1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[334],{4835:function(e,t,n){"use strict";var i,r;n.d(t,{qX:function(){return c},vs:function(){return d},WC:function(){return p},PS:function(){return f},FB:function(){return u},wp:function(){return h},rZ:function(){return g}});let o={},a={},s=(e,t)=>{a[e]=t},l=e=>{class t extends Error{cause;constructor(n,i,r){if(super(n||e,r),Object.setPrototypeOf(this,t.prototype),this.name=e,i)for(let e in i)this[e]=i[e];if(r&&"object"==typeof r&&"cause"in r&&!this.cause){let e=r.cause;this.cause=e,"stack"in e&&(this.stack=this.stack+"\nCAUSE: "+e.stack)}}}return o[e]=t,t};l("AccountNameRequired"),l("AccountNotSupported"),l("AccountAwaitingSendPendingOperations"),l("AmountRequired"),l("BluetoothRequired"),l("BtcUnmatchedApp"),l("CantOpenDevice"),l("CashAddrNotSupported"),l("ClaimRewardsFeesWarning"),l("CurrencyNotSupported"),l("DeviceAppVerifyNotSupported"),l("DeviceGenuineSocketEarlyClose"),l("DeviceNotGenuine"),l("DeviceOnDashboardExpected"),l("DeviceOnDashboardUnexpected"),l("DeviceInOSUExpected"),l("DeviceHalted"),l("DeviceNameInvalid"),l("DeviceSocketFail"),l("DeviceSocketNoBulkStatus"),l("DeviceSocketNoBulkStatus"),l("UnresponsiveDeviceError");let c=l("DisconnectedDevice"),d=l("DisconnectedDeviceDuringOperation");l("DeviceExtractOnboardingStateError"),l("DeviceOnboardingStatePollingError"),l("EnpointConfig"),l("EthAppPleaseEnableContractData"),l("FeeEstimationFailed"),l("FirmwareNotRecognized"),l("HardResetFail"),l("InvalidXRPTag"),l("InvalidAddress"),l("InvalidNonce"),l("InvalidAddressBecauseDestinationIsAlsoSource"),l("LatestMCUInstalledError"),l("LatestFirmwareVersionRequired"),l("UnknownMCU"),l("LedgerAPIError"),l("LedgerAPIErrorWithMessage"),l("LedgerAPINotAvailable"),l("ManagerAppAlreadyInstalled"),l("ManagerAppRelyOnBTC"),l("ManagerAppDepInstallRequired"),l("ManagerAppDepUninstallRequired"),l("ManagerDeviceLocked"),l("ManagerFirmwareNotEnoughSpace"),l("ManagerNotEnoughSpace"),l("ManagerUninstallBTCDep"),l("NetworkDown"),l("NetworkError"),l("NoAddressesFound"),l("NotEnoughBalance"),l("NotEnoughBalanceFees"),l("NotEnoughBalanceSwap"),l("NotEnoughBalanceToDelegate"),l("UnstakeNotEnoughStakedBalanceLeft"),l("RestakeNotEnoughStakedBalanceLeft"),l("NotEnoughToRestake"),l("NotEnoughToUnstake"),l("NotEnoughBalanceInParentAccount"),l("NotEnoughSpendableBalance"),l("NotEnoughBalanceBecauseDestinationNotCreated"),l("NotEnoughToStake"),l("NoAccessToCamera"),l("NotEnoughGas"),l("NotEnoughGasSwap"),l("TronEmptyAccount"),l("MaybeKeepTronAccountAlive"),l("NotSupportedLegacyAddress"),l("GasLessThanEstimate"),l("PriorityFeeTooLow"),l("PriorityFeeTooHigh"),l("PriorityFeeHigherThanMaxFee"),l("MaxFeeTooLow"),l("PasswordsDontMatch"),l("PasswordIncorrect"),l("RecommendSubAccountsToEmpty"),l("RecommendUndelegation"),l("TimeoutTagged"),l("UnexpectedBootloader"),l("MCUNotGenuineToDashboard"),l("RecipientRequired"),l("UnavailableTezosOriginatedAccountReceive"),l("UnavailableTezosOriginatedAccountSend"),l("UpdateFetchFileFail"),l("UpdateIncorrectHash"),l("UpdateIncorrectSig"),l("UpdateYourApp"),l("UserRefusedDeviceNameChange"),l("UserRefusedAddress"),l("UserRefusedFirmwareUpdate"),l("UserRefusedAllowManager"),l("UserRefusedOnDevice"),l("PinNotSet"),l("ExpertModeRequired");let u=l("TransportOpenUserCancelled");l("TransportInterfaceNotAvailable");let h=l("TransportRaceCondition");l("TransportWebUSBGestureRequired"),l("TransactionHasBeenValidatedError"),l("TransportExchangeTimeoutError"),l("DeviceShouldStayInApp"),l("WebsocketConnectionError"),l("WebsocketConnectionFailed"),l("WrongDeviceForAccount"),l("WrongDeviceForAccountPayout"),l("MissingSwapPayloadParamaters"),l("WrongDeviceForAccountRefund"),l("WrongAppForCurrency"),l("ETHAddressNonEIP"),l("CantScanQRCode"),l("FeeNotLoaded"),l("FeeNotLoadedSwap"),l("FeeRequired"),l("FeeTooHigh"),l("PendingOperation"),l("SyncError"),l("PairingFailed"),l("PeerRemovedPairing"),l("GenuineCheckFailed"),l("LedgerAPI4xx"),l("LedgerAPI5xx"),l("FirmwareOrAppUpdateRequired"),l("ReplacementTransactionUnderpriced"),l("OpReturnSizeLimit"),l("DustLimit"),l("HederaInsufficientFundsForAssociation"),l("HederaRecipientTokenAssociationRequired"),l("HederaRecipientTokenAssociationUnverified"),l("LanguageNotFound"),l("NoDBPathGiven"),l("DBWrongPassword"),l("DBNotReset"),l("SequenceNumberError"),l("DisabledTransactionBroadcastError"),(r=i||(i={})).Unknown="Unknown",r.LocationServicesDisabled="LocationServicesDisabled",r.LocationServicesUnauthorized="LocationServicesUnauthorized",r.BluetoothScanStartFailed="BluetoothScanStartFailed";
1class f extends Error{id;constructor(e,t){let n="TransportError";super(e||n),this.name=n,this.message=e,this.stack=Error(e).stack,this.id=t}}s("TransportError",e=>new f(e.message,e.id));let p={ACCESS_CONDITION_NOT_FULFILLED:38916,ALGORITHM_NOT_SUPPORTED:38020,CLA_NOT_SUPPORTED:28160,CODE_BLOCKED:38976,CODE_NOT_INITIALIZED:38914,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,CONDITIONS_OF_USE_NOT_SATISFIED:27013,CONTRADICTION_INVALIDATION:38928,CONTRADICTION_SECRET_CODE_STATUS:38920,DEVICE_IN_RECOVERY_MODE:26159,CUSTOM_IMAGE_EMPTY:26158,FILE_ALREADY_EXISTS:27273,FILE_NOT_FOUND:37892,GP_AUTH_FAILED:25344,HALTED:28586,INCONSISTENT_FILE:37896,INCORRECT_DATA:27264,INCORRECT_LENGTH:26368,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,DEVICE_NOT_ONBOARDED:27911,DEVICE_NOT_ONBOARDED_2:26129,INVALID_KCV:38021,INVALID_OFFSET:37890,LICENSING:28482,LOCKED_DEVICE:21781,MAX_VALUE_REACHED:38992,MEMORY_PROBLEM:37440,MISSING_CRITICAL_PARAMETER:26624,NO_EF_SELECTED:37888,NOT_ENOUGH_MEMORY_SPACE:27268,OK:36864,PIN_REMAINING_ATTEMPTS:25536,REFERENCED_DATA_NOT_FOUND:27272,SECURITY_STATUS_NOT_SATISFIED:27010,TECHNICAL_PROBLEM:28416,UNKNOWN_APDU:27906,USER_REFUSED_ON_DEVICE:21761,NOT_ENOUGH_SPACE:20738,APP_NOT_FOUND_OR_INVALID_CONTEXT:20771,INVALID_APP_NAME_LENGTH:26378,GEN_AES_KEY_FAILED:21529,INTERNAL_CRYPTO_OPERATION_FAILED:21530,INTERNAL_COMPUTE_AES_CMAC_FAILED:21531,ENCRYPT_APP_STORAGE_FAILED:21532,INVALID_BACKUP_STATE:26178,PIN_NOT_SET:21762,INVALID_BACKUP_LENGTH:26419,INVALID_RESTORE_STATE:26179,INVALID_CHUNK_LENGTH:26420,INVALID_BACKUP_HEADER:26698,TRUSTCHAIN_WRONG_SEED:45063};class g extends Error{statusCode;statusText;constructor(e,{canBeMappedToChildError:t=!0}={}){let n=Object.keys(p).find(t=>p[t]===e)||"UNKNOWN_ERROR",i=function(e){switch(e){case 26368:return"Incorrect length";case 26624:return"Missing critical parameter";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received";case 21781:return"Locked device"}if(28416<=e&&e<=28671)return"Internal error, please report"}(e)||n,r=e.toString(16),o=`Ledger device: ${i} (0x${r})`;if(super(o),this.name="TransportStatusError",this.statusCode=e,this.statusText=n,Object.setPrototypeOf(this,g.prototype),t&&e===p.LOCKED_DEVICE)return new w(o)}}class w extends g{constructor(e){super(p.LOCKED_DEVICE,{canBeMappedToChildError:!1}),e&&(this.message=e),this.name="LockedDeviceError",Object.setPrototypeOf(this,w.prototype)}}s("TransportStatusError",e=>new g(e.statusCode))},6022:function(e,t,n){"use strict";n.d(t,{WC:function(){return o.WC},ZP:function(){return l},rZ:function(){return o.rZ}});var i=n(5445),r=n.n(i),o=n(4835),a=n(1832),s=n(2957).Buffer;class l{exchangeTimeout=3e4;unresponsiveTimeout=15e3;deviceModel=null;tracer;constructor({context:e,logType:t}={}){this.tracer=new a.O$(t??"transport",e)}static isSupported;static list;static listen;static open;exchange(e,{abortTimeoutMs:t}={}){throw Error("exchange not implemented")}exchangeBulk(e,t){let n=!1;return(async()=>{if(!n)for(let i of e){let e=await this.exchange(i);if(n)return;let r=e.readUInt16BE(e.length-2);if(r!==o.WC.OK)throw new o.rZ(r);t.next(e)}})().then(()=>!n&&t.complete(),e=>!n&&t.error(e)),{unsubscribe:()=>{n=!0}}}setScrambleKey(e){}close(){return Promise.resolve()}_events=new(r());on(e,t){this._events.on(e,t)}off(e,t){this._events.removeListener(e,t)}emit(e,...t){this._events.emit(e,...t)}setDebugMode(){console.warn("setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore.")}setExchangeTimeout(e){this.exchangeTimeout=e}setExchangeUnresponsiveTimeout(e){this.unresponsiveTimeout=e}send=async(e,t,n,i,r=s.alloc(0),a=[o.WC.OK],{abortTimeoutMs:l}={})=>{let c=this.tracer.withUpdatedContext({function:"send"});if(r.length>=256)throw c.trace("data.length exceeded 256 bytes limit",{dataLength:r.length}),new o.PS("data.length exceed 256 bytes limit. Got: "+r.length,"DataLengthTooBig");c.trace("Starting an exchange",{abortTimeoutMs:l});let d=await this.exchange(s.concat([s.from([e,t,n,i]),s.from([r.length]),r]),{abortTimeoutMs:l});c.trace("Received response from exchange");let u=d.readUInt16BE(d.length-2);if(!a.some(e=>e===u))throw new o.rZ(u);return d};static create(e=3e3,t){return new Promise((n,i)=>{let r=!1,a=this.listen({next:t=>{r=!0,a&&a.unsubscribe(),s&&clearTimeout(s),this.open(t.descriptor,e).then(n,i)},error:e=>{s&&clearTimeout(s),i(e)},complete:()=>{s&&clearTimeout(s),r||i(new o.PS(this.ErrorMessage_NoDeviceFound,"NoDeviceFound"))}}),s=t?setTimeout(()=>{a.unsubscribe(),i(new o.PS(this.ErrorMessage_ListenTimeout,"ListenTimeout"))},t):null})}exchangeBusyPromise;async exchangeAtomicImpl(e){let t;let n=this.tracer.withUpdatedContext({function:"exchangeAtomicImpl",unresponsiveTimeout:this.unresponsiveTimeout});if(this.exchangeBusyPromise)throw n.trace("Atomic exchange is already busy"),new o.wp("An action was already pending on the Ledger device. Please deny or reconnect.");let i=new Promise(e=>{t=e});this.exchangeBusyPromise=i;let r=!1,a=setTimeout(()=>{n.trace('Timeout reached, emitting Transport event "unresponsive"',{unresponsiveTimeout:this.unresponsiveTimeout}
1),r=!0,this.emit("unresponsive")},this.unresponsiveTimeout);try{let t=await e();return r&&(n.trace("Device was unresponsive, emitting responsive"),this.emit("responsive")),t}finally{n.trace("Finalize, clearing busy guard"),clearTimeout(a),t&&t(),this.exchangeBusyPromise=null}}decorateAppAPIMethods(e,t,n){for(let i of t)e[i]=this.decorateAppAPIMethod(i,e[i],e,n)}_appAPIlock=null;decorateAppAPIMethod(e,t,n,i){return async(...r)=>{let{_appAPIlock:a}=this;if(a)return Promise.reject(new o.PS("Ledger Device is busy (lock "+a+")","TransportLocked"));try{return this._appAPIlock=e,this.setScrambleKey(i),await t.apply(n,r)}finally{this._appAPIlock=null}}}setTraceContext(e){this.tracer=this.tracer.withContext(e)}updateTraceContext(e){this.tracer.updateContext(e)}getTraceContext(){return this.tracer.getContext()}static ErrorMessage_ListenTimeout="No Ledger device found (timeout)";static ErrorMessage_NoDeviceFound="No Ledger device found"}},1832:function(e,t,n){"use strict";n.d(t,{O$:function(){return s},cM:function(){return o}});let i=0,r=[],o=(e,t,n)=>{let r={type:e,id:String(++i),date:new Date};t&&(r.message=t),n&&(r.data=n),l(r)},a=({type:e,message:t,data:n,context:r})=>{let o={type:e,id:String(++i),date:new Date};t&&(o.message=t),n&&(o.data=n),r&&(o.context=r),l(o)};class s{type;context;constructor(e,t){this.type=e,this.context=t}trace(e,t){a({type:this.type,message:e,data:t,context:this.context})}getContext(){return this.context}setContext(e){this.context=e}updateContext(e){this.context={...this.context,...e}}getType(){return this.type}setType(e){this.type=e}withType(e){return new s(e,this.context)}withContext(e){return new s(this.type,e)}withUpdatedContext(e){return new s(this.type,{...this.context,...e})}}function l(e){for(let t=0;t<r.length;t++)try{r[t](e)}catch(e){console.error(e)}}"undefined"!=typeof window&&(window.__ledgerLogsListen=e=>(r.push(e),()=>{let t=r.indexOf(e);-1!==t&&(r[t]=r[r.length-1],r.pop())}))},8595:function(e,t,n){"use strict";n.d(t,{Analytics:function(){return p}});
1var i=n(2265),r=n(5475),o=n(5566),a=()=>{window.va||(window.va=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];(window.vaq=window.vaq||[]).push(t)})};function s(){return"undefined"!=typeof window}function l(){return"production"}function c(){return"development"===((s()?window.vam:l())||"production")}function d(e){return new RegExp("/".concat(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"(?=[/?#]|$)"))}function u(e){return(0,i.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,i.useEffect)(()=>{var t;!function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{debug:!0};if(!s())return;(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto";if("auto"===e){window.vam=l();return}window.vam=e})(t.mode),a(),t.beforeSend&&(null==(e=window.va)||e.call(window,"beforeSend",t.beforeSend));let n=t.scriptSrc?t.scriptSrc:c()?"https://va.vercel-scripts.com/v1/script.debug.js":t.basePath?"".concat(t.basePath,"/insights/script.js"):"/_vercel/insights/script.js";if(document.head.querySelector('script[src*="'.concat(n,'"]')))return;let i=document.createElement("script");i.src=n,i.defer=!0,i.dataset.sdkn="@vercel/analytics"+(t.framework?"/".concat(t.framework):""),i.dataset.sdkv="1.5.0",t.disableAutoTrack&&(i.dataset.disableAutoTrack="1"),t.endpoint?i.dataset.endpoint=t.endpoint:t.basePath&&(i.dataset.endpoint="".concat(t.basePath,"/insights")),t.dsn&&(i.dataset.dsn=t.dsn),i.onerror=()=>{let e=c()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log("[Vercel Web Analytics] Failed to load script from ".concat(n,". ").concat(e))},c()&&!1===t.debug&&(i.dataset.debug="false"),document.head.appendChild(i)}({framework:e.framework||"react",basePath:null!==(t=e.basePath)&&void 0!==t?t:function(){if(void 0!==o&&void 0!==o.env)return o.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,i.useEffect)(()=>{e.route&&e.path&&function(e){var t;let{route:n,path:i}=e;null==(t=window.va)||t.call(window,"pageview",{route:n,path:i})}({route:e.route,path:e.path})},[e.route,e.path]),null}var h=()=>{let e=(0,r.useParams)(),t=(0,r.useSearchParams)(),n=(0,r.usePathname)();return e?{route:function(e,t){if(!e||!t)return e;let n=e;try{let e=Object.entries(t);for(let[t,i]of e)if(!Array.isArray(i)){let e=d(i);e.test(n)&&(n=n.replace(e,"/[".concat(t,"]")))}for(let[t,i]of e)if(Array.isArray(i)){let e=d(i.join("/"));e.test(n)&&(n=n.replace(e,"/[...".concat(t,"]")))}return n}catch(t){return e}}(n,Object.keys(e).length?e:Object.fromEntries(t.entries())),path:n}:{route:null,path:n}};function f(e){let{route:t,path:n}=h();return i.createElement(u,{path:n,route:t,...e,basePath:function(){if(void 0!==o&&void 0!==o.env)return o.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}(),framework:"next"})}function p(e){return i.createElement(i.Suspense,{fallback:null},i.createElement(f,{...e}))}},8282:function(e){"use strict";e.exports=function(e){if(e.length>=255)throw TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var i=0;i<e.length;i++){var r=e.charAt(i),o=r.charCodeAt(0);if(255!==t[o])throw TypeError(r+" is ambiguous");t[o]=i}var a=e.length,s=e.charAt(0),l=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function d(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;for(var n=0,i=0,r=0;e[n]===s;)i++,n++;for(var o=(e.length-n)*l+1>>>0,c=new Uint8Array(o);e[n];){var d=e.charCodeAt(n);if(d>255)return;var u=t[d];if(255===u)return;for(var h=0,f=o-1;(0!==u||h<r)&&-1!==f;f--,h++)u+=a*c[f]>>>0,c[f]=u%256>>>0,u=u/256>>>0;if(0!==u)throw Error("Non-zero carry");r=h,n++}for(var p=o-r;p!==o&&0===c[p];)p++;for(var g=new Uint8Array(i+(o-p)),w=i;p!==o;)g[w++]=c[p++];return g}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,i=0,r=0,o=t.length;r!==o&&0===t[r];)r++,n++;for(var l=(o-r)*c+1>>>0,d=new Uint8Array(l);r!==o;){for(var u=t[r],h=0,f=l-1;(0!==u||h<i)&&-1!==f;f--,h++)u+=256*d[f]>>>0,d[f]=u%a>>>0,u=u/a>>>0;if(0!==u)throw Error("Non-zero carry");i=h,r++}for(var p=l-i;p!==l&&0===d[p];)p++;for(var g=s.repeat(n);p<l;++p)g+=e.charAt(d[p]);return g},decodeUnsafe:d,decode:function(e){var t=d(e);if(t)return t;throw Error("Non-base"+a+" character")}}}},9147:function(e,t,n){let i=n(8282);e.exports=i("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},6946:function(e){"use strict";var t={single_source_shortest_paths:function(e,n,i){var r,o,a,s,l,c,d,u={},h={};h[n]=0;var f=t.PriorityQueue.make();for(f.push(n,0);!f.empty();)for(a in o=(r=f.pop()).value,s=r.cost,l=e[o]||{})l.hasOwnProperty(a)&&(c=s+l[a],d=h[a],(void 0===h[a]||d>c)&&(h[a]=c,f.push(a,c),u[a]=o));if(void 0!==i&&void 0===h[i])throw Error(["Could not find a path from ",n," to ",i,"."].join(""));return u},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],i=t;i;)n.push(i),e[i],i=e[i];return n.reverse(),n},find_path:function(e,n,i){var r=t.single_source_shortest_paths(e,n,i);return t.extract_shortest_path_from_predecessor_list(r,i)},PriorityQueue:{make:function(e){var n,i=t.PriorityQueue,r={};for(n in e=e||{},i)i.hasOwnProperty(n)&&(r[n]=i[n]);return r.queue=[],r.sorter=e.sorter||i.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){this.queue.push({value:e,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},5445:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(n,i){var r;function o(n){e.removeListener(t,a),i(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,a,{once:!0}),"error"!==t&&(r={once:!0},"function"==typeof e.on&&g(e,"error",o,r))})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,i){if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=i?[n,a]:[a,n]:i?a.unshift(n):a.push(n),(r=l(e))>0&&a.length>r&&!a.warned){a.warned=!0;var r,o,a,c=Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,console&&console.warn&&console.warn(c)}return e}function d(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=d.bind(i);return r.listener=n,i.wrapFn=r,r}function h(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):p(r,r.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=Array(t),i=0;i<t;++i)n[i]=e[i];return n}function g(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else if("function"==typeof e.addEventListener)e.addEventListener(t,function r(o){i.once&&e.removeEventListener(t,r),n(o)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
1,set:function(e){if("number"!=typeof e||e<0||r(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var a,s=Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else for(var c=l.length,d=p(l,c),n=0;n<c;++n)i(d[n],this,t);return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,u(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,u(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,i,r,o,a;if(s(t),void 0===(i=this._events)||void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0==arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},5819:function(e,t,n){let i=n(4888),r=n(2216),o=n(962),a=n(5623);function s(e,t,n,o,a){let s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!i())throw Error("Callback required as last argument");if(c){if(l<2)throw Error("Too few arguments provided");2===l?(a=n,n=t,t=o=void 0):3===l&&(t.getContext&&void 0===a?(a=o,o=void 0):(a=o,o=n,n=t,t=void 0))}else{if(l<1)throw Error("Too few arguments provided");return 1===l?(n=t,t=o=void 0):2!==l||t.getContext||(o=n,n=t,t=void 0),new Promise(function(i,a){try{let a=r.create(n,o);i(e(a,t,o))}catch(e){a(e)}})}try{let i=r.create(n,o);a(null,e(i,t,o))}catch(e){a(e)}}t.create=r.create,t.toCanvas=s.bind(null,o.render),t.toDataURL=s.bind(null,o.renderToDataURL),t.toString=s.bind(null,function(e,t,n){return a.render(e,n)})},4888:function(e){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},4691:function(e,t,n){let i=n(2415).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,n=i(e),r=145===n?26:2*Math.ceil((n-13)/(2*t-2)),o=[n-7];for(let e=1;e<t-1;e++)o[e]=o[e-1]-r;return o.push(6),o.reverse()},t.getPositions=function(e){let n=[],i=t.getRowColCoords(e),r=i.length;for(let e=0;e<r;e++)for(let t=0;t<r;t++)(0!==e||0!==t)&&(0!==e||t!==r-1)&&(e!==r-1||0!==t)&&n.push([i[e],i[t]]);return n}},7111:function(e,t,n){let i=n(7956),r=["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 o(e){this.mode=i.ALPHANUMERIC,this.data=e}o.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*r.indexOf(this.data[t]);n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},e.exports=o},9298:function(e){function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){return(this.buffer[Math.floor(e/8)]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},5526:function(e){function t(e){if(!e||e<1)throw 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)}t.prototype.set=function(e,t,n,i){let r=e*this.size+t;this.data[r]=n,i&&(this.reservedBit[r]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},8153:function(e,t,n){let i=n(7956);function r(e){this.mode=i.BYTE,"string"==typeof e?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}r.getBitsLength=function(e){return 8*e},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=r},9386:function(e,t,n){let i=n(9947),r=[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],o=[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];t.getBlocksCount=function(e,t){switch(t){case i.L:return r[(e-1)*4+0];case i.M:return r[(e-1)*4+1];case i.Q:return r[(e-1)*4+2];case i.H:return r[(e-1)*4+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case i.L:return o[(e-1)*4+0];case i.M:return o[(e-1)*4+1];case i.Q:return o[(e-1)*4+2];case i.H:return o[(e-1)*4+3];default:return}}},9947: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 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 Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}},4086:function(e,t,n){let i=n(2415).getSymbolSize;t.getPositions=function(e){let t=i(e);return[[0,0],[t-7,0],[0,t-7]]}},7433:function(e,t,n){let i=n(2415),r=i.getBCHDigit(1335);t.getEncodedBits=function(e,t){let n=e.bit<<3|t,o=n<<10;for(;i.getBCHDigit(o)-r>=0;)o^=1335<<i.getBCHDigit(o)-r;return(n<<10|o)^21522}},3384:function(e,t){let n=new Uint8Array(512),i=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)n[t]=e,i[e]=t,256&(e<<=1)&&(e^=285);for(let e=255;e<512;e++)n[e]=n[e-255]}(),t.log=function(e){if(e<1)throw Error("log("+e+")");return i[e]},t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[i[e]+i[t]]}},8514:function(e,t,n){let i=n(7956),r=n(2415);function o(e){this.mode=i.KANJI,this.data=e}o.getBitsLength=function(e){return 13*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n=(n>>>8&255)*192+(255&n),e.put(n,13)}},e.exports=o},4483:function(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};let n={N1:3,N2:3,N3:40,N4:10};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){let t=e.size,i=0,r=0,o=0,a=null,s=null;for(let l=0;l<t;l++){r=o=0,a=s=null;for(let c=0;c<t;c++){let t=e.get(l,c);t===a?r++:(r>=5&&(i+=n.N1+(r-5)),a=t,r=1),(t=e.get(c,l))===s?o++:(o>=5&&(i+=n.N1+(o-5)),s=t,o=1)}r>=5&&(i+=n.N1+(r-5)),o>=5&&(i+=n.N1+(o-5))}return i},t.getPenaltyN2=function(e){let t=e.size,i=0;for(let n=0;n<t-1;n++)for(let r=0;r<t-1;r++){let t=e.get(n,r)+e.get(n,r+1)+e.get(n+1,r)+e.get(n+1,r+1);(4===t||0===t)&&i++}return i*n.N2},t.getPenaltyN3=function(e){let t=e.size,i=0,r=0,o=0;for(let n=0;n<t;n++){r=o=0;for(let a=0;a<t;a++)r=r<<1&2047|e.get(n,a),a>=10&&(1488===r||93===r)&&i++,o=o<<1&2047|e.get(a,n),a>=10&&(1488===o||93===o)&&i++}return i*n.N3},t.getPenaltyN4=function(e){let t=0,i=e.data.length;for(let n=0;n<i;n++)t+=e.data[n];return Math.abs(Math.ceil(100*t/i/5)-10)*n.N4},t.applyMask=function(e,n){let i=n.size;for(let r=0;r<i;r++)for(let o=0;o<i;o++)n.isReserved(o,r)||n.xor(o,r,function(e,n,i){switch(e){case t.Patterns.PATTERN000:return(n+i)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return i%3==0;case t.Patterns.PATTERN011:return(n+i)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2==0;case t.Patterns.PATTERN101:return n*i%2+n*i%3==0;case t.Patterns.PATTERN110:return(n*i%2+n*i%3)%2==0;case t.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,o,r))},t.getBestMask=function(e,n){let i=Object.keys(t.Patterns).length,r=0,o=1/0;for(let a=0;a<i;
vendor: 10,213 bytes, line 1
1a++){n(a),t.applyMask(a,e);let i=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),i<o&&(o=i,r=a)}return r}},7956:function(e,t,n){let i=n(6623),r=n(581);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 Error("Invalid mode: "+e);if(!i.isValid(t))throw 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 r.testNumeric(e)?t.NUMERIC:r.testAlphanumeric(e)?t.ALPHANUMERIC:r.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw 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 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 Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},1687:function(e,t,n){let i=n(7956);function r(e){this.mode=i.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n;for(t=0;t+3<=this.data.length;t+=3)n=parseInt(this.data.substr(t,3),10),e.put(n,10);let i=this.data.length-t;i>0&&(n=parseInt(this.data.substr(t),10),e.put(n,3*i+1))},e.exports=r},6413:function(e,t,n){let i=n(3384);t.mul=function(e,t){let n=new Uint8Array(e.length+t.length-1);for(let r=0;r<e.length;r++)for(let o=0;o<t.length;o++)n[r+o]^=i.mul(e[r],t[o]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){let e=n[0];for(let r=0;r<t.length;r++)n[r]^=i.mul(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,i.exp(r)]));return n}},2216:function(e,t,n){let i=n(2415),r=n(9947),o=n(9298),a=n(5526),s=n(4691),l=n(4086),c=n(4483),d=n(9386),u=n(4011),h=n(3379),f=n(7433),p=n(7956),g=n(9940);function w(e,t,n){let i,r;let o=e.size,a=f.getEncodedBits(t,n);for(i=0;i<15;i++)r=(a>>i&1)==1,i<6?e.set(i,8,r,!0):i<8?e.set(i+1,8,r,!0):e.set(o-15+i,8,r,!0),i<8?e.set(8,o-i-1,r,!0):i<9?e.set(8,15-i-1+1,r,!0):e.set(8,15-i-1,r,!0);e.set(o-8,8,1,!0)}t.create=function(e,t){let n,f;if(void 0===e||""===e)throw Error("No input text");let m=r.M;return void 0!==t&&(m=r.from(t.errorCorrectionLevel,r.M),n=h.from(t.version),f=c.from(t.maskPattern),t.toSJISFunc&&i.setToSJISFunction(t.toSJISFunc)),function(e,t,n,r){let f;if(Array.isArray(e))f=g.fromArray(e);else if("string"==typeof e){let i=t;if(!i){let t=g.rawSplit(e);i=h.getBestVersionForData(t,n)}f=g.fromString(e,i||40)}else throw Error("Invalid data");let m=h.getBestVersionForData(f,n);if(!m)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<m)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+m+".\n")}else t=m;let y=function(e,t,n){let r=new o;n.forEach(function(t){r.put(t.mode.bit,4),r.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(r)});let a=(i.getSymbolTotalCodewords(e)-d.getTotalCodewordsCount(e,t))*8;for(r.getLengthInBits()+4<=a&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);let s=(a-r.getLengthInBits())/8;for(let e=0;e<s;e++)r.put(e%2?17:236,8);return function(e,t,n){let r,o;let a=i.getSymbolTotalCodewords(t),s=a-d.getTotalCodewordsCount(t,n),l=d.getBlocksCount(t,n),c=a%l,h=l-c,f=Math.floor(a/l),p=Math.floor(s/l),g=p+1,w=f-p,m=new u(w),y=0,v=Array(l),E=Array(l),M=0,b=new Uint8Array(e.buffer);for(let e=0;e<l;e++){let t=e<h?p:g;v[e]=b.slice(y,y+t),E[e]=m.encode(v[e]),y+=t,M=Math.max(M,t)}let S=new Uint8Array(a),N=0;for(r=0;r<M;r++)for(o=0;o<l;o++)r<v[o].length&&(S[N++]=v[o][r]);for(r=0;r<w;r++)for(o=0;o<l;o++)S[N++]=E[o][r];return S}(r,e,t)}(t,n,f),v=new a(i.getSymbolSize(t));return function(e,t){let n=e.size,i=l.getPositions(t);for(let t=0;t<i.length;t++){let r=i[t][0],o=i[t][1];for(let t=-1;t<=7;t++)if(!(r+t<=-1)&&!(n<=r+t))for(let i=-1;i<=7;i++)o+i<=-1||n<=o+i||(t>=0&&t<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===t||6===t)||t>=2&&t<=4&&i>=2&&i<=4?e.set(r+t,o+i,!0,!0):e.set(r+t,o+i,!1,!0))}}(v,t),function(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(v),function(e,t){let n=s.getPositions(t);for(let t=0;t<n.length;t++){let i=n[t][0],r=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(i+t,r+n,!0,!0):e.set(i+t,r+n,!1,!0)}}(v,t),w(v,n,0),t>=7&&function(e,t){let n,i,r;let o=e.size,a=h.getEncodedBits(t);for(let t=0;t<18;t++)n=Math.floor(t/3),i=t%3+o-8-3,r=(a>>t&1)==1,e.set(n,i,r,!0),e.set(i,n,r,!0)}(v,t),function(e,t){let n=e.size,i=-1,r=n-1,o=7,a=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(r,s-n)){let i=!1;a<t.length&&(i=(t[a]>>>o&1)==1),e.set(r,s-n,i),-1==--o&&(a++,o=7)}if((r+=i)<0||n<=r){r-=i,i=-i;break}}}(v,y),isNaN(r)&&(r=c.getBestMask(v,w.bind(null,v,n))),c.applyMask(r,v),w(v,n,r),{modules:v,version:t,errorCorrectionLevel:n,maskPattern:r,segments:f}}(e,n,m,f)}},4011:function(e,t,n){let i=n(6413);function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=i.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let n=i.mod(t,this.genPoly),r=this.degree-n.length;if(r>0){let e=new Uint8Array(this.degree);return e.set(n,r),e}return n},e.exports=r},581:function(e,t){let n="[0-9]+",i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",r="(?:(?![A-Z0-9 $%*+\\-./:]|"+(i=i.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(i,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(r,"g"),t.NUMERIC=RegExp(n,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let o=RegExp("^"+i+"$"),a=RegExp("^"+n+"$"),s=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},9940:function(e,t,n){let i=n(7956),r=n(1687),o=n(7111),a=n(8153),s=n(8514),l=n(581),c=n(2415),d=n(6946);function u(e){return unescape(encodeURIComponent(e)).length}function h(e,t,n){let i;let r=[];for(;null!==(i=e.exec(n));)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function f(e){let t,n;let r=h(l.NUMERIC,i.NUMERIC,e),o=h(l.ALPHANUMERIC,i.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=h(l.BYTE,i.BYTE,e),n=h(l.KANJI,i.KANJI,e)):(t=h(l.BYTE_KANJI,i.BYTE,e),n=[]),r.concat(o,t,n).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function p(e,t){switch(t){case i.NUMERIC:return r.getBitsLength(e);case i.ALPHANUMERIC:return o.getBitsLength(e);case i.KANJI:return s.getBitsLength(e);case i.BYTE:return a.getBitsLength(e)}}function g(e,t){let n;let l=i.getBestModeForData(e);if((n=i.from(t,l))!==i.BYTE&&n.bit<l.bit)throw Error('"'+e+'" cannot be encoded with mode '+i.toString(n)+".\n Suggested mode is: "+i.toString(l));switch(n!==i.KANJI||c.isKanjiModeEnabled()||(n=i.BYTE),n){case i.NUMERIC:return new r(e);case i.ALPHANUMERIC:return new o(e);case i.KANJI:return new s(e);case i.BYTE:return new a(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},t.fromString=function(e,n){let r=function(e,t){let n={},r={start:{}},o=["start"];for(let a=0;a<e.length;a++){let s=e[a],l=[];for(let e=0;e<s.length;e++){let c=s[e],d=""+a+e;l.push(d),n[d]={node:c,lastCount:0},r[d]={};for(let e=0;e<o.length;e++){let a=o[e];n[a]&&n[a].node.mode===c.mode?(r[a][d]=p(n[a].lastCount+c.length,c.mode)-p(n[a].lastCount,c.mode),n[a].lastCount+=c.length):(n[a]&&(n[a].lastCount=c.length),r[a][d]=p(c.length,c.mode)+4+i.getCharCountIndicator(c.mode,t))}}o=l}for(let e=0;e<o.length;e++)r[o[e]].end=0;return{map:r,table:n}}(function(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];switch(r.mode){case i.NUMERIC:t.push([r,{data:r.data,mode:i.ALPHANUMERIC,length:r.length},{data:r.data,mode:i.BYTE,length:r.length}]);break;case i.ALPHANUMERIC:t.push([r,{data:r.data,mode:i.BYTE,length:r.length}]);break;case i.KANJI:t.push([r,{data:r.data,mode:i.BYTE,length:u(r.data)}]);break;case i.BYTE:t.push([{data:r.data,mode:i.BYTE,length:u(r.data)}])}}return t}(f(e,c.isKanjiModeEnabled())),n),o=d.find_path(r.map,"start","end"),a=[];for(let e=1;e<o.length-1;e++)a.push(r.table[o[e]].node);return t.fromArray(a.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?e[e.length-1].data+=t.data:e.push(t),e},[]))},t.rawSplit=function(e){return t.fromArray(f(e,c.isKanjiModeEnabled()))}},2415:function(e,t){let n;let i=[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];t.getSymbolSize=function(e){if(!e)throw Error('"version" cannot be null or undefined');if(e<1||e>40)throw Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return i[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},6623:function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},3379:function(e,t,n){let i=n(2415),r=n(9386),o=n(9947),a=n(7956),s=n(6623),l=i.getBCHDigit
1(7973);function c(e,t){return a.getCharCountIndicator(e,t)+4}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!s.isValid(e))throw Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);let o=(i.getSymbolTotalCodewords(e)-r.getTotalCodewordsCount(e,t))*8;if(n===a.MIXED)return o;let l=o-c(n,e);switch(n){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,n){let i;let r=o.from(n,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let i=1;i<=40;i++)if(function(e,t){let n=0;return e.forEach(function(e){let i=c(e.mode,t);n+=i+e.getBitsLength()}),n}(e,i)<=t.getCapacity(i,n,a.MIXED))return i}(e,r);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,n,i){for(let r=1;r<=40;r++)if(n<=t.getCapacity(r,i,e))return r}(i.mode,i.getLength(),r)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;i.getBCHDigit(t)-l>=0;)t^=7973<<i.getBCHDigit(t)-l;return e<<12|t}},962:function(e,t,n){let i=n(7220);t.render=function(e,t,n){var r;let o=n,a=t;void 0!==o||t&&t.getContext||(o=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),o=i.getOptions(o);let s=i.getImageWidth(e.modules.size,o),l=a.getContext("2d"),c=l.createImageData(s,s);return i.qrToImageData(c.data,e,o),r=a,l.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=s,r.width=s,r.style.height=s+"px",r.style.width=s+"px",l.putImageData(c,0,0),a},t.renderToDataURL=function(e,n,i){let r=i;void 0!==r||n&&n.getContext||(r=n,n=void 0),r||(r={});let o=t.render(e,n,r),a=r.type||"image/png",s=r.rendererOpts||{};return o.toDataURL(a,s.quality)}},5623:function(e,t,n){let i=n(7220);function r(e,t){let n=e.a/255,i=t+'="'+e.hex+'"';return n<1?i+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function o(e,t,n){let i=e+t;return void 0!==n&&(i+=" "+n),i}t.render=function(e,t,n){let a=i.getOptions(t),s=e.modules.size,l=e.modules.data,c=s+2*a.margin,d=a.color.light.a?"<path "+r(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",u="<path "+r(a.color.dark,"stroke")+' d="'+function(e,t,n){let i="",r=0,a=!1,s=0;for(let l=0;l<e.length;l++){let c=Math.floor(l%t),d=Math.floor(l/t);c||a||(a=!0),e[l]?(s++,l>0&&c>0&&e[l-1]||(i+=a?o("M",c+n,.5+d+n):o("m",r,0),r=0,a=!1),c+1<t&&e[l+1]||(i+=o("h",s),s=0)):r++}return i}(l,s,a.margin)+'"/>',h='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+('viewBox="0 0 '+c)+" "+c+'" shape-rendering="crispEdges">'+d+u+"</svg>\n";return"function"==typeof n&&n(null,h),h}},7220:function(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw 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 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");let 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={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,r=e.scale||4;return{width:i,scale:i?4:r,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){let i=t.getScale(e,n);return Math.floor((e+2*n.margin)*i)},t.qrToImageData=function(e,n,i){let r=n.modules.size,o=n.modules.data,a=t.getScale(r,i),s=Math.floor((r+2*i.margin)*a),l=i.margin*a,c=[i.color.light,i.color.dark];for(let t=0;t<s;t++)for(let n=0;n<s;n++){let d=(t*s+n)*4,u=i.color.light;t>=l&&n>=l&&t<s-l&&n<s-l&&(u=c[o[Math.floor((t-l)/a)*r+Math.floor((n-l)/a)]?1:0]),e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}}},2060:function(){},1826:function(e){e.exports={style:{fontFamily:"'__poppinsFont_41ae11', '__poppinsFont_Fallback_41ae11'"},className:"__className_41ae11",variable:"__variable_41ae11"}},285:function(e){e.exports={style:{fontFamily:"'__steakFont_dc056b', '__steakFont_Fallback_dc056b'"},className:"__className_dc056b",variable:"__variable_dc056b"}},5044:function(e){e.exports={style:{fontFamily:"'__GeistMono_f910ec', ui-monospace, SFMono-Regular, Roboto Mono, Menlo, Monaco, Liberation Mono, DejaVu Sans Mono, Courier New, monospace"},className:"__className_f910ec",variable:"__variable_f910ec"}},8313:function(e){e.exports={style:{fontFamily:"'__GeistSans_fb8f2c', '__GeistSans_Fallback_fb8f2c'"},className:"__className_fb8f2c",variable:"__variable_fb8f2c"}},5566:function(e){var t,n,i,r=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l=[],c=!1,d=-1;function u(){c&&i&&(c=!1,i.length?l=i.concat(l):d=-1,l.length&&h())}function h(){if(!c){var e=s(u);c=!0;for(var t=l.length;t;){for(i=l,l=[];++d<t;)i&&i[d].run();d=-1,t=l.length}i=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||c||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw Error("process.chdir is not supported")},r.umask=function(){return 0}},2887:function(e,t,n){"use strict";var i,r,o,a,s,l,c,d,u,h,f,p,g,w=n(7159),m=n(4024),y=n(4146),v=n(9098);
vendor: 6,645 bytes, line 1
1function E(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})}function M(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function b(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n}let S="standard:connect";function N(e){return window.btoa(String.fromCharCode.call(null,...e))}function T(e){switch(e){case"mainnet-beta":return"solana:mainnet";case"testnet":return"solana:testnet";case"devnet":return"solana:devnet";default:return e}}class I extends w.BaseSignInMessageSignerWalletAdapter{constructor(e,t){super(),i.add(this),this.supportedTransactionVersions=new Set(["legacy",0]),r.set(this,void 0),o.set(this,!1),a.set(this,"undefined"!=typeof window&&window.isSecureContext&&"undefined"!=typeof document&&/android/i.test(navigator.userAgent)?w.WalletReadyState.Loadable:w.WalletReadyState.Unsupported),s.set(this,void 0),l.set(this,void 0),c.set(this,void 0),d.set(this,e=>E(this,void 0,void 0,function*(){if(e.accounts&&e.accounts.length>0){M(this,i,"m",h).call(this);let t=yield M(this,s,"f").call(this,e.accounts);t!==M(this,l,"f")&&(b(this,l,t,"f"),b(this,c,void 0,"f"),this.emit("connect",this.publicKey))}})),b(this,s,e=>E(this,void 0,void 0,function*(){var n;let i=yield t.addressSelector.select(e.map(({publicKey:e})=>N(e)));return null!==(n=e.find(({publicKey:e})=>N(e)===i))&&void 0!==n?n:e[0]}),"f"),b(this,r,e,"f"),M(this,r,"f").features["standard:events"].on("change",M(this,d,"f")),this.name=M(this,r,"f").name,this.icon=M(this,r,"f").icon,this.url=M(this,r,"f").url}get publicKey(){var e;if(!M(this,c,"f")&&M(this,l,"f"))try{b(this,c,new m.PublicKey(M(this,l,"f").publicKey),"f")}catch(e){throw new w.WalletPublicKeyError(e instanceof Error&&(null==e?void 0:e.message)||"Unknown error",e)}return null!==(e=M(this,c,"f"))&&void 0!==e?e:null}get connected(){return M(this,r,"f").connected}get connecting(){return M(this,o,"f")}get readyState(){return M(this,a,"f")}autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED(){return E(this,void 0,void 0,function*(){return yield this.autoConnect()})}autoConnect(){return E(this,void 0,void 0,function*(){M(this,i,"m",u).call(this,!0)})}connect(){return E(this,void 0,void 0,function*(){M(this,i,"m",u).call(this)})}performAuthorization(e){return E(this,void 0,void 0,function*(){try{let t=yield M(this,r,"f").cachedAuthorizationResult;if(t)return yield M(this,r,"f").features[S].connect({silent:!0}),t;return e?yield M(this,r,"f").features[y.SolanaSignIn].signIn(e):yield M(this,r,"f").features[S].connect(),yield yield M(this,r,"f").cachedAuthorizationResult}catch(e){throw new w.WalletConnectionError(e instanceof Error&&e.message||"Unknown error",e)}})}disconnect(){return E(this,void 0,void 0,function*(){return yield M(this,i,"m",g).call(this,()=>E(this,void 0,void 0,function*(){b(this,o,!1,"f"),b(this,c,void 0,"f"),b(this,l,void 0,"f"),yield M(this,r,"f").features["standard:disconnect"].disconnect(),this.emit("disconnect")}))})}signIn(e){return E(this,void 0,void 0,function*(){return M(this,i,"m",g).call(this,()=>E(this,void 0,void 0,function*(){var t;if(M(this,a,"f")!==w.WalletReadyState.Installed&&M(this,a,"f")!==w.WalletReadyState.Loadable)throw new w.WalletNotReadyError;b(this,o,!0,"f");try{let n=yield M(this,r,"f").features[y.SolanaSignIn].signIn(Object.assign(Object.assign({},e),{domain:null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:window.location.host}));if(n.length>0)return n[0];throw Error("Sign in failed, no sign in result returned by wallet")}catch(e){throw new w.WalletConnectionError(e instanceof Error&&e.message||"Unknown error",e)}finally{b(this,o,!1,"f")}}))})}signMessage(e){return E(this,void 0,void 0,function*(){return yield M(this,i,"m",g).call(this,()=>E(this,void 0,void 0,function*(){let t=M(this,i,"m",f).call(this);try{return(yield M(this,r,"f").features[y.SolanaSignMessage].signMessage({account:t,message:e}))[0].signature}catch(e){throw new w.WalletSignMessageError(null==e?void 0:e.message,e)}}))})}sendTransaction(e,t,n){return E(this,void 0,void 0,function*(){return yield M(this,i,"m",g).call(this,()=>E(this,void 0,void 0,function*(){let o=M(this,i,"m",f).call(this);try{if(y.SolanaSignAndSendTransaction in M(this,r,"f").features){let t=T(M(this,r,"f").currentAuthorization.chain),[i]=(yield M(this,r,"f").features[y.SolanaSignAndSendTransaction].signAndSendTransaction({account:o,transaction:e.serialize(),chain:t,options:n?{skipPreflight:n.skipPreflight,maxRetries:n.maxRetries}:void 0})).map(e=>N(e.signature));return i}{let[r]=yield M(this,i,"m",p).call(this,[e]);if("version"in r)return yield t.sendTransaction(r);{let e=r.serialize();return yield t.sendRawTransaction(e,Object.assign(Object.assign({},n),{preflightCommitment:function(){let e,i;switch(t.commitment){case"confirmed":case"finalized":case"processed":e=t.commitment;break;default:e="finalized"}switch(null==n?void 0:n.preflightCommitment){case"confirmed":case"finalized":case"processed":i=n.preflightCommitment;break;case void 0:i=e;break;default:i="finalized"}let r="finalized"===i?2:"confirmed"===i?1:0,o="finalized"===e?2:"confirmed"===e?1:0;return r<o?i:e}()}))}}}catch(e){throw new w.WalletSendTransactionError(null==e?void 0:e.message,e)}}))})}signTransaction(e){return E(this,void 0,void 0,function*(){return yield M(this,i,"m",g).call(this,()=>E(this,void 0,void 0,function*(){let[t]=yield M(this,i,"m",p).call(this,[e]);return t}))})}signAllTransactions(e){return E(this,void 0,void 0,function*(){return yield M(this,i,"m",g).call(this,()=>E(this,void 0,void 0,function*(){return yield M(this,i,"m",p).call(this,e)}))})}}r=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,i=new WeakSet,u=function(e=!1){return E(this,void 0,void 0,function*(){if(!this.connecting&&!this.connected)return yield M(this,i,"m",g).call(this,()=>E(this,void 0,void 0,function*(){if(M(this,a,"f")!==w.WalletReadyState.Installed&&M(this,a,"f")!==w.WalletReadyState.Loadable)throw new w.Wallet
1NotReadyError;b(this,o,!0,"f");try{yield M(this,r,"f").features[S].connect({silent:e})}catch(e){throw new w.WalletConnectionError(e instanceof Error&&e.message||"Unknown error",e)}finally{b(this,o,!1,"f")}}))})},h=function(){M(this,a,"f")!==w.WalletReadyState.Installed&&this.emit("readyStateChange",b(this,a,w.WalletReadyState.Installed,"f"))},f=function(){if(!M(this,r,"f").isAuthorized||!M(this,l,"f"))throw new w.WalletNotConnectedError;return M(this,l,"f")},p=function(e){return E(this,void 0,void 0,function*(){let t=M(this,i,"m",f).call(this);try{if(y.SolanaSignTransaction in M(this,r,"f").features)return M(this,r,"f").features[y.SolanaSignTransaction].signTransaction(...e.map(e=>({account:t,transaction:e.serialize()}))).then(e=>e.map(e=>{let t=e.signedTransaction,n=t[0],i=m.VersionedMessage.deserializeMessageVersion(t.slice(64*n+1,t.length));return"legacy"===i?m.Transaction.from(t):m.VersionedTransaction.deserialize(t)}));throw Error("Connected wallet does not support signing transactions")}catch(e){throw new w.WalletSignTransactionError(null==e?void 0:e.message,e)}})},g=function(e){return E(this,void 0,void 0,function*(){try{return yield e()}catch(e){throw this.emit("error",e),e}})};class L extends I{constructor(e){var t;let n=T(null!==(t=e.chain)&&void 0!==t?t:e.cluster);super(new v.LocalSolanaMobileWalletAdapterWallet({appIdentity:e.appIdentity,authorizationCache:{set:e.authorizationResultCache.set,get:()=>E(this,void 0,void 0,function*(){return yield e.authorizationResultCache.get()}),clear:e.authorizationResultCache.clear},chains:[n],chainSelector:v.createDefaultChainSelector(),onWalletNotFound:()=>E(this,void 0,void 0,function*(){e.onWalletNotFound(this)})}),{addressSelector:e.addressSelector,chain:n})}}class A extends L{}function _(e){return E(this,void 0,void 0,function*(){return v.defaultErrorModalWalletNotFoundHandler()})}t.lX=A,t.gw="Mobile Wallet Adapter",t.RH=function(){return{select(e){return E(this,void 0,void 0,function*(){return e[0]})}}},t.YS=function(){return v.createDefaultAuthorizationCache()},t.Kf=function(){return _}},9098:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r,o,a,s,l,c,d,u,h,f,p,g,w,m,y,v,E,M,b,S,N,T,I,L,A,_,C,j,D,O,x,R,z,P,k,W,U,B,F,Y,H,Q,K,G,V,Z,q,$,J,X,ee,et,en,ei,er,eo,ea,es,el,ec,ed,eu,eh,ef,ep,eg,ew,em,ey,ev,eE,eM,eb,eS,eN,eT,eI,eL,eA=n(4146),e_=n(5819),eC=n(6001),ej=n(9545),eD=n(9147),eO=n(3127);function ex(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var eR=ex(e_),ez=ex(eD);function eP(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})}function ek(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function eW(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n}let eU=` 2<div class="mobile-wallet-adapter-embedded-modal-container" role="dialog" aria-modal="true" aria-labelledby="modal-title"> 3 <div data-modal-close style="position: absolute; width: 100%; height: 100%;"></div> 4 <div class="mobile-wallet-adapter-embedded-modal-card"> 5 <div> 6 <button data-modal-close class="mobile-wallet-adapter-embedded-modal-close"> 7 <svg width="14" height="14"> 8 <path d="M 6.7125,8.3036995 1.9082,13.108199 c -0.2113,0.2112 -0.4765,0.3168 -0.7957,0.3168 -0.3192,0 -0.5844,-0.1056 -0.7958,-0.3168 C 0.1056,12.896899 0,12.631699 0,12.312499 c 0,-0.3192 0.1056,-0.5844 0.3167,-0.7958 L 5.1212,6.7124995 0.3167,1.9082 C 0.1056,1.6969 0,1.4317 0,1.1125 0,0.7933 0.1056,0.5281 0.3167,0.3167 0.5281,0.1056 0.7933,0 1.1125,0 1.4317,0 1.6969,0.1056 1.9082,0.3167 L 6.7125,5.1212 11.5167,0.3167 C 11.7281,0.1056 11.9933,0 12.3125,0 c 0.3192,0 0.5844,0.1056 0.7957,0.3167 0.2112,0.2114 0.3168,0.4766 0.3168,0.7958 0,0.3192 -0.1056,0.5844 -0.3168,0.7957 L 8.3037001,6.7124995 13.1082,11.516699 c 0.2112,0.2114 0.3168,0.4766 0.3168,0.7958 0,0.3192 -0.1056,0.5844 -0.3168,0.7957 -0.2113,0.2112 -0.4765,0.3168 -0.7957,0.3168 -0.3192,0 -0.5844,-0.1056 -0.7958,-0.3168 z" /> 9 </svg> 10 </button> 11 </div> 12 <div class="mobile-wallet-adapter-embedded-modal-content"></div> 13 </div> 14</div> 15`,eB=` 16.mobile-wallet-adapter-embedded-modal-container { 17 display: flex; /* Use flexbox to center content */ 18 justify-content: center; /* Center horizontally */ 19 align-items: center; /* Center vertically */ 20 position: fixed;
20 /* Stay in place */ 21 z-index: 1; /* Sit on top */ 22 left: 0; 23 top: 0; 24 width: 100%; /* Full width */ 25 height: 100%; /* Full height */ 26 background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ 27 overflow-y: auto; /* enable scrolling */ 28} 29 30.mobile-wallet-adapter-embedded-modal-card { 31 display: flex; 32 flex-direction: column; 33 margin: auto 20px; 34 max-width: 780px; 35 padding: 20px; 36 border-radius: 24px; 37 background: #ffffff; 38 font-family: "Inter Tight", "PT Sans", Calibri, sans-serif; 39 transform: translateY(-200%); 40 animation: slide-in 0.5s forwards; 41} 42 43@keyframes slide-in { 44 100% { transform: translateY(0%); } 45} 46 47.mobile-wallet-adapter-embedded-modal-close { 48 display: flex; 49 align-items: center; 50 justify-content: center; 51 width: 32px; 52 height: 32px; 53 cursor: pointer; 54 background: #e4e9e9; 55 border: none; 56 border-radius: 50%; 57} 58 59.mobile-wallet-adapter-embedded-modal-close:focus-visible { 60 outline-color: red; 61} 62 63.mobile-wallet-adapter-embedded-modal-close svg { 64 fill: #546266; 65 transition: fill 200ms ease 0s; 66} 67 68.mobile-wallet-adapter-embedded-modal-close:hover svg { 69 fill: #fff; 70} 71`,eF=` 72<link rel="preconnect" href="https://fonts.googleapis.com"> 73<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> 74<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet"> 75`;class eY{constructor(){i.add(this),r.set(this,null),o.set(this,{}),a.set(this,!1),this.dom=null,this.open=()=>{console.debug("Modal open"),ek(this,i,"m",l).call(this),ek(this,r,"f")&&(ek(this,r,"f").style.display="flex")},this.close=e=>{var t;console.debug("Modal close"),ek(this,i,"m",c).call(this),ek(this,r,"f")&&(ek(this,r,"f").style.display="none"),null===(t=ek(this,o,"f").close)||void 0===t||t.forEach(t=>t(e))},d.set(this,e=>{"Escape"===e.key&&this.close(e)}),this.init=this.init.bind(this),eW(this,r,document.getElementById("mobile-wallet-adapter-embedded-root-ui"),"f")}init(){return eP(this,void 0,void 0,function*(){console.log("Injecting modal"),ek(this,i,"m",s).call(this)})}addEventListener(e,t){var n;return(null===(n=ek(this,o,"f")[e])||void 0===n?void 0:n.push(t))||(ek(this,o,"f")[e]=[t]),()=>this.removeEventListener(e,t)}removeEventListener(e,t){var n;ek(this,o,"f")[e]=null===(n=ek(this,o,"f")[e])||void 0===n?void 0:n.filter(e=>t!==e)}}r=new WeakMap,o=new WeakMap,a=new WeakMap,d=new WeakMap,i=new WeakSet,s=function(){if(document.getElementById("mobile-wallet-adapter-embedded-root-ui")){ek(this,r,"f")||eW(this,r,document.getElementById("mobile-wallet-adapter-embedded-root-ui"),"f");return}eW(this,r,document.createElement("div"),"f"),ek(this,r,"f").id="mobile-wallet-adapter-embedded-root-ui",ek(this,r,"f").innerHTML=eU,ek(this,r,"f").style.display="none";let e=ek(this,r,"f").querySelector(".mobile-wallet-adapter-embedded-modal-content");e&&(e.innerHTML=this.contentHtml);let t=document.createElement("style");t.id="mobile-wallet-adapter-embedded-modal-styles",t.textContent=eB+this.contentStyles;let n=document.createElement("div");n.innerHTML=eF,this.dom=n.attachShadow({mode:"closed"}),this.dom.appendChild(t),this.dom.appendChild(ek(this,r,"f")),document.body.appendChild(n)},l=function(){!ek(this,r,"f")||ek(this,a,"f")||([...ek(this,r,"f").querySelectorAll("[data-modal-close]")].forEach(e=>null==e?void 0:e.addEventListener("click",this.close)),window.addEventListener("load",this.close),document.addEventListener("keydown",ek(this,d,"f")),eW(this,a,!0,"f"))},c=function(){ek(this,a,"f")&&(window.removeEventListener("load",this.close),document.removeEventListener("keydown",ek(this,d,"f")),ek(this,r,"f")&&([...ek(this,r,"f").querySelectorAll("[data-modal-close]")].forEach(e=>null==e?void 0:e.removeEventListener("click",this.close)),eW(this,a,!1,"f")))};class eH extends eY{constructor(){super(...arguments),this.contentStyles=eK,this.contentHtml=eQ}initWithQR(e){let t=Object.create(null,{init:{get:()=>super.init}});return eP(this,void 0,void 0,function*(){t.init.call(this),this.populateQRCode(e)})}populateQRCode(e){var t;return eP(this,void 0,void 0,function*(){let n=null===(t=this.dom)||void 0===t?void 0:t.getElementById("mobile-wallet-adapter-embedded-modal-qr-code-container");if(n){let t=yield eR.default.toCanvas(e,{width:200,margin:0});null!==n.firstElementChild?n.replaceChild(t,n.firstElementChild):n.appendChild(t)}else console.error("QRCode Container not found")})}}let eQ=` 76<div class="mobile-wallet-adapter-embedded-modal-qr-content"> 77 <div> 78 <svg class="mobile-wallet-adapter-embedded-modal-icon" width="100%" height="100%"> 79 <circle r="52" cx="53" cy="53" fill="#99b3be" stroke="#000000" stroke-width="2"/> 80 <path d="m 53,82.7305 c -3.3116,0 -6.1361,-1.169 -8.4735,-3.507 -2.338,-2.338 -3.507,-5.1625 -3.507,-8.4735 0,-3.3116 1.169,-6.1364 3.507,-8.4744 2.3374,-2.338 5.1619,-3.507 8.4735,-3.507 3.3116,0 6.1361,1.169 8.4735,3.507 2.338,2.338 3.507,5.1628 3.507,8.4744 0,3.311 -1.169,6.1355 -3.507,8.4735 -2.3374,2.338 -5.1619,3.507 -8.4735,3.507 z m 0.007,-5.25 c 1.8532,0 3.437,-0.6598 4.7512,-1.9793 1.3149,-1.3195 1.9723,-2.9058
801.9723,-4.7591 0,-1.8526 -0.6598,-3.4364 -1.9793,-4.7512 -1.3195,-1.3149 -2.9055,-1.9723 -4.7582,-1.9723 -1.8533,0 -3.437,0.6598 -4.7513,1.9793 -1.3148,1.3195 -1.9722,2.9058 -1.9722,4.7591 0,1.8527 0.6597,3.4364 1.9792,4.7512 1.3195,1.3149 2.9056,1.9723 4.7583,1.9723 z m -28,-33.5729 -3.85,-3.6347 c 4.1195,-4.025 8.8792,-7.1984 14.2791,-9.52 5.4005,-2.3223 11.2551,-3.4834 17.5639,-3.4834 6.3087,0 12.1634,1.1611 17.5639,3.4834 5.3999,2.3216 10.1596,5.495 14.2791,9.52 l -3.85,3.6347 C 77.2999,40.358 73.0684,37.5726 68.2985,35.5514 63.5292,33.5301 58.4296,32.5195 53,32.5195 c -5.4297,0 -10.5292,1.0106 -15.2985,3.0319 -4.7699,2.0212 -9.0014,4.8066 -12.6945,8.3562 z m 44.625,10.8771 c -2.2709,-2.1046 -4.7962,-3.7167 -7.5758,-4.8361 -2.7795,-1.12 -5.7983,-1.68 -9.0562,-1.68 -3.2579,0 -6.2621,0.56 -9.0125,1.68 -2.7504,1.1194 -5.2903,2.7315 -7.6195,4.8361 L 32.5189,51.15 c 2.8355,-2.6028 5.9777,-4.6086 9.4263,-6.0174 3.4481,-1.4087 7.133,-2.1131 11.0548,-2.1131 3.9217,0 7.5979,0.7044 11.0285,2.1131 3.43,1.4088 6.5631,3.4146 9.3992,6.0174 z"/> 81 </svg> 82 <div class="mobile-wallet-adapter-embedded-modal-title">Remote Mobile Wallet Adapter</div> 83 </div> 84 <div> 85 <div> 86 <h4 class="mobile-wallet-adapter-embedded-modal-qr-label"> 87 Open your wallet and scan this code 88 </h4> 89 </div> 90 <div id="mobile-wallet-adapter-embedded-modal-qr-code-container" class="mobile-wallet-adapter-embedded-modal-qr-code-container"></div> 91 </div> 92</div> 93<div class="mobile-wallet-adapter-embedded-modal-divider"><hr></div> 94<div class="mobile-wallet-adapter-embedded-modal-footer"> 95 <div class="mobile-wallet-adapter-embedded-modal-subtitle"> 96 Follow the instructions on your device. When you're finished, this screen will update. 97 </div> 98 <div class="mobile-wallet-adapter-embedded-modal-progress-badge"> 99 <div> 100 <div class="spinner"> 101 <div class="leftWrapper"> 102 <div class="left"> 103 <div class="circle"></div> 104 </div> 105 </div> 106 <div class="rightWrapper"> 107 <div class="right"> 108 <div class="circle"></div> 109 </div> 110 </div> 111 </div> 112 </div> 113 <div>Waiting for scan</div> 114 </div> 115</div> 116`,eK=` 117.mobile-wallet-adapter-embedded-modal-qr-content { 118 display: flex; 119 margin-top: 10px; 120 padding: 10px; 121} 122 123.mobile-wallet-adapter-embedded-modal-qr-content > div:first-child { 124 display: flex; 125 flex-direction: column; 126 flex: 2; 127 margin-top: auto; 128 margin-right: 30px; 129} 130 131.mobile-wallet-adapter-embedded-modal-qr-content > div:nth-child(2) { 132 display: flex; 133 flex-direction: column; 134 flex: 1; 135 margin-left: auto; 136} 137 138.mobile-wallet-adapter-embedded-modal-footer { 139 display: flex; 140 padding: 10px; 141} 142 143.mobile-wallet-adapter-embedded-modal-icon {} 144 145.mobile-wallet-adapter-embedded-modal-title { 146 color: #000000; 147 font-size: 2.5em; 148 font-weight: 600; 149} 150 151.mobile-wallet-adapter-embedded-modal-qr-label { 152 text-align: right; 153 color: #000000; 154} 155 156.mobile-wallet-adapter-embedded-modal-qr-code-container { 157 margin-left: auto; 158} 159 160.mobile-wallet-adapter-embedded-modal-divider { 161 margin-top: 20px; 162 padding-left: 10px; 163 padding-right: 10px; 164} 165 166.mobile-wallet-adapter-embedded-modal-divider hr { 167 border-top: 1px solid #D9DEDE; 168} 169 170.mobile-wallet-adapter-embedded-modal-subtitle { 171 margin: auto; 172 margin-right: 60px; 173 padding: 20px; 174 color: #6E8286; 175} 176 177.mobile-wallet-adapter-embedded-modal-progress-badge { 178 display: flex; 179 background: #F7F8F8; 180 height: 56px; 181 min-width: 200px; 182 margin: auto; 183 padding-left: 20px; 184 padding-right: 20px; 185 border-radius: 18px; 186 color: #A8B6B8; 187 align-items: center; 188} 189 190.mobile-wallet-adapter-embedded-modal-progress-badge > div:first-child { 191 margin-left: auto; 192 margin-right: 20px; 193} 194 195.mobile-wallet-adapter-embedded-modal-progress-badge > div:nth-child(2) { 196 margin-right: auto; 197} 198 199/* Smaller screens */ 200@media all and (max-width: 600px) { 201 .mobile-wallet-adapter-embedded-modal-card { 202 text-align: center; 203 } 204 .mobile-wallet-adapter-embedded-modal-qr-content { 205 flex-direction: column; 206 } 207 .mobile-wallet-adapter-embedded-modal-qr-content > div:first-child { 208 margin: auto; 209 } 210 .mobile-wallet-adapter-embedded-modal-qr-content > div:nth-child(2) { 211 margin: auto; 212 flex: 2 auto; 213 } 214 .mobile-wallet-adapter-embedded-modal-footer { 215 flex-direction: column; 216 } 217 .mobile-wallet-adapter-embedded-modal-icon { 218 display: none; 219 } 220 .mobile-wallet-adapter-embedded-modal-title { 221 font-size: 1.5em; 222 } 223 .mobile-wallet-adapter-embedded-modal-subtitle { 224 margin-right: unset; 225 } 226 .mobile-wallet-adapter-embedded-modal-qr-label { 227 text-align: center; 228 } 229 .mobile-wallet-adapter-embedded-modal-qr-code-container { 230 margin: auto; 231 } 232} 233 234/* Spinner */ 235@keyframes spinLeft { 236 0% { 237 transform: rotate(20deg); 238 } 239 50% { 240 transform: rotate(160deg); 241 } 242 100% { 243 transform: rotate(20deg); 244 } 245} 246@keyframes spinRight { 247 0% { 248 transform: rotate(160deg); 249 } 250 50% { 251 transform: rotate(20deg); 252 } 253 100% { 254 transform: rotate(160deg); 255 } 256} 257@keyframes spin { 258 0% { 259 transform: rotate(0deg); 260 } 261 100% { 262 transform: rotate(2520deg); 263 } 264} 265 266.spinner { 267 position: relative; 268 width: 1.5em; 269 height: 1.5em; 270 margin: auto; 271 animation: spin 10s linear infinite; 272} 273.spinner::before { 274 content: ""; 275 position: absolute; 276 top: 0; 277 bottom: 0; 278 left: 0; 279 right: 0; 280} 281.right, .rightWrapper, .left, .leftWrapper { 282 position: absolute; 283 top: 0; 284 overflow: hidden; 285 width: .75em; 286 height: 1.5em; 287} 288.left, .leftWrapper { 289 left: 0; 290} 291.right { 292 left: -12px; 293} 294.rightWrapper { 295 right: 0; 296} 297.circle { 298 border: .125em solid #A8B6B8; 299 width: 1.25em; /* 1.5em - 2*0.125em border */ 300 height: 1.25em; /* 1.5em - 2*0.125em border */ 301 border-radius: 0.75em; /* 0.5*1.5em spinner size 8 */ 302} 303.left { 304 transform-origin: 100% 50%; 305 animation: spinLeft 2.5s cubic-bezier(.2,0,.8,1) infinite; 306} 307.right { 308 transform-origin: 100% 50%; 309 animation: spinRight 2.5s cubic-bezier(.2,0,.8,1) infinite; 310} 311`,eG="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03IDIuNUgxN0MxNy44Mjg0IDIuNSAxOC41IDMuMTc
311xNTcgMTguNSA0VjIwQzE4LjUgMjAuODI4NCAxNy44Mjg0IDIxLjUgMTcgMjEuNUg3QzYuMTcxNTcgMjEuNSA1LjUgMjAuODI4NCA1LjUgMjBWNEM1LjUgMy4xNzE1NyA2LjE3MTU3IDIuNSA3IDIuNVpNMyA0QzMgMS43OTA4NiA0Ljc5MDg2IDAgNyAwSDE3QzE5LjIwOTEgMCAyMSAxLjc5MDg2IDIxIDRWMjBDMjEgMjIuMjA5MSAxOS4yMDkxIDI0IDE3IDI0SDdDNC43OTA4NiAyNCAzIDIyLjIwOTEgMyAyMFY0Wk0xMSA0LjYxNTM4QzEwLjQ0NzcgNC42MTUzOCAxMCA1LjA2MzEgMTAgNS42MTUzOFY2LjM4NDYyQzEwIDYuOTM2OSAxMC40NDc3IDcuMzg0NjIgMTEgNy4zODQ2MkgxM0MxMy41NTIzIDcuMzg0NjIgMTQgNi45MzY5IDE0IDYuMzg0NjJWNS42MTUzOEMxNCA1LjA2MzEgMTMuNTUyMyA0LjYxNTM4IDEzIDQuNjE1MzhIMTFaIiBmaWxsPSIjRENCOEZGIi8+Cjwvc3ZnPgo=";function eV(e){return window.btoa(String.fromCharCode.call(null,...e))}function eZ(e){return new Uint8Array(window.atob(e).split("").map(e=>e.charCodeAt(0)))}let eq="Mobile Wallet Adapter",e$=[eA.SolanaSignAndSendTransaction,eA.SolanaSignTransaction,eA.SolanaSignMessage,eA.SolanaSignIn];class eJ{constructor(e){u.add(this),h.set(this,{}),f.set(this,"1.0.0"),p.set(this,eq),g.set(this,"https://solanamobile.com/wallets"),w.set(this,eG),m.set(this,void 0),y.set(this,void 0),v.set(this,void 0),E.set(this,!1),M.set(this,0),b.set(this,[]),S.set(this,void 0),N.set(this,void 0),T.set(this,void 0),I.set(this,(e,t)=>{var n;return(null===(n=ek(this,h,"f")[e])||void 0===n?void 0:n.push(t))||(ek(this,h,"f")[e]=[t]),()=>ek(this,u,"m",A).call(this,e,t)}),_.set(this,({silent:e}={})=>eP(this,void 0,void 0,function*(){if(ek(this,E,"f")||this.connected)return{accounts:this.accounts};eW(this,E,!0,"f");try{if(e){let e=yield ek(this,v,"f").get();if(!e)return{accounts:this.accounts};yield ek(this,D,"f").call(this,e.capabilities),yield ek(this,j,"f").call(this,e)}else yield ek(this,C,"f").call(this)}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}finally{eW(this,E,!1,"f")}return{accounts:this.accounts}})),C.set(this,e=>eP(this,void 0,void 0,function*(){try{let t=yield ek(this,v,"f").get();if(t)return ek(this,j,"f").call(this,t),t;let n=yield ek(this,S,"f").select(ek(this,b,"f"));return yield ek(this,R,"f").call(this,t=>eP(this,void 0,void 0,function*(){let[i,r]=yield Promise.all([t.getCapabilities(),t.authorize({chain:n,identity:ek(this,m,"f"),sign_in_payload:e})]),o=ek(this,P,"f").call(this,r.accounts),a=Object.assign(Object.assign({},r),{accounts:o,chain:n,capabilities:i});return Promise.all([ek(this,D,"f").call(this,i),ek(this,v,"f").set(a),ek(this,j,"f").call(this,a)]),a}))}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}})),j.set(this,e=>eP(this,void 0,void 0,function*(){var t;let n=null==ek(this,y,"f")||(null===(t=ek(this,y,"f"))||void 0===t?void 0:t.accounts.length)!==e.accounts.length||ek(this,y,"f").accounts.some((t,n)=>t.address!==e.accounts[n].address);eW(this,y,e,"f"),n&&ek(this,u,"m",L).call(this,"change",{accounts:this.accounts})})),D.set(this,e=>eP(this,void 0,void 0,function*(){let t=e.features.includes("solana:signTransactions"),n=e.supports_sign_and_send_transactions,i=eA.SolanaSignAndSendTransaction in this.features!==n||eA.SolanaSignTransaction in this.features!==t;eW(this,N,Object.assign(Object.assign({},(n||!n&&!t)&&{[eA.SolanaSignAndSendTransaction]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:ek(this,U,"f")}}),t&&{[eA.SolanaSignTransaction]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:ek(this,B,"f")}}),"f"),i&&ek(this,u,"m",L).call(this,"change",{features:this.features})})),O.set(this,(e,t,n)=>eP(this,void 0,void 0,function*(){var i,r;try{let[o,a]=yield Promise.all([null!==(r=null===(i=ek(this,y,"f"))||void 0===i?void 0:i.capabilities)&&void 0!==r?r:yield e.getCapabilities(),e.authorize({auth_token:t,identity:ek(this,m,"f"),chain:n})]),s=ek(this,P,"f").call(this,a.accounts),l=Object.assign(Object.assign({},a),{accounts:s,chain:n,capabilities:o});Promise.all([ek(this,v,"f").set(l),ek(this,j,"f").call(this,l)])}catch(e){throw ek(this,x,"f").call(this),Error(e instanceof Error&&e.message||"Unknown error")}})),x.set(this,()=>eP(this,void 0,void 0,function*(){var e;ek(this,v,"f").clear(),eW(this,E,!1,"f"),eW(this,M,(e=ek(this,M,"f"),++e),"f"),eW(this,y,void 0,"f"),ek(this,u,"m",L).call(this,"change",{accounts:this.accounts})})),R.set(this,e=>eP(this,void 0,void 0,function*(){var t;let n=null===(t=ek(this,y,"f"))||void 0===t?void 0:t.wallet_uri_base,i=ek(this,M,"f");try{return yield eC.transact(e,n?{baseUri:n}:void 0)}catch(e){throw ek(this,M,"f")!==i&&(yield new Promise(()=>{})),e instanceof Error&&"SolanaMobileWalletAdapterError"===e.name&&"ERROR_WALLET_NOT_FOUND"===e.code&&(yield ek(this,T,"f").call(this,this)),e}})),z.set(this,()=>{if(!ek(this,y,"f"))throw Error("Wallet not connected");return{authToken:ek(this,y,"f").auth_token,chain:ek(this,y,"f").chain}}),P.set(this,e=>e.map(e=>{var t,n;let i=eZ(e.address);return{address:ez.default.encode(i),publicKey:i,label:e.label,icon:e.icon,chains:null!==(t=e.chains)&&void 0!==t?t:ek(this,b,"f"),features:null!==(n=e.features)&&void 0!==n?n:e$}})),k.set(this,e=>eP(this,void 0,void 0,function*(){let{authToken:t,chain:n}=ek(this,z,"f").call(this);try{let i=e.map(e=>eV(e));return yield ek(this,R,"f").call(this,e=>eP(this,void 0,void 0,function*(){return yield ek(this,O,"f").call(this,e,t,n),(yield e.signTransactions({payloads:i})).signed_payloads.map(eZ)}))}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}})),W.set(this,(e,t)=>eP(this,void 0,void 0,function*(){let{authToken:n,chain:i}=ek(this,z,"f").call(this);try{return yield ek(this,R,"f").call(this,r=>eP(this,void 0,void 0,function*(){let[o,a]=yield Promise.all([r.getCapabilities(),ek(this,O,"f").call(this,r,n,i)]);if(o.supports_sign_and_send_transactions){let n=eV(e);return(yield r.signAndSendTransactions(Object.assign(Object.assign({},t),{payloads:[n]}))).signatures.map(eZ)[0]}throw Error("connected wallet does not support signAndSendTransaction")}))}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}})),U.set(this,(...e)=>eP(this,void 0,void 0,function*(){let t=[];for(let n of e){let e=yield ek(this,W,"f").call(this,n.transaction,n.options);t.push({signature:e})}return t})),B.set(this,(...e)=>eP(this,void 0,void 0,function*(){return(yield ek(this,k,"f").call(this,e.map(({transaction:e})=>e))).map(e=>({signedTransaction:e}))})),F.set(this,(...e)=>eP(this,void 0,void 0,function*(){let{authToken:t,chain:n}=ek(this,z,"f").call(this),i=e.map(({account:e})=>eV(e.publicKey)),r=e.map(({message:e})=>eV(e));try{return yield ek(this,R,"f").call(this,e=>eP(this,void 0,void 0,function*(){return yield ek(this,O,"f").call(this,e,t,n),(yield e.signMessages({addresses:i,payloads:r})).signed_payloads.map(eZ).map(e=>({signedMessage:e,signature:e.slice(-64)}))}
311))}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}})),Y.set(this,(...e)=>eP(this,void 0,void 0,function*(){let t=[];if(!(e.length>1))return[(yield ek(this,H,"f").call(this,e[0]))];for(let n of e)t.push((yield ek(this,H,"f").call(this,n)));return t})),H.set(this,e=>eP(this,void 0,void 0,function*(){var t,n,i;eW(this,E,!0,"f");try{let r=yield ek(this,C,"f").call(this,Object.assign(Object.assign({},e),{domain:null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:window.location.host}));if(!r.sign_in_result)throw Error("Sign in failed, no sign in result returned by wallet");let o=r.sign_in_result.address,a=r.accounts.find(e=>e.address==o);return{account:Object.assign(Object.assign({},null!=a?a:{address:ez.default.encode(eZ(o))}),{publicKey:eZ(o),chains:null!==(n=null==a?void 0:a.chains)&&void 0!==n?n:ek(this,b,"f"),features:null!==(i=null==a?void 0:a.features)&&void 0!==i?i:r.capabilities.features}),signedMessage:eZ(r.sign_in_result.signed_message),signature:eZ(r.sign_in_result.signature)}}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}finally{eW(this,E,!1,"f")}})),eW(this,v,e.authorizationCache,"f"),eW(this,m,e.appIdentity,"f"),eW(this,b,e.chains,"f"),eW(this,S,e.chainSelector,"f"),eW(this,T,e.onWalletNotFound,"f"),eW(this,N,{[eA.SolanaSignAndSendTransaction]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:ek(this,U,"f")},[eA.SolanaSignTransaction]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:ek(this,B,"f")}},"f")}get version(){return ek(this,f,"f")}get name(){return ek(this,p,"f")}get url(){return ek(this,g,"f")}get icon(){return ek(this,w,"f")}get chains(){return ek(this,b,"f")}get features(){return Object.assign({[ej.StandardConnect]:{version:"1.0.0",connect:ek(this,_,"f")},[ej.StandardDisconnect]:{version:"1.0.0",disconnect:ek(this,x,"f")},[ej.StandardEvents]:{version:"1.0.0",on:ek(this,I,"f")},[eA.SolanaSignMessage]:{version:"1.0.0",signMessage:ek(this,F,"f")},[eA.SolanaSignIn]:{version:"1.0.0",signIn:ek(this,Y,"f")}},ek(this,N,"f"))}get accounts(){var e,t;return null!==(t=null===(e=ek(this,y,"f"))||void 0===e?void 0:e.accounts)&&void 0!==t?t:[]}get connected(){return!!ek(this,y,"f")}get isAuthorized(){return!!ek(this,y,"f")}get currentAuthorization(){return ek(this,y,"f")}get cachedAuthorizationResult(){return ek(this,v,"f").get()}}h=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,w=new WeakMap,m=new WeakMap,y=new WeakMap,v=new WeakMap,E=new WeakMap,M=new WeakMap,b=new WeakMap,S=new WeakMap,N=new WeakMap,T=new WeakMap,I=new WeakMap,_=new WeakMap,C=new WeakMap,j=new WeakMap,D=new WeakMap,O=new WeakMap,x=new WeakMap,R=new WeakMap,z=new WeakMap,P=new WeakMap,k=new WeakMap,W=new WeakMap,U=new WeakMap,B=new WeakMap,F=new WeakMap,Y=new WeakMap,H=new WeakMap,u=new WeakSet,L=function(e,...t){var n;null===(n=ek(this,h,"f")[e])||void 0===n||n.forEach(e=>e.apply(null,t))},A=function(e,t){var n;ek(this,h,"f")[e]=null===(n=ek(this,h,"f")[e])||void 0===n?void 0:n.filter(e=>t!==e)};class eX{constructor(e){Q.add(this),K.set(this,{}),G.set(this,"1.0.0"),V.set(this,eq),Z.set(this,"https://solanamobile.com/wallets"),q.set(this,eG),$.set(this,void 0),J.set(this,void 0),X.set(this,void 0),ee.set(this,!1),et.set(this,0),en.set(this,[]),ei.set(this,void 0),er.set(this,void 0),eo.set(this,void 0),ea.set(this,void 0),es.set(this,void 0),el.set(this,(e,t)=>{var n;return(null===(n=ek(this,K,"f")[e])||void 0===n?void 0:n.push(t))||(ek(this,K,"f")[e]=[t]),()=>ek(this,Q,"m",ed).call(this,e,t)}),eu.set(this,({silent:e}={})=>eP(this,void 0,void 0,function*(){if(ek(this,ee,"f")||this.connected)return{accounts:this.accounts};eW(this,ee,!0,"f");try{yield ek(this,eh,"f").call(this)}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}finally{eW(this,ee,!1,"f")}return{accounts:this.accounts}})),eh.set(this,e=>eP(this,void 0,void 0,function*(){try{let t=yield ek(this,X,"f").get();if(t)return ek(this,ef,"f").call(this,t),t;ek(this,es,"f")&&eW(this,es,void 0,"f");let n=yield ek(this,ei,"f").select(ek(this,en,"f"));return yield ek(this,em,"f").call(this,t=>eP(this,void 0,void 0,function*(){let[i,r]=yield Promise.all([t.getCapabilities(),t.authorize({chain:n,identity:ek(this,$,"f"),sign_in_payload:e})]),o=ek(this,ev,"f").call(this,r.accounts),a=Object.assign(Object.assign({},r),{accounts:o,chain:n,capabilities:i});return Promise.all([ek(this,ep,"f").call(this,i),ek(this,X,"f").set(a),ek(this,ef,"f").call(this,a)]),a}))}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}})),ef.set(this,e=>eP(this,void 0,void 0,function*(){var t;let n=null==ek(this,J,"f")||(null===(t=ek(this,J,"f"))||void 0===t?void 0:t.accounts.length)!==e.accounts.length||ek(this,J,"f").accounts.some((t,n)=>t.address!==e.accounts[n].address);eW(this,J,e,"f"),n&&ek(this,Q,"m",ec).call(this,"change",{accounts:this.accounts})})),ep.set(this,e=>eP(this,void 0,void 0,function*(){let t=e.features.includes("solana:signTransactions"),n=e.supports_sign_and_send_transactions||e.features.includes("solana:signAndSendTransaction"),i=eA.SolanaSignAndSendTransaction in this.features!==n||eA.SolanaSignTransaction in this.features!==t;eW(this,er,Object.assign(Object.assign({},n&&{[eA.SolanaSignAndSendTransaction]:{version:"1.0.0",supportedTransactionVersions:e.supported_transaction_versions,signAndSendTransaction:ek(this,eb,"f")}}),t&&{[eA.SolanaSignTransaction]:{version:"1.0.0",supportedTransactionVersions:e.supported_transaction_versions,signTransaction:ek(this,eS,"f")}}),"f"),i&&ek(this,Q,"m",ec).call(this,"change",{features:this.features})})),eg.set(this,(e,t,n)=>eP(this,void 0,void 0,function*(){var i,r;try{let[o,a]=yield Promise.all([null!==(r=null===(i=ek(this,J,"f"))||void 0===i?void 0:i.capabilities)&&void 0!==r?r:yield e.getCapabilities(),e.authorize({auth_token:t,identity:ek(this,$,"f"),chain:n})]),s=ek(this,ev,"f").call(this,a.accounts),l=Object.assign(Object.assign({},a),{accounts:s,chain:n,capabilities:o});Promise.all([ek(this,X,"f").set(l),ek(this,ef,"f").call(this,l)])}catch(e){throw ek(this,ew,"f").call(this),Error(e instanceof Error&&e.message||"Unknown error")}})),ew.set(this,()=>eP(this,void 0,void 0,function*(){var e,t;null===(e=ek(this,es,"f"))||void 0===e||e.close(),ek(this,X,"f").clear(),eW(this,ee,!1,"f"),eW(this,et,(t=ek(this,et,"f"),++t),"f"),eW(this,J,void 0,"f"),eW(this,es,void 0,"f"),ek(this,Q,"m",ec).call(this,"change",{accounts:this.accounts})})),em.set(this,e=>eP(this,void 0,void 0,function*(){var t;let n=null===(t=ek(this,J,"f"))||void 0===t?void 0:t.wallet_uri_base,i=Object.assign(Object.assign({},n?{baseUri:n}:void 0),{remoteHostAuthority:ek(this,ea,"f")}),r=ek(this,et,"f"),o=new eH;if(ek(this,es,"f"))return e(ek(this,es,"f").wallet);try{let{associationUrl:t,close:n,wallet:r}=yield eC.startRemoteScenario(i),a=o.addEventListener("close",e=>{e&&n()});return o.initWithQR(t.toString()),o.open(),eW(this,es,{close:n,wallet:yield r},"f"),a(),o.close(),yield e(ek(this,es,"f").wallet)}catch(e){throw o.close(),ek(this,et,"f")!==r&&(yield new Promise(()=>{})),e instanceof Error&&"SolanaMobileWalletAdapterError"===e.name&&"ERROR_WALLET_NOT_FOUND"===e.code&&(yield ek(this,eo,"f").call(this,this)),e}})),ey.set(this,()=>{if(!ek(this,J,"f"))throw Error("Wallet not connected");return{authToken:ek(this,J,"f").auth_token,chain:ek(this,J,"f").chain}}),ev.set(this,e=>e.map(e=>{var t,n;let i=eZ(e.address);return{address:ez.default.encode(i),publicKey:i,label:e.label,icon:e.icon,chains:null!==(t=e.chains)&&void 0!==t?t:ek(this,en,"f"),features:null!==(n=e.features)&&void 0!==n?n:e$}})),eE.set(this,e=>eP(this,void 0,void 0,function*(){let{authToken:t,chain:n}=ek(this,ey,"f").call(this);try{return yield ek(this,em,"f").call(this,i=>eP(this,void 0,void 0,function*(){return yield ek(this,eg,"f").call(this,i,t,n),(yield i.signTransactions({payloads:e.map(eV)})).signed_payloads.map(eZ)}))}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}})),eM.set(this,(e,t)=>eP(this,void 0,void 0,function*(){let{authToken:n,chain:i}=ek(this,ey,"f").call(this);try{return yield ek(this,em,"f").call(this,r=>eP(this,void 0,void 0,function*(){let[o,a]=yield Promise.all([r.getCapabilities(),ek(this,eg,"f").call(this,r,n,i)]);if(o.supports_sign_and_send_transactions)return(yield r.signAndSendTransactions(Object.assign(Object.assign({},t),{payloads:[eV(e)]}))).signatures.map(eZ)[0];throw Error("connected wallet does not support signAndSendTransaction")}))}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}})),eb.set(this,(...e)=>eP(this,void 0,void 0,function*(){let t=[];for(let n of e){let e=yield ek(this,eM,"f").call(this,n.transaction,n.options);t.push({signature:e})}return t})),eS.set(this,(...e)=>eP(this,void 0,void 0,function*(){return(yield ek(this,eE,"f").call(this,e.map(({transaction:e})=>e))).map(e=>({signedTransaction:e}))})),eN.set(this,(...e)=>eP(this,void 0,void 0,function*(){let{authToken:t,chain:n}=ek(this,ey,"f").call(this),i=e.map(({account:e})=>eV(e.publicKey)),r=e.map(({message:e})=>eV(e));try{return yield ek(this,em,"f").call(this,e=>eP(this,void 0,void 0,function*(){return yield ek(this,eg,"f").call(this,e,t,n),(yield e.signMessages({addresses:i,payloads:r})).signed_payloads.map(eZ).map(e=>({signedMessage:e,signature:e.slice(-64)}))}
311))}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}})),eT.set(this,(...e)=>eP(this,void 0,void 0,function*(){let t=[];if(!(e.length>1))return[(yield ek(this,eI,"f").call(this,e[0]))];for(let n of e)t.push((yield ek(this,eI,"f").call(this,n)));return t})),eI.set(this,e=>eP(this,void 0,void 0,function*(){var t,n,i;eW(this,ee,!0,"f");try{let r=yield ek(this,eh,"f").call(this,Object.assign(Object.assign({},e),{domain:null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:window.location.host}));if(!r.sign_in_result)throw Error("Sign in failed, no sign in result returned by wallet");let o=r.sign_in_result.address,a=r.accounts.find(e=>e.address==o);return{account:Object.assign(Object.assign({},null!=a?a:{address:ez.default.encode(eZ(o))}),{publicKey:eZ(o),chains:null!==(n=null==a?void 0:a.chains)&&void 0!==n?n:ek(this,en,"f"),features:null!==(i=null==a?void 0:a.features)&&void 0!==i?i:r.capabilities.features}),signedMessage:eZ(r.sign_in_result.signed_message),signature:eZ(r.sign_in_result.signature)}}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}finally{eW(this,ee,!1,"f")}})),eW(this,X,e.authorizationCache,"f"),eW(this,$,e.appIdentity,"f"),eW(this,en,e.chains,"f"),eW(this,ei,e.chainSelector,"f"),eW(this,ea,e.remoteHostAuthority,"f"),eW(this,eo,e.onWalletNotFound,"f"),eW(this,er,{[eA.SolanaSignAndSendTransaction]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:ek(this,eb,"f")},[eA.SolanaSignTransaction]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:ek(this,eS,"f")}},"f")}get version(){return ek(this,G,"f")}get name(){return ek(this,V,"f")}get url(){return ek(this,Z,"f")}get icon(){return ek(this,q,"f")}get chains(){return ek(this,en,"f")}get features(){return Object.assign({[ej.StandardConnect]:{version:"1.0.0",connect:ek(this,eu,"f")},[ej.StandardDisconnect]:{version:"1.0.0",disconnect:ek(this,ew,"f")},[ej.StandardEvents]:{version:"1.0.0",on:ek(this,el,"f")},[eA.SolanaSignMessage]:{version:"1.0.0",signMessage:ek(this,eN,"f")},[eA.SolanaSignIn]:{version:"1.0.0",signIn:ek(this,eT,"f")}},ek(this,er,"f"))}get accounts(){var e,t;return null!==(t=null===(e=ek(this,J,"f"))||void 0===e?void 0:e.accounts)&&void 0!==t?t:[]}get connected(){return!!ek(this,es,"f")&&!!ek(this,J,"f")}get isAuthorized(){return!!ek(this,J,"f")}get currentAuthorization(){return ek(this,J,"f")}get cachedAuthorizationResult(){return ek(this,X,"f").get()}}K=new WeakMap,G=new WeakMap,V=new WeakMap,Z=new WeakMap,q=new WeakMap,$=new WeakMap,J=new WeakMap,X=new WeakMap,ee=new WeakMap,et=new WeakMap,en=new WeakMap,ei=new WeakMap,er=new WeakMap,eo=new WeakMap,ea=new WeakMap,es=new WeakMap,el=new WeakMap,eu=new WeakMap,eh=new WeakMap,ef=new WeakMap,ep=new WeakMap,eg=new WeakMap,ew=new WeakMap,em=new WeakMap,ey=new WeakMap,ev=new WeakMap,eE=new WeakMap,eM=new WeakMap,eb=new WeakMap,eS=new WeakMap,eN=new WeakMap,eT=new WeakMap,eI=new WeakMap,Q=new WeakSet,ec=function(e,...t){var n;null===(n=ek(this,K,"f")[e])||void 0===n||n.forEach(e=>e.apply(null,t))},ed=function(e,t){var n;ek(this,K,"f")[e]=null===(n=ek(this,K,"f")[e])||void 0===n?void 0:n.filter(e=>t!==e)};var e0=function(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},e1=function(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)};function e4(e){let t=({register:t})=>t(e);try{window.dispatchEvent(new e2(t))}catch(e){console.error("wallet-standard:register-wallet event could not be dispatched\n",e)}try{window.addEventListener("wallet-standard:app-ready",({detail
311:e})=>t(e))}catch(e){console.error("wallet-standard:app-ready event listener could not be added\n",e)}}class e2 extends Event{constructor(e){super("wallet-standard:register-wallet",{bubbles:!1,cancelable:!1,composed:!1}),eL.set(this,void 0),e0(this,eL,e,"f")}get detail(){return e1(this,eL,"f")}get type(){return"wallet-standard:register-wallet"}preventDefault(){throw Error("preventDefault cannot be called")}stopImmediatePropagation(){throw Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw Error("stopPropagation cannot be called")}}eL=new WeakMap;class e5 extends eY{constructor(){super(...arguments),this.contentStyles=e6,this.contentHtml=e3}initWithError(e){super.init(),this.populateError(e)}populateError(e){var t,n;let i=null===(t=this.dom)||void 0===t?void 0:t.getElementById("mobile-wallet-adapter-error-message"),r=null===(n=this.dom)||void 0===n?void 0:n.getElementById("mobile-wallet-adapter-error-action");if(i){if("SolanaMobileWalletAdapterError"===e.name)switch(e.code){case"ERROR_WALLET_NOT_FOUND":i.innerHTML="To use mobile wallet adapter, you must have a compatible mobile wallet application installed on your device.",r&&r.addEventListener("click",()=>{window.location.href="https://solanamobile.com/wallets"});return;case"ERROR_BROWSER_NOT_SUPPORTED":i.innerHTML="This browser appears to be incompatible with mobile wallet adapter. Open this page in a compatible mobile browser app and try again.",r&&(r.style.display="none");return}i.innerHTML=`An unexpected error occurred: ${e.message}`}else console.log("Failed to locate error dialog element")}}let e3=` 312<svg class="mobile-wallet-adapter-embedded-modal-error-icon" xmlns="http://www.w3.org/2000/svg" height="50px" viewBox="0 -960 960 960" width="50px" fill="#000000"><path d="M 280,-80 Q 197,-80 138.5,-138.5 80,-197 80,-280 80,-363 138.5,-421.5 197,-480 280,-480 q 83,0 141.5,58.5 58.5,58.5 58.5,141.5 0,83 -58.5,141.5 Q 363,-80 280,-80 Z M 824,-120 568,-376 Q 556,-389 542.5,-402.5 529,-416 516,-428 q 38,-24 61,-64 23,-40 23,-88 0,-75 -52.5,-127.5 Q 495,-760 420,-760 345,-760 292.5,-707.5 240,-655 240,-580 q 0,6 0.5,11.5 0.5,5.5 1.5,11.5 -18,2 -39.5,8 -21.5,6 -38.5,14 -2,-11 -3,-22 -1,-11 -1,-23 0,-109 75.5,-184.5 Q 311,-840 420,-840 q 109,0 184.5,75.5 75.5,75.5 75.5,184.5 0,43 -13.5,81.5 Q 653,-460 629,-428 l 251,252 z m -615,-61 71,-71 70,71 29,-28 -71,-71 71,-71 -28,-28 -71,71 -71,-71 -28,28 71,71 -71,71 z"/></svg> 313<div class="mobile-wallet-adapter-embedded-modal-title">We can't find a wallet.</div> 314<div id="mobile-wallet-adapter-error-message" class="mobile-wallet-adapter-embedded-modal-subtitle"></div> 315<div> 316 <button data-error-action id="mobile-wallet-adapter-error-action" class="mobile-wallet-adapter-embedded-modal-error-action"> 317 Find a wallet 318 </button> 319</div> 320`,e6=` 321.mobile-wallet-adapter-embedded-modal-content { 322 text-align: center; 323} 324 325.mobile-wallet-adapter-embedded-modal-error-icon { 326 margin-top: 24px; 327} 328 329.mobile-wallet-adapter-embedded-modal-title { 330 margin: 18px 100px auto 100px; 331 color: #000000; 332 font-size: 2.75em; 333 font-weight: 600; 334} 335 336.mobile-wallet-adapter-embedded-modal-subtitle { 337 margin: 30px 60px 40px 60px; 338 color: #000000; 339 font-size: 1.25em; 340 font-weight: 400; 341} 342 343.mobile-wallet-adapter-embedded-modal-error-action { 344 display: block; 345 width: 100%; 346 height: 56px; 347 /*margin-top: 40px;*/ 348 font-size: 1.25em; 349 /*line-height: 24px;*/ 350 /*letter-spacing: -1%;*/ 351 background: #000000; 352 color: #FFFFFF; 353 border-radius: 18px; 354} 355 356/* Smaller screens */ 357@media all and (max-width: 600px) { 358 .mobile-wallet-adapter-embedded-modal-title { 359 font-size: 1.5em; 360 margin-right: 12px; 361 margin-left: 12px; 362 } 363 .mobile-wallet-adapter-embedded-modal-subtitle { 364 margin-right: 12px; 365 margin-left: 12px; 366 } 367} 368`;function e8(){return eP(this,void 0,void 0,function*(){if("undefined"!=typeof window){let e=window.navigator.userAgent.toLowerCase(),t=new e5;e.includes("wv")?t.initWithError({name:"SolanaMobileWalletAdapterError",code:"ERROR_BROWSER_NOT_SUPPORTED",message:""}):t.initWithError({name:"SolanaMobileWalletAdapterError",code:"ERROR_WALLET_NOT_FOUND",message:""}),t.open()}})}let e7="SolanaMobileWalletAdapterDefaultAuthorizationCache";t.LocalSolanaMobileWalletAdapterWallet=eJ,t.RemoteSolanaMobileWalletAdapterWallet=eX,t.SolanaMobileWalletAdapterWalletName=eq,t.createDefaultAuthorizationCache=function(){let e;try{e=window.localStorage}catch(e){}return{clear(){return eP(this,void 0,void 0,function*(){if(e)try{e.removeItem(e7)}catch(e){}})},get(){return eP(this,void 0,void 0,function*(){if(e)try{let t=JSON.parse(e.getItem(e7));if(!t||!t.accounts)return t||void 0;{let e=t.accounts.map(e=>Object.assign(Object.assign({},e),{publicKey:"publicKey"in e?new Uint8Array(Object.values(e.publicKey)):ez.default.decode(e.address)}));return Object.assign(Object.assign({},t),{accounts:e})}}catch(e){}})},set(t){return eP(this,void 0,void 0,function*(){if(e)try{e.setItem(e7,JSON.stringify(t))}catch(e){}})}}},t.createDefaultChainSelector=function(){return{select(e){return eP(this,void 0,void 0,function*(){return 1===e.length?e[0]:e.includes(eO.SOLANA_MAINNET_CHAIN)?eO.SOLANA_MAINNET_CHAIN:e[0]})}}},t.createDefaultWalletNotFoundHandler=function(){return()=>eP(this,void 0,void 0,function*(){e8()})},t.defaultErrorModalWalletNotFoundHandler=e8,t.registerMwa=function(e){"undefined"!=typeof window&&window.isSecureContext&&"undefined"!=typeof document&&/android/i.test(navigator.userAgent)?e4(new eJ(e)):"undefined"!=typeof window&&window.isSecureContext&&"undefined"!=typeof document&&!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&void 0!==e.remoteHostAuthority&&e4(new eX(Object.assign(Object.assign({},e),{remoteHostAuthority:e.remoteHostAuthority})))}},614:function(e,t,n){"use strict";var i,r,o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Prom
368ise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWalletAdapter=t.WalletReadyState=t.EventEmitter=void 0,t.scopePollingDetectionStrategy=function(e){if("undefined"==typeof window||"undefined"==typeof document)return;let t=[];function n(){if(e())for(let e of t)e()}let i=setInterval(n,1e3);t.push(()=>clearInterval(i)),"loading"===document.readyState&&(document.addEventListener("DOMContentLoaded",n,{once:!0}),t.push(()=>document.removeEventListener("DOMContentLoaded",n))),"complete"!==document.readyState&&(window.addEventListener("load",n,{once:!0}),t.push(()=>window.removeEventListener("load",n))),n()},t.isIosAndRedirectable=function(){if(!navigator)return!1;let e=navigator.userAgent.toLowerCase(),t=e.includes("iphone")||e.includes("ipad"),n=e.includes("safari");return t&&n};let s=a(n(7625));t.EventEmitter=s.default;let l=n(8175);(i=r||(t.WalletReadyState=r={})).Installed="Installed",i.NotDetected="NotDetected",i.Loadable="Loadable",i.Unsupported="Unsupported";class c extends s.default{get connected(){return!!this.publicKey}autoConnect(){return o(this,void 0,void 0,function*(){yield this.connect()})}prepareTransaction(e,t){return o(this,arguments,void 0,function*(e,t,n={}){let i=this.publicKey;if(!i)throw new l.WalletNotConnectedError;return e.feePayer=e.feePayer||i,e.recentBlockhash=e.recentBlockhash||(yield t.getLatestBlockhash({commitment:n.preflightCommitment,minContextSlot:n.minContextSlot})).blockhash,e})}}t.BaseWalletAdapter=c},8175:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletWindowClosedError=t.WalletWindowBlockedError=t.WalletTimeoutError=t.WalletSignInError=t.WalletSignMessageError=t.WalletSignTransactionError=t.WalletSendTransactionError=t.WalletNotConnectedError=t.WalletKeypairError=t.WalletPublicKeyError=t.WalletAccountError=t.WalletDisconnectionError=t.WalletDisconnectedError=t.WalletConnectionError=t.WalletConfigError=t.WalletLoadError=t.WalletNotReadyError=t.WalletError=void 0;class n extends Error{constructor(e,t){super(e),this.error=t}}t.WalletError=n;class i extends n{constructor(){super(...arguments),this.name="WalletNotReadyError"}}t.WalletNotReadyError=i;class r extends n{constructor(){super(...arguments),this.name="WalletLoadError"}}t.WalletLoadError=r;class o extends n{constructor(){super(...arguments),this.name="WalletConfigError"}}t.WalletConfigError=o;class a extends n{constructor(){super(...arguments),this.name="WalletConnectionError"}}t.WalletConnectionError=a;class s extends n{constructor(){super(...arguments),this.name="WalletDisconnectedError"}}t.WalletDisconnectedError=s;class l extends n{constructor(){super(...arguments),this.name="WalletDisconnectionError"}}t.WalletDisconnectionError=l;class c extends n{constructor(){super(...arguments),this.name="WalletAccountError"}}t.WalletAccountError=c;class d extends n{constructor(){super(...arguments),this.name="WalletPublicKeyError"}}t.WalletPublicKeyError=d;class u extends n{constructor(){super(...arguments),this.name="WalletKeypairError"}}t.WalletKeypairError=u;class h extends n{constructor(){super(...arguments),this.name="WalletNotConnectedError"}}t.WalletNotConnectedError=h;class f extends n{constructor(){super(...arguments),this.name="WalletSendTransactionError"}}t.WalletSendTransactionError=f;class p extends n{constructor(){super(...arguments),this.name="WalletSignTransactionError"}}t.WalletSignTransactionError=p;class g extends n{constructor(){super(...arguments),this.name="WalletSignMessageError"}}t.WalletSignMessageError=g;class w extends n{constructor(){super(...arguments),this.name="WalletSignInError"}}t.WalletSignInError=w;class m extends n{constructor(){super(...arguments),this.name="WalletTimeoutError"}}t.WalletTimeoutError=m;class y extends n{constructor(){super(...arguments),this.name="WalletWindowBlockedError"}}t.WalletWindowBlockedError=y;class v extends n{constructor(){super(...arguments),this.name="WalletWindowClosedError"}}t.WalletWindowClosedError=v},7159:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);
368(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(614),t),r(n(8175),t),r(n(1045),t),r(n(4291),t),r(n(8416),t),r(n(7551),t)},1045:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})},r=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)0>t.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseSignInMessageSignerWalletAdapter=t.BaseMessageSignerWalletAdapter=t.BaseSignerWalletAdapter=void 0;let o=n(614),a=n(8175),s=n(8416);class l extends o.BaseWalletAdapter{sendTransaction(e,t){return i(this,arguments,void 0,function*(e,t,n={}){let i=!0;try{if((0,s.isVersionedTransaction)(e)){if(!this.supportedTransactionVersions)throw new a.WalletSendTransactionError("Sending versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(e.version))throw new a.WalletSendTransactionError(`Sending transaction version ${e.version} isn't supported by this wallet`);try{let i=(e=yield this.signTransaction(e)).serialize();return yield t.sendRawTransaction(i,n)}catch(e){if(e instanceof a.WalletSignTransactionError)throw i=!1,e;throw new a.WalletSendTransactionError(null==e?void 0:e.message,e)}}else try{let{signers:i}=n,o=r(n,["signers"]);e=yield this.prepareTransaction(e,t,o),(null==i?void 0:i.length)&&e.partialSign(...i);let a=(e=yield this.signTransaction(e)).serialize();return yield t.sendRawTransaction(a,o)}catch(e){if(e instanceof a.WalletSignTransactionError)throw i=!1,e;throw new a.WalletSendTransactionError(null==e?void 0:e.message,e)}}catch(e){throw i&&this.emit("error",e),e}})}signAllTransactions(e){return i(this,void 0,void 0,function*(){for(let t of e)if((0,s.isVersionedTransaction)(t)){if(!this.supportedTransactionVersions)throw new a.WalletSignTransactionError("Signing versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(t.version))throw new a.WalletSignTransactionError(`Signing transaction version ${t.version} isn't supported by this wallet`)}let t=[];for(let n of e)t.push((yield this.signTransaction(n)));return t})}}t.BaseSignerWalletAdapter=l;class c extends l{}t.BaseMessageSignerWalletAdapter=c;class d extends c{}t.BaseSignInMessageSignerWalletAdapter=d},4291:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWalletAdapterCompatibleStandardWallet=function(e){return r.StandardConnect in e.features&&r.StandardEvents in e.features&&(i.SolanaSignAndSendTransaction in e.features||i.SolanaSignTransaction in e.features)};let i=n(4146),r=n(9545)},8416:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVersionedTransaction=function(e){return"version"in e}},7551:function(e,t){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletAdapterNetwork=void 0,(i=n||(t.WalletAdapterNetwork=n={})).Mainnet="mainnet-beta",i.Testnet="testnet",i.Devnet="devnet"},3127:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SOLANA_CHAINS=t.SOLANA_LOCALNET_CHAIN=t.SOLANA_TESTNET_CHAIN=t.SOLANA_DEVNET_CHAIN=t.SOLANA_MAINNET_CHAIN=void 0,t.isSolanaChain=function(e){return t.SOLANA_CHAINS.includes(e)},t.SOLANA_MAINNET_CHAIN="solana:mainnet",t.SOLANA_DEVNET_CHAIN="solana:devnet",t.SOLANA_TESTNET_CHAIN="solana:testnet",t.SOLANA_LOCALNET_CHAIN="solana:localnet",t.SOLANA_CHAINS=[t.SOLANA_MAINNET_CHAIN,t.SOLANA_DEVNET_CHAIN,t.SOLANA_TESTNET_CHAIN,t.SOLANA_LOCALNET_CHAIN]},4146:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);
vendor: 1,958 bytes, line 368
368(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(7132),t),r(n(9366),t),r(n(9683),t),r(n(8102),t),r(n(4812),t)},4812:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignAndSendAllTransactions=void 0,t.SignAndSendAllTransactions="solana:signAndSendAllTransactions"},7132:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaSignAndSendTransaction=void 0,t.SolanaSignAndSendTransaction="solana:signAndSendTransaction"},9366:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaSignIn=void 0,t.SolanaSignIn="solana:signIn"},9683:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaSignMessage=void 0,t.SolanaSignMessage="solana:signMessage"},8102:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaSignTransaction=void 0,t.SolanaSignTransaction="solana:signTransaction"},1987:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Connect=t.StandardConnect=void 0,t.StandardConnect="standard:connect",t.Connect=t.StandardConnect},6283:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disconnect=t.StandardDisconnect=void 0,t.StandardDisconnect="standard:disconnect",t.Disconnect=t.StandardDisconnect},7110:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Events=t.StandardEvents=void 0,t.StandardEvents="standard:events",t.Events=t.StandardEvents},9545:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);
368(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(1987),t),r(n(6283),t),r(n(7110),t)},6001:function(e,t,n){"use strict";let i;n.r(t),n.d(t,{SolanaCloneAuthorization:function(){return f},SolanaMobileWalletAdapterError:function(){return a},SolanaMobileWalletAdapterErrorCode:function(){return o},SolanaMobileWalletAdapterProtocolError:function(){return l},SolanaMobileWalletAdapterProtocolErrorCode:function(){return s},SolanaSignInWithSolana:function(){return p},SolanaSignTransactions:function(){return h},startRemoteScenario:function(){return k},transact:function(){return P}});let r=`(?:\\nURI: (?<uri>[^\\n]+))?(?:\\nVersion: (?<version>[^\\n]+))?(?:\\nChain ID: (?<chainId>[^\\n]+))?(?:\\nNonce: (?<nonce>[^\\n]+))?(?:\\nIssued At: (?<issuedAt>[^\\n]+))?(?:\\nExpiration Time: (?<expirationTime>[^\\n]+))?(?:\\nNot Before: (?<notBefore>[^\\n]+))?(?:\\nRequest ID: (?<requestId>[^\\n]+))?(?:\\nResources:(?<resources>(?:\\n- [^\\n]+)*))?`;RegExp(`^(?<domain>[^\\n]+?) wants you to sign in with your Solana account:\\n(?<address>[^\\n]+)(?:\\n|$)(?:\\n(?<statement>[\\S\\s]*?)(?:\\n|$))??${r}\\n*$`);let o={ERROR_ASSOCIATION_PORT_OUT_OF_RANGE:"ERROR_ASSOCIATION_PORT_OUT_OF_RANGE",ERROR_REFLECTOR_ID_OUT_OF_RANGE:"ERROR_REFLECTOR_ID_OUT_OF_RANGE",ERROR_FORBIDDEN_WALLET_BASE_URL:"ERROR_FORBIDDEN_WALLET_BASE_URL",ERROR_SECURE_CONTEXT_REQUIRED:"ERROR_SECURE_CONTEXT_REQUIRED",ERROR_SESSION_CLOSED:"ERROR_SESSION_CLOSED",ERROR_SESSION_TIMEOUT:"ERROR_SESSION_TIMEOUT",ERROR_WALLET_NOT_FOUND:"ERROR_WALLET_NOT_FOUND",ERROR_INVALID_PROTOCOL_VERSION:"ERROR_INVALID_PROTOCOL_VERSION",ERROR_BROWSER_NOT_SUPPORTED:"ERROR_BROWSER_NOT_SUPPORTED"};class a extends Error{constructor(...e){let[t,n,i]=e;super(n),this.code=t,this.data=i,this.name="SolanaMobileWalletAdapterError"}}let s={ERROR_AUTHORIZATION_FAILED:-1,ERROR_INVALID_PAYLOADS:-2,ERROR_NOT_SIGNED:-3,ERROR_NOT_SUBMITTED:-4,ERROR_TOO_MANY_PAYLOADS:-5,ERROR_ATTEST_ORIGIN_ANDROID:-100};class l extends Error{constructor(...e){let[t,n,i,r]=e;super(i),this.code=n,this.data=r,this.jsonRpcMessageId=t,this.name="SolanaMobileWalletAdapterProtocolError"}}function c(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})}function d(e,t){let n=window.btoa(String.fromCharCode.call(null,...e));return t?n.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):n}function u(e,t){return c(this,void 0,void 0,function*(){let n=yield crypto.subtle.exportKey("raw",e),i=yield crypto.subtle.sign({hash:"SHA-256",name:"ECDSA"},t,n),r=new Uint8Array(n.byteLength+i.byteLength);return r.set(new Uint8Array(n),0),r.set(new Uint8Array(i),n.byteLength),r})}let h="solana:signTransactions",f="solana:cloneAuthorization",p="solana:signInWithSolana";function g(e,t){return new Proxy({},{get:(n,i)=>"then"===i?null:(null==n[i]&&(n[i]=function(n){return c(this,void 0,void 0,function*(){let{method:r,params:o}=function(e,t,n){let i=t,r=e.toString().replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`).toLowerCase();switch(e){case"authorize":{let{chain:e}=i;if("legacy"===n){switch(e){case"solana:testnet":e="testnet";break;case"solana:devnet":e="devnet";break;case"solana:mainnet":e="mainnet-beta";break;default:e=i.cluster}i.cluster=e}else{switch(e){case"testnet":case"devnet":e=`solana:${e}`;break;case"mainnet-beta":e="solana:mainnet"}i.chain=e}}case"reauthorize":{let{auth_token:e,identity:t}=i;e&&("legacy"===n?(r="reauthorize",i={auth_token:e,identity:t}):r="authorize")}}return{method:r,params:i}}(i,n,e),a=yield t(r,o);return"authorize"===r&&o.sign_in_payload&&!a.sign_in_result&&(a.sign_in_result=yield function(e,t,n){var i;return c(this,void 0,void 0,function*(){var r;let o=null!==(i=e.domain)&&void 0!==i?i:window.location.host,a=t.accounts[0].address,s=(r=function(e){let t=`${e.domain} wants you to sign in with your Solana account: 369`;t+=`${e.address}`,e.statement&&(t+=` 370 371${e.statement}`);let n=[];if(e.uri&&n.push(`URI: ${e.uri}
371`),e.version&&n.push(`Version: ${e.version}`),e.chainId&&n.push(`Chain ID: ${e.chainId}`),e.nonce&&n.push(`Nonce: ${e.nonce}`),e.issuedAt&&n.push(`Issued At: ${e.issuedAt}`),e.expirationTime&&n.push(`Expiration Time: ${e.expirationTime}`),e.notBefore&&n.push(`Not Before: ${e.notBefore}`),e.requestId&&n.push(`Request ID: ${e.requestId}`),e.resources)for(let t of(n.push("Resources:"),e.resources))n.push(`- ${t}`);return n.length&&(t+=` 372 373${n.join("\n")}`),t}(Object.assign(Object.assign({},e),{domain:o,address:a})),window.btoa(r)),l=yield n("sign_messages",{addresses:[a],payloads:[s]});return{address:a,signed_message:s,signature:l.signed_payloads[0].slice(s.length)}})}(o.sign_in_payload,a,t)),function(e,t,n){if("getCapabilities"===e)switch(n){case"legacy":{let e=[h];return!0===t.supports_clone_authorization&&e.push(f),Object.assign(Object.assign({},t),{features:e})}case"v1":return Object.assign(Object.assign({},t),{supports_sign_and_send_transactions:!0,supports_clone_authorization:t.features.includes(f)})}return t}(i,a,e)})}),n[i]),defineProperty:()=>!1,deleteProperty:()=>!1})}function w(e,t){return c(this,void 0,void 0,function*(){let n=e.slice(0,4),r=e.slice(4,16),o=e.slice(16),a=yield crypto.subtle.decrypt(m(n,r),t,o);return(void 0===i&&(i=new TextDecoder("utf-8")),i).decode(a)})}function m(e,t){return{additionalData:e,iv:t,name:"AES-GCM",tagLength:128}}function y(){return c(this,void 0,void 0,function*(){return yield crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign"])})}function v(){return c(this,void 0,void 0,function*(){return yield crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!1,["deriveKey","deriveBits"])})}function E(e){let t="",n=new Uint8Array(e),i=n.byteLength;for(let e=0;e<i;e++)t+=String.fromCharCode(n[e]);return window.btoa(t)}function M(e){if(e<49152||e>65535)throw new a(o.ERROR_ASSOCIATION_PORT_OUT_OF_RANGE,`Association port number must be between 49152 and 65535. ${e} given.`,{port:e});return e}function b(e){return e.replace(/[/+=]/g,e=>({"/":"_","+":"-","=":"."})[e])}function S(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function N(e,t){let n=null;if(t){try{n=new URL(t)}catch(e){}if((null==n?void 0:n.protocol)!=="https:")throw new a(o.ERROR_FORBIDDEN_WALLET_BASE_URL,"Base URLs supplied by wallets must be valid `https` URLs")}return n||(n=new URL("solana-wallet:/")),new URL(e.startsWith("/")?e:[...S(n.pathname),...S(e)].join("/"),n)}function T(e,t){return c(this,void 0,void 0,function*(){return function(e,t,n){return c(this,void 0,void 0,function*(){let i=function(e){if(e>=4294967296)throw Error("Outbound sequence number overflow. The maximum sequence number is 32-bytes.");let t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e,!1),new Uint8Array(t)}(t),r=new Uint8Array(12);crypto.getRandomValues(r);let o=yield crypto.subtle.encrypt(m(i,r),n,new TextEncoder().encode(e)),a=new Uint8Array(i.byteLength+r.byteLength+o.byteLength);return a.set(new Uint8Array(i),0),a.set(new Uint8Array(r),i.byteLength),a.set(new Uint8Array(o),i.byteLength+r.byteLength),a})}(JSON.stringify(e),e.id,t)})}function I(e,t){return c(this,void 0,void 0,function*(){let n=JSON.parse((yield w(e,t)));if(Object.hasOwnProperty.call(n,"error"))throw new l(n.id,n.error.code,n.error.message);return n})}function L(e,t,n){return c(this,void 0,void 0,function*(){let[i,r]=yield Promise.all([crypto.subtle.exportKey("raw",t),crypto.subtle.importKey("raw",e.slice(0,65),{name:"ECDH",namedCurve:"P-256"},!1,[])]),o=yield crypto.subtle.deriveBits({name:"ECDH",public:r},n,256),a=yield crypto.subtle.importKey("raw",o,"HKDF",!1,["deriveKey"]);return yield crypto.subtle.deriveKey({name:"HKDF",hash:"SHA-256",salt:new Uint8Array(i),info:new Uint8Array},a,{name:"AES-GCM",length:128},!1,["encrypt","decrypt"])})}function A(e,t){return c(this,void 0,void 0,function*(){let n=JSON.parse((yield w(e,t))),i="legacy";if(Object.hasOwnProperty.call(n,"v"))switch(n.v){case 1:case"1":case"v1":i="v1";break;case"legacy":i="legacy";break;default:throw new a(o.ERROR_INVALID_PROTOCOL_VERSION,`Unknown/unsupported protocol version: ${n.v}`)}return{protocol_version:i}})}let _={Firefox:0,Other:1},C=null,j=[150,150,200,500,500,750,750,1e3],D="com.solana.mobilewalletadapter.v1",O="com.solana.mobilewalletadapter.v1.base64";function x(){if("undefined"==typeof window||!0!==window.isSecureContext)throw new a(o.ERROR_SECURE_CONTEXT_REQUIRED,"The mobile wallet adapter protocol must be used in a secure context (`https`).")}function R(e){let t;try{t=new URL(e)}catch(e){throw new a(o.ERROR_FORBIDDEN_WALLET_BASE_URL,"Invalid base URL supplied by wallet")}if("https:"!==t.protocol)throw new a(o.ERROR_FORBIDDEN_WALLET_BASE_URL,"Base URLs supplied by wallets must be valid `https` URLs")}function z(e){return new DataView(e).getUint32(0,!1)}function P(e,t){return c(this,void 0,void 0,function*(){let n;x();let i=yield y(),r=yield function(e,t){return c(this,void 0,void 0,function*(){let n=M(49152+Math.floor(16384*Math.random())),i=yield function(e,t,n,i=["v1"]){return c(this,void 0,void 0,function*(){let r=M(t),o=E((yield crypto.subtle.exportKey("raw",e))),a=N("v1/associate/local",n);return a.searchParams.set("association",b(o)),a.searchParams.set("port",`${r}
373`),i.forEach(e=>{a.searchParams.set("v",e)}),a})}(e,n,t);return yield function(e){return c(this,void 0,void 0,function*(){if("https:"===e.protocol)window.location.assign(e);else try{switch(-1!==navigator.userAgent.indexOf("Firefox/")?_.Firefox:_.Other){case _.Firefox:null==C&&((C=document.createElement("iframe")).style.display="none",document.body.appendChild(C)),C.contentWindow.location.href=e.toString();break;case _.Other:{let t=new Promise((e,t)=>{function n(){clearTimeout(r),window.removeEventListener("blur",i)}function i(){n(),e()}window.addEventListener("blur",i);let r=setTimeout(()=>{n(),t()},3e3)});window.location.assign(e),yield t}}}catch(e){throw new a(o.ERROR_WALLET_NOT_FOUND,"Found no installed wallet that supports the mobile wallet protocol.")}})}(i),n})}(i.publicKey,null==t?void 0:t.baseUri),s=`ws://localhost:${r}/solana-wallet`,d=(()=>{let e=[...j];return()=>e.length>1?e.shift():e[0]})(),h=1,f=0,p={__type:"disconnected"};return new Promise((t,r)=>{let w,m,y;let E={},M=()=>c(this,void 0,void 0,function*(){if("connecting"!==p.__type){console.warn(`Expected adapter state to be \`connecting\` at the moment the websocket opens. Got \`${p.__type}\`.`);return}w.removeEventListener("open",M);let{associationKeypair:e}=p,t=yield v();w.send((yield u(t.publicKey,e.privateKey))),p={__type:"hello_req_sent",associationPublicKey:e.publicKey,ecdhPrivateKey:t.privateKey}}),b=e=>{e.wasClean?p={__type:"disconnected"}:r(new a(o.ERROR_SESSION_CLOSED,`The wallet session dropped unexpectedly (${e.code}: ${e.reason}).`,{closeEvent:e})),m()},S=e=>c(this,void 0,void 0,function*(){m(),Date.now()-n>=3e4?r(new a(o.ERROR_SESSION_TIMEOUT,`Failed to connect to the wallet websocket at ${s}.`)):(yield new Promise(e=>{let t=d();y=window.setTimeout(e,t)}),_())}),N=n=>c(this,void 0,void 0,function*(){let o=yield n.data.arrayBuffer();switch(p.__type){case"connecting":if(0!==o.byteLength)throw Error("Encountered unexpected message while connecting");let a=yield v();w.send((yield u(a.publicKey,i.privateKey))),p={__type:"hello_req_sent",associationPublicKey:i.publicKey,ecdhPrivateKey:a.privateKey};break;case"connected":try{let e=o.slice(0,4),t=z(e);if(t!==f+1)throw Error("Encrypted message has invalid sequence number");f=t;let n=yield I(o,p.sharedSecret),i=E[n.id];delete E[n.id],i.resolve(n.result)}catch(e){if(e instanceof l){let t=E[e.jsonRpcMessageId];delete E[e.jsonRpcMessageId],t.reject(e)}else throw e}break;case"hello_req_sent":{if(0===o.byteLength){let e=yield v();w.send((yield u(e.publicKey,i.privateKey))),p={__type:"hello_req_sent",associationPublicKey:i.publicKey,ecdhPrivateKey:e.privateKey};break}let n=yield L(o,p.associationPublicKey,p.ecdhPrivateKey),a=o.slice(65),s=0!==a.byteLength?yield c(this,void 0,void 0,function*(){let e=z(a.slice(0,4));if(e!==f+1)throw Error("Encrypted message has invalid sequence number");return f=e,A(a,n)}):{protocol_version:"legacy"};p={__type:"connected",sharedSecret:n,sessionProperties:s};let l=g(s.protocol_version,(e,t)=>c(this,void 0,void 0,function*(){let i=h++;return w.send((yield T({id:i,jsonrpc:"2.0",method:e,params:null!=t?t:{}},n))),new Promise((t,n)=>{E[i]={resolve(i){switch(e){case"authorize":case"reauthorize":{let{wallet_uri_base:e}=i;if(null!=e)try{R(e)}catch(e){n(e);return}}}t(i)},reject:n}})}));try{t((yield e(l)))}catch(e){r(e)}finally{m(),w.close()}}}}),_=()=>{m&&m(),p={__type:"connecting",associationKeypair:i},void 0===n&&(n=Date.now()),(w=new WebSocket(s,[D])).addEventListener("open",M),w.addEventListener("close",b),w.addEventListener("error",S),w.addEventListener("message",N),m=()=>{window.clearTimeout(y),w.removeEventListener("open",M),w.removeEventListener("close",b),w.removeEventListener("error",S),w.removeEventListener("message",N)}};_()})})}function k(e){return c(this,void 0,void 0,function*(){let t,n,i,r,s;x();let h=yield y(),f=`wss://${null==e?void 0:e.remoteHostAuthority}/reflect`,p=(()=>{let e=[...j];return()=>e.length>1?e.shift():e[0]})(),w=1,m=0,M={__type:"disconnected"},S=e=>c(this,void 0,void 0,function*(){var t;return"base64"!=n?yield e.data.arrayBuffer():(t=yield e.data,new Uint8Array(window.atob(t).split("").map(e=>e.charCodeAt(0)))).buffer}),_=yield new Promise((s,l)=>{let u;let g=()=>c(this,void 0,void 0,function*(){if("connecting"!==M.__type){console.warn(`Expected adapter state to be \`connecting\` at the moment the websocket opens. Got \`${M.__type}\`.`);return}n=i.protocol.includes(O)?"base64":"binary",i.removeEventListener("open",g)}),w=e=>{e.wasClean?M={__type:"disconnected"}:l(new a(o.ERROR_SESSION_CLOSED,`The wallet session dropped unexpectedly (${e.code}: ${e.reason}).`,{closeEvent:e})),r()},m=e=>c(this,void 0,void 0,function*(){r(),Date.now()-t>=3e4?l(new a(o.ERROR_SESSION_TIMEOUT,`Failed to connect to the wallet websocket at ${f}.`)):(yield new Promise(e=>{let t=p();u=window.setTimeout(e,t)}),v())}),y=t=>c(this,void 0,void 0,function*(){let n=yield S(t);if("connecting"===M.__type){if(0==n.byteLength)throw Error("Encountered unexpected message while connecting");let t=function(e){let{value:t,offset:n}=function(e){var t,n=new Uint8Array(e),i=e.byteLength,r=0,o=0;do{if(o>=i||o>10)throw RangeError("Failed to decode varint");r|=(127&(t=n[o++]))<<7*o}while(t>=128);return{value:r,offset:o}}(e);return new Uint8Array(e.slice(n,n+t))}(n);M={__type:"reflector_id_received",reflectorId:t};let r=yield function(e,t,n,i,r=["v1"]){return c(this,void 0,void 0,function*(){let o=E((yield crypto.subtle.exportKey("raw",e))),a=N("v1/associate/remote",i);return a.searchParams.set("association",b(o)),a.searchParams.set("reflector",`${t}`),a.searchParams.set("id",`${d(n,!0)}
373`),r.forEach(e=>{a.searchParams.set("v",e)}),a})}(h.publicKey,e.remoteHostAuthority,t,null==e?void 0:e.baseUri);i.removeEventListener("message",y),s(r)}}),v=()=>{r&&r(),M={__type:"connecting",associationKeypair:h},void 0===t&&(t=Date.now()),(i=new WebSocket(f,[D,O])).addEventListener("open",g),i.addEventListener("close",w),i.addEventListener("error",m),i.addEventListener("message",y),r=()=>{window.clearTimeout(u),i.removeEventListener("open",g),i.removeEventListener("close",w),i.removeEventListener("error",m),i.removeEventListener("message",y)}};v()}),C=!1;return{associationUrl:_,close:()=>{i.close(),s()},wallet:new Promise((e,t)=>{let f={},p=r=>c(this,void 0,void 0,function*(){let o=yield S(r);switch(M.__type){case"reflector_id_received":if(0!==o.byteLength)throw Error("Encountered unexpected message while awaiting reflection");let a=yield v(),s=yield u(a.publicKey,h.privateKey);"base64"==n?i.send(d(s)):i.send(s),M={__type:"hello_req_sent",associationPublicKey:h.publicKey,ecdhPrivateKey:a.privateKey};break;case"connected":try{let e=o.slice(0,4),t=z(e);if(t!==m+1)throw Error("Encrypted message has invalid sequence number");m=t;let n=yield I(o,M.sharedSecret),i=f[n.id];delete f[n.id],i.resolve(n.result)}catch(e){if(e instanceof l){let t=f[e.jsonRpcMessageId];delete f[e.jsonRpcMessageId],t.reject(e)}else throw e}break;case"hello_req_sent":{let r=yield L(o,M.associationPublicKey,M.ecdhPrivateKey),a=o.slice(65),s=0!==a.byteLength?yield c(this,void 0,void 0,function*(){let e=z(a.slice(0,4));if(e!==m+1)throw Error("Encrypted message has invalid sequence number");return m=e,A(a,r)}):{protocol_version:"legacy"};M={__type:"connected",sharedSecret:r,sessionProperties:s};let l=g(s.protocol_version,(e,t)=>c(this,void 0,void 0,function*(){let o=w++,a=yield T({id:o,jsonrpc:"2.0",method:e,params:null!=t?t:{}},r);return"base64"==n?i.send(d(a)):i.send(a),new Promise((t,n)=>{f[o]={resolve(i){switch(e){case"authorize":case"reauthorize":{let{wallet_uri_base:e}=i;if(null!=e)try{R(e)}catch(e){n(e);return}}}t(i)},reject:n}})}));C=!0;try{e(l)}catch(e){t(e)}}}});i.addEventListener("message",p),s=()=>{i.removeEventListener("message",p),r(),C||t(new a(o.ERROR_SESSION_CLOSED,"The wallet session was closed before connection.",{closeEvent:new CloseEvent("socket was closed before connection")}))}})}})}},8757:function(e,t,n){"use strict";n.d(t,{H:function(){return c},i1:function(){return r},mI:function(){return s},su:function(){return l}});var i,r,o=n(2015),a=n(4659);(i=r||(r={})).Installed="Installed",i.NotDetected="NotDetected",i.Loadable="Loadable",i.Unsupported="Unsupported";class s extends o.Z{get connected(){return!!this.publicKey}async autoConnect(){await this.connect()}async prepareTransaction(e,t,n={}){let i=this.publicKey;if(!i)throw new a.oS;return e.feePayer=e.feePayer||i,e.recentBlockhash=e.recentBlockhash||(await t.getLatestBlockhash({commitment:n.preflightCommitment,minContextSlot:n.minContextSlot})).blockhash,e}}function l(e){if("undefined"==typeof window||"undefined"==typeof document)return;let t=[];function n(){if(e())for(let e of t)e()}let i=setInterval(n,1e3);t.push(()=>clearInterval(i)),"loading"===document.readyState&&(document.addEventListener("DOMContentLoaded",n,{once:!0}),t.push(()=>document.removeEventListener("DOMContentLoaded",n))),"complete"!==document.readyState&&(window.addEventListener("load",n,{once:!0}),t.push(()=>window.removeEventListener("load",n))),n()}function c(){if(!navigator)return!1;let e=navigator.userAgent.toLowerCase(),t=e.includes("iphone")||e.includes("ipad"),n=e.includes("safari");return t&&n}},4659:function(e,t,n){"use strict";n.d(t,{$w:function(){return s},IW:function(){return f},Nx:function(){return u},OZ:function(){return r},PY:function(){return p},UG:function(){return c},W8:function(){return o},at:function(){return l},bD:function(){return w},cO:function(){return d},fk:function(){return g},lj:function(){return i},oS:function(){return h},p6:function(){return a}});class i extends Error{constructor(e,t){super(e),this.error=t}}class r extends i{constructor(){super(...arguments),this.name="WalletNotReadyError"}}class o extends i{constructor(){super(...arguments),this.name="WalletLoadError"}}class a extends i{constructor(){super(...arguments),this.name="WalletConfigError"}}class s extends i{constructor(){super(...arguments),this.name="WalletConnectionError"}}class l extends i{constructor(){super(...arguments),this.name="WalletDisconnectedError"}}class c extends i{constructor(){super(...arguments),this.name="WalletDisconnectionError"}}class d extends i{constructor(){super(...arguments),this.name="WalletAccountError"}}class u extends i{constructor(){super(...arguments),this.name="WalletPublicKeyError"}}class h extends i{constructor(){super(...arguments),this.name="WalletNotConnectedError"}}class f extends i{constructor(){super(...arguments),this.name="WalletSendTransactionError"}}class p extends i{constructor(){super(...arguments),this.name="WalletSignTransactionError"}}class g extends i{constructor(){super(...arguments),this.name="WalletSignMessageError"}}class w extends i{constructor(){super(...arguments),this.name="WalletSignInError"}}},5462:function(e,t,n){"use strict";n.d(t,{eC:function(){return s},sz:function(){return a}});var i=n(8757),r=n(4659),o=n(3887);class a extends i.mI{async sendTransaction(e,t,n={}){let i=!0;try{if((0,o.W)(e)){if(!this.supportedTransactionVersions)throw new r.IW("Sending versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(e.version))throw new r.IW(`Sending transaction version ${e.ver
373sion} isn't supported by this wallet`);try{let i=(e=await this.signTransaction(e)).serialize();return await t.sendRawTransaction(i,n)}catch(e){if(e instanceof r.PY)throw i=!1,e;throw new r.IW(e?.message,e)}}else try{let{signers:i,...r}=n;e=await this.prepareTransaction(e,t,r),i?.length&&e.partialSign(...i);let o=(e=await this.signTransaction(e)).serialize();return await t.sendRawTransaction(o,r)}catch(e){if(e instanceof r.PY)throw i=!1,e;throw new r.IW(e?.message,e)}}catch(e){throw i&&this.emit("error",e),e}}async signAllTransactions(e){for(let t of e)if((0,o.W)(t)){if(!this.supportedTransactionVersions)throw new r.PY("Signing versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(t.version))throw new r.PY(`Signing transaction version ${t.version} isn't supported by this wallet`)}let t=[];for(let n of e)t.push(await this.signTransaction(n));return t}}class s extends a{}},3887:function(e,t,n){"use strict";function i(e){return"version"in e}n.d(t,{W:function(){return i}})},6454:function(e,t,n){"use strict";var i,r;n.d(t,{Q:function(){return i}}),(r=i||(i={})).Mainnet="mainnet-beta",r.Testnet="testnet",r.Devnet="devnet"},4017:function(e,t,n){"use strict";n.d(t,{B:function(){return p}});var i=n(5462),r=n(8757),o=n(4659),a=n(6022),s=n(3887),l=n(4024),c=n(2957).Buffer;function d(e){return(2147483648|e)>>>0}async function u(e,t){let n=await f(e,5,0,t);return new l.PublicKey(n)}async function h(e,t,n){let i=c.alloc(1);i.writeUInt8(1,0);let r=(0,s.W)(t)?t.message.serialize():t.serializeMessage(),o=c.concat([i,n,r]);return await f(e,6,1,o)}async function f(e,t,n,i){let r=0,o=0;if(i.length>255)for(;i.length-o>255;){let s=i.slice(o,o+255);if(2!==(await e.send(224,t,n,2|r,s)).length)throw new a.rZ(a.WC.INCORRECT_DATA);r|=1,o+=255}let s=i.slice(o),l=await e.send(224,t,n,r,s);return l.slice(0,l.length-2)}class p extends i.sz{constructor(e={}){super(),this.name="Ledger",this.url="https://ledger.com",this.icon="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzUgMzUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0ibTIzLjU4OCAwaC0xNnYyMS41ODNoMjEuNnYtMTZhNS41ODUgNS41ODUgMCAwIDAgLTUuNi01LjU4M3oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUuNzM5KSIvPjxwYXRoIGQ9Im04LjM0MiAwaC0yLjc1N2E1LjU4NSA1LjU4NSAwIDAgMCAtNS41ODUgNS41ODV2Mi43NTdoOC4zNDJ6Ii8+PHBhdGggZD0ibTAgNy41OWg4LjM0MnY4LjM0MmgtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDUuNzM5KSIvPjxwYXRoIGQ9Im0xNS4xOCAyMy40NTFoMi43NTdhNS41ODUgNS41ODUgMCAwIDAgNS41ODUtNS42di0yLjY3MWgtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMS40NzggMTEuNDc4KSIvPjxwYXRoIGQ9Im03LjU5IDE1LjE4aDguMzQydjguMzQyaC04LjM0MnoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUuNzM5IDExLjQ3OCkiLz48cGF0aCBkPSJtMCAxNS4xOHYyLjc1N2E1LjU4NSA1LjU4NSAwIDAgMCA1LjU4NSA1LjU4NWgyLjc1N3YtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDExLjQ3OCkiLz48L2c+PC9zdmc+",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator&&navigator.hid?r.i1.Loadable:r.i1.Unsupported,this._disconnected=()=>{let e=this._transport;e&&(e.off("disconnect",this._disconnected),this._transport=null,this._publicKey=null,this.emit("error",new o.at),this.emit("disconnect"))},this._derivationPath=e.derivationPath||function(e,t){let n=c.alloc(17),i=n.writeUInt8(4,0);return i=n.writeUInt32BE(d(44),i),i=n.writeUInt32BE(d(501),i),i=n.writeUInt32BE(d(0),i),n.writeUInt32BE(d(0),i),n}(0,0),this._connecting=!1,this._transport=null,this._publicKey=null}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{let e,t,i;if(this.connected||this.connecting)return;if(this._readyState!==r.i1.Loadable)throw new o.OZ;this._connecting=!0;try{e=(await n.e(400).then(n.bind(n,7400))).default}catch(e){throw new o.W8(e?.message,e)}try{t=await e.create()}catch(e){throw new o.$w(e?.message,e)}try{i=await u(t,this._derivationPath)}catch(e){throw new o.Nx(e?.message,e)}t.on("disconnect",this._disconnected),this._transport=t,this._publicKey=i,this.emit("connect",i)}
373catch(e){throw this.emit("error",e),e}finally{this._connecting=!1}}async disconnect(){let e=this._transport;if(e){e.off("disconnect",this._disconnected),this._transport=null,this._publicKey=null;try{await e.close()}catch(e){this.emit("error",new o.UG(e?.message,e))}}this.emit("disconnect")}async signTransaction(e){try{let t=this._transport,n=this._publicKey;if(!t||!n)throw new o.oS;try{let i=await h(t,e,this._derivationPath);e.addSignature(n,i)}catch(e){throw new o.PY(e?.message,e)}return e}catch(e){throw this.emit("error",e),e}}}},4298:function(e,t,n){"use strict";n.d(t,{O:function(){return l}});var i=n(5462),r=n(8757),o=n(4659),a=n(3887),s=n(4024);class l extends i.eC{constructor(e={}){super(),this.name="Phantom",this.url="https://phantom.app",this.icon="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiB2aWV3Qm94PSIwIDAgMTA4IDEwOCIgZmlsbD0ibm9uZSI+CjxyZWN0IHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiByeD0iMjYiIGZpbGw9IiNBQjlGRjIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00Ni41MjY3IDY5LjkyMjlDNDIuMDA1NCA3Ni44NTA5IDM0LjQyOTIgODUuNjE4MiAyNC4zNDggODUuNjE4MkMxOS41ODI0IDg1LjYxODIgMTUgODMuNjU2MyAxNSA3NS4xMzQyQzE1IDUzLjQzMDUgNDQuNjMyNiAxOS44MzI3IDcyLjEyNjggMTkuODMyN0M4Ny43NjggMTkuODMyNyA5NCAzMC42ODQ2IDk0IDQzLjAwNzlDOTQgNTguODI1OCA4My43MzU1IDc2LjkxMjIgNzMuNTMyMSA3Ni45MTIyQzcwLjI5MzkgNzYuOTEyMiA2OC43MDUzIDc1LjEzNDIgNjguNzA1MyA3Mi4zMTRDNjguNzA1MyA3MS41NzgzIDY4LjgyNzUgNzAuNzgxMiA2OS4wNzE5IDY5LjkyMjlDNjUuNTg5MyA3NS44Njk5IDU4Ljg2ODUgODEuMzg3OCA1Mi41NzU0IDgxLjM4NzhDNDcuOTkzIDgxLjM4NzggNDUuNjcxMyA3OC41MDYzIDQ1LjY3MTMgNzQuNDU5OEM0NS42NzEzIDcyLjk4ODQgNDUuOTc2OCA3MS40NTU2IDQ2LjUyNjcgNjkuOTIyOVpNODMuNjc2MSA0Mi41Nzk0QzgzLjY3NjEgNDYuMTcwNCA4MS41NTc1IDQ3Ljk2NTggNzkuMTg3NSA0Ny45NjU4Qzc2Ljc4MTYgNDcuOTY1OCA3NC42OTg5IDQ2LjE3MDQgNzQuNjk4OSA0Mi41Nzk0Qzc0LjY5ODkgMzguOTg4NSA3Ni43ODE2IDM3LjE5MzEgNzkuMTg3NSAzNy4xOTMxQzgxLjU1NzUgMzcuMTkzMSA4My42NzYxIDM4Ljk4ODUgODMuNjc2MSA0Mi41Nzk0Wk03MC4yMTAzIDQyLjU3OTVDNzAuMjEwMyA0Ni4xNzA0IDY4LjA5MTYgNDcuOTY1OCA2NS43MjE2IDQ3Ljk2NThDNjMuMzE1NyA0Ny45NjU4IDYxLjIzMyA0Ni4xNzA0IDYxLjIzMyA0Mi41Nzk1QzYxLjIzMyAzOC45ODg1IDYzLjMxNTcgMzcuMTkzMSA2NS43MjE2IDM3LjE5MzFDNjguMDkxNiAzNy4xOTMxIDcwLjIxMDMgMzguOTg4NSA3MC4yMTAzIDQyLjU3OTVaIiBmaWxsPSIjRkZGREY4Ii8+Cjwvc3ZnPg==",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState="undefined"==typeof window||"undefined"==typeof document?r.i1.Unsupported:r.i1.NotDetected,this._disconnected=()=>{let e=this._wallet;e&&(e.off("disconnect",this._disconnected),e.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null,this.emit("error",new o.at),this.emit("disconnect"))},this._accountChanged=e=>{let t=this._publicKey;if(t){try{e=new s.PublicKey(e.toBytes())}catch(e){this.emit("error",new o.Nx(e?.message,e));return}t.equals(e)||(this._publicKey=e,this.emit("connect",e))}},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==r.i1.Unsupported&&((0,r.H)()?(this._readyState=r.i1.Loadable,this.emit("readyStateChange",this._readyState)):(0,r.su)(()=>!!(window.phantom?.solana?.isPhantom||window.solana?.isPhantom)&&(this._readyState=r.i1.Installed,this.emit("readyStateChange",this._readyState),!0)))}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async autoConnect(){this.readyState===r.i1.Installed&&await this.connect()}async connect(){try{let e;if(this.connected||this.connecting)return;if(this.readyState===r.i1.Loadable){let e=encodeURIComponent(window.location.href),t=encodeURIComponent(window.location.origin);window.location.href=`https://phantom.app/ul/browse/${e}?ref=${t}`;return}if(this.readyState!==r.i1.Installed)throw new o.OZ;this._connecting=!0;let t=window.phantom?.solana||window.solana;if(!t.isConnected)try{await t.connect()}catch(e){throw new o.$w(e?.message,e)}if(!t.publicKey)throw new o.cO;try{e=new s.PublicKey(t.publicKey.toBytes())}catch(e){throw new o.Nx(e?.message,e)}t.on("disconnect",this._disconnected),t.on("accountChanged",this._accountChanged),this._wallet=t,this._publicKey=e,this.emit
373("connect",e)}catch(e){throw this.emit("error",e),e}finally{this._connecting=!1}}async disconnect(){let e=this._wallet;if(e){e.off("disconnect",this._disconnected),e.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null;try{await e.disconnect()}catch(e){this.emit("error",new o.UG(e?.message,e))}}this.emit("disconnect")}async sendTransaction(e,t,n={}){try{let i=this._wallet;if(!i)throw new o.oS;try{let{signers:r,...o}=n;(0,a.W)(e)?r?.length&&e.sign(r):(e=await this.prepareTransaction(e,t,o),r?.length&&e.partialSign(...r)),o.preflightCommitment=o.preflightCommitment||t.commitment;let{signature:s}=await i.signAndSendTransaction(e,o);return s}catch(e){if(e instanceof o.lj)throw e;throw new o.IW(e?.message,e)}}catch(e){throw this.emit("error",e),e}}async signTransaction(e){try{let t=this._wallet;if(!t)throw new o.oS;try{return await t.signTransaction(e)||e}catch(e){throw new o.PY(e?.message,e)}}catch(e){throw this.emit("error",e),e}}async signAllTransactions(e){try{let t=this._wallet;if(!t)throw new o.oS;try{return await t.signAllTransactions(e)||e}catch(e){throw new o.PY(e?.message,e)}}catch(e){throw this.emit("error",e),e}}async signMessage(e){try{let t=this._wallet;if(!t)throw new o.oS;try{let{signature:n}=await t.signMessage(e);return n}catch(e){throw new o.fk(e?.message,e)}}catch(e){throw this.emit("error",e),e}}}},2948:function(e,t,n){"use strict";n.d(t,{s:function(){return p}});
373var i=n(2265),r=n(2941),o=n(8757),a=n(5408),s=n(4887);let l=({id:e,children:t,expanded:n=!1})=>{let r=(0,i.useRef)(null),o=(0,i.useRef)(!0),a=()=>{let e=r.current;e&&requestAnimationFrame(()=>{e.style.height=e.scrollHeight+"px"})},s=()=>{let e=r.current;e&&requestAnimationFrame(()=>{e.style.height=e.offsetHeight+"px",e.style.overflow="hidden",requestAnimationFrame(()=>{e.style.height="0"})})};return(0,i.useLayoutEffect)(()=>{n?a():s()},[n]),(0,i.useLayoutEffect)(()=>{let e=r.current;if(e)return o.current&&(t(),o.current=!1),e.addEventListener("transitionend",i),()=>e.removeEventListener("transitionend",i);function t(){e&&(e.style.overflow=n?"initial":"hidden",n&&(e.style.height="auto"))}function i(n){e&&n.target===e&&"height"===n.propertyName&&t()}},[n]),i.createElement("div",{className:"wallet-adapter-collapse",id:e,ref:r,role:"region",style:{height:0,transition:o.current?void 0:"height 250ms ease-out"}},t)};var c=n(6625),d=n(724);let u=({handleClick:e,tabIndex:t,wallet:n})=>i.createElement("li",null,i.createElement(c.z,{onClick:e,startIcon:i.createElement(d.o,{wallet:n}),tabIndex:t},n.adapter.name,n.readyState===o.i1.Installed&&i.createElement("span",null,"Detected"))),h=()=>i.createElement("svg",{width:"97",height:"96",viewBox:"0 0 97 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("circle",{cx:"48.5",cy:"48",r:"48",fill:"url(#paint0_linear_880_5115)",fillOpacity:"0.1"}),i.createElement("circle",{cx:"48.5",cy:"48",r:"47",stroke:"url(#paint1_linear_880_5115)",strokeOpacity:"0.4",strokeWidth:"2"}),i.createElement("g",{clipPath:"url(#clip0_880_5115)"},i.createElement("path",{d:"M65.5769 28.1523H31.4231C27.6057 28.1523 24.5 31.258 24.5 35.0754V60.9215C24.5 64.7389 27.6057 67.8446 31.4231 67.8446H65.5769C69.3943 67.8446 72.5 64.7389 72.5 60.9215V35.0754C72.5 31.258 69.3943 28.1523 65.5769 28.1523ZM69.7308 52.1523H59.5769C57.2865 52.1523 55.4231 50.289 55.4231 47.9985C55.4231 45.708 57.2864 43.8446 59.5769 43.8446H69.7308V52.1523ZM69.7308 41.0754H59.5769C55.7595 41.0754 52.6539 44.1811 52.6539 47.9985C52.6539 51.8159 55.7595 54.9215 59.5769 54.9215H69.7308V60.9215C69.7308 63.2119 67.8674 65.0754 65.5769 65.0754H31.4231C29.1327 65.0754 27.2692 63.212 27.2692 60.9215V35.0754C27.2692 32.785 29.1326 30.9215 31.4231 30.9215H65.5769C67.8673 30.9215 69.7308 32.7849 69.7308 35.0754V41.0754Z",fill:"url(#paint2_linear_880_5115)"}),i.createElement("path",{d:"M61.4231 46.6172H59.577C58.8123 46.6172 58.1924 47.2371 58.1924 48.0018C58.1924 48.7665 58.8123 49.3863 59.577 49.3863H61.4231C62.1878 49.3863 62.8077 48.7664 62.8077 48.0018C62.8077 47.2371 62.1878 46.6172 61.4231 46.6172Z",fill:"url(#paint3_linear_880_5115)"})),i.createElement("defs",null,i.createElement("linearGradient",{id:"paint0_linear_880_5115",x1:"3.41664",y1:"98.0933",x2:"103.05",y2:"8.42498",gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"#9945FF"}),i.createElement("stop",{offset:"0.14",stopColor:"#8A53F4"}),i.createElement("stop",{offset:"0.42",stopColor:"#6377D6"}),i.createElement("stop",{offset:"0.79",stopColor:"#24B0A7"}),i.createElement("stop",{offset:"0.99",stopColor:"#00D18C"}),i.createElement("stop",{offset:"1",stopColor:"#00D18C"})),i.createElement("linearGradient",{id:"paint1_linear_880_5115",x1:"3.41664",y1:"98.0933",x2:"103.05",y2:"8.42498",gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"#9945FF"}),i.createElement("stop",{offset:"0.14",stopColor:"#8A53F4"}),i.createElement("stop",{offset:"0.42",stopColor:"#6377D6"}),i.createElement("stop",{offset:"0.79",stopColor:"#24B0A7"}),i.createElement("stop",{offset:"0.99",stopColor:"#00D18C"}),i.createElement("stop",{offset:"1",stopColor:"#00D18C"})),i.createElement("linearGradient",{id:"paint2_linear_880_5115",x1:"25.9583",y1:"68.7101",x2:"67.2337",y2:"23.7879",gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"#9945FF"}),i.createElement("stop",{offset:"0.14",stopColor:"#8A53F4"}),i.createElement("stop",{offset:"0.42",stopColor:"#6377D6"}),i.createElement("stop",{offset:"0.79",stopColor:"#24B0A7"}),i.createElement("stop",{offset:"0.99",stopColor:"#00D18C"}),i.createElement("stop",{offset:"1",stopColor:"#00D18C"})),i.createElement("linearGradient",{id:"paint3_linear_880_5115",x1:"58.3326",y1:"49.4467",x2:"61.0002",y2:"45.4453",gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"#9945FF"}),i.createElement("stop",{offset:"0.14",stopColor:"#8A53F4"}),i.createElement("stop",{offset:"0.42",stopColor:"#6377D6"}),i.createElement("stop",{offset:"0.79",stopColor:"#24B0A7"}),i.createElement("stop",{offset:"0.99",stopColor:"#00D18C"}),i.createElement("stop",{offset:"1",stopColor:"#00D18C"})),i.createElement("clipPath",{id:"clip0_880_5115"},i.createElement("rect",{width:"48",height:"48",fill:"white",transform:"translate(24.5 24)"}
373)))),f=({className:e="",container:t="body"})=>{let n=(0,i.useRef)(null),{wallets:c,select:d}=(0,a.O)(),{setVisible:f}=(0,r.h)(),[p,g]=(0,i.useState)(!1),[w,m]=(0,i.useState)(!1),[y,v]=(0,i.useState)(null),[E,M]=(0,i.useMemo)(()=>{let e=[],t=[];for(let n of c)n.readyState===o.i1.Installed?e.push(n):t.push(n);return e.length?[e,t]:[t,[]]},[c]),b=(0,i.useCallback)(()=>{m(!1),setTimeout(()=>f(!1),150)},[f]),S=(0,i.useCallback)(e=>{e.preventDefault(),b()},[b]),N=(0,i.useCallback)((e,t)=>{d(t),S(e)},[d,S]),T=(0,i.useCallback)(()=>g(!p),[p]),I=(0,i.useCallback)(e=>{let t=n.current;if(!t)return;let i=t.querySelectorAll("button"),r=i[0],o=i[i.length-1];e.shiftKey?document.activeElement===r&&(o.focus(),e.preventDefault()):document.activeElement===o&&(r.focus(),e.preventDefault())},[n]);return(0,i.useLayoutEffect)(()=>{let e=e=>{"Escape"===e.key?b():"Tab"===e.key&&I(e)},{overflow:t}=window.getComputedStyle(document.body);return setTimeout(()=>m(!0),0),document.body.style.overflow="hidden",window.addEventListener("keydown",e,!1),()=>{document.body.style.overflow=t,window.removeEventListener("keydown",e,!1)}},[b,I]),(0,i.useLayoutEffect)(()=>v(document.querySelector(t)),[t]),y&&(0,s.createPortal)(i.createElement("div",{"aria-labelledby":"wallet-adapter-modal-title","aria-modal":"true",className:`wallet-adapter-modal ${w&&"wallet-adapter-modal-fade-in"} ${e}`,ref:n,role:"dialog"},i.createElement("div",{className:"wallet-adapter-modal-container"},i.createElement("div",{className:"wallet-adapter-modal-wrapper"},i.createElement("button",{onClick:S,className:"wallet-adapter-modal-button-close"},i.createElement("svg",{width:"14",height:"14"},i.createElement("path",{d:"M14 12.461 8.3 6.772l5.234-5.233L12.006 0 6.772 5.234 1.54 0 0 1.539l5.234 5.233L0 12.006l1.539 1.528L6.772 8.3l5.69 5.7L14 12.461z"}))),E.length?i.createElement(i.Fragment,null,i.createElement("h1",{className:"wallet-adapter-modal-title"},"Connect a wallet on Solana to continue"),i.createElement("ul",{className:"wallet-adapter-modal-list"},E.map(e=>i.createElement(u,{key:e.adapter.name,handleClick:t=>N(t,e.adapter.name),wallet:e})),M.length?i.createElement(l,{expanded:p,id:"wallet-adapter-modal-collapse"},M.map(e=>i.createElement(u,{key:e.adapter.name,handleClick:t=>N(t,e.adapter.name),tabIndex:p?0:-1,wallet:e}))):null),M.length?i.createElement("button",{className:"wallet-adapter-modal-list-more",onClick:T,tabIndex:0},i.createElement("span",null,p?"Less ":"More ","options"),i.createElement("svg",{width:"13",height:"7",viewBox:"0 0 13 7",xmlns:"http://www.w3.org/2000/svg",className:`${p?"wallet-adapter-modal-list-more-icon-rotate":""}`},i.createElement("path",{d:"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z"}))):null):i.createElement(i.Fragment,null,i.createElement("h1",{className:"wallet-adapter-modal-title"},"You'll need a wallet on Solana to continue"),i.createElement("div",{className:"wallet-adapter-modal-middle"},i.createElement(h,null)),M.length?i.createElement(i.Fragment,null,i.createElement("button",{className:"wallet-adapter-modal-list-more",onClick:T,tabIndex:0},i.createElement("span",null,p?"Hide ":"Already have a wallet? View ","options"),i.createElement("svg",{width:"13",height:"7",viewBox:"0 0 13 7",xmlns:"http://www.w3.org/2000/svg",className:`${p?"wallet-adapter-modal-list-more-icon-rotate":""}`},i.createElement("path",{d:"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z"}))),i.createElement(l,{expanded:p,id:"wallet-adapter-modal-collapse"},i.createElement("ul",{className:"wallet-adapter-modal-list"},M.map(e=>i.createElement(u,{key:e.adapter.name,handleClick:t=>N(t,e.adapter.name),tabIndex:p?0:-1,wallet:e}))))):null))),i.createElement("div",{className:"wallet-adapter-modal-overlay",onMouseDown:S})),y)},p=({children:e,...t})=>{let[n,o]=(0,i.useState)(!1);return i.createElement(r.g.Provider,{value:{visible:n,setVisible:o}},e,n&&i.createElement(f,{...t}))}},4968:function(e,t,n){"use strict";n.d(t,{U:function(){return a}});var i=n(4024),r=n(2265),o=n(3816);let a=({children:e,endpoint:t,config:n={commitment:"confirmed"}})=>{let a=(0,r.useMemo)(()=>new i.Connection(t,n),[t,n]);return r.createElement(o.h.Provider,{value:{connection:a}},e)}},2183:function(e,t,n){"use strict";let i,r,o;n.d(t,{n:function(){return ec}});var a,s,l,c,d,u,h,f,p,g,w,m,y,v,E,M,b,S,N,T,I,L=n(2887),A=n(7684),_=n(282),C=n(9186),j=n(3747);let D=function(e){return C.V in e.features&&j.k in e.features&&(A.G in e.features||_.R in e.features)};var O=n(8757),x=n(4659),R=n(3887),z=n(4402);let P="solana:signIn";var k=n(8746);function W(e){switch(e){case"processed":case"confirmed":case"finalized":case void 0:return e;case"recent":return"processed";case"single":case"singleGossip":return"confirmed";case"max":case"root":return"finalized";default:return}}var U=n(4024),B=n(3005);new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap;var F=function(e){if(e.length>=255)throw TypeError("Alphabet too long");let t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){let i=e.charAt(n),r=i.charCodeAt(0);if(255!==t[r])throw TypeError(i+" is ambiguous");t[r]=n}let n=e.length,i=e.charAt(0),r=Math.log(n)/Math.log(256),o=Math.log(256)/Math.log(n);function a(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;let o=0,a=0,s=0;for(;e[o]===i;)a++,o++;let l=(e.length-o)*r+1>>>0,c=new Uint8Array(l);for(;o<e.length;){let i=e.charCodeAt(o);if(i>255)return;let r=t[i];if(255===r)return;let a=0;for(let e=l-1;(0!==r||a<s)&&-1!==e;e--,a++)r+=n*c[e]>>>0,c[e]=r%256>>>0,r=r/256>>>0;if(0!==r)throw Error("Non-zero carry");s=a,o++}let d=l-s;for(;d!==l&&0===c[d];)d++;let u=new Uint8Array(a+(l-d)),h=a;for(;d!==l;)u[h++]=c[d++];return u}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";let r=0,a=0,s=0,l=t.length;for(;s!==l&&0===t[s];)s++,r++;let c=(l-s)*o+1>>>0,d=new Uint8Array(c);for(;s!==l;){let e=t[s],i=0;for(let t=c-1;(0!==e||i<a)&&-1!==t;t--,i++)e+=256*d[t]>>>0,d[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw Error("Non-zero carry");a=i,s++}let u=c-a;for(;u!==c&&0===d[u];)u++;let h=i.repeat(r);for(;u<c;++u)h+=e.charAt(d[u]);return h},decodeUnsafe:a,decode:function(e){let t=a(e);if(t)return t;throw Error("Non-base"+n+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),Y=function(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},H=function(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};class Q extends O.mI{get name(){return Y(this,p,"f").name}get url(){return"https://github.com/solana-labs/wallet-standard"}get icon(){return Y(this,p,"f").icon}get readyState(){return Y(this,g,"f")}get publicKey(){return Y(this,c,"f")}get connecting(){return Y(this,d,"f")}get supportedTransactionVersions(){return Y(this,f,"f")}get wallet(){return Y(this,p,"f")}get standard(){return!0}constructor({wallet:e}){super(),s.add(this),l.set(this,void 0),c.set(this,void 0),d.set(this,void 0),u.set(this,void 0),h.set(this,void 0),f.set(this,void 0),p.set(this,void 0),g.set(this,"undefined"==typeof window||"undefined"==typeof document?O.i1.Unsupported:O.i1.Installed),E.set(this,e=>{if("accounts"in e){let e=Y(this,p,"f").accounts[0];Y(this,l,"f")&&!Y(this,u,"f")&&e!==Y(this,l,"f")&&(e?Y(this,s,"m",m).call(this,e):(this.emit
373("error",new x.at),Y(this,s,"m",y).call(this)))}"features"in e&&Y(this,s,"m",v).call(this)}),H(this,p,e,"f"),H(this,l,null,"f"),H(this,c,null,"f"),H(this,d,!1,"f"),H(this,u,!1,"f"),H(this,h,Y(this,p,"f").features[j.k].on("change",Y(this,E,"f")),"f"),Y(this,s,"m",v).call(this)}destroy(){H(this,l,null,"f"),H(this,c,null,"f"),H(this,d,!1,"f"),H(this,u,!1,"f");let e=Y(this,h,"f");e&&(H(this,h,null,"f"),e())}async autoConnect(){return Y(this,s,"m",w).call(this,{silent:!0})}async connect(){return Y(this,s,"m",w).call(this)}async disconnect(){if(B.R in Y(this,p,"f").features)try{H(this,u,!0,"f"),await Y(this,p,"f").features[B.R].disconnect()}catch(e){this.emit("error",new x.UG(e?.message,e))}finally{H(this,u,!1,"f")}Y(this,s,"m",y).call(this)}async sendTransaction(e,t,n={}){try{var i;let r;let o=Y(this,l,"f");if(!o)throw new x.oS;if(A.G in Y(this,p,"f").features){if(o.features.includes(A.G))r=A.G;else if(_.R in Y(this,p,"f").features&&o.features.includes(_.R))r=_.R;else throw new x.cO}else if(_.R in Y(this,p,"f").features){if(!o.features.includes(_.R))throw new x.cO;r=_.R}else throw new x.p6;let a=(i=t.rpcEndpoint).includes("https://api.mainnet-beta.solana.com")?k.aI:/\bdevnet\b/i.test(i)?k.BR:/\btestnet\b/i.test(i)?k.gv:/\blocalhost\b/i.test(i)||/\b127\.0\.0\.1\b/.test(i)?k.l1:k.aI;if(!o.chains.includes(a))throw new x.IW;try{let i;let{signers:s,...l}=n;if((0,R.W)(e)?(s?.length&&e.sign(s),i=e.serialize()):(e=await this.prepareTransaction(e,t,l),s?.length&&e.partialSign(...s),i=new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))),r===A.G){let[e]=await Y(this,p,"f").features[A.G].signAndSendTransaction({account:o,chain:a,transaction:i,options:{preflightCommitment:W(l.preflightCommitment||t.commitment),skipPreflight:l.skipPreflight,maxRetries:l.maxRetries,minContextSlot:l.minContextSlot}});return F.encode(e.signature)}{let[e]=await Y(this,p,"f").features[_.R].signTransaction({account:o,chain:a,transaction:i,options:{preflightCommitment:W(l.preflightCommitment||t.commitment),minContextSlot:l.minContextSlot}});return await t.sendRawTransaction(e.signedTransaction,{...l,preflightCommitment:W(l.preflightCommitment||t.commitment)})}}catch(e){if(e instanceof x.lj)throw e;throw new x.IW(e?.message,e)}}catch(e){throw this.emit("error",e),e}}}l=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,E=new WeakMap,s=new WeakSet,w=async function(e){try{if(this.connected||this.connecting)return;if(Y(this,g,"f")!==O.i1.Installed)throw new x.OZ;if(H(this,d,!0,"f"),!Y(this,p,"f").accounts.length)try{await Y(this,p,"f").features[C.V].connect(e)}catch(e){throw new x.$w(e?.message,e)}let t=Y(this,p,"f").accounts[0];if(!t)throw new x.cO;Y(this,s,"m",m).call(this,t)}catch(e){throw this.emit("error",e),e}finally{H(this,d,!1,"f")}},m=function(e){let t;try{t=new U.PublicKey(e.address)}catch(e){throw new x.Nx(e?.message,e)}H(this,l,e,"f"),H(this,c,t,"f"),Y(this,s,"m",v).call(this),this.emit("connect",t)},y=function(){H(this,l,null,"f"),H(this,c,null,"f"),Y(this,s,"m",v).call(this),this.emit("disconnect")},v=function(){let e=A.G in Y(this,p,"f").features?Y(this,p,"f").features[A.G].supportedTransactionVersions:Y(this,p,"f").features[_.R].supportedTransactionVersions;H(this,f,!function(e,t){if(e===t)return!0;let n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}(e,["legacy"])?new Set(e):null,"f"),_.R in Y(this,p,"f").features&&Y(this,l,"f")?.features.includes(_.R)?(this.signTransaction=Y(this,s,"m",M),this.signAllTransactions=Y(this,s,"m",b)):(delete this.signTransaction,delete this.signAllTransactions),z.g in Y(this,p,"f").features&&Y(this,l,"f")?.features.includes(z.g)?this.signMessage=Y(this,s,"m",S):delete this.signMessage,P in Y(this,p,"f").features?this.signIn=Y(this,s,"m",N):delete this.signIn},M=async function(e){try{let t=Y(this,l,"f");if(!t)throw new x.oS;if(!(_.R in Y(this,p,"f").features))throw new x.p6;if(!t.features.includes(_.R))throw new x.cO;try{let n=(await Y(this,p,"f").features[_.R].signTransaction({account:t,transaction:(0,R.W)(e)?e.serialize():new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))}
vendor: 4,582 bytes, line 373
373))[0].signedTransaction;return(0,R.W)(e)?U.VersionedTransaction.deserialize(n):U.Transaction.from(n)}catch(e){if(e instanceof x.lj)throw e;throw new x.PY(e?.message,e)}}catch(e){throw this.emit("error",e),e}},b=async function(e){try{let t=Y(this,l,"f");if(!t)throw new x.oS;if(!(_.R in Y(this,p,"f").features))throw new x.p6;if(!t.features.includes(_.R))throw new x.cO;try{let n=await Y(this,p,"f").features[_.R].signTransaction(...e.map(e=>({account:t,transaction:(0,R.W)(e)?e.serialize():new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))})));return e.map((e,t)=>{let i=n[t].signedTransaction;return(0,R.W)(e)?U.VersionedTransaction.deserialize(i):U.Transaction.from(i)})}catch(e){throw new x.PY(e?.message,e)}}catch(e){throw this.emit("error",e),e}},S=async function(e){try{let t=Y(this,l,"f");if(!t)throw new x.oS;if(!(z.g in Y(this,p,"f").features))throw new x.p6;if(!t.features.includes(z.g))throw new x.cO;try{return(await Y(this,p,"f").features[z.g].signMessage({account:t,message:e}))[0].signature}catch(e){throw new x.fk(e?.message,e)}}catch(e){throw this.emit("error",e),e}},N=async function(e={}){try{let t;if(!(P in Y(this,p,"f").features))throw new x.p6;try{[t]=await Y(this,p,"f").features[P].signIn(e)}catch(e){throw new x.bD(e?.message,e)}if(!t)throw new x.bD;return Y(this,s,"m",m).call(this,t.account),t}catch(e){throw this.emit("error",e),e}};var K=function(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},G=function(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};let V=new Set,Z={};function q(...e){return(e=e.filter(e=>!V.has(e))).length?(e.forEach(e=>{i=void 0,V.add(e)}),Z.register?.forEach(t=>X(()=>t(...e))),function(){e.forEach(e=>{i=void 0,V.delete(e)}),Z.unregister?.forEach(t=>X(()=>t(...e)))}):()=>{}}function $(){return i||(i=[...V]),i}function J(e,t){return Z[e]?.push(t)||(Z[e]=[t]),function(){Z[e]=Z[e]?.filter(e=>t!==e)}}function X(e){try{e()}catch(e){console.error(e)}}class ee extends Event{get detail(){return K(this,T,"f")}get type(){return"wallet-standard:app-ready"}constructor(e){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),T.set(this,void 0),G(this,T,e,"f")}preventDefault(){throw Error("preventDefault cannot be called")}stopImmediatePropagation(){throw Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw Error("stopPropagation cannot be called")}}T=new WeakMap;var et=n(2265);function en(e){let t=(0,et.useRef)(void 0);return void 0===t.current&&(t.current={value:e()}),t.current.value}function ei(e){return e.filter(D).map(e=>new Q({wallet:e}))}(a=I||(I={}))[a.DESKTOP_WEB=0]="DESKTOP_WEB",a[a.MOBILE_WEB=1]="MOBILE_WEB";var er=n(3816);class eo extends x.lj{constructor(){super(...arguments),this.name="WalletNotSelectedError"}}var ea=n(5408);function es({children:e,wallets:t,adapter:n,isUnloadingRef:i,onAutoConnectRequest:r,onConnectError:o,onError:a,onSelectWallet:s}){let l=(0,et.useRef)(!1),[c,d]=(0,et.useState)(!1),u=(0,et.useRef)(!1),[h,f]=(0,et.useState)(!1),[p,g]=(0,et.useState)(()=>n?.publicKey??null),[w,m]=(0,et.useState)(()=>n?.connected??!1),y=(0,et.useRef)(a);(0,et.useEffect)(()=>(y.current=a,()=>{y.current=void 0}),[a]);let v=(0,et.useRef)((e,t)=>(!i.current&&(y.current?y.current(e,t):(console.error(e,t),e instanceof x.OZ&&"undefined"!=typeof window&&t&&window.open(t.url,"_blank"))),e)),[E,M]=(0,et.useState)(()=>t.map(e=>({adapter:e,readyState:e.readyState})).filter(({readyState:e})=>e!==O.i1.Unsupported));(0,et.useEffect)(()=>{function e(e){M(t=>{let n=t.findIndex(({adapter:e})=>e===this);if(-1===n)return t;let{adapter:i}=t[n];return[...t.slice(0,n),{adapter:i,readyState:e},...t.slice(n+1)].filter(({readyState:e})=>e!==O.i1.Unsupported)})}return M(e=>t.map((t,n)=>{let i=e[n];return i&&i.adapter===t&&i.readyState===t.readyState?i:{adapter:t,readyState:t.readyState}}).filter(({readyState:e})=>e!==O.i1.Unsupported)),t.forEach(t=>t.on("readyStateChange",e,t)),()=>{t.forEach(t=>t.off("readyStateChange",e,t))}},[n,t]);let b=(0,et.useMemo)(()=>E.find(e=>e.adapter===n)??null,[n,E]);(0,et.useEffect)(()=>
373{if(!n)return;let e=e=>{g(e),l.current=!1,d(!1),m(!0),u.current=!1,f(!1)},t=()=>{i.current||(g(null),l.current=!1,d(!1),m(!1),u.current=!1,f(!1))},r=e=>{v.current(e,n)};return n.on("connect",e),n.on("disconnect",t),n.on("error",r),()=>{n.off("connect",e),n.off("disconnect",t),n.off("error",r),t()}},[n,i]);let S=(0,et.useRef)(!1);(0,et.useEffect)(()=>()=>{S.current=!1},[n]),(0,et.useEffect)(()=>{S.current||l.current||w||!r||b?.readyState!==O.i1.Installed&&b?.readyState!==O.i1.Loadable||(l.current=!0,d(!0),S.current=!0,async function(){try{await r()}catch{o()}finally{d(!1),l.current=!1}}())},[w,r,o,b]);let N=(0,et.useCallback)(async(e,t,i)=>{if(!n)throw v.current(new eo);if(!w)throw v.current(new x.oS,n);return await n.sendTransaction(e,t,i)},[n,w]),T=(0,et.useMemo)(()=>n&&"signTransaction"in n?async e=>{if(!w)throw v.current(new x.oS,n);return await n.signTransaction(e)}:void 0,[n,w]),I=(0,et.useMemo)(()=>n&&"signAllTransactions"in n?async e=>{if(!w)throw v.current(new x.oS,n);return await n.signAllTransactions(e)}:void 0,[n,w]),L=(0,et.useMemo)(()=>n&&"signMessage"in n?async e=>{if(!w)throw v.current(new x.oS,n);return await n.signMessage(e)}:void 0,[n,w]),A=(0,et.useMemo)(()=>n&&"signIn"in n?async e=>await n.signIn(e):void 0,[n]),_=(0,et.useCallback)(async()=>{if(l.current||u.current||b?.adapter.connected)return;if(!b)throw v.current(new eo);let{adapter:e,readyState:t}=b;if(!(t===O.i1.Installed||t===O.i1.Loadable))throw v.current(new x.OZ,e);l.current=!0,d(!0);try{await e.connect()}catch(e){throw o(),e}finally{d(!1),l.current=!1}},[o,b]),C=(0,et.useCallback)(async()=>{if(!u.current&&n){u.current=!0,f(!0);try{await n.disconnect()}finally{f(!1),u.current=!1}}},[n]);return et.createElement(ea.z.Provider,{value:{autoConnect:!!r,wallets:E,wallet:b,publicKey:p,connected:w,connecting:c,disconnecting:h,select:s,connect:_,disconnect:C,sendTransaction:N,signTransaction:T,signAllTransactions:I,signMessage:L,signIn:A}},e)}function el(e){return function({adapters:e,userAgentString:t}){return e.some(e=>e.name!==L.gw&&e.readyState===O.i1.Installed)?I.DESKTOP_WEB:t&&/android/i.test(t)&&!/(WebView|Version\/.+(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+)|; wv\).+(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+))/i.test(t)?I.MOBILE_WEB:I.DESKTOP_WEB}({adapters:e,userAgentString:(void 0===r&&(r=globalThis.navigator?.userAgent??null),r)})===I.MOBILE_WEB}function ec({children:e,wallets:t,autoConnect:n,localStorageKey:i="walletName",onError:r}){let{connection:a}=(0,er.R)(),s=function(e){let t=en(()=>new Set),{get:n,on:i}=en(()=>(function(){if(o||(o=function(){if(o||(o=Object.freeze({register:q,get:$,on:J}),"undefined"==typeof window))return o;let e=Object.freeze({register:q});try{window.addEventListener("wallet-standard:register-wallet",({detail:t})=>t(e))}catch(e){console.error("wallet-standard:register-wallet event listener could not be added\n",e)}try{window.dispatchEvent(new ee(e))}catch(e){console.error("wallet-standard:app-ready event could not be dispatched\n",e)}return o}(),"undefined"==typeof window))return o;let e=window.navigator.wallets||[];if(!Array.isArray(e))return console.error("window.navigator.wallets is not an array"),o;let{register:t}=o,n=(...e)=>e.forEach(e=>X(()=>e({register:t})));try{Object.defineProperty(window.navigator,"wallets",{value:Object.freeze({push:n})})}catch(e){return console.error("window.navigator.wallets could not be set"),o}return n(...e),o})()),[r,a]=(0,et.useState)(()=>ei(n()));(0,et.useEffect)(()=>{let e=[i("register",(...e)=>a(t=>[...t,...ei(e)])),i("unregister",(...e)=>a(t=>t.filter(t=>e.some(e=>e===t.wallet))))];return()=>e.forEach(e=>e())},[i]);let s=function(e){let t=(0,et.useRef)(void 0);return(0,et.useEffect)(()=>{t.current=e}),t.current}(r);return(0,et.useEffect)(()=>{if(!s)return;let e=new Set(r);new Set(s.filter(t=>!e.has(t))).forEach(e=>e.destroy())},[s,r]),(0,et.useEffect)(()=>()=>r.forEach(e=>e.destroy()),[]),(0,et.useMemo)(()=>[...r,...e.filter(({name:e})=>!r.some(t=>t.name===e)||(t.has(e)||(t.add(e),console.warn(`${e} was registered as a Standard Wallet. The Wallet Adapter for ${e} can be removed from your app.`)),!1))],[r,e,t])}(t),l=(0,et.useMemo)(()=>{var e;if(!el(s))return null;let t=s.find(e=>e.name===L.gw);return t||new L.lX({addressSelector:(0,L.RH)(),appIdentity:{uri:function(){let e=globalThis.location;if(e)return`${e.protocol}//${e.host}`}()}
373,authorizationResultCache:(0,L.YS)(),cluster:(e=a?.rpcEndpoint)?/devnet/i.test(e)?"devnet":/testnet/i.test(e)?"testnet":"mainnet-beta":"mainnet-beta",onWalletNotFound:(0,L.Kf)()})},[s,a?.rpcEndpoint]),c=(0,et.useMemo)(()=>null==l||-1!==s.indexOf(l)?s:[l,...s],[s,l]),[d,u]=function(e,t){let n=(0,et.useState)(()=>{try{let t=localStorage.getItem(e);if(t)return JSON.parse(t)}catch(e){"undefined"!=typeof window&&console.error(e)}return null}),i=n[0],r=(0,et.useRef)(!0);return(0,et.useEffect)(()=>{if(r.current){r.current=!1;return}try{null===i?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(i))}catch(e){"undefined"!=typeof window&&console.error(e)}},[i,e]),n}(i,0),h=(0,et.useMemo)(()=>c.find(e=>e.name===d)??null,[c,d]),f=(0,et.useCallback)(e=>{d!==e&&(h&&h.name!==L.gw&&h.disconnect(),u(e))},[h,u,d]);(0,et.useEffect)(()=>{if(h)return h.on("disconnect",e),()=>{h.off("disconnect",e)};function e(){w.current||u(null)}},[h,s,u,d]);let p=(0,et.useRef)(!1),g=(0,et.useMemo)(()=>{if(n&&h)return async()=>{(!0===n||await n(h))&&(p.current?await h.connect():await h.autoConnect())}},[n,h]),w=(0,et.useRef)(!1);(0,et.useEffect)(()=>{if(d===L.gw&&el(s)){w.current=!1;return}function e(){w.current=!0}return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}},[s,d]);let m=(0,et.useCallback)(()=>{h&&f(null)},[h,f]),y=(0,et.useCallback)(e=>{p.current=!0,f(e)},[f]);return et.createElement(es,{wallets:c,adapter:h,isUnloadingRef:w,onAutoConnectRequest:g,onConnectError:m,onError:r,onSelectWallet:y},e)}},1867:function(e,t,n){"use strict";n.d(t,{e:function(){return k}});var i,r,o,a,s,l,c,d,u,h,f,p,g,w,m,y=n(5462),v=n(8757),E=n(4659),M=n(3887),b=n(4024),S=function(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},N=function(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};class T extends Event{get detail(){return S(this,i,"f")}get type(){return"wallet-standard:register-wallet"}constructor(e){super("wallet-standard:register-wallet",{bubbles:!1,cancelable:!1,composed:!1}),i.set(this,void 0),N(this,i,e,"f")}preventDefault(){throw Error("preventDefault cannot be called")}stopImmediatePropagation(){throw Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw Error("stopPropagation cannot be called")}}i=new WeakMap;var I=n(8746),L=n(7684),A=n(282),_=n(4402),C=n(9186),j=n(3005),D=n(3747),O=function(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},x=function(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};class R{constructor(){r.add(this),o.set(this,{}),a.set(this,"1.0.0"),s.set(this,"MetaMask"),l.set(this,"data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMxIiB2aWV3Qm94PSIwIDAgMzEgMzEiIHdpZHRoPSIzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjIwLjI1IiB4Mj0iMjYuNTcxIiB5MT0iMjcuMTczIiB5Mj0iMTkuODU4Ij48c3RvcCBvZmZzZXQ9Ii4wOCIgc3RvcC1jb2xvcj0iIzk5NDVmZiIvPjxzdG9wIG9mZnNldD0iLjMiIHN0b3AtY29sb3I9IiM4NzUyZjMiLz48c3RvcCBvZmZzZXQ9Ii41IiBzdG9wLWNvbG9yPSIjNTQ5N2Q1Ii8+PHN0b3Agb2Zmc2V0PSIuNiIgc3RvcC1jb2xvcj0iIzQzYjRjYSIvPjxzdG9wIG9mZnNldD0iLjcyIiBzdG9wLWNvbG9yPSIjMjhlMGI5Ii8+PHN0b3Agb2Zmc2V0PSIuOTciIHN0b3AtY29sb3I9IiMxOWZiOWIiLz48L2xpbmVhckdyYWRpZW50PjxnIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjA5NCI+PHBhdGggZD0ibTI2LjEwOSAzLjY0My05LjM2OSA2Ljk1OSAxLjczMy00LjEwNSA3LjYzNy0yLjg1M3oiIGZpbGw9IiNlMjc2MWIiIHN0cm9rZT0iI2UyNzYxYiIvPjxnIGZpbGw9IiNlNDc2MWIiIHN0cm9rZT0iI2U0NzYxYiI+PHBhdGggZD0ibTQuNDgxIDMuNjQzIDkuMjk0IDcuMDI0LTEuNjQ4LTQuMTcxem0xOC4yNTggMTYuMTMtMi40OTUgMy44MjMgNS4zMzkgMS40NjkgMS41MzUtNS4yMDctNC4zNzgtLjA4NXptLTE5LjI0Ny4wODUgMS41MjUgNS4yMDcgNS4zMzktMS40NjktMi4
3730OTUtMy44MjN6Ii8+PHBhdGggZD0ibTEwLjA1NSAxMy4zMTMtMS40ODggMi4yNTEgNS4zMDEuMjM1LS4xODgtNS42OTd6bTEwLjQ4IDAtMy42NzItMy4yNzctLjEyMiA1Ljc2MyA1LjI5Mi0uMjM1LTEuNDk3LTIuMjUxem0tMTAuMTc4IDEwLjI4MyAzLjE4My0xLjU1NC0yLjc0OS0yLjE0Ny0uNDMzIDMuNzAxem02LjY5NS0xLjU1NCAzLjE5MiAxLjU1NC0uNDQzLTMuNzAxeiIvPjwvZz48cGF0aCBkPSJtMjAuMjQ0IDIzLjU5Ni0zLjE5Mi0xLjU1NC4yNTQgMi4wODEtLjAyOC44NzZ6bS05Ljg4NyAwIDIuOTY2IDEuNDAzLS4wMTktLjg3Ni4yMzUtMi4wODEtMy4xODMgMS41NTR6IiBmaWxsPSIjZDdjMWIzIiBzdHJva2U9IiNkN2MxYjMiLz48cGF0aCBkPSJtMTMuMzY5IDE4LjUyMS0yLjY1NS0uNzgxIDEuODc0LS44NTd6bTMuODUxIDAgLjc4MS0xLjYzOCAxLjg4My44NTctMi42NjUuNzgxeiIgZmlsbD0iIzIzMzQ0NyIgc3Ryb2tlPSIjMjMzNDQ3Ii8+PHBhdGggZD0ibTEwLjM1NyAyMy41OTYuNDUyLTMuODIzLTIuOTQ3LjA4NXptOS40MzUtMy44MjMuNDUyIDMuODIzIDIuNDk1LTMuNzM4em0yLjI0MS00LjIwOS01LjI5Mi4yMzUuNDkgMi43MjEuNzgyLTEuNjM4IDEuODgzLjg1N3ptLTExLjMxOCAyLjE3NSAxLjg4My0uODU3Ljc3MiAxLjYzOC40OTktMi43MjEtNS4zMDEtLjIzNXoiIGZpbGw9IiNjZDYxMTYiIHN0cm9rZT0iI2NkNjExNiIvPjxwYXRoIGQ9Im04LjU2NyAxNS41NjQgMi4yMjIgNC4zMzEtLjA3NS0yLjE1NnptMTEuMzI4IDIuMTc1LS4wOTQgMi4xNTYgMi4yMzItNC4zMzEtMi4xMzcgMi4xNzV6bS02LjAyNi0xLjk0LS40OTkgMi43MjEuNjIxIDMuMjExLjE0MS00LjIyOC0uMjY0LTEuNzA0em0yLjg3MiAwLS4yNTQgMS42OTUuMTEzIDQuMjM3LjYzMS0zLjIxMXoiIGZpbGw9IiNlNDc1MWYiIHN0cm9rZT0iI2U0NzUxZiIvPjxwYXRoIGQ9Im0xNy4yMyAxOC41Mi0uNjMxIDMuMjExLjQ1Mi4zMTEgMi43NS0yLjE0Ny4wOTQtMi4xNTZ6bS02LjUxNi0uNzgxLjA3NSAyLjE1NiAyLjc1IDIuMTQ3LjQ1Mi0uMzExLS42MjItMy4yMTF6IiBmaWxsPSIjZjY4NTFiIiBzdHJva2U9IiNmNjg1MWIiLz48cGF0aCBkPSJtMTcuMjc3IDI0Ljk5OS4wMjgtLjg3Ni0uMjM1LS4yMDdoLTMuNTVsLS4yMTcuMjA3LjAxOS44NzYtMi45NjYtMS40MDMgMS4wMzYuODQ4IDIuMSAxLjQ1OWgzLjYwNmwyLjEwOS0xLjQ1OSAxLjAzNi0uODQ4eiIgZmlsbD0iI2MwYWQ5ZSIgc3Ryb2tlPSIjYzBhZDllIi8+PHBhdGggZD0ibTE3LjA1MSAyMi4wNDItLjQ1Mi0uMzExaC0yLjYwOGwtLjQ1Mi4zMTEtLjIzNSAyLjA4MS4yMTctLjIwN2gzLjU1bC4yMzUuMjA3LS4yNTQtMi4wODF6IiBmaWxsPSIjMTYxNjE2IiBzdHJva2U9IiMxNjE2MTYiLz48cGF0aCBkPSJtMjYuNTA1IDExLjA1My44LTMuODQyLTEuMTk2LTMuNTY5LTkuMDU4IDYuNzIzIDMuNDg0IDIuOTQ3IDQuOTI1IDEuNDQxIDEuMDkyLTEuMjcxLS40NzEtLjMzOS43NTMtLjY4Ny0uNTg0LS40NTIuNzUzLS41NzQtLjQ5OS0uMzc3em0tMjMuMjExLTMuODQxLjggMy44NDItLjUwOC4zNzcuNzUzLjU3NC0uNTc0LjQ1Mi43NTMuNjg3LS40NzEuMzM5IDEuMDgzIDEuMjcxIDQuOTI1LTEuNDQxIDMuNDg0LTIuOTQ3LTkuMDU5LTYuNzIzeiIgZmlsbD0iIzc2M2QxNiIgc3Ryb2tlPSIjNzYzZDE2Ii8+PHBhdGggZD0ibTI1LjQ2IDE0Ljc1NC00LjkyNS0xLjQ0MSAxLjQ5NyAyLjI1MS0yLjIzMiA0LjMzMSAyLjkzOC0uMDM4aDQuMzc4bC0xLjY1Ny01LjEwNHptLTE1LjQwNS0xLjQ0MS00LjkyNSAxLjQ0MS0xLjYzOCA1LjEwNGg0LjM2OWwyLjkyOC4wMzgtMi4yMjItNC4zMzEgMS40ODgtMi4yNTF6bTYuNjg1IDIuNDg2LjMxMS01LjQzMyAxLjQzMS0zLjg3aC02LjM1NmwxLjQxMyAzLjg3LjMyOSA1LjQzMy4xMTMgMS43MTQuMDA5IDQuMjE5aDIuNjFsLjAxOS00LjIxOS4xMjItMS43MTR6IiBmaWxsPSIjZjY4NTFiIiBzdHJva2U9IiNmNjg1MWIiLz48L2c+PGNpcmNsZSBjeD0iMjMuNSIgY3k9IjIzLjUiIGZpbGw9IiMwMDAiIHI9IjYuNSIvPjxwYXRoIGQ9Im0yNy40NzMgMjUuNTQ1LTEuMzEgMS4zNjhjLS4wMjkuMDMtLjA2My4wNTMtLjEwMS4wN2EuMzEuMzEgMCAwIDEgLS4xMjEuMDI0aC02LjIwOWMtLjAzIDAtLjA1OS0uMDA4LS4wODMtLjAyNGEuMTUuMTUgMCAwIDEgLS4wNTYtLjA2NWMtLjAxMi0uMDI2LS4wMTUtLjA1Ni0uMDEtLjA4NHMuMDE4LS4wNTUuMDM5LS4wNzZsMS4zMTEtMS4zNjhjLjAyOC0uMDMuMDYzLS4wNTMuMTAxLS4wNjlhLjMxLjMxIDAgMCAxIC4xMjEtLjAyNWg2LjIwOGMuMDMgMCAuMDU5LjAwOC4wODMuMDI0YS4xNS4xNSAwIDAgMSAuMDU2LjA2NWMuMDEyLjAyNi4wMTUuMDU2LjAxLjA4NHMtLjAxOC4wNTUtLjAzOS4wNzZ6bS0xLjMxLTIuNzU2Yy0uMDI5LS4wMy0uMDYzLS4wNTMtLjEwMS0uMDdhLjMxLjMxIDAgMCAwIC0uMTIxLS4wMjRoLTYuMjA5Yy0uMDMgMC0uMDU5LjAwOC0uMDgzLjAyNHMtLjA0NC4wMzgtLjA1Ni4wNjUtLjAxNS4wNTYtLjAxLjA4NC4wMTguMDU1LjAzOS4wNzZsMS4zMTEgMS4zNjhjLjAyOC4wMy4wNjMuMDUzLjEwMS4wNjlhLjMxLjMxIDAgMCAwIC4xMjEuMDI1aDYuMjA4Yy4wMyAwIC4wNTktLjAwOC4wODMtLjAyNGEuMTUuMTUgMCAwIDAgLjA1Ni0uMDY1Yy4wMTItLjAyNi4wMTUtLjA1Ni4wMS0uMDg0cy0uMDE4LS4wNTUtLjAzOS0uMDc2em0tNi40MzEtLjk4M2g2LjIwOWEuMzEuMzEgMCAwIDAgLjEyMS0uMDI0Yy4wMzgtLjAxNi4wNzMtLjA0LjEwMS0uMDdsMS4zMS0xLjM2OGMuMDItLjAyMS4wMzQtLjA0Ny4wMzktLjA3NnMuMDAxLS4wNTgtLjAxLS4wODRhLjE1LjE1IDAgMCAwIC0uMDU2LS4wNjVjLS4wMjUtLjAxNi0uMDU0LS4wMjQtLjA4My0uMDI0aC02LjIwOGEuMzEuMzEgMCAwIDAgLS4xMjEuMDI1Yy0uMDM4LjAxNi0uMDcyLjA0LS4xMDEuMDY5bC0xLjMxIDEuMzY4Yy0uMDIuMDIxLS4wMzQuMDQ3LS4wMzkuMDc2cy0uMDAxLjA1OC4wMS4wODQuMDMxLjA0OS4wNTYuMDY1LjA1NC4wMjQuMDgzLjAyNHoiIGZpbGw9InVybCgjYSkiLz48L3N2Zz4="),c.set(this,null),d.set(this,(e,t)=>(O(this,o,"f")[e]?.push(t)||(O(this,o,"f")[e]=[t]),()=>O(this,r,"m",h).call(this,e,t))),f.set(this,async()=>
373{if(!O(this,c,"f")){let e;try{e=(await n.e(284).then(n.bind(n,1284))).default}catch(e){throw Error("Unable to load Solflare MetaMask SDK")}x(this,c,new e,"f"),O(this,c,"f").on("standard_change",e=>O(this,r,"m",u).call(this,"change",e))}return this.accounts.length||await O(this,c,"f").connect(),{accounts:this.accounts}}),p.set(this,async()=>{O(this,c,"f")&&await O(this,c,"f").disconnect()}),g.set(this,async(...e)=>{if(!O(this,c,"f"))throw new E.oS;return await O(this,c,"f").standardSignAndSendTransaction(...e)}),w.set(this,async(...e)=>{if(!O(this,c,"f"))throw new E.oS;return await O(this,c,"f").standardSignTransaction(...e)}),m.set(this,async(...e)=>{if(!O(this,c,"f"))throw new E.oS;return await O(this,c,"f").standardSignMessage(...e)})}get version(){return O(this,a,"f")}get name(){return O(this,s,"f")}get icon(){return O(this,l,"f")}get chains(){return[I.aI,I.BR,I.gv]}get features(){return{[C.V]:{version:"1.0.0",connect:O(this,f,"f")},[j.R]:{version:"1.0.0",disconnect:O(this,p,"f")},[D.k]:{version:"1.0.0",on:O(this,d,"f")},[L.G]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:O(this,g,"f")},[A.R]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:O(this,w,"f")},[_.g]:{version:"1.0.0",signMessage:O(this,m,"f")}}}get accounts(){return O(this,c,"f")?O(this,c,"f").standardAccounts:[]}}o=new WeakMap,a=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,w=new WeakMap,m=new WeakMap,r=new WeakSet,u=function(e,...t){O(this,o,"f")[e]?.forEach(e=>e.apply(null,t))},h=function(e,t){O(this,o,"f")[e]=O(this,o,"f")[e]?.filter(e=>t!==e)};let z=!1;async function P(){let e="solflare-detect-metamask";function t(){window.postMessage({target:"metamask-contentscript",data:{name:"metamask-provider",data:{id:e,jsonrpc:"2.0",method:"wallet_getSnaps"}}},window.location.origin)}function n(i){let r=i.data;r?.target==="metamask-inpage"&&r.data?.name==="metamask-provider"&&(r.data.data?.id===e?(window.removeEventListener("message",n),!r.data.data.error&&(z||(function(e){let t=({register:t})=>t(e);try{window.dispatchEvent(new T(t))}catch(e){console.error("wallet-standard:register-wallet event could not be dispatched\n",e)}try{window.addEventListener("wallet-standard:app-ready",({detail
373:e})=>t(e))}catch(e){console.error("wallet-standard:app-ready event listener could not be added\n",e)}}(new R),z=!0))):t())}window.addEventListener("message",n),window.setTimeout(()=>window.removeEventListener("message",n),5e3),t()}class k extends y.eC{constructor(e={}){super(),this.name="Solflare",this.url="https://solflare.com",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJTIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MCA1MCI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMwMjA1MGE7c3Ryb2tlOiNmZmVmNDY7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOi41cHg7fS5jbHMtMntmaWxsOiNmZmVmNDY7fTwvc3R5bGU+PC9kZWZzPjxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMCIgd2lkdGg9IjUwIiBoZWlnaHQ9IjUwIiByeD0iMTIiIHJ5PSIxMiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTI0LjIzLDI2LjQybDIuNDYtMi4zOCw0LjU5LDEuNWMzLjAxLDEsNC41MSwyLjg0LDQuNTEsNS40MywwLDEuOTYtLjc1LDMuMjYtMi4yNSw0LjkzbC0uNDYuNS4xNy0xLjE3Yy42Ny00LjI2LS41OC02LjA5LTQuNzItNy40M2wtNC4zLTEuMzhoMFpNMTguMDUsMTEuODVsMTIuNTIsNC4xNy0yLjcxLDIuNTktNi41MS0yLjE3Yy0yLjI1LS43NS0zLjAxLTEuOTYtMy4zLTQuNTF2LS4wOGgwWk0xNy4zLDMzLjA2bDIuODQtMi43MSw1LjM0LDEuNzVjMi44LjkyLDMuNzYsMi4xMywzLjQ2LDUuMThsLTExLjY1LTQuMjJoMFpNMTMuNzEsMjAuOTVjMC0uNzkuNDItMS41NCwxLjEzLTIuMTcuNzUsMS4wOSwyLjA1LDIuMDUsNC4wOSwyLjcxbDQuNDIsMS40Ni0yLjQ2LDIuMzgtNC4zNC0xLjQyYy0yLS42Ny0yLjg0LTEuNjctMi44NC0yLjk2TTI2LjgyLDQyLjg3YzkuMTgtNi4wOSwxNC4xMS0xMC4yMywxNC4xMS0xNS4zMiwwLTMuMzgtMi01LjI2LTYuNDMtNi43MmwtMy4zNC0xLjEzLDkuMTQtOC43Ny0xLjg0LTEuOTYtMi43MSwyLjM4LTEyLjgxLTQuMjJjLTMuOTcsMS4yOS04Ljk3LDUuMDktOC45Nyw4Ljg5LDAsLjQyLjA0LjgzLjE3LDEuMjktMy4zLDEuODgtNC42MywzLjYzLTQuNjMsNS44LDAsMi4wNSwxLjA5LDQuMDksNC41NSw1LjIybDIuNzUuOTItOS41Miw5LjE0LDEuODQsMS45NiwyLjk2LTIuNzEsMTQuNzMsNS4yMmgwWiIvPjwvc3ZnPg==",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState="undefined"==typeof window||"undefined"==typeof document?v.i1.Unsupported:v.i1.Loadable,this._disconnected=()=>{let e=this._wallet;e&&(e.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new E.at),this.emit("disconnect"))},this._accountChanged=e=>{if(!e)return;let t=this._publicKey;if(t){try{e=new b.PublicKey(e.toBytes())}catch(e){this.emit("error",new E.Nx(e?.message,e));return}t.equals(e)||(this._publicKey=e,this.emit("connect",e))}},this._connecting=!1,this._publicKey=null,this._wallet=null,this._config=e,this._readyState!==v.i1.Unsupported&&((0,v.su)(()=>(!!window.solflare?.isSolflare||!!window.SolflareApp)&&(this._readyState=v.i1.Installed,this.emit("readyStateChange",this._readyState),!0)),P())}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.connected}get readyState(){return this._readyState}async autoConnect(){this.readyState===v.i1.Loadable&&(0,v.H)()||await this.connect()}async connect(){try{let e,t,i;if(this.connected||this.connecting)return;if(this._readyState!==v.i1.Loadable&&this._readyState!==v.i1.Installed)throw new E.OZ;if(this.readyState===v.i1.Loadable&&(0,v.H)()){let e=encodeURIComponent(window.location.href),t=encodeURIComponent(window.location.origin);window.location.href=`https://solflare.com/ul/v1/browse/${e}?ref=${t}`;return}try{e=(await n.e(218).then(n.bind(n,6218))).default}catch(e){throw new E.W8(e?.message,e)}try{t=new e({network:this._config.network})}catch(e){throw new E.p6(e?.message,e)}if(this._connecting=!0,!t.connected)try{await t.connect()}catch(e){throw new E.$w(e?.message,e)}if(!t.publicKey)throw new E.$w;try{i=new b.PublicKey(t.publicKey.toBytes())}catch(e){throw new E.Nx(e?.message,e)}t.on("disconnect",this._disconnected),t.on("accountChanged",this._accountChanged),this._wallet=t,this._publicKey=i,this.emit("connect",i)}catch(e){throw this.emit("error",e),e}finally{this._connecting=!1}}async disconnect(){let e=this._wallet;if(e){e.off("disconnect",this._disconnected),e.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null;try{await e.disconnect()}catch(e){this.emit("error",new E.UG(e?.message,e))}}this.emit("disconnect")}async sendTransaction(e,t,n={}){try{let i=this._wallet;if(!i)throw new E.oS;try{let{signers:r,...o}=n;return(0,M.W)(e)?r?.length&&e.sign(r):(e=await this.prepareTransaction(e,t,o),r?.length&&e.partialSign(...r)),o.preflightCommitment=o.preflightCommitment||t.commitment,await i.signAndSendTransaction(e,o)}catch(e){if(e instanceof E.lj)throw e;throw new E.IW(e?.message,e)}}
373catch(e){throw this.emit("error",e),e}}async signTransaction(e){try{let t=this._wallet;if(!t)throw new E.oS;try{return await t.signTransaction(e)||e}catch(e){throw new E.PY(e?.message,e)}}catch(e){throw this.emit("error",e),e}}async signAllTransactions(e){try{let t=this._wallet;if(!t)throw new E.oS;try{return await t.signAllTransactions(e)||e}catch(e){throw new E.PY(e?.message,e)}}catch(e){throw this.emit("error",e),e}}async signMessage(e){try{let t=this._wallet;if(!t)throw new E.oS;try{return await t.signMessage(e,"utf8")}catch(e){throw new E.fk(e?.message,e)}}catch(e){throw this.emit("error",e),e}}}},8746:function(e,t,n){"use strict";n.d(t,{BR:function(){return r},aI:function(){return i},gv:function(){return o},l1:function(){return a}});let i="solana:mainnet",r="solana:devnet",o="solana:testnet",a="solana:localnet"},7684:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});let i="solana:signAndSendTransaction"},4402:function(e,t,n){"use strict";n.d(t,{g:function(){return i}});let i="solana:signMessage"},282:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});let i="solana:signTransaction"},9186:function(e,t,n){"use strict";n.d(t,{V:function(){return i}});let i="standard:connect"},3005:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});let i="standard:disconnect"},3747:function(e,t,n){"use strict";n.d(t,{k:function(){return i}});let i="standard:events"}}]);
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.