text: !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@onflow/config"),require("@onflow/sdk"),require("@onflow/util-invariant"),require("@onflow/types"),require("@onflow/util-actor"),require("@onflow/util-address"),require("@onflow/rlp"),require("@onflow/util-uid"),require("@onflow/util-template")):"function"==typeof define&&define.amd?define(["exports","@onflow/config","@onflow/sdk","@onflow/util-invariant","@onflow/types","@onflow/util-actor","@onflow/util-address","@onflow/rlp","@onflow/util-uid","@onflow/util-template"],t):t((e=e||self).fcl={},e.config,e.sdk,e.utilInvariant,e.t$1,e.utilActor,e.utilAddress,e.rlp,e.utilUid,e.utilTemplate)}(this,function(e,t,r,n,o,i,u,a,c,s){t.config().put("accessNode.api","http://localhost:8080").put("challenge.handshake","http://localhost:8700/authenticate"),t.config().put("sdk.resolve",r.resolve);var l,f,d=function(e){try{return Promise.resolve(r.send([r.getTransactionStatus(e)]).then(r.decode))}catch(e){return Promise.reject(e)}},p=function(e){return e.status>=4},h=function(e){return e.status>=3},m=function(e){return e.status>=2},v=((l={})[i.INIT]=function(e){try{return Promise.resolve(d(e.self())).then(function(t){p(t)||setTimeout(function(){return e.sendSelf("POLL")},2500),e.merge(t)})}catch(e){return Promise.reject(e)}},l[i.SUBSCRIBE]=function(e,t){e.subscribe(t.from),e.send(t.from,i.UPDATED,e.all())},l[i.UNSUBSCRIBE]=function(e,t){e.unsubscribe(t.from)},l[i.SNAPSHOT]=function(e,t){try{return t.reply(e.all()),Promise.resolve()}catch(e){return Promise.reject(e)}},l.POLL=function(e){try{return Promise.resolve(d(e.self())).then(function(t){var r,n;p(t)||setTimeout(function(){return e.sendSelf("POLL")},2500),r=e.all(),n=t,JSON.stringify(r)!==JSON.stringify(n)&&e.broadcast(i.UPDATED,t),e.merge(t)})}catch(e){return Promise.reject(e)}},l),y=function(e){if("object"==typeof e&&(e=e.transactionId),null==e)throw new Error("transactionId required");return e},g=function(e){return i.spawn(v,y(e))};function P(e){function t(t){return i.subscriber(y(e),g,t)}function r(e){return function(r){void 0===r&&(r={});var n=r.suppress||!1;return new Promise(function(r,o){var i=t(function(t){t.statusCode&&!n?(o(t.errorMessage),i()):e(t)&&(r(t),i())})})}}return{snapshot:function(){return i.snapshoter(e,g)},subscribe:t,onceFinalized:r(m),onceExecuted:r(h),onceSealed:r(p)}}function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function j(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return E(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}P.isUnknown=function(e){return e.status>=0},P.isPending=function(e){return e.status>=1},P.isFinalized=m,P.isExecuted=h,P.isSealed=p,P.isExpired=function(e){return 5===e.status};var w=function(e){try{var r=setTimeout;return Promise.resolve(t.config().get("fcl.eventPollRate",1e4)).then(function(t){return r(function(){return e.sendSelf("TICK")},t)})}catch(e){return Promise.reject(e)}},O=((f={}).TICK=function(e){try{if(!e.hasSubs())return Promise.resolve();var t=e.get("hwm"),n=function(){if(null==t){var n=e.put;return Promise.resolve(r.latestBlock()).then(function(t){n.call(e,"hwm",t);var r=e.put;return Promise.resolve(w(e)).then(function(t){r.call(e,"tick",t)})})}return Promise.resolve(r.latestBlock()).then(function(n){return e.put("hwm",n),Promise.resolve(r.send([getEvents(e.self(),t.height,n.height-1)]).then(r.decode)).then(function(t){for(var r,n=j(t);!(r=n()).done;)e.broadcast("UPDATED",r.value.data);var o=e.put;return Promise.resolve(w(e)).then(function(t){o.call(e,"tick",t)})})})}();return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},f[i.SUBSCRIBE]=function(e,t){try{var r=function(){e.subscribe(t.from)},n=function(){if(!e.hasSubs()){var t=e.put;return Promise.resolve(w(e)).then(function(r){t.call(e,"tick",r)})}}();return Promise.resolve(n&&n.then?n.then(r):r())}catch(e){return Promise.reject(e)}},f[i.UNSUBSCRIBE]=function(e,t){e.unsubscribe(t.from),e.hasSubs()||(clearTimeout(e.get("tick")),e.delete("tick"),e.delete("hwm"))},f),S=function(e){return i.spawn(O,e)},R={f_type:"Service",f_vsn:"1.0.0"},I={f_type:"Identity",f_vsn:"1.0.0"},k={f_type:"USER",f_vsn:"1.0.0"},C={f_type:"PollingResponse",f_vsn:"1.0.0"},A={f_type:"CompositeSignature",f_vsn:"1.0.0"};function T(e){if(null==e)return null;switch(e.f_vsn){case"1.0.0":return e;default:return b({old:e},R,{type:"frame",endpoint:e.endpoint,params:e.params||{},data:e.data||{}})}}function N(e){if(null==e)return null;switch(e.f_vsn){case"1.0.0":return e;default:return b({},R,{type:"back-channel-rpc",endpoint:e.endpoint,method:e.method,params:e.params||{},data:e.data||{}})}}var B={"back-channel-rpc":N,"pre-authz":function(e){if(null==e)return null;switch(e.f_vsn){case"1.0.0":return e;default:return b({},R,{type:e.type,uid:e.id,endpoint:e.endpoint,method:e.method,identity:b({},I,{address:u.withPrefix(e.addr),keyId:e.keyId}),params:e.params,data:e.data})}},authz:function(e){if(null==e)return null;switch(e.f_vsn){case"1.0.0":return e;default:return b({},R,{type:e.type,uid:e.id,endpoint:e.endpoint,method:e.method,identity:b({},I,{address:u.withPrefix(e.addr),keyId:e.keyId}),params:e.params,data:e.data})}},authn:function(e){if(null==e)return null;switch(e.f_vsn){case"1.0.0":return e;default:return b({},R,{type:e.type,uid:e.id,endpoint:e.authn,id:e.pid,provider:{address:u.withPrefix(e.addr),name:e.name,icon:e.icon}})}},frame:T,"open-id":function(e){if(null==e)return null;switch(e.f_vsn){case"1.0.0":return e;default:return null}},"user-signature":function(e){if(null==e)return null;switch(e.f_vsn){case"1.0.0":return e;default:throw new Error("Invalid user-signature service")}}};function U(e){return a.encode([e.provider.address||e.provider.name||"UNSPECIFIED",e.id]).toString("hex")}function x(e,t){return void 0===e&&(e=[]),e.find(function(e){return e.type===t})}function D(e){var t=new URL(e.endpoint);if(t.searchParams.append("l6n",window.location.origin),null!=e.params)for(var r=0,n=Object.entries(e.params||{});r<n.length;r++){var o=n[r];t.searchParams.append(o[0],o[1])}return t}function _(e,t){void 0===t&&(t={});var r=t.method||"POST",n="GET"===r?void 0:JSON.stringify(t.data||e.data||{});return fetch(D(e),{method:r,headers:b({},e.headers||{},t.headers||{},{"Content-Type":"application/json"}),body:n}).then(function(e){return e.json()})}function L(e){if(null==e)return null;switch(e.f_vsn){case"1.0.0":return e;default:return b({},C,{status:e.status,reason:e.reason,data:e.compositeSignature||e.data||{},updates:N(e.authorizationUpdates),local:T((e.local||[])[0])})}}function z(e){if(null==e)return null;switch(e.f_vsn){case"1.0.0":return e;default:return b({},A,{addr:u.sansPrefix(e.addr||e.address),signature:e.signature||e.sig,keyId:e.keyId})}}var F="FCL_IFRAME",H=function(){},M=new Set(["monetizationstart","monetizationpending","monetizationprogress","monetizationstop"]);function q(e,t){if(void 0===t&&(t={}),null==e)return{send:H,close:H};var r=t.onClose||H,o=t.onMessage||H,i=t.onReady||H,u=t.onResponse||H;window.addEventListener("message",l);var a=function(e){n.invariant(!document.getElementById(F),"Attempt at triggering multiple Frames",{src:e});var t=document.createElement("iframe");return t.src=e,t.id=F,t.allow="usb *; hid *",t.frameBorder="0",t.style.cssText="\n  position:fixed;\n  top: 0px;\n  right: 0px;\n  bottom: 0px;\n  left: 0px;\n  height: 100vh;\n  width: 100vw;\n  display:block;\n  background:rgba(0,0,0,0.25);\n  z-index: 2147483647;\n  box-sizing: border-box;\n",document.body.append(t),[t,function(){document.getElementById(F)&&document.getElementById(F).remove()}]}(D(e)),c=a[0],s=a[1];return{send:d,close:f};function l(e){try{if("object"!=typeof e.data)return;if(M.has(e.data.type))return;"FCL:FRAME:CLOSE"===e.data.type&&f(),"FCL:FRAME:READY"===e.data.type&&i(e,{send:d,close:f}),"FCL:FRAME:RESPONSE"===e.data.type&&u(e,{send:d,close:f}),o(e,{send:d,close:f}),"FCL::CHALLENGE::RESPONSE"===e.data.type&&u(e,{send:d,close:f}),"FCL::AUTHZ_READY"===e.data.type&&i(e,{send:d,close:f}),"FCL::CHALLENGE::CANCEL"===e.data.type&&f(),"FCL::CANCEL"===e.data.type&&f()}catch(e){console.error("Frame Callback Error",e),f()}}function f(){try{window.removeEventListener("message",l),s(),r()}catch(e){console.error("Frame Close Error",e)}}function d(e){try{c.contentWindow.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Frame Send Error",e,t)}}}var J,G={"HTTP/GET":"GET","HTTP/POST":"POST"},V=function(e){return n.invariant(G[e.method],"Invalid Service Method for type back-channel-rpc",{service:e}),G[e.method]},Y=function(e,t,r){try{return t.data=e.data,Promise.resolve(_(e,{data:t}).then(L)).then(function(t){if("APPROVED"===t.status)return t.data;if("DECLINED"===t.status)throw new Error("Declined: "+(t.reason||"No reason supplied."));if("PENDING"===t.status){var r=!0,o=q(t.local,{onClose:function(){r=!1}}).close;return function e(t,r){void 0===r&&(r=function(){return!0});try{if(n.invariant(t,"Missing Polling Service",{service:t}),!r())throw new Error("Externally Halted");return Promise.resolve(_(t,{method:V(t)}).then(L)).then(function(t){switch(t.status){case"APPROVED":return t.data;case"DECLINED":throw new Error("Declined: "+(t.reason||"No reason supplied."));default:return Promise.resolve(new Promise(function(e){return setTimeout(e,500)})).then(function(){return e(t.updates,r)})}})}catch(e){return Promise.reject(e)}}(t.updates,function(){return r}).then(function(e){return o(),z(e)}).catch(function(e){throw console.error(e),o(),e})}throw console.error("Auto Decline: Invalid Response",{service:e,resp:t}),new Error("Auto Decline: Invalid Response")})}catch(e){return Promise.reject(e)}},Z=function(e,t,r){void 0===r&&(r={});try{try{return Promise.resolve($[e.method](e,t,r))}catch(n){throw console.error("execService(service, msg)",n,{service:e,msg:t,opts:r}),n}}catch(e){return Promise.reject(e)}},$={"HTTP/RPC":Y,"HTTP/POST":Y,"IFRAME/RPC":function(e,t,r){return new Promise(function(n,o){var i=c.uid(),u=r.includeOlderJsonRpcCall;t.data=e.data,q(e,{onReady:function(r,n){var o=n.send;try{o({type:"FCL:FRAME:READY:RESPONSE",body:t,service:{params:e.params,data:e.data}}),u&&o({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[t,e.params]})}catch(e){throw e}},onResponse:function(e,t){var r=t.close;try{if("object"!=typeof e.data)return;var i=L(e.data);switch(i.status){case"APPROVED":n(z(i.data)),r();break;case"DECLINED":o("Declined: "+(i.reason||"No reason supplied")),r();break;default:o("Declined: No reason supplied"),r()}}catch(e){throw console.error("execIframeRPC onResponse error",e),e}},onMessage:function(e,t){var r=t.close;try{if("object"!=typeof e.data)return;if("2.0"!==e.data.jsonrpc)return;if(e.data.id!==i)return;var u=L(e.data.result);switch(u.status){case"APPROVED":n(z(u.data)),r();break;case"DECLINED":o("Declined: "+(u.reason||"No reason supplied")),r();break;default:o("Declined: No reason supplied"),r()}}catch(e){throw console.error("execIframeRPC onMessage error",e),e}},onClose:function(){o("Declined: Externally Halted")}})})}};function K(e,t,r){if(!e.s){if(r instanceof Q){if(!r.s)return void(r.o=K.bind(null,e,t));1&t&&(t=r.s),r=r.v}if(r&&r.then)return void r.then(K.bind(null,e,t),K.bind(null,e,2));e.s=t,e.v=r;var n=e.o;n&&n(e)}}var X=function(e,t){void 0===t&&(t={});try{return le(),Promise.resolve(te(t)).then(function(t){var r=x(t.services,"user-signature");return n.invariant(r,"Current user must have authorized a signing service."),function(t,n){try{var o=Promise.resolve(Z(r,ve(e)))}catch(e){return n(e)}return o&&o.then?o.then(void 0,n):o}(0,function(e){console.log(e)})})}catch(e){return Promise.reject(e)}},W=function(e){try{return le(),Promise.resolve(te()).then(function(t){var r=x(t.services,"authz"),n=x(t.services,"pre-authz");return b({},e,n?{tempId:"CURRENT_USER",resolve:function(e,t){try{return Promise.resolve(Z(n,t)).then(pe)}catch(e){return Promise.reject(e)}}}:{tempId:"CURRENT_USER",resolve:null,addr:u.sansPrefix(r.identity.address),keyId:r.identity.keyId,sequenceNum:null,signature:null,signingFunction:function(e){try{return Promise.resolve(Z(r,e,{includeOlderJsonRpcCall:!0}))}catch(e){return Promise.reject(e)}}})})}catch(e){return Promise.reject(e)}},Q=function(){function e(){}return e.prototype.then=function(t,r){var n=new e,o=this.s;if(o){var i=1&o?t:r;if(i){try{K(n,1,i(this.v))}catch(e){K(n,2,e)}return n}return this}return this.o=function(e){try{var o=e.v;1&e.s?K(n,1,t?t(o):o):r?K(n,1,r(o)):K(n,2,o)}catch(e){K(n,2,e)}},n},e}();function ee(e){return e instanceof Q&&1&e.s}var te=function(e){void 0===e&&(e={});try{return Promise.resolve(new Promise(function(r,n){try{return le(),Promise.resolve(me()).then(function(n){if(n.loggedIn&&fe(n))return r(n);var o=e.serviceStrategy||q;return Promise.resolve(t.config().get("discovery.wallet")).then(function(e){function n(e){o({endpoint:e},{onReady:function(e,t){var r=t.send;try{return Promise.resolve(re(/^service\./)).then(function(e){return Promise.resolve(re(/^app\.detail\./)).then(function(t){r({type:"FCL:AUTHN:CONFIG",services:e,app:t})})})}catch(e){return Promise.reject(e)}},onClose:function(){try{return Promise.resolve(me()).then(function(e){r(e)})}catch(e){return Promise.reject(e)}},onResponse:function(e,t){var n=t.close;try{return Promise.resolve(function(e){try{var t=(e=function(e){return e.addr=e.addr?u.withPrefix(e.addr):null,e.paddr=e.paddr?u.withPrefix(e.paddr):null,e}(e)).services||[];return Promise.resolve(function(e,t){try{if(null==e||null==t)return Promise.resolve([]);var r=new URL(e);return r.searchParams.append("code",t),Promise.resolve(fetch(r,{method:"GET",headers:{"Content-Type":"application/json"}}).then(function(e){return e.json()})).then(function(e){if(Array.isArray(e))return e;var t=[];if(Array.isArray(e.authorizations))for(var r,n=j(e.authorizations);!(r=n()).done;)t.push(b({type:"authz",keyId:e.keyId},r.value));return null!=e.provider&&t.push(b({type:"authn",id:"wallet-provider#authn"},e.provider)),t})}catch(e){return Promise.reject(e)}}(e.hks,e.code)).then(function(r){var n,o,i=(n=t,o=r,void 0===n&&(n=[]),void 0===o&&(o=[]),[].concat(n,o)).map(function(t){return function(e,t){try{return B[e.type](e,t)}catch(t){return console.error("Unrecognized FCL Service Type ["+e.type+"]",e,t),e}}(t,e)}),a=function(e,t){return t.find(function(e){return"authn"===e.type})}(0,i);return b({},k,{addr:u.withPrefix(e.addr),cid:U(a),loggedIn:!0,services:i,expiresAt:e.exp})})}catch(e){return Promise.reject(e)}}(e.data)).then(function(e){return i.send(ne,ie,e),Promise.resolve(me()).then(function(e){r(e),n()})})}catch(e){return Promise.reject(e)}}})}return e?n(e):Promise.resolve(t.config().get("challenge.handshake")).then(n)})})}catch(e){return Promise.reject(e)}}))}catch(e){return Promise.reject(e)}},re=function(e){try{return Promise.resolve(t.config().where(e)).then(function(t){return Object.fromEntries(Object.entries(t).map(function(t){var r=t[1];return[t[0].replace(e,""),r]}))})}catch(e){return Promise.reject(e)}},ne="CURRENT_USER",oe="CURRENT_USER/UPDATED",ie="SET_CURRENT_USER",ue='{\n  "f_type": "User",\n  "f_vsn": "1.0.0",\n  "addr":null,\n  "cid":null,\n  "loggedIn":null,\n  "expiresAt":null,\n  "services":[]\n}',ae=function(e){try{return sessionStorage.setItem(ne,JSON.stringify(e)),Promise.resolve(e)}catch(e){return Promise.reject(e)}},ce=function(){return t.config().get("persistSession",!0)},se=((J={})[i.INIT]=function(e){try{return e.merge(JSON.parse(ue)),Promise.resolve(ce()).then(function(t){var r=function(){if(t)return Promise.resolve(function(){try{var e=JSON.parse(ue),t=JSON.parse(sessionStorage.getItem(ne));return null!=t&&e.f_vsn!==t.f_vsn?(sessionStorage.removeItem(ne),Promise.resolve(e)):Promise.resolve(t||e)}catch(e){return Promise.reject(e)}}()).then(function(t){fe(t)&&e.merge(t)})}();if(r&&r.then)return r.then(function(){})})}catch(e){return Promise.reject(e)}},J[i.SUBSCRIBE]=function(e,t){e.subscribe(t.from),e.send(t.from,oe,b({},e.all()))},J[i.UNSUBSCRIBE]=function(e,t){e.unsubscribe(t.from)},J.SNAPSHOT=function(e,t){try{return t.reply(b({},e.all())),Promise.resolve()}catch(e){return Promise.reject(e)}},J[ie]=function(e,t,r){try{return e.merge(r),Promise.resolve(ce()).then(function(t){t&&ae(e.all()),e.broadcast(oe,b({},e.all()))})}catch(e){return Promise.reject(e)}},J.DEL_CURRENT_USER=function(e,t){try{return e.merge(JSON.parse(ue)),Promise.resolve(ce()).then(function(t){t&&ae(e.all()),e.broadcast(oe,b({},e.all()))})}catch(e){return Promise.reject(e)}},J),le=function(){return i.spawn(se,ne)};function fe(e){return null==e.expiresAt||0===e.expiresAt||e.expiresAt>Date.now()}function de(){le(),i.send(ne,"DEL_CURRENT_USER")}function pe(e){var t=function(e){return{f_type:"PreAuthzResponse",f_vsn:"1.0.0",proposer:(e||{}).proposer,payer:(e||{}).payer||[],authorization:(e||{}).authorization||[]}}(e),r=[];null!=t.proposer&&r.push(["PROPOSER",t.proposer]);for(var n,o=j(t.payer||[]);!(n=o()).done;)r.push(["PAYER",n.value]);for(var i,u=j(t.authorization||[]);!(i=u()).done;)r.push(["AUTHORIZER",i.value]);return r.map(function(e){var t=e[0],r=e[1];return{tempId:[r.identity.address,r.identity.keyId].join("|"),addr:r.identity.address,keyId:r.identity.keyId,signingFunction:function(e){return Z(r,e)},role:{proposer:"PROPOSER"===t,payer:"PAYER"===t,authorizer:"AUTHORIZER"===t}}})}function he(e){le();var t=i.spawn(function(t){try{var r;return t.send(ne,i.SUBSCRIBE),Promise.resolve(function(e,t,r){for(var n;;){var o=e();if(ee(o)&&(o=o.v),!o)return i;if(o.then){n=0;break}var i=r();if(i&&i.then){if(!ee(i)){n=1;break}i=i.s}}var u=new Q,a=K.bind(null,u,2);return(0===n?o.then(s):1===n?i.then(c):(void 0).then(function(){(o=e())?o.then?o.then(s).then(void 0,a):s(o):K(u,1,i)})).then(void 0,a),u;function c(t){i=t;do{if(!(o=e())||ee(o)&&!o.v)return void K(u,1,i);if(o.then)return void o.then(s).then(void 0,a);ee(i=r())&&(i=i.v)}while(!i||!i.then);i.then(c).then(void 0,a)}function s(e){e?(i=r())&&i.then?i.then(c).then(void 0,a):c(i):K(u,1,i)}}(function(){return!r&&1},0,function(){return Promise.resolve(t.receive()).then(function(n){if("@EXIT"===n.tag)return t.send(ne,i.UNSUBSCRIBE),void(r=1);e(n.data)})}))}catch(e){return Promise.reject(e)}});return function(){return i.send(t,"@EXIT")}}function me(){return le(),i.send(ne,"SNAPSHOT",null,{expectReply:!0,timeout:0})}var ve=function(e){return n.invariant(/^[0-9a-f]+$/i.test(e),"Message must be a hex string"),{message:e}},ye=function(){return{authenticate:te,unauthenticate:de,authorization:W,signUserMessage:X,subscribe:he,snapshot:me}},ge=ye().authorization,Pe=o;Object.defineProperty(e,"config",{enumerable:!0,get:function(){return t.config}}),Object.defineProperty(e,"account",{enumerable:!0,get:function(){return r.account}}),Object.defineProperty(e,"arg",{enumerable:!0,get:function(){return r.arg}}),Object.defineProperty(e,"args",{enumerable:!0,get:function(){return r.args}}),Object.defineProperty(e,"atBlockHeight",{enumerable:!0,get:function(){return r.atBlockHeight}}),Object.defineProperty(e,"atBlockId",{enumerable:!0,get:function(){return r.atBlockId}}),Object.defineProperty(e,"authorization",{enumerable:!0,get:function(){return r.authorization}}),Object.defineProperty(e,"authorizations",{enumerable:!0,get:function(){return r.authorizations}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return r.build}}),Object.defineProperty(e,"decode",{enumerable:!0,get:function(){return r.decode}}),Object.defineProperty(e,"getAccount",{enumerable:!0,get:function(){return r.getAccount}}),Object.defineProperty(e,"getBlock",{enumerable:!0,get:function(){return r.getBlock}}),Object.defineProperty(e,"getBlockByHeight",{enumerable:!0,get:function(){return r.getBlockByHeight}}),Object.defineProperty(e,"getBlockById",{enumerable:!0,get:function(){return r.getBlockById}}),Object.defineProperty(e,"getBlockHeader",{enumerable:!0,get:function(){return r.getBlockHeader}}),Object.defineProperty(e,"getCollection",{enumerable:!0,get:function(){return r.getCollection}}),Object.defineProperty(e,"getEvents",{enumerable:!0,get:function(){return r.getEvents}}),Object.defineProperty(e,"getEventsAtBlockHeightRange",{enumerable:!0,get:function(){return r.getEventsAtBlockHeightRange}}),Object.defineProperty(e,"getEventsAtBlockIds",{enumerable:!0,get:function(){return r.getEventsAtBlockIds}}),Object.defineProperty(e,"getLatestBlock",{enumerable:!0,get:function(){return r.getLatestBlock}}),Object.defineProperty(e,"getTransaction",{enumerable:!0,get:function(){return r.getTransaction}}),Object.defineProperty(e,"getTransactionStatus",{enumerable:!0,get:function(){return r.getTransactionStatus}}),Object.defineProperty(e,"invariant",{enumerable:!0,get:function(){return r.invariant}}),Object.defineProperty(e,"isBad",{enumerable:!0,get:function(){return r.isBad}}),Object.defineProperty(e,"isOk",{enumerable:!0,get:function(){return r.isOk}}),Object.defineProperty(e,"latestBlock",{enumerable:!0,get:function(){return r.latestBlock}}),Object.defineProperty(e,"limit",{enumerable:!0,get:function(){return r.limit}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return r.param}}),Object.defineProperty(e,"params",{enumerable:!0,get:function(){return r.params}}),Object.defineProperty(e,"payer",{enumerable:!0,get:function(){return r.payer}}),Object.defineProperty(e,"ping",{enumerable:!0,get:function(){return r.ping}}),Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return r.pipe}}),Object.defineProperty(e,"proposer",{enumerable:!0,get:function(){return r.proposer}}),Object.defineProperty(e,"ref",{enumerable:!0,get:function(){return r.ref}}),Object.defineProperty(e,"script",{enumerable:!0,get:function(){return r.script}}),Object.defineProperty(e,"send",{enumerable:!0,get:function(){return r.send}}),Object.defineProperty(e,"transaction",{enumerable:!0,get:function(){return r.transaction}}),Object.defineProperty(e,"validator",{enumerable:!0,get:function(){return r.validator}}),Object.defineProperty(e,"why",{enumerable:!0,get:function(){return r.why}}),Object.defineProperty(e,"display",{enumerable:!0,get:function(){return u.display}}),Object.defineProperty(e,"sansPrefix",{enumerable:!0,get:function(){return u.sansPrefix}}),Object.defineProperty(e,"withPrefix",{enumerable:!0,get:function(){return u.withPrefix}}),Object.defineProperty(e,"cadence",{enumerable:!0,get:function(){return s.template}}),Object.defineProperty(e,"cdc",{enumerable:!0,get:function(){return s.template}}),e.VERSION="0.0.71",e.authenticate=function(e){return ye().authenticate(e)},e.authz=ge,e.currentUser=ye,e.events=function(e){return{subscribe:function(t){return i.subscriber(e,S,t)}}},e.logIn=function(e){return ye().authenticate()},e.query=function(e){void 0===e&&(e={});try{return Promise.resolve(function(e){try{return n.invariant(null!=typeof e.cadence,"query({ cadence }) -- cadence is required"),n.invariant(function(e){return"string"==typeof e}(e.cadence),"query({ cadence }) -- cadence must be a string"),Promise.resolve()}catch(e){return Promise.reject(e)}}(e)).then(function(){return r.send([r.script(e.cadence),r.args((t=e.args||[],"function"==typeof t?t(r.arg,o):[])),e.limit&&"number"==typeof e.limit&&r.limit(e.limit)]).then(r.decode);var t})}catch(e){return Promise.reject(e)}},e.reauthenticate=function(){return ye().unauthenticate(),ye().authenticate()},e.serialize=function(e,n){void 0===e&&(e=[]),void 0===n&&(n={});try{return Promise.resolve(t.config().get("sdk.resolve",n.resolve||r.resolve(n))).then(function(t){function n(){return Promise.resolve(t(e)).then(function(e){return JSON.stringify(r.createSignableVoucher(e),null,2)})}var o=function(){if(Array.isArray(e))return Promise.resolve(r.pipe(r.interaction(),e)).then(function(t){e=t})}();return o&&o.then?o.then(n):n()})}catch(e){return Promise.reject(e)}},e.signUp=function(e){return ye().authenticate()},e.t=Pe,e.tx=P,e.unauthenticate=function(){return ye().unauthenticate()}});
  //# sourceMappingURL=fcl.umd.js.map
  