New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@stacks/connect

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stacks/connect - npm Package Compare versions

Comparing version

to
7.10.1-alpha.ab8b769.0

@@ -1,3 +0,3 @@

'use strict';var common=require('@stacks/common'),connectUi=require('@stacks/connect-ui'),network=require('@stacks/network'),networkV6=require('@stacks/network-v6'),transactions=require('@stacks/transactions'),transactionsV6=require('@stacks/transactions-v6'),loader=require('@stacks/connect-ui/loader'),auth=require('@stacks/auth'),jsontokens=require('jsontokens');var Gn=Object.create;var ve=Object.defineProperty,$n=Object.defineProperties,Qn=Object.getOwnPropertyDescriptor,qn=Object.getOwnPropertyDescriptors,Vn=Object.getOwnPropertyNames,ln=Object.getOwnPropertySymbols,Zn=Object.getPrototypeOf,fn=Object.prototype.hasOwnProperty,Hn=Object.prototype.propertyIsEnumerable;var ke=(o,t)=>(t=Symbol[o])?t:Symbol.for("Symbol."+o),Wn=o=>{throw TypeError(o)};var Tn=(o,t,s)=>t in o?ve(o,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[t]=s,f=(o,t)=>{for(var s in t||(t={}))fn.call(t,s)&&Tn(o,s,t[s]);if(ln)for(var s of ln(t))Hn.call(t,s)&&Tn(o,s,t[s]);return o},I=(o,t)=>$n(o,qn(t));var Xn=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports);var Jn=(o,t,s,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of Vn(t))!fn.call(o,c)&&c!==s&&ve(o,c,{get:()=>t[c],enumerable:!(d=Qn(t,c))||d.enumerable});return o};var hn=(o,t,s)=>(s=o!=null?Gn(Zn(o)):{},Jn(!o||!o.__esModule?ve(s,"default",{value:o,enumerable:!0}):s,o));var et=function(o,t){this[0]=o,this[1]=t;};var W=o=>{var t=o[ke("asyncIterator")],s=!1,d,c={};return t==null?(t=o[ke("iterator")](),d=u=>c[u]=T=>t[u](T)):(t=t.call(o),d=u=>c[u]=T=>{if(s){if(s=!1,u==="throw")throw T;return T}return s=!0,{done:!1,value:new et(new Promise(l=>{var y=t[u](T);y instanceof Object||Wn("Object expected"),l(y);}),1)}}),c[ke("iterator")]=()=>c,d("next"),"throw"in t?d("throw"):c.throw=u=>{throw u},"return"in t&&d("return"),c};var wn=Xn(a=>{Object.defineProperty(a,"__esModule",{value:!0});a.Type=a.StandardType=a.ExtendedTypeBuilder=a.StandardTypeBuilder=a.TypeBuilder=a.TemplateLiteralGenerator=a.TemplateLiteralFinite=a.TemplateLiteralParser=a.TemplateLiteralParserError=a.TemplateLiteralResolver=a.TemplateLiteralPattern=a.KeyResolver=a.ObjectMap=a.TypeClone=a.TypeExtends=a.TypeExtendsResult=a.ExtendsUndefined=a.TypeGuard=a.TypeGuardUnknownTypeError=a.FormatRegistry=a.TypeRegistry=a.PatternStringExact=a.PatternNumberExact=a.PatternBooleanExact=a.PatternString=a.PatternNumber=a.PatternBoolean=a.Kind=a.Hint=a.Modifier=void 0;a.Modifier=Symbol.for("TypeBox.Modifier");a.Hint=Symbol.for("TypeBox.Hint");a.Kind=Symbol.for("TypeBox.Kind");a.PatternBoolean="(true|false)";a.PatternNumber="(0|[1-9][0-9]*)";a.PatternString="(.*)";a.PatternBooleanExact=`^${a.PatternBoolean}$`;a.PatternNumberExact=`^${a.PatternNumber}$`;a.PatternStringExact=`^${a.PatternString}$`;var gn;(function(o){let t=new Map;function s(){return new Map(t)}o.Entries=s;function d(){return t.clear()}o.Clear=d;function c(l){return t.has(l)}o.Has=c;function u(l,y){t.set(l,y);}o.Set=u;function T(l){return t.get(l)}o.Get=T;})(gn=a.TypeRegistry||(a.TypeRegistry={}));(function(o){let t=new Map;function s(){return new Map(t)}o.Entries=s;function d(){return t.clear()}o.Clear=d;function c(l){return t.has(l)}o.Has=c;function u(l,y){t.set(l,y);}o.Set=u;function T(l){return t.get(l)}o.Get=T;})(a.FormatRegistry||(a.FormatRegistry={}));var an=class extends Error{constructor(t){super("TypeGuard: Unknown type"),this.schema=t;}};a.TypeGuardUnknownTypeError=an;var i;(function(o){function t(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function s(r){return typeof r=="object"&&r!==null&&Array.isArray(r)}function d(r){try{return new RegExp(r),!0}catch(m){return !1}}function c(r){if(typeof r!="string")return !1;for(let m=0;m<r.length;m++){let D=r.charCodeAt(m);if(D>=7&&D<=13||D===27||D===127)return !1}return !0}function u(r){return typeof r=="bigint"}function T(r){return typeof r=="string"}function l(r){return typeof r=="number"&&globalThis.Number.isFinite(r)}function y(r){return typeof r=="boolean"}function C(r){return r===void 0||r!==void 0&&u(r)}function O(r){return r===void 0||r!==void 0&&l(r)}function j(r){return r===void 0||r!==void 0&&y(r)}function N(r){return r===void 0||r!==void 0&&T(r)}function S(r){return r===void 0||r!==void 0&&T(r)&&c(r)&&d(r)}function A(r){return r===void 0||r!==void 0&&T(r)&&c(r)}function b(r){return r===void 0||F(r)}function k(r){return L(r)&&r[a.Kind]==="Any"&&N(r.$id)}o.TAny=k;function g(r){return L(r)&&r[a.Kind]==="Array"&&r.type==="array"&&N(r.$id)&&F(r.items)&&O(r.minItems)&&O(r.maxItems)&&j(r.uniqueItems)}o.TArray=g;function w(r){return L(r)&&r[a.Kind]==="BigInt"&&r.type==="null"&&r.typeOf==="BigInt"&&N(r.$id)&&C(r.multipleOf)&&C(r.minimum)&&C(r.maximum)&&C(r.exclusiveMinimum)&&C(r.exclusiveMaximum)}o.TBigInt=w;function U(r){return L(r)&&r[a.Kind]==="Boolean"&&r.type==="boolean"&&N(r.$id)}o.TBoolean=U;function R(r){if(!(L(r)&&r[a.Kind]==="Constructor"&&r.type==="object"&&r.instanceOf==="Constructor"&&N(r.$id)&&s(r.parameters)&&F(r.returns)))return !1;for(let m of r.parameters)if(!F(m))return !1;return !0}o.TConstructor=R;function pe(r){return L(r)&&r[a.Kind]==="Date"&&r.type==="object"&&r.instanceOf==="Date"&&N(r.$id)&&O(r.minimumTimestamp)&&O(r.maximumTimestamp)&&O(r.exclusiveMinimumTimestamp)&&O(r.exclusiveMaximumTimestamp)}o.TDate=pe;function le(r){if(!(L(r)&&r[a.Kind]==="Function"&&r.type==="object"&&r.instanceOf==="Function"&&N(r.$id)&&s(r.parameters)&&F(r.returns)))return !1;for(let m of r.parameters)if(!F(m))return !1;return !0}o.TFunction=le;function ee(r){return L(r)&&r[a.Kind]==="Integer"&&r.type==="integer"&&N(r.$id)&&O(r.multipleOf)&&O(r.minimum)&&O(r.maximum)&&O(r.exclusiveMinimum)&&O(r.exclusiveMaximum)}o.TInteger=ee;function Te(r){if(!(L(r)&&r[a.Kind]==="Intersect"&&s(r.allOf)&&N(r.type)&&(j(r.unevaluatedProperties)||b(r.unevaluatedProperties))&&N(r.$id))||"type"in r&&r.type!=="object")return !1;for(let m of r.allOf)if(!F(m))return !1;return !0}o.TIntersect=Te;function L(r){return t(r)&&a.Kind in r&&typeof r[a.Kind]=="string"}o.TKind=L;function J(r){return L(r)&&r[a.Kind]==="Literal"&&N(r.$id)&&(T(r.const)||l(r.const)||y(r.const)||u(r.const))}o.TLiteral=J;function ne(r){return L(r)&&r[a.Kind]==="Never"&&t(r.not)&&globalThis.Object.getOwnPropertyNames(r.not).length===0}o.TNever=ne;function h(r){return L(r)&&r[a.Kind]==="Not"&&s(r.allOf)&&r.allOf.length===2&&t(r.allOf[0])&&F(r.allOf[0].not)&&F(r.allOf[1])}o.TNot=h;function te(r){return L(r)&&r[a.Kind]==="Null"&&r.type==="null"&&N(r.$id)}o.TNull=te;function fe(r){return L(r)&&r[a.Kind]==="Number"&&r.type==="number"&&N(r.$id)&&O(r.multipleOf)&&O(r.minimum)&&O(r.maximum)&&O(r.exclusiveMinimum)&&O(r.exclusiveMaximum)}o.TNumber=fe;function ye(r){if(!(L(r)&&r[a.Kind]==="Object"&&r.type==="object"&&N(r.$id)&&t(r.properties)&&(j(r.additionalProperties)||b(r.additionalProperties))&&O(r.minProperties)&&O(r.maxProperties)))return !1;for(let[m,D]of Object.entries(r.properties))if(!c(m)||!F(D))return !1;return !0}o.TObject=ye;function Me(r){return L(r)&&r[a.Kind]==="Promise"&&r.type==="object"&&r.instanceOf==="Promise"&&N(r.$id)&&F(r.item)}o.TPromise=Me;function Se(r){if(!(L(r)&&r[a.Kind]==="Record"&&r.type==="object"&&N(r.$id)&&r.additionalProperties===!1&&t(r.patternProperties)))return !1;let m=Object.keys(r.patternProperties);return !(m.length!==1||!d(m[0])||!F(r.patternProperties[m[0]]))}o.TRecord=Se;function Ce(r){return L(r)&&r[a.Kind]==="Ref"&&N(r.$id)&&T(r.$ref)}o.TRef=Ce;function Z(r){return L(r)&&r[a.Kind]==="String"&&r.type==="string"&&N(r.$id)&&O(r.minLength)&&O(r.maxLength)&&S(r.pattern)&&A(r.format)}o.TString=Z;function Ie(r){return L(r)&&r[a.Kind]==="Symbol"&&r.type==="null"&&r.typeOf==="Symbol"&&N(r.$id)}o.TSymbol=Ie;function re(r){return L(r)&&r[a.Kind]==="TemplateLiteral"&&r.type==="string"&&T(r.pattern)&&r.pattern[0]==="^"&&r.pattern[r.pattern.length-1]==="$"}o.TTemplateLiteral=re;function v(r){return L(r)&&r[a.Kind]==="This"&&N(r.$id)&&T(r.$ref)}o.TThis=v;function Ae(r){if(!(L(r)&&r[a.Kind]==="Tuple"&&r.type==="array"&&N(r.$id)&&l(r.minItems)&&l(r.maxItems)&&r.minItems===r.maxItems))return !1;if(r.items===void 0&&r.additionalItems===void 0&&r.minItems===0)return !0;if(!s(r.items))return !1;for(let m of r.items)if(!F(m))return !1;return !0}o.TTuple=Ae;function Le(r){return L(r)&&r[a.Kind]==="Undefined"&&r.type==="null"&&r.typeOf==="Undefined"&&N(r.$id)}o.TUndefined=Le;function H(r){if(!(L(r)&&r[a.Kind]==="Union"&&s(r.anyOf)&&N(r.$id)))return !1;for(let m of r.anyOf)if(!F(m))return !1;return !0}o.TUnion=H;function oe(r){return H(r)&&r.anyOf.every(m=>J(m)&&typeof m.const=="string")}o.TUnionLiteral=oe;function z(r){return L(r)&&r[a.Kind]==="Uint8Array"&&r.type==="object"&&N(r.$id)&&r.instanceOf==="Uint8Array"&&O(r.minByteLength)&&O(r.maxByteLength)}o.TUint8Array=z;function xe(r){return L(r)&&r[a.Kind]==="Unknown"&&N(r.$id)}o.TUnknown=xe;function ie(r){return L(r)&&r[a.Kind]==="Unsafe"}o.TUnsafe=ie;function Oe(r){return L(r)&&r[a.Kind]==="Void"&&r.type==="null"&&r.typeOf==="Void"&&N(r.$id)}o.TVoid=Oe;function Ee(r){return t(r)&&r[a.Modifier]==="ReadonlyOptional"}o.TReadonlyOptional=Ee;function Re(r){return t(r)&&r[a.Modifier]==="Readonly"}o.TReadonly=Re;function Ue(r){return t(r)&&r[a.Modifier]==="Optional"}o.TOptional=Ue;function F(r){return typeof r=="object"&&(k(r)||g(r)||U(r)||w(r)||R(r)||pe(r)||le(r)||ee(r)||Te(r)||J(r)||ne(r)||h(r)||te(r)||fe(r)||ye(r)||Me(r)||Se(r)||Ce(r)||Z(r)||Ie(r)||re(r)||v(r)||Ae(r)||Le(r)||H(r)||z(r)||xe(r)||ie(r)||Oe(r)||L(r)&&gn.Has(r[a.Kind]))}o.TSchema=F;})(i=a.TypeGuard||(a.TypeGuard={}));(function(o){function t(s){return s[a.Kind]==="Undefined"?!0:s[a.Kind]==="Union"?s.anyOf.some(c=>t(c)):!1}o.Check=t;})(a.ExtendsUndefined||(a.ExtendsUndefined={}));var p;(function(o){o[o.Union=0]="Union",o[o.True=1]="True",o[o.False=2]="False";})(p=a.TypeExtendsResult||(a.TypeExtendsResult={}));var q;(function(o){function t(n){return n===p.False?p.False:p.True}function s(n,e){return p.True}function d(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)&&e.anyOf.some(P=>i.TAny(P)||i.TUnknown(P))?p.True:i.TUnion(e)?p.Union:i.TUnknown(e)||i.TAny(e)?p.True:p.Union}function c(n,e){return i.TUnknown(n)?p.False:i.TAny(n)?p.Union:i.TNever(n)?p.True:p.False}function u(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)&&Z(e)?p.True:i.TArray(e)?t(E(n.items,e.items)):p.False}function T(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TNever(e)?R():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TBigInt(e)?p.True:p.False}function l(n,e){return i.TLiteral(n)&&typeof n.const=="boolean"||i.TBoolean(n)?p.True:p.False}function y(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TNever(e)?R():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TBoolean(e)?p.True:p.False}function C(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):!i.TConstructor(e)||n.parameters.length>e.parameters.length||!n.parameters.every((P,$)=>t(E(e.parameters[$],P))===p.True)?p.False:t(E(n.returns,e.returns))}function O(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TDate(e)?p.True:p.False}function j(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):!i.TFunction(e)||n.parameters.length>e.parameters.length||!n.parameters.every((P,$)=>t(E(e.parameters[$],P))===p.True)?p.False:t(E(n.returns,e.returns))}function N(n,e){return i.TLiteral(n)&&typeof n.const=="number"||i.TNumber(n)||i.TInteger(n)?p.True:p.False}function S(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TNever(e)?R():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TInteger(e)||i.TNumber(e)?p.True:p.False}function A(n,e){return e.allOf.every(P=>E(n,P)===p.True)?p.True:p.False}function b(n,e){return n.allOf.some(P=>E(P,e)===p.True)?p.True:p.False}function k(n){return typeof n.const=="string"}function g(n){return typeof n.const=="number"}function w(n){return typeof n.const=="boolean"}function U(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TNever(e)?R():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TString(e)?ie(n):i.TNumber(e)?ee(n):i.TInteger(e)?N(n):i.TBoolean(e)?l(n):i.TLiteral(e)&&e.const===n.const?p.True:p.False}function R(n,e){return p.False}function pe(n,e){return p.True}function le(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TNever(e)?R():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TNull(e)?p.True:p.False}function ee(n,e){return i.TLiteral(n)&&g(n)||i.TNumber(n)||i.TInteger(n)?p.True:p.False}function Te(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TNever(e)?R():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TInteger(e)||i.TNumber(e)?p.True:p.False}function L(n,e){return globalThis.Object.keys(n.properties).length===e}function J(n){return Z(n)}function ne(n){return L(n,0)||L(n,1)&&"description"in n.properties&&i.TUnion(n.properties.description)&&n.properties.description.anyOf.length===2&&(i.TString(n.properties.description.anyOf[0])&&i.TUndefined(n.properties.description.anyOf[1])||i.TString(n.properties.description.anyOf[1])&&i.TUndefined(n.properties.description.anyOf[0]))}function h(n){return L(n,0)}function te(n){return L(n,0)}function fe(n){return L(n,0)}function ye(n){return L(n,0)}function Me(n){return Z(n)}function Se(n){let e=a.Type.Number();return L(n,0)||L(n,1)&&"length"in n.properties&&t(E(n.properties.length,e))===p.True}function Ce(n){return L(n,0)}function Z(n){let e=a.Type.Number();return L(n,0)||L(n,1)&&"length"in n.properties&&t(E(n.properties.length,e))===p.True}function Ie(n){let e=a.Type.Function([a.Type.Any()],a.Type.Any());return L(n,0)||L(n,1)&&"then"in n.properties&&t(E(n.properties.then,e))===p.True}function re(n,e){return E(n,e)===p.False||i.TOptional(n)&&!i.TOptional(e)?p.False:p.True}function v(n,e){return i.TUnknown(n)?p.False:i.TAny(n)?p.Union:i.TNever(n)||i.TLiteral(n)&&k(n)&&J(e)||i.TLiteral(n)&&g(n)&&h(e)||i.TLiteral(n)&&w(n)&&te(e)||i.TSymbol(n)&&ne(e)||i.TBigInt(n)&&fe(e)||i.TString(n)&&J(e)||i.TSymbol(n)&&ne(e)||i.TNumber(n)&&h(e)||i.TInteger(n)&&h(e)||i.TBoolean(n)&&te(e)||i.TUint8Array(n)&&Me(e)||i.TDate(n)&&ye(e)||i.TConstructor(n)&&Ce(e)||i.TFunction(n)&&Se(e)?p.True:i.TRecord(n)&&i.TString(H(n))?e[a.Hint]==="Record"?p.True:p.False:i.TRecord(n)&&i.TNumber(H(n))&&L(e,0)?p.True:p.False}function Ae(n,e){if(i.TIntersect(e))return A(n,e);if(i.TUnion(e))return D(n,e);if(i.TUnknown(e))return _();if(i.TAny(e))return s();if(i.TRecord(e))return z(n,e);if(!i.TObject(e))return p.False;for(let P of globalThis.Object.keys(e.properties))if(!(P in n.properties)||re(n.properties[P],e.properties[P])===p.False)return p.False;return p.True}function Le(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)&&Ie(e)?p.True:i.TPromise(e)?t(E(n.item,e.item)):p.False}function H(n){if(a.PatternNumberExact in n.patternProperties)return a.Type.Number();if(a.PatternStringExact in n.patternProperties)return a.Type.String();throw Error("TypeExtends: Cannot get record key")}function oe(n){if(a.PatternNumberExact in n.patternProperties)return n.patternProperties[a.PatternNumberExact];if(a.PatternStringExact in n.patternProperties)return n.patternProperties[a.PatternStringExact];throw Error("TypeExtends: Cannot get record value")}function z(n,e){let P=H(e),$=oe(e);if(i.TLiteral(n)&&k(n)&&i.TNumber(P)&&t(E(n,$))===p.True)return p.True;if(i.TUint8Array(n)&&i.TNumber(P)||i.TString(n)&&i.TNumber(P)||i.TArray(n)&&i.TNumber(P))return E(n,$);if(i.TObject(n)){for(let Kn of globalThis.Object.keys(n.properties))if(re($,n.properties[Kn])===p.False)return p.False;return p.True}return p.False}function xe(n,e){let P=oe(n);return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?E(P,oe(e)):p.False}function ie(n,e){return i.TLiteral(n)&&typeof n.const=="string"||i.TString(n)?p.True:p.False}function Oe(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TNever(e)?R():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TString(e)?p.True:p.False}function Ee(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TNever(e)?R():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TSymbol(e)?p.True:p.False}function Re(n,e){return i.TUnknown(n)?p.False:i.TAny(n)?p.Union:i.TNever(n)?p.True:p.False}function Ue(n,e){return i.TArray(e)&&n.items!==void 0&&n.items.every(P=>E(P,e.items)===p.True)}function F(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)&&Z(e)||i.TArray(e)&&Ue(n,e)?p.True:!i.TTuple(e)||n.items===void 0&&e.items!==void 0||n.items!==void 0&&e.items===void 0?p.False:n.items===void 0&&e.items===void 0||n.items.every((P,$)=>E(P,e.items[$])===p.True)?p.True:p.False}function r(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TUint8Array(e)?p.True:p.False}function m(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TNever(e)?R():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TVoid(e)?Bn(n):i.TUndefined(e)?p.True:p.False}function D(n,e){return e.anyOf.some(P=>E(n,P)===p.True)?p.True:p.False}function _n(n,e){return n.anyOf.every(P=>E(P,e)===p.True)?p.True:p.False}function _(n,e){return p.True}function Fn(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TAny(e)?s():i.TString(e)?ie(n):i.TNumber(e)?ee(n):i.TInteger(e)?N(n):i.TBoolean(e)?l(n):i.TArray(e)?c(n):i.TTuple(e)?Re(n):i.TObject(e)?v(n,e):i.TUnknown(e)?p.True:p.False}function Bn(n,e){return i.TUndefined(n)||i.TUndefined(n)?p.True:p.False}function zn(n,e){return i.TIntersect(e)?A(n,e):i.TUnion(e)?D(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TVoid(e)?p.True:p.False}function E(n,e){if(i.TTemplateLiteral(n))return E(V.Resolve(n),e);if(i.TTemplateLiteral(e))return E(n,V.Resolve(e));if(i.TAny(n))return d(n,e);if(i.TArray(n))return u(n,e);if(i.TBigInt(n))return T(n,e);if(i.TBoolean(n))return y(n,e);if(i.TConstructor(n))return C(n,e);if(i.TDate(n))return O(n,e);if(i.TFunction(n))return j(n,e);if(i.TInteger(n))return S(n,e);if(i.TIntersect(n))return b(n,e);if(i.TLiteral(n))return U(n,e);if(i.TNever(n))return pe();if(i.TNull(n))return le(n,e);if(i.TNumber(n))return Te(n,e);if(i.TObject(n))return Ae(n,e);if(i.TRecord(n))return xe(n,e);if(i.TString(n))return Oe(n,e);if(i.TSymbol(n))return Ee(n,e);if(i.TTuple(n))return F(n,e);if(i.TPromise(n))return Le(n,e);if(i.TUint8Array(n))return r(n,e);if(i.TUndefined(n))return m(n,e);if(i.TUnion(n))return _n(n,e);if(i.TUnknown(n))return Fn(n,e);if(i.TVoid(n))return zn(n,e);throw Error(`TypeExtends: Unknown left type operand '${n[a.Kind]}'`)}function Yn(n,e){return E(n,e)}o.Extends=Yn;})(q=a.TypeExtends||(a.TypeExtends={}));var x;(function(o){function t(l){return typeof l=="object"&&l!==null}function s(l){return globalThis.Array.isArray(l)}function d(l){return l.map(y=>u(y))}function c(l){let y=globalThis.Object.getOwnPropertyNames(l).reduce((O,j)=>I(f({},O),{[j]:u(l[j])}),{}),C=globalThis.Object.getOwnPropertySymbols(l).reduce((O,j)=>I(f({},O),{[j]:u(l[j])}),{});return f(f({},y),C)}function u(l){return s(l)?d(l):t(l)?c(l):l}function T(l,y){return f(f({},u(l)),y)}o.Clone=T;})(x=a.TypeClone||(a.TypeClone={}));var ue;(function(o){function t(T,l){return a.Type.Intersect(T.allOf.map(y=>c(y,l)),f({},T))}function s(T,l){return a.Type.Union(T.anyOf.map(y=>c(y,l)),f({},T))}function d(T,l){return l(T)}function c(T,l){return T[a.Kind]==="Intersect"?t(T,l):T[a.Kind]==="Union"?s(T,l):T[a.Kind]==="Object"?d(T,l):T}function u(T,l,y){return f(f({},c(x.Clone(T,{}),l)),y)}o.Map=u;})(ue=a.ObjectMap||(a.ObjectMap={}));var mn;(function(o){function t(l){return i.TIntersect(l)||i.TUnion(l)||i.TObject(l)&&globalThis.Object.getOwnPropertyNames(l.properties).length>0}function s(l){return [...l.allOf.filter(y=>t(y)).reduce((y,C)=>u(C).map(O=>y.add(O))[0],new Set)]}function d(l){let y=l.anyOf.filter(C=>t(C)).map(C=>u(C));return [...y.reduce((C,O)=>O.map(j=>y.every(N=>N.includes(j))?C.add(j):C)[0],new Set)]}function c(l){return globalThis.Object.keys(l.properties)}function u(l){return i.TIntersect(l)?s(l):i.TUnion(l)?d(l):i.TObject(l)?c(l):[]}function T(l){return u(l)}o.Resolve=T;})(mn=a.KeyResolver||(a.KeyResolver={}));var bn;(function(o){function t(c){return c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function s(c,u){if(i.TTemplateLiteral(c))return c.pattern.slice(1,c.pattern.length-1);if(i.TUnion(c))return `(${c.anyOf.map(l=>s(l,u)).join("|")})`;if(i.TNumber(c))return `${u}${a.PatternNumber}`;if(i.TInteger(c))return `${u}${a.PatternNumber}`;if(i.TBigInt(c))return `${u}${a.PatternNumber}`;if(i.TString(c))return `${u}${a.PatternString}`;if(i.TLiteral(c))return `${u}${t(c.const.toString())}`;if(i.TBoolean(c))return `${u}${a.PatternBoolean}`;throw i.TNever(c)?Error("TemplateLiteralPattern: TemplateLiteral cannot operate on types of TNever"):Error(`TemplateLiteralPattern: Unexpected Kind '${c[a.Kind]}'`)}function d(c){return `^${c.map(u=>s(u,"")).join("")}$`}o.Create=d;})(bn=a.TemplateLiteralPattern||(a.TemplateLiteralPattern={}));var V;(function(o){function t(s){let d=un.ParseExact(s.pattern);if(!cn.Check(d))return a.Type.String();let c=[...dn.Generate(d)].map(u=>a.Type.Literal(u));return a.Type.Union(c)}o.Resolve=t;})(V=a.TemplateLiteralResolver||(a.TemplateLiteralResolver={}));var ce=class extends Error{constructor(t){super(t);}};a.TemplateLiteralParserError=ce;var un;(function(o){function t(S,A,b){return S[A]===b&&S.charCodeAt(A-1)!==92}function s(S,A){return t(S,A,"(")}function d(S,A){return t(S,A,")")}function c(S,A){return t(S,A,"|")}function u(S){if(!(s(S,0)&&d(S,S.length-1)))return !1;let A=0;for(let b=0;b<S.length;b++)if(s(S,b)&&(A+=1),d(S,b)&&(A-=1),A===0&&b!==S.length-1)return !1;return !0}function T(S){return S.slice(1,S.length-1)}function l(S){let A=0;for(let b=0;b<S.length;b++)if(s(S,b)&&(A+=1),d(S,b)&&(A-=1),c(S,b)&&A===0)return !0;return !1}function y(S){for(let A=0;A<S.length;A++)if(s(S,A))return !0;return !1}function C(S){let[A,b]=[0,0],k=[];for(let w=0;w<S.length;w++)if(s(S,w)&&(A+=1),d(S,w)&&(A-=1),c(S,w)&&A===0){let U=S.slice(b,w);U.length>0&&k.push(j(U)),b=w+1;}let g=S.slice(b);return g.length>0&&k.push(j(g)),k.length===0?{type:"const",const:""}:k.length===1?k[0]:{type:"or",expr:k}}function O(S){function A(g,w){if(!s(g,w))throw new ce("TemplateLiteralParser: Index must point to open parens");let U=0;for(let R=w;R<g.length;R++)if(s(g,R)&&(U+=1),d(g,R)&&(U-=1),U===0)return [w,R];throw new ce("TemplateLiteralParser: Unclosed group parens in expression")}function b(g,w){for(let U=w;U<g.length;U++)if(s(g,U))return [w,U];return [w,g.length]}let k=[];for(let g=0;g<S.length;g++)if(s(S,g)){let[w,U]=A(S,g),R=S.slice(w,U+1);k.push(j(R)),g=U;}else {let[w,U]=b(S,g),R=S.slice(w,U);R.length>0&&k.push(j(R)),g=U-1;}return k.length===0?{type:"const",const:""}:k.length===1?k[0]:{type:"and",expr:k}}function j(S){return u(S)?j(T(S)):l(S)?C(S):y(S)?O(S):{type:"const",const:S}}o.Parse=j;function N(S){return j(S.slice(1,S.length-1))}o.ParseExact=N;})(un=a.TemplateLiteralParser||(a.TemplateLiteralParser={}));var cn;(function(o){function t(u){return u.type==="or"&&u.expr.length===2&&u.expr[0].type==="const"&&u.expr[0].const==="0"&&u.expr[1].type==="const"&&u.expr[1].const==="[1-9][0-9]*"}function s(u){return u.type==="or"&&u.expr.length===2&&u.expr[0].type==="const"&&u.expr[0].const==="true"&&u.expr[1].type==="const"&&u.expr[1].const==="false"}function d(u){return u.type==="const"&&u.const===".*"}function c(u){if(s(u))return !0;if(t(u)||d(u))return !1;if(u.type==="and")return u.expr.every(T=>c(T));if(u.type==="or")return u.expr.every(T=>c(T));if(u.type==="const")return !0;throw Error("TemplateLiteralFinite: Unknown expression type")}o.Check=c;})(cn=a.TemplateLiteralFinite||(a.TemplateLiteralFinite={}));var dn;(function(o){function*t(T){if(T.length===1)return yield*W(T[0]);for(let l of T[0])for(let y of t(T.slice(1)))yield `${l}${y}`;}function*s(T){return yield*W(t(T.expr.map(l=>[...u(l)])))}function*d(T){for(let l of T.expr)yield*W(u(l));}function*c(T){return yield T.const}function*u(T){if(T.type==="and")return yield*W(s(T));if(T.type==="or")return yield*W(d(T));if(T.type==="const")return yield*W(c(T));throw Error("TemplateLiteralGenerator: Unknown expression")}o.Generate=u;})(dn=a.TemplateLiteralGenerator||(a.TemplateLiteralGenerator={}));var ir=0,me=class{Create(t){return t}Strict(t){return JSON.parse(JSON.stringify(t))}};a.TypeBuilder=me;var de=class extends me{Optional(t){return f({[a.Modifier]:"Optional"},x.Clone(t,{}))}ReadonlyOptional(t){return f({[a.Modifier]:"ReadonlyOptional"},x.Clone(t,{}))}Readonly(t){return f({[a.Modifier]:"Readonly"},t)}Any(t={}){return this.Create(I(f({},t),{[a.Kind]:"Any"}))}Array(t,s={}){return this.Create(I(f({},s),{[a.Kind]:"Array",type:"array",items:x.Clone(t,{})}))}Boolean(t={}){return this.Create(I(f({},t),{[a.Kind]:"Boolean",type:"boolean"}))}Composite(t,s){let d=(y,C)=>y.every(O=>!(C in O.properties)||c(O.properties[C])),c=y=>i.TOptional(y)||i.TReadonlyOptional(y),[u,T]=[new Set,new Set];for(let y of t)for(let C of globalThis.Object.getOwnPropertyNames(y.properties))d(t,C)&&T.add(C);for(let y of t)for(let C of globalThis.Object.getOwnPropertyNames(y.properties))T.has(C)||u.add(C);let l={};for(let y of t)for(let[C,O]of Object.entries(y.properties)){let j=x.Clone(O,{});if(T.has(C)||delete j[a.Modifier],C in l){let N=q.Extends(l[C],j)!==p.False,S=q.Extends(j,l[C])!==p.False;!N&&!S&&(l[C]=a.Type.Never()),!N&&S&&(l[C]=j);}else l[C]=j;}return u.size>0?this.Create(I(f({},s),{[a.Kind]:"Object",[a.Hint]:"Composite",type:"object",properties:l,required:[...u]})):this.Create(I(f({},s),{[a.Kind]:"Object",[a.Hint]:"Composite",type:"object",properties:l}))}Enum(t,s={}){let c=globalThis.Object.keys(t).filter(u=>isNaN(u)).map(u=>t[u]).map(u=>typeof u=="string"?{[a.Kind]:"Literal",type:"string",const:u}:{[a.Kind]:"Literal",type:"number",const:u});return this.Create(I(f({},s),{[a.Kind]:"Union",anyOf:c}))}Extends(t,s,d,c,u={}){switch(q.Extends(t,s)){case p.Union:return this.Union([x.Clone(d,u),x.Clone(c,u)]);case p.True:return x.Clone(d,u);case p.False:return x.Clone(c,u)}}Exclude(t,s,d={}){if(i.TTemplateLiteral(t))return this.Exclude(V.Resolve(t),s,d);if(i.TTemplateLiteral(s))return this.Exclude(t,V.Resolve(s),d);if(i.TUnion(t)){let c=t.anyOf.filter(u=>q.Extends(u,s)===p.False);return c.length===1?x.Clone(c[0],d):this.Union(c,d)}else return q.Extends(t,s)!==p.False?this.Never(d):x.Clone(t,d)}Extract(t,s,d={}){if(i.TTemplateLiteral(t))return this.Extract(V.Resolve(t),s,d);if(i.TTemplateLiteral(s))return this.Extract(t,V.Resolve(s),d);if(i.TUnion(t)){let c=t.anyOf.filter(u=>q.Extends(u,s)!==p.False);return c.length===1?x.Clone(c[0],d):this.Union(c,d)}else return q.Extends(t,s)!==p.False?x.Clone(t,d):this.Never(d)}Integer(t={}){return this.Create(I(f({},t),{[a.Kind]:"Integer",type:"integer"}))}Intersect(t,s={}){if(t.length===0)return a.Type.Never();if(t.length===1)return x.Clone(t[0],s);let d=t.every(T=>i.TObject(T)),c=t.map(T=>x.Clone(T,{})),u=i.TSchema(s.unevaluatedProperties)?{unevaluatedProperties:x.Clone(s.unevaluatedProperties,{})}:{};return s.unevaluatedProperties===!1||i.TSchema(s.unevaluatedProperties)||d?this.Create(I(f(f({},s),u),{[a.Kind]:"Intersect",type:"object",allOf:c})):this.Create(I(f(f({},s),u),{[a.Kind]:"Intersect",allOf:c}))}KeyOf(t,s={}){if(i.TRecord(t)){let d=Object.getOwnPropertyNames(t.patternProperties)[0];if(d===a.PatternNumberExact)return this.Number(s);if(d===a.PatternStringExact)return this.String(s);throw Error("StandardTypeBuilder: Unable to resolve key type from Record key pattern")}else {let d=mn.Resolve(t);if(d.length===0)return this.Never(s);let c=d.map(u=>this.Literal(u));return this.Union(c,s)}}Literal(t,s={}){return this.Create(I(f({},s),{[a.Kind]:"Literal",const:t,type:typeof t}))}Never(t={}){return this.Create(I(f({},t),{[a.Kind]:"Never",not:{}}))}Not(t,s,d){return this.Create(I(f({},d),{[a.Kind]:"Not",allOf:[{not:x.Clone(t,{})},x.Clone(s,{})]}))}Null(t={}){return this.Create(I(f({},t),{[a.Kind]:"Null",type:"null"}))}Number(t={}){return this.Create(I(f({},t),{[a.Kind]:"Number",type:"number"}))}Object(t,s={}){let d=globalThis.Object.getOwnPropertyNames(t),c=d.filter(y=>i.TOptional(t[y])||i.TReadonlyOptional(t[y])),u=d.filter(y=>!c.includes(y)),T=i.TSchema(s.additionalProperties)?{additionalProperties:x.Clone(s.additionalProperties,{})}:{},l=d.reduce((y,C)=>I(f({},y),{[C]:x.Clone(t[C],{})}),{});return u.length>0?this.Create(I(f(f({},s),T),{[a.Kind]:"Object",type:"object",properties:l,required:u})):this.Create(I(f(f({},s),T),{[a.Kind]:"Object",type:"object",properties:l}))}Omit(t,s,d={}){let c=i.TUnionLiteral(s)?s.anyOf.map(u=>u.const):i.TLiteral(s)?[s.const]:i.TNever(s)?[]:s;return ue.Map(x.Clone(t,{}),u=>{u.required&&(u.required=u.required.filter(T=>!c.includes(T)),u.required.length===0&&delete u.required);for(let T of globalThis.Object.keys(u.properties))c.includes(T)&&delete u.properties[T];return this.Create(u)},d)}Partial(t,s={}){function d(c){switch(c[a.Modifier]){case"ReadonlyOptional":c[a.Modifier]="ReadonlyOptional";break;case"Readonly":c[a.Modifier]="ReadonlyOptional";break;case"Optional":c[a.Modifier]="Optional";break;default:c[a.Modifier]="Optional";break}}return ue.Map(x.Clone(t,{}),c=>(delete c.required,globalThis.Object.keys(c.properties).forEach(u=>d(c.properties[u])),c),s)}Pick(t,s,d={}){let c=i.TUnionLiteral(s)?s.anyOf.map(u=>u.const):i.TLiteral(s)?[s.const]:i.TNever(s)?[]:s;return ue.Map(x.Clone(t,{}),u=>{u.required&&(u.required=u.required.filter(T=>c.includes(T)),u.required.length===0&&delete u.required);for(let T of globalThis.Object.keys(u.properties))c.includes(T)||delete u.properties[T];return this.Create(u)},d)}Record(t,s,d={}){if(i.TTemplateLiteral(t)){let c=un.ParseExact(t.pattern);return cn.Check(c)?this.Object([...dn.Generate(c)].reduce((u,T)=>I(f({},u),{[T]:x.Clone(s,{})}),{}),d):this.Create(I(f({},d),{[a.Kind]:"Record",type:"object",patternProperties:{[t.pattern]:x.Clone(s,{})},additionalProperties:!1}))}else if(i.TUnionLiteral(t))if(t.anyOf.every(c=>i.TLiteral(c)&&(typeof c.const=="string"||typeof c.const=="number"))){let c=t.anyOf.reduce((u,T)=>I(f({},u),{[T.const]:x.Clone(s,{})}),{});return this.Object(c,I(f({},d),{[a.Hint]:"Record"}))}else throw Error("TypeBuilder: Record key can only be derived from union literal of number or string");else if(i.TLiteral(t)){if(typeof t.const=="string"||typeof t.const=="number")return this.Object({[t.const]:x.Clone(s,{})},d);throw Error("TypeBuilder: Record key can only be derived from literals of number or string")}else if(i.TInteger(t)||i.TNumber(t)){let c=a.PatternNumberExact;return this.Create(I(f({},d),{[a.Kind]:"Record",type:"object",patternProperties:{[c]:x.Clone(s,{})},additionalProperties:!1}))}else if(i.TString(t)){let c=t.pattern===void 0?a.PatternStringExact:t.pattern;return this.Create(I(f({},d),{[a.Kind]:"Record",type:"object",patternProperties:{[c]:x.Clone(s,{})},additionalProperties:!1}))}else throw Error("StandardTypeBuilder: Invalid Record Key")}Recursive(t,s={}){s.$id===void 0&&(s.$id=`T${ir++}`);let d=t({[a.Kind]:"This",$ref:`${s.$id}`});return d.$id=s.$id,this.Create(f(I(f({},s),{[a.Hint]:"Recursive"}),d))}Ref(t,s={}){if(t.$id===void 0)throw Error("StandardTypeBuilder.Ref: Target type must specify an $id");return this.Create(I(f({},s),{[a.Kind]:"Ref",$ref:t.$id}))}Required(t,s={}){function d(c){switch(c[a.Modifier]){case"ReadonlyOptional":c[a.Modifier]="Readonly";break;case"Readonly":c[a.Modifier]="Readonly";break;case"Optional":delete c[a.Modifier];break;default:delete c[a.Modifier];break}}return ue.Map(x.Clone(t,{}),c=>(c.required=globalThis.Object.keys(c.properties),globalThis.Object.keys(c.properties).forEach(u=>d(c.properties[u])),c),s)}String(t={}){return this.Create(I(f({},t),{[a.Kind]:"String",type:"string"}))}TemplateLiteral(t,s={}){let d=bn.Create(t);return this.Create(I(f({},s),{[a.Kind]:"TemplateLiteral",type:"string",pattern:d}))}Tuple(t,s={}){let[d,c,u]=[!1,t.length,t.length],T=t.map(y=>x.Clone(y,{})),l=t.length>0?I(f({},s),{[a.Kind]:"Tuple",type:"array",items:T,additionalItems:d,minItems:c,maxItems:u}):I(f({},s),{[a.Kind]:"Tuple",type:"array",minItems:c,maxItems:u});return this.Create(l)}Union(t,s={}){if(i.TTemplateLiteral(t))return V.Resolve(t);{let d=t;if(d.length===0)return this.Never(s);if(d.length===1)return this.Create(x.Clone(d[0],s));let c=d.map(u=>x.Clone(u,{}));return this.Create(I(f({},s),{[a.Kind]:"Union",anyOf:c}))}}Unknown(t={}){return this.Create(I(f({},t),{[a.Kind]:"Unknown"}))}Unsafe(t={}){return this.Create(I(f({},t),{[a.Kind]:t[a.Kind]||"Unsafe"}))}};a.StandardTypeBuilder=de;var be=class extends de{BigInt(t={}){return this.Create(I(f({},t),{[a.Kind]:"BigInt",type:"null",typeOf:"BigInt"}))}ConstructorParameters(t,s={}){return this.Tuple([...t.parameters],f({},s))}Constructor(t,s,d={}){let c=x.Clone(s,{});if(i.TTuple(t)){let u=t.items===void 0?[]:t.items.map(T=>x.Clone(T,{}));return this.Create(I(f({},d),{[a.Kind]:"Constructor",type:"object",instanceOf:"Constructor",parameters:u,returns:c}))}else if(globalThis.Array.isArray(t)){let u=t.map(T=>x.Clone(T,{}));return this.Create(I(f({},d),{[a.Kind]:"Constructor",type:"object",instanceOf:"Constructor",parameters:u,returns:c}))}else throw new Error("ExtendedTypeBuilder.Constructor: Invalid parameters")}Date(t={}){return this.Create(I(f({},t),{[a.Kind]:"Date",type:"object",instanceOf:"Date"}))}Function(t,s,d={}){let c=x.Clone(s,{});if(i.TTuple(t)){let u=t.items===void 0?[]:t.items.map(T=>x.Clone(T,{}));return this.Create(I(f({},d),{[a.Kind]:"Function",type:"object",instanceOf:"Function",parameters:u,returns:c}))}else if(globalThis.Array.isArray(t)){let u=t.map(T=>x.Clone(T,{}));return this.Create(I(f({},d),{[a.Kind]:"Function",type:"object",instanceOf:"Function",parameters:u,returns:c}))}else throw new Error("ExtendedTypeBuilder.Function: Invalid parameters")}InstanceType(t,s={}){return x.Clone(t.returns,s)}Parameters(t,s={}){return this.Tuple(t.parameters,f({},s))}Promise(t,s={}){return this.Create(I(f({},s),{[a.Kind]:"Promise",type:"object",instanceOf:"Promise",item:x.Clone(t,{})}))}RegEx(t,s={}){return this.Create(I(f({},s),{[a.Kind]:"String",type:"string",pattern:t.source}))}ReturnType(t,s={}){return x.Clone(t.returns,s)}Symbol(t){return this.Create(I(f({},t),{[a.Kind]:"Symbol",type:"null",typeOf:"Symbol"}))}Undefined(t={}){return this.Create(I(f({},t),{[a.Kind]:"Undefined",type:"null",typeOf:"Undefined"}))}Uint8Array(t={}){return this.Create(I(f({},t),{[a.Kind]:"Uint8Array",type:"object",instanceOf:"Uint8Array"}))}Void(t={}){return this.Create(I(f({},t),{[a.Kind]:"Void",type:"null",typeOf:"Void"}))}};a.ExtendedTypeBuilder=be;a.StandardType=new de;a.Type=new be;});function B(){return connectUi.getProviderFromId(connectUi.getSelectedProviderId())||window.StacksProvider||window.BlockstackProvider}function st(){return !!B()}function Sn(o){return o?typeof o=="string"?networkV6.StacksNetwork.fromName(o):"version"in o?o:"url"in o?new networkV6.StacksMainnet({url:o.url}):o.transactionVersion===network.TransactionVersion.Mainnet?new networkV6.StacksMainnet({url:o.client.baseUrl}):new networkV6.StacksTestnet({url:o.client.baseUrl}):new networkV6.StacksTestnet}function Ne(o,t){var s,d;return o instanceof t||((d=(s=o==null?void 0:o.constructor)==null?void 0:s.name)==null?void 0:d.toLowerCase())===t.name}function je(o){return typeof o=="string"?o:Ne(o,networkV6.StacksMainnet)?"mainnet":Ne(o,networkV6.StacksTestnet)?"testnet":Ne(o,networkV6.StacksDevnet)||Ne(o,networkV6.StacksMocknet)?"devnet":"coreApiUrl"in o?o.coreApiUrl:"url"in o?o.url:"transactionVersion"in o?o.transactionVersion===network.TransactionVersion.Mainnet?"mainnet":"testnet":"mainnet"}function Q(o){if(typeof o.type=="string")return o;switch(o.type){case transactionsV6.ClarityType.BoolFalse:return transactions.Cl.bool(!1);case transactionsV6.ClarityType.BoolTrue:return transactions.Cl.bool(!0);case transactionsV6.ClarityType.Int:return transactions.Cl.int(o.value);case transactionsV6.ClarityType.UInt:return transactions.Cl.uint(o.value);case transactionsV6.ClarityType.Buffer:return transactions.Cl.buffer(o.buffer);case transactionsV6.ClarityType.StringASCII:return transactions.Cl.stringAscii(o.data);case transactionsV6.ClarityType.StringUTF8:return transactions.Cl.stringUtf8(o.data);case transactionsV6.ClarityType.List:return transactions.Cl.list(o.list.map(Q));case transactionsV6.ClarityType.Tuple:return transactions.Cl.tuple(Object.fromEntries(Object.entries(o.data).map(([s,d])=>[s,Q(d)])));case transactionsV6.ClarityType.OptionalNone:return transactions.Cl.none();case transactionsV6.ClarityType.OptionalSome:return transactions.Cl.some(Q(o.value));case transactionsV6.ClarityType.ResponseErr:return transactions.Cl.error(Q(o.value));case transactionsV6.ClarityType.ResponseOk:return transactions.Cl.ok(Q(o.value));case transactionsV6.ClarityType.PrincipalContract:return transactions.Cl.contractPrincipal(transactions.Address.stringify(o.address),o.contractName.content);case transactionsV6.ClarityType.PrincipalStandard:return transactions.Cl.standardPrincipal(transactions.Address.stringify(o.address));default:let t=o;throw new Error(`Unknown clarity type: ${t}`)}}var In="asigna-stx",Cn=(o,t)=>new Promise(s=>{function d(c){c.data.source===In&&c.data[t]&&(s(c.data[t]),window.removeEventListener("message",d));}window.addEventListener("message",d),window.top.postMessage(ut(o,t),"*");}),at={authenticationRequest:async o=>Cn(o,"authenticationRequest"),transactionRequest:async o=>Cn(o,"transactionRequest")},ut=(o,t)=>({source:In,[t]:o}),An=()=>{!!window.top&&document.referrer.endsWith(".asigna.io/")&&(window.AsignaProvider=at);};An();var Ln=[{id:"LeatherProvider",name:"Leather",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiByeD0iMjYuODM4NyIgZmlsbD0iIzEyMTAwRiIvPgo8cGF0aCBkPSJNNzQuOTE3MSA1Mi43MTE0QzgyLjQ3NjYgNTEuNTQwOCA5My40MDg3IDQzLjU4MDQgOTMuNDA4NyAzNy4zNzYxQzkzLjQwODcgMzUuNTAzMSA5MS44OTY4IDM0LjIxNTQgODkuNjg3MSAzNC4yMTU0Qzg1LjUwMDQgMzQuMjE1NCA3OC40MDYxIDQwLjUzNjggNzQuOTE3MSA1Mi43MTE0Wk0zOS45MTEgODMuNDk5MUMzMC4wMjU2IDgzLjQ5OTEgMjkuMjExNSA5My4zMzI0IDM5LjA5NjkgOTMuMzMyNEM0My41MTYzIDkzLjMzMjQgNDguODY2MSA5MS41NzY0IDUxLjY1NzMgODguNDE1N0M0Ny41ODY4IDg0LjkwMzggNDQuMjE0MSA4My40OTkxIDM5LjkxMSA4My40OTkxWk0xMDIuODI5IDc5LjI4NDhDMTAzLjQxIDk1Ljc5MDcgOTUuMDM2OSAxMDUuMDM5IDgwLjg0ODQgMTA1LjAzOUM3Mi40NzQ4IDEwNS4wMzkgNjguMjg4MSAxMDEuODc4IDU5LjMzMyA5Ni4wMjQ5QzU0LjY4MSAxMDEuMTc2IDQ1Ljg0MjMgMTA1LjAzOSAzOC41MTU0IDEwNS4wMzlDMTMuMjc4NSAxMDUuMDM5IDE0LjMyNTIgNzIuODQ2MyA0MC4wMjczIDcyLjg0NjNDNDUuMzc3MSA3Mi44NDYzIDQ5LjkxMjggNzQuMjUxMSA1NS43Mjc3IDc3Ljg4TDU5LjU2NTYgNjQuNDE3N0M0My43NDg5IDYwLjA4NjQgMzUuODQwNSA0Ny45MTE4IDQzLjYzMjYgMzAuNDY5M0g1Ni4xOTI5QzQ5LjIxNSA0Mi4wNTg2IDUzLjk4MzIgNTEuNjU3OCA2Mi44MjIgNTIuNzExNEM2Ny41OTAzIDM1LjczNzIgNzcuODI0NiAyMi41MDkgOTEuNDMxNiAyMi41MDlDOTkuMTA3NCAyMi41MDkgMTA1LjE1NSAyNy41NDI4IDEwNS4xNTUgMzYuNjczN0MxMDUuMTU1IDUxLjMwNjYgODYuMDgxOSA2My4yNDcxIDcxLjY2MDcgNjQuNDE3N0w2NS43Mjk1IDg1LjM3MjFDNzIuNDc0OCA5My4yMTUzIDkxLjE5OSAxMDAuODI0IDkxLjE5OSA3OS4yODQ4SDEwMi44MjlaIiBmaWxsPSIjRjVGMUVEIi8+Cjwvc3ZnPgo=",webUrl:"https://leather.io",chromeWebStoreUrl:"https://chrome.google.com/webstore/detail/hiro-wallet/ldinpeekobnhjjdofggfgjlcehhmanlj",mozillaAddOnsUrl:"https://leather.io/install-extension"},{id:"XverseProviders.StacksProvider",name:"Xverse Wallet",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMxNzE3MTciIGQ9Ik0wIDBoNjAwdjYwMEgweiIvPjxwYXRoIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTQ0MCA0MzUuNHYtNTFjMC0yLS44LTMuOS0yLjItNS4zTDIyMCAxNjIuMmE3LjYgNy42IDAgMCAwLTUuNC0yLjJoLTUxLjFjLTIuNSAwLTQuNiAyLTQuNiA0LjZ2NDcuM2MwIDIgLjggNCAyLjIgNS40bDc4LjIgNzcuOGE0LjYgNC42IDAgMCAxIDAgNi41bC03OSA3OC43Yy0xIC45LTEuNCAyLTEuNCAzLjJ2NTJjMCAyLjQgMiA0LjUgNC42IDQuNUgyNDljMi42IDAgNC42LTIgNC42LTQuNlY0MDVjMC0xLjIuNS0yLjQgMS40LTMuM2w0Mi40LTQyLjJhNC42IDQuNiAwIDAgMSA2LjQgMGw3OC43IDc4LjRhNy42IDcuNiAwIDAgMCA1LjQgMi4yaDQ3LjVjMi41IDAgNC42LTIgNC42LTQuNloiLz48cGF0aCBmaWxsPSIjRUU3QTMwIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik0zMjUuNiAyMjcuMmg0Mi44YzIuNiAwIDQuNiAyLjEgNC42IDQuNnY0Mi42YzAgNCA1IDYuMSA4IDMuMmw1OC43LTU4LjVjLjgtLjggMS4zLTIgMS4zLTMuMnYtNTEuMmMwLTIuNi0yLTQuNi00LjYtNC42TDM4NCAxNjBjLTEuMiAwLTIuNC41LTMuMyAxLjNsLTU4LjQgNTguMWE0LjYgNC42IDAgMCAwIDMuMiA3LjhaIi8+PC9nPjwvc3ZnPg==",webUrl:"https://xverse.app",chromeWebStoreUrl:"https://chrome.google.com/webstore/detail/xverse-wallet/idnnbdplmphpflfnlkomgpfbpcgelopg",googlePlayStoreUrl:"https://play.google.com/store/apps/details?id=com.secretkeylabs.xverse",iOSAppStoreUrl:"https://apps.apple.com/app/xverse-bitcoin-web3-wallet/id1552272513",mozillaAddOnsUrl:"https://www.xverse.app/download"},{id:"AsignaProvider",name:"Asigna Multisig",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMDEwMCIgZD0iTTAgMGgzMnYzMkgweiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik0xNS4xMSA1LjU1YTMgMyAwIDAgMC0xLjgyIDEuM2wtLjA1LjA4LS40My43Mi0uMDcuMTEtLjUuODUtLjA1LjA5LTEuMjkgMi4xOC0uMDQuMDctLjQ3LjgtLjA2LjEtLjQ2Ljc4LS4wNy4xMS0xLjYzIDIuNzYtLjA3LjExLS4zOC42Ni0uMDUuMDgtLjczIDEuMjQtLjM1LjYtLjQuNjctLjA1LjA5TDUuMSAyMC43bC0uMTEuMTgtLjE0LjIzLS4wNy4xMy0uMzMuNTUtLjA0LjA3di4wMWExLjI2IDEuMjYgMCAwIDAtLjE0LjQ3IDEuMzEgMS4zMSAwIDAgMCAxLjI0IDEuNGgxLjVsLjA1LS4wNi4wNC0uMDYuODctMS4yMS4wNS0uMDguNzctMS4wNy4wNS0uMDcuNC0uNTcuMDUtLjA2LjI0LS4zNGExLjUyIDEuNTIgMCAwIDEgMS4zOS0uNjIgMS41IDEuNSAwIDAgMSAuNjQuMiAxLjQ3IDEuNDcgMCAwIDEgLjczIDEuMjcgMS40NCAxLjQ0IDAgMCAxLS4yNy44NGwtLjYzLjg4LS4wNS4wNy0uMzIuNDUtLjA2LjA4LS4wOC4xMi0uMTIuMTYtLjA1LjA4aDIuMTNhMi4zMiAyLjMyIDAgMCAwIDEuNzctLjk2bDEuMTgtMS42My43Ny0xLjA4IDEuMy0xLjhhMS4yNCAxLjI0IDAgMCAxIC41NS0uNDNsLjA4LS4wM2ExLjMgMS4zIDAgMCAxIC4zLS4wNiAxLjI4IDEuMjggMCAwIDEgMS4xNS41NGwuMTEuMmExLjEzIDEuMTMgMCAwIDEgLjEuNDEgMS4xOSAxLjE5IDAgMCAxLS4yMy43N2wtLjAzLjA1LS41Ny44LS43Ljk4LS4yNy4zN2ExLjIyIDEuMjIgMCAwIDAtLjIuNSAxLjA1IDEuMDUgMCAwIDAtLjAyLjIzdi4wNmExLjE3IDEuMTcgMCAwIDAgLjE0LjQzbC4wMi4wNS4wNy4xYTEuNDQgMS40NCAwIDAgMCAuMS4xMWwuMDUuMDYuMDEuMDFhMS44IDEuOCAwIDAgMCAuMTQuMWMwIC4wMi4wMi4wMy4wNC4wM2ExIDEgMCAwIDAgLjA4LjA1bC4wNy4wNGExLjI1IDEuMjUgMCAwIDAgLjUuMWg2LjljLjEgMCAuMi0uMDEuMjktLjAzbC4wNi0uMDJhMS4yNyAxLjI3IDAgMCAwIC4yNy0uMS41Ny41NyAwIDAgMCAuMDctLjAzIDEuMjEgMS4yMSAwIDAgMCAuMjYtLjE5bC4wOC0uMDdhLjkyLjkyIDAgMCAwIC4xNS0uMTkgMS41NSAxLjU1IDAgMCAwIC4wOS0uMTdsLjAyLS4wNWExLjIyIDEuMjIgMCAwIDAgLjA4LS4yNnYtLjA0bC4wMi0uMDh2LS4wOGExLjMyIDEuMzIgMCAwIDAtLjItLjc0bC0xLjYtMi42NC0uMDYtLjEtLjItLjMyLS4zMy0uNTR2LS4wMWwtLjA1LS4wOC0xLjMtMi4xNS0uMDctLjEtLjA0LS4wNi0uOC0xLjMyLS4wNC0uMDctLjItLjM0LS4xLS4xNC0uMS0uMTYtLjUzLS45LS4xMy0uMi0uMDktLjE0LTIuMTctMy41Ny0uMDQtLjA3LS43Mi0xLjE5LS4wNS0uMDctLjQtLjY1YTIuNjUgMi42NSAwIDAgMC0uMy0uNCAyLjk2IDIuOTYgMCAwIDAtLjk3LS43NCAzLjA0IDMuMDQgMCAwIDAtMS4zLS4zYy0uMjUgMC0uNS4wNC0uNzQuMVoiLz48cGF0aCBmaWxsPSJ1cmwoI2IpIiBkPSJNMTkgMTYuM2E1LjQ1IDUuNDUgMCAwIDAtLjgzIDEuNTZsLS4wNC4xNWExLjM2IDEuMzYgMCAwIDEgLjI4LS4xNiAxLjI0IDEuMjQgMCAwIDEgLjM4LS4wOGguMWExLjI4IDEuMjggMCAwIDEgMS4wNS41NGMuMDQuMDYuMDguMTMuMS4yYTEuMjQgMS4yNCAwIDAgMSAuMDkuMjcgMS4xOSAxLjE5IDAgMCAxLS4yLjkxbC0uMDQuMDUtLjU3Ljc5LS43Ljk5LS4yNy4zN2ExLjIzIDEuMjMgMCAwIDAtLjIuNDIgMS4wNiAxLjA2IDAgMCAwLS4wMi4zMXYuMDZhMS4xNyAxLjE3IDAgMCAwIC4xNi40Ny45My45MyAwIDAgMCAuMDcuMSAxLjUgMS41IDAgMCAwIC4xLjEybC4wNS4wNmguMDFhMS45NCAxLjk0IDAgMCAwIC4wOS4wOCAxIDEgMCAwIDAgLjE3LjFsLjA3LjA0YTEuMjUgMS4yNSAwIDAgMCAuNS4xaDYuOWMuMSAwIC4yIDAgLjI4LS4wMmwuMDctLjAyYTEuMzIgMS4zMiAwIDAgMCAuMzQtLjEzbC4xNi0uMS4wMy0uMDNhMS4yOSAxLjI5IDAgMCAwIC4yLS4yIDIuNDMgMi40MyAwIDAgMCAuMTItLjE3Yy4wMy0uMDMuMDUtLjA4LjA3LS4xMmwuMDItLjA1YTEuMjEgMS4yMSAwIDAgMCAuMDktLjN2LS4wOGwuMDEtLjA5YTEuMzIgMS4zMiAwIDAgMC0uMi0uNzNsLTEuNi0yLjY0LS4wNi0uMS0uMi0uMzItLjMzLS41NHYtLjAybC0uMDUtLjA3LTEuMy0yLjE1LS4xMi0uMDctLjA3LS4wNGE0Ljk0IDQuOTQgMCAwIDAtMi40Ni0uNjdjLTEuMDMgMC0xLjc2LjU3LTIuMjYgMS4yWiIvPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0xMi4yOSAyMS4wOGMwIC4yOS0uMDkuNTgtLjI3Ljg0bC0xLjMxIDEuODRIN2wyLjUyLTMuNTNhMS41NCAxLjU0IDAgMCAxIDIuMS0uMzZjLjQzLjI4LjY2Ljc0LjY2IDEuMloiLz48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTEuMTYgMjEuMjVhLjU2LjU2IDAgMCAxLS41Ny41NS41Ni41NiAwIDAgMS0uNTctLjU2LjU2LjU2IDAgMCAxIC41Ny0uNTUuNTYuNTYgMCAwIDEgLjU3LjU2WiIvPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0iYSIgeDE9IjE1LjIzIiB4Mj0iMTkuMyIgeTE9IjI1Ljc4IiB5Mj0iNi4xMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM2NTIyRjQiLz48c3RvcCBvZmZzZXQ9Ii41NSIgc3RvcC1jb2xvcj0iIzlCNkJGRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0E1ODVGRiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJiIiB4MT0iMjIuNTkiIHgyPSIyNC44IiB5MT0iMjQuNzEiIHkyPSIxNS41MyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM0MjFGOEIiLz48c3RvcCBvZmZzZXQ9Ii41NSIgc3RvcC1jb2xvcj0iIzcyMzBGRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzk3NzNGRiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjwvc3ZnPg==",webUrl:"https://asigna.io",chromeWebStoreUrl:"https://stx.asigna.io/"}];var Be=class extends Error{constructor(s,d,c,u){super(c?`${s} (${c})`:s);this.code=d;this.data=c;this.cause=u;this.name="JsonRpcError",this.cause=u;}},se=class extends Be{constructor(t="User canceled provider selection"){super(t,32001),this.name="ConnectCanceledError";}};async function Pe(o,t,s){return (await o.request(t,s)).result}async function ae(...o){let{options:t,method:s,params:d}=lt(o),c=Object.assign({defaultProviders:Ln,persistSelection:!0,forceSelection:!1,provider:connectUi.getProvider()},t);if(c.provider&&!c.forceSelection)return Pe(c.provider,s,d);if(typeof window!="undefined")return loader.defineCustomElements(window),new Promise((u,T)=>{let l=document.createElement("connect-modal");l.defaultProviders=c.defaultProviders,l.installedProviders=connectUi.getInstalledProviders(c.defaultProviders),l.persistSelection=c.persistSelection;let y=document.body.style.overflow;document.body.style.overflow="hidden";let C=()=>{l.remove(),document.body.style.overflow=y;};l.callback=j=>{C(),u(Pe(j,s,d));},l.cancelCallback=()=>{C(),T(new se);},document.body.appendChild(l);let O=j=>{j.key==="Escape"&&(document.removeEventListener("keydown",O),l.remove(),T(new se));};document.addEventListener("keydown",O);})}function lt(o){return typeof o[0]=="string"?{method:o[0],params:o[1]}:{options:o[0],method:o[1],params:o[2]}}function G(o,t,s){return (d,c)=>{if(!c)throw new Error("[Connect] No installed Stacks wallet found");let u=t(d);Pe(c,o,u).then(T=>{var y;let l=s(T);(y=d.onFinish)==null||y.call(d,l);}).catch(d.onCancel);}}var $r="https://app.blockstack.org";typeof window!="undefined"&&(window.__CONNECT_VERSION__="__VERSION__");var Qr=()=>{let o=navigator.userAgent;return /android/i.test(o)||/iPad|iPhone|iPod/.test(o)?!0:/windows phone/i.test(o)},xn=async(o,t=B())=>{if(!t)throw new Error("[Connect] No installed Stacks wallet found");let{onFinish:s,onCancel:d,userSession:c}=o,u=On(c);u.isUserSignedIn()&&u.signUserOut();try{let l=(await ae({forceSelection:!0},"stx_getAddresses")).addresses[0].address.toUpperCase(),y=l[1]==="P"||l[1]==="M",C=u.store.getSessionData();C.userData||(C.userData={profile:{}}),C.userData.profile||(C.userData.profile={}),C.userData.profile.stxAddress||(C.userData.profile.stxAddress={}),Object.assign(C.userData.profile.stxAddress,{mainnet:y!=null?y:l,testnet:!y}),u.store.setSessionData(C),s==null||s({userSession:u});}catch(T){console.error("[Connect] Error during auth request",T),d==null||d();}},Tt="blockstack-session",ze=class{constructor(t){t!=null&&t.appConfig&&(this.appConfig=t.appConfig),typeof window=="undefined"&&typeof self=="undefined"?this.store=new Ye:this.store=new Ke;}makeAuthRequestToken(){}generateAndStoreTransitKey(){}getAuthResponseToken(){}isSignInPending(){return !1}isUserSignedIn(){return !!this.store.getSessionData().userData}async handlePendingSignIn(){return Promise.resolve(this.loadUserData())}loadUserData(){let t=this.store.getSessionData().userData;if(!t)throw new common.NoSessionDataError("No user data found. Did the user sign in?");return t}encryptContent(){}decryptContent(){}signUserOut(t){this.store.deleteSessionData(),t&&typeof location!="undefined"&&location.href&&(location.href=t);}},De=class{constructor(t){t&&this.setSessionData(t);}getSessionData(){throw new Error("Abstract class")}setSessionData(t){throw new Error("Abstract class")}deleteSessionData(){throw new Error("Abstract class")}},Ye=class extends De{constructor(t){super(t),this.sessionData||this.setSessionData({});}getSessionData(){if(!this.sessionData)throw new common.NoSessionDataError("No session data was found.");return this.sessionData}setSessionData(t){return this.sessionData=t,!0}deleteSessionData(){return this.setSessionData({}),!0}},Ke=class extends De{constructor(t){var d;super(t),this.key=typeof((d=t==null?void 0:t.storeOptions)==null?void 0:d.localStorageKey)=="string"?t.storeOptions.localStorageKey:Tt,localStorage.getItem(this.key)||this.setSessionData({});}getSessionData(){let t=localStorage.getItem(this.key);if(!t)throw new common.NoSessionDataError("No session data was found in localStorage");return JSON.parse(t)}setSessionData(t){return localStorage.setItem(this.key,JSON.stringify(t)),!0}deleteSessionData(){return localStorage.removeItem(this.key),this.setSessionData({}),!0}},On=o=>o||new ze,qr=async o=>(o=On(o),o.isUserSignedIn()?Promise.resolve(o.loadUserData()):Promise.resolve(null));var ft=(d=>(d.ContractCall="contract_call",d.ContractDeploy="smart_contract",d.STXTransfer="token_transfer",d))(ft||{}),yt=(u=>(u.BUFFER="buffer",u.UINT="uint",u.INT="int",u.PRINCIPAL="principal",u.BOOL="bool",u))(yt||{});var $e=(u=>(u[u.DEFAULT=0]="DEFAULT",u[u.ALL=1]="ALL",u[u.NONE=2]="NONE",u[u.SINGLE=3]="SINGLE",u[u.ANYONECANPAY=128]="ANYONECANPAY",u))($e||{});function Mt(o){}var St=async o=>{},Ct="stx_updateProfile",Qe=o=>o,qe=o=>o.profile;function It(o,t=B()){G(Ct,Qe,qe)(o,t);}function At(o){}var Lt=async o=>{},xt="stx_signMessage",Ve=o=>o,Ze=o=>o;function Ot(o,t=B()){G(xt,Ve,Ze)(o,t);}async function jt(o){}var Pt="stx_signStructuredMessage",He=o=>({message:Q(o.message),domain:Q(o.domain)}),We=o=>o;function Dt(o,t=B()){if(o.domain.type!==transactionsV6.ClarityType.Tuple)throw new Error("Domain must be a tuple");G(Pt,He,We)(o,t);}var Xe=o=>{let t=o;if(!t){let s=new auth.AppConfig(["store_write"],document.location.href);t=new auth.UserSession({appConfig:s});}return t};function Ut(o){try{return Xe(o).loadUserData().appPrivateKey}catch(t){return !1}}var kt=o=>{let s=Xe(o).loadUserData().appPrivateKey,d=jsontokens.SECP256K1Client.derivePublicKey(s);return {privateKey:s,publicKey:d}};function vt(o){var y;let{stxAddress:t,userSession:s,network:d}=o;if(t)return t;if(!s||!d)return;let c=(y=s==null?void 0:s.loadUserData().profile)==null?void 0:y.stxAddress,u={[network.ChainId.Mainnet]:"mainnet",[network.ChainId.Testnet]:"testnet"},T=Sn(d);return c==null?void 0:c[u[T.chainId]]}var _t=async o=>{},Ft=async o=>{},Bt=async o=>{},zt=async o=>{},Yt="stx_callContract",Je=o=>{var s;let t=(s=o.functionArgs)==null?void 0:s.map(d=>typeof d=="string"?transactions.Cl.deserialize(d):Q(d));return I(f({},o),{contract:`${o.contractAddress}.${o.contractName}`,functionArgs:t,network:je(o.network),postConditionMode:Dn(o.postConditionMode),postConditions:Pn(o.postConditions),address:o.stxAddress})},he=o=>({txId:o.txid,txRaw:o.transaction,stacksTransaction:transactions.deserializeTransaction(o.transaction)});function Kt(o,t=B()){G(Yt,Je,he)(o,t);}var Gt="stx_deployContract",en=o=>I(f({},o),{name:o.contractName,clarityCode:o.codeBody,network:je(o.network),postConditionMode:Dn(o.postConditionMode),postConditions:Pn(o.postConditions),address:o.stxAddress}),nn=o=>({txId:o.txid,txRaw:o.transaction,stacksTransaction:transactions.deserializeTransaction(o.transaction)});function $t(o,t=B()){G(Gt,en,nn)(o,t);}var Qt="stx_transferStx",tn=o=>I(f({},o),{amount:o.amount.toString(),network:je(o.network),address:o.stxAddress}),rn=o=>({txId:o.txid,txRaw:o.transaction,stacksTransaction:transactions.deserializeTransaction(o.transaction)});function qt(o,t=B()){G(Qt,tn,rn)(o,t);}var Vt="stx_signTransaction",on=o=>I(f({},o),{transaction:o.txHex}),sn=o=>I(f({},o),{stacksTransaction:transactions.deserializeTransaction(o.transaction)});function Zt(o,t=B()){G(Vt,on,sn)(o,t);}function Pn(o){if(typeof o!="undefined")return o.map(t=>typeof t=="string"?t:typeof t.type=="string"?I(f({},t),{amount:"amount"in t?t.amount.toString():void 0}):common.bytesToHex(transactionsV6.serializePostCondition(t)))}function Dn(o){if(typeof o!="undefined"){if(typeof o=="string")return o;switch(o){case transactions.PostConditionMode.Allow:return "allow";case transactions.PostConditionMode.Deny:return "deny";default:let t=o;throw new Error(`Unknown post condition mode: ${t}. Should be one of: 'allow', 'deny'`)}}}function X(o,t,s,d={forceSelection:!0}){return (c,u)=>{u&&(d.provider=u);let T=t(c);ae(d,o,T).then(l=>{var C;let y=s(l);(C=c.onFinish)==null||C.call(c,y);}).catch(c.onCancel);}}var Wt=xn,go=X("stx_transferStx",tn,rn),mo=X("stx_callContract",Je,he),bo=X("stx_deployContract",en,nn),wo=X("stx_signTransaction",on,sn),Eo=X("stx_updateProfile",Qe,qe),Ro=X("stx_signMessage",Ve,Ze),Uo=X("stx_signStructuredMessage",He,We),ko=connectUi.clearSelectedProviderId,vo=Wt;function Xt(o){}var Jt=async o=>{},ht="signPsbt",er=o=>{var t;return {psbt:o.hex,signInputs:typeof o.signAtIndex=="number"?[o.signAtIndex]:o.signAtIndex,allowedSigHash:(t=o.allowedSighash)==null?void 0:t.map(s=>$e[s])}},nr=o=>({hex:o.psbt});function tr(o,t=B()){G(ht,er,nr)(o,t);}var M=hn(wn()),we=M.Type.Union([M.Type.Number(),M.Type.BigInt(),M.Type.String()]),sr=M.Type.RegEx(/^(?:0x)?[A-Fa-f0-9]+$/),En=M.Type.RegEx(/^[A-Za-z0-9]+$/),Rn=M.Type.RegEx(/^[A-Za-z0-9]+\.[A-Za-z0-9-]+$/),pn=M.Type.Union([M.Type.Literal("origin"),En,Rn]),Un=M.Type.RegEx(/^[A-Z0-9]+\.[A-Za-z0-9]+::[A-Za-z0-9]+$/),kn=M.Type.Union([M.Type.Literal("eq"),M.Type.Literal("gt"),M.Type.Literal("gte"),M.Type.Literal("lt"),M.Type.Literal("lte")]),ar=M.Type.Object({type:M.Type.Literal("uint"),value:we},{$id:"UInt"}),ur=M.Type.Object({type:M.Type.Literal("int"),value:we},{$id:"Int"}),cr=M.Type.Object({type:M.Type.Literal("buffer"),value:sr},{$id:"Buffer"}),dr=M.Type.Object({type:M.Type.Literal("true")},{$id:"True"}),pr=M.Type.Object({type:M.Type.Literal("false")},{$id:"False"}),lr=M.Type.Union([dr,pr],{$id:"Boolean"}),Tr=M.Type.Object({type:M.Type.Literal("address"),value:En},{$id:"StandardPrincipal"}),fr=M.Type.Object({type:M.Type.Literal("contract"),value:Rn},{$id:"ContractPrincipal"}),yr=M.Type.Object({type:M.Type.Literal("ascii"),value:M.Type.String()},{$id:"StringAscii"}),Mr=M.Type.Object({type:M.Type.Literal("utf8"),value:M.Type.String()},{$id:"StringUtf8"}),Sr=M.Type.Object({type:M.Type.Literal("none")},{$id:"None"}),vn=M.Type.Recursive(o=>M.Type.Union([ar,ur,cr,lr,Tr,fr,yr,Mr,Sr,M.Type.Object({type:M.Type.Literal("some"),value:o},{$id:"Some"}),M.Type.Object({type:M.Type.Literal("tuple"),value:M.Type.Record(M.Type.String(),o)},{$id:"Tuple"}),M.Type.Object({type:M.Type.Literal("list"),value:M.Type.Array(o)},{$id:"List"}),M.Type.Union([M.Type.Object({type:M.Type.Literal("ok"),value:o}),M.Type.Object({type:M.Type.Literal("err"),value:o})],{$id:"Response"})],{$id:"ClarityValue"})),Cr=M.Type.Object({type:M.Type.Literal("stx-postcondition"),address:pn,condition:kn,amount:we},{$id:"StxPostCondition"}),Ir=M.Type.Object({type:M.Type.Literal("ft-postcondition"),address:pn,condition:kn,amount:we,asset:Un},{$id:"FungiblePostCondition"}),Ar=M.Type.Object({type:M.Type.Literal("nft-postcondition"),address:pn,condition:M.Type.Union([M.Type.Literal("sent"),M.Type.Literal("not-sent")]),asset:Un,assetId:vn},{$id:"NonFungiblePostCondition"}),Lr=M.Type.Union([Cr,Ir,Ar]);
Object.defineProperty(exports,"clearSelectedProviderId",{enumerable:true,get:function(){return connectUi.clearSelectedProviderId}});Object.defineProperty(exports,"getSelectedProviderId",{enumerable:true,get:function(){return connectUi.getSelectedProviderId}});Object.defineProperty(exports,"isProviderSelected",{enumerable:true,get:function(){return connectUi.isProviderSelected}});Object.defineProperty(exports,"setSelectedProviderId",{enumerable:true,get:function(){return connectUi.setSelectedProviderId}});exports.ClarityValueTypeBoxSchema=vn;exports.ContractCallArgumentType=yt;exports.DEFAULT_PROVIDERS=Ln;exports.InstanceDataStore=Ye;exports.LOCALSTORAGE_SESSION_KEY=Tt;exports.LocalStorageStore=Ke;exports.PostConditionTypeBoxSchema=Lr;exports.SessionDataStore=De;exports.SignatureHash=$e;exports.TransactionTypes=ft;exports.UserSession=ze;exports.authenticate=xn;exports.defaultAuthURL=$r;exports.disconnect=ko;exports.getDefaultProfileUpdateRequestOptions=Mt;exports.getDefaultPsbtRequestOptions=Xt;exports.getDefaultSignatureRequestOptions=At;exports.getKeys=kt;exports.getOrCreateUserSession=On;exports.getStacksProvider=B;exports.getStxAddress=vt;exports.getUserData=qr;exports.getUserSession=Xe;exports.hasAppPrivateKey=Ut;exports.isMobile=Qr;exports.isStacksWalletInstalled=st;exports.makeContractCallToken=_t;exports.makeContractDeployToken=Ft;exports.makeProfileUpdateToken=St;exports.makePsbtToken=Jt;exports.makeSTXTransferToken=Bt;exports.makeSignTransaction=zt;exports.openContractCall=Kt;exports.openContractDeploy=$t;exports.openProfileUpdateRequestPopup=It;exports.openPsbtRequestPopup=tr;exports.openSTXTransfer=qt;exports.openSignTransaction=Zt;exports.openSignatureRequestPopup=Ot;exports.openStructuredDataSignatureRequestPopup=Dt;exports.request=ae;exports.requestRaw=Pe;exports.showBlockstackConnect=vo;exports.showConnect=Wt;exports.showContractCall=mo;exports.showContractDeploy=bo;exports.showProfileUpdate=Eo;exports.showSTXTransfer=go;exports.showSignMessage=Ro;exports.showSignStructuredMessage=Uo;exports.showSignTransaction=wo;exports.signMessage=Lt;exports.signStructuredMessage=jt;//# sourceMappingURL=index.js.map
'use strict';var common=require('@stacks/common'),connectUi=require('@stacks/connect-ui'),network=require('@stacks/network'),networkV6=require('@stacks/network-v6'),transactions=require('@stacks/transactions'),transactionsV6=require('@stacks/transactions-v6'),loader=require('@stacks/connect-ui/loader'),jsontokens=require('jsontokens');var qn=Object.create;var Fe=Object.defineProperty,Qn=Object.defineProperties,Vn=Object.getOwnPropertyDescriptor,Zn=Object.getOwnPropertyDescriptors,Hn=Object.getOwnPropertyNames,Tn=Object.getOwnPropertySymbols,Wn=Object.getPrototypeOf,yn=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable;var _e=(o,t)=>(t=Symbol[o])?t:Symbol.for("Symbol."+o),Jn=o=>{throw TypeError(o)};var fn=(o,t,s)=>t in o?Fe(o,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):o[t]=s,f=(o,t)=>{for(var s in t||(t={}))yn.call(t,s)&&fn(o,s,t[s]);if(Tn)for(var s of Tn(t))Xn.call(t,s)&&fn(o,s,t[s]);return o},C=(o,t)=>Qn(o,Zn(t));var hn=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports);var et=(o,t,s,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of Hn(t))!yn.call(o,c)&&c!==s&&Fe(o,c,{get:()=>t[c],enumerable:!(d=Vn(t,c))||d.enumerable});return o};var nt=(o,t,s)=>(s=o!=null?qn(Wn(o)):{},et(!o||!o.__esModule?Fe(s,"default",{value:o,enumerable:!0}):s,o));var tt=function(o,t){this[0]=o,this[1]=t;};var W=o=>{var t=o[_e("asyncIterator")],s=!1,d,c={};return t==null?(t=o[_e("iterator")](),d=u=>c[u]=l=>t[u](l)):(t=t.call(o),d=u=>c[u]=l=>{if(s){if(s=!1,u==="throw")throw l;return l}return s=!0,{done:!1,value:new tt(new Promise(T=>{var y=t[u](l);y instanceof Object||Jn("Object expected"),T(y);}),1)}}),c[_e("iterator")]=()=>c,d("next"),"throw"in t?d("throw"):c.throw=u=>{throw u},"return"in t&&d("return"),c};var Rn=hn(a=>{Object.defineProperty(a,"__esModule",{value:!0});a.Type=a.StandardType=a.ExtendedTypeBuilder=a.StandardTypeBuilder=a.TypeBuilder=a.TemplateLiteralGenerator=a.TemplateLiteralFinite=a.TemplateLiteralParser=a.TemplateLiteralParserError=a.TemplateLiteralResolver=a.TemplateLiteralPattern=a.KeyResolver=a.ObjectMap=a.TypeClone=a.TypeExtends=a.TypeExtendsResult=a.ExtendsUndefined=a.TypeGuard=a.TypeGuardUnknownTypeError=a.FormatRegistry=a.TypeRegistry=a.PatternStringExact=a.PatternNumberExact=a.PatternBooleanExact=a.PatternString=a.PatternNumber=a.PatternBoolean=a.Kind=a.Hint=a.Modifier=void 0;a.Modifier=Symbol.for("TypeBox.Modifier");a.Hint=Symbol.for("TypeBox.Hint");a.Kind=Symbol.for("TypeBox.Kind");a.PatternBoolean="(true|false)";a.PatternNumber="(0|[1-9][0-9]*)";a.PatternString="(.*)";a.PatternBooleanExact=`^${a.PatternBoolean}$`;a.PatternNumberExact=`^${a.PatternNumber}$`;a.PatternStringExact=`^${a.PatternString}$`;var bn;(function(o){let t=new Map;function s(){return new Map(t)}o.Entries=s;function d(){return t.clear()}o.Clear=d;function c(T){return t.has(T)}o.Has=c;function u(T,y){t.set(T,y);}o.Set=u;function l(T){return t.get(T)}o.Get=l;})(bn=a.TypeRegistry||(a.TypeRegistry={}));(function(o){let t=new Map;function s(){return new Map(t)}o.Entries=s;function d(){return t.clear()}o.Clear=d;function c(T){return t.has(T)}o.Has=c;function u(T,y){t.set(T,y);}o.Set=u;function l(T){return t.get(T)}o.Get=l;})(a.FormatRegistry||(a.FormatRegistry={}));var un=class extends Error{constructor(t){super("TypeGuard: Unknown type"),this.schema=t;}};a.TypeGuardUnknownTypeError=un;var i;(function(o){function t(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function s(r){return typeof r=="object"&&r!==null&&Array.isArray(r)}function d(r){try{return new RegExp(r),!0}catch(b){return !1}}function c(r){if(typeof r!="string")return !1;for(let b=0;b<r.length;b++){let g=r.charCodeAt(b);if(g>=7&&g<=13||g===27||g===127)return !1}return !0}function u(r){return typeof r=="bigint"}function l(r){return typeof r=="string"}function T(r){return typeof r=="number"&&globalThis.Number.isFinite(r)}function y(r){return typeof r=="boolean"}function A(r){return r===void 0||r!==void 0&&u(r)}function O(r){return r===void 0||r!==void 0&&T(r)}function N(r){return r===void 0||r!==void 0&&y(r)}function j(r){return r===void 0||r!==void 0&&l(r)}function S(r){return r===void 0||r!==void 0&&l(r)&&c(r)&&d(r)}function I(r){return r===void 0||r!==void 0&&l(r)&&c(r)}function P(r){return r===void 0||F(r)}function w(r){return L(r)&&r[a.Kind]==="Any"&&j(r.$id)}o.TAny=w;function m(r){return L(r)&&r[a.Kind]==="Array"&&r.type==="array"&&j(r.$id)&&F(r.items)&&O(r.minItems)&&O(r.maxItems)&&N(r.uniqueItems)}o.TArray=m;function E(r){return L(r)&&r[a.Kind]==="BigInt"&&r.type==="null"&&r.typeOf==="BigInt"&&j(r.$id)&&A(r.multipleOf)&&A(r.minimum)&&A(r.maximum)&&A(r.exclusiveMinimum)&&A(r.exclusiveMaximum)}o.TBigInt=E;function k(r){return L(r)&&r[a.Kind]==="Boolean"&&r.type==="boolean"&&j(r.$id)}o.TBoolean=k;function U(r){if(!(L(r)&&r[a.Kind]==="Constructor"&&r.type==="object"&&r.instanceOf==="Constructor"&&j(r.$id)&&s(r.parameters)&&F(r.returns)))return !1;for(let b of r.parameters)if(!F(b))return !1;return !0}o.TConstructor=U;function Te(r){return L(r)&&r[a.Kind]==="Date"&&r.type==="object"&&r.instanceOf==="Date"&&j(r.$id)&&O(r.minimumTimestamp)&&O(r.maximumTimestamp)&&O(r.exclusiveMinimumTimestamp)&&O(r.exclusiveMaximumTimestamp)}o.TDate=Te;function fe(r){if(!(L(r)&&r[a.Kind]==="Function"&&r.type==="object"&&r.instanceOf==="Function"&&j(r.$id)&&s(r.parameters)&&F(r.returns)))return !1;for(let b of r.parameters)if(!F(b))return !1;return !0}o.TFunction=fe;function ne(r){return L(r)&&r[a.Kind]==="Integer"&&r.type==="integer"&&j(r.$id)&&O(r.multipleOf)&&O(r.minimum)&&O(r.maximum)&&O(r.exclusiveMinimum)&&O(r.exclusiveMaximum)}o.TInteger=ne;function ye(r){if(!(L(r)&&r[a.Kind]==="Intersect"&&s(r.allOf)&&j(r.type)&&(N(r.unevaluatedProperties)||P(r.unevaluatedProperties))&&j(r.$id))||"type"in r&&r.type!=="object")return !1;for(let b of r.allOf)if(!F(b))return !1;return !0}o.TIntersect=ye;function L(r){return t(r)&&a.Kind in r&&typeof r[a.Kind]=="string"}o.TKind=L;function h(r){return L(r)&&r[a.Kind]==="Literal"&&j(r.$id)&&(l(r.const)||T(r.const)||y(r.const)||u(r.const))}o.TLiteral=h;function te(r){return L(r)&&r[a.Kind]==="Never"&&t(r.not)&&globalThis.Object.getOwnPropertyNames(r.not).length===0}o.TNever=te;function ee(r){return L(r)&&r[a.Kind]==="Not"&&s(r.allOf)&&r.allOf.length===2&&t(r.allOf[0])&&F(r.allOf[0].not)&&F(r.allOf[1])}o.TNot=ee;function re(r){return L(r)&&r[a.Kind]==="Null"&&r.type==="null"&&j(r.$id)}o.TNull=re;function Me(r){return L(r)&&r[a.Kind]==="Number"&&r.type==="number"&&j(r.$id)&&O(r.multipleOf)&&O(r.minimum)&&O(r.maximum)&&O(r.exclusiveMinimum)&&O(r.exclusiveMaximum)}o.TNumber=Me;function Se(r){if(!(L(r)&&r[a.Kind]==="Object"&&r.type==="object"&&j(r.$id)&&t(r.properties)&&(N(r.additionalProperties)||P(r.additionalProperties))&&O(r.minProperties)&&O(r.maxProperties)))return !1;for(let[b,g]of Object.entries(r.properties))if(!c(b)||!F(g))return !1;return !0}o.TObject=Se;function Ce(r){return L(r)&&r[a.Kind]==="Promise"&&r.type==="object"&&r.instanceOf==="Promise"&&j(r.$id)&&F(r.item)}o.TPromise=Ce;function Ie(r){if(!(L(r)&&r[a.Kind]==="Record"&&r.type==="object"&&j(r.$id)&&r.additionalProperties===!1&&t(r.patternProperties)))return !1;let b=Object.keys(r.patternProperties);return !(b.length!==1||!d(b[0])||!F(r.patternProperties[b[0]]))}o.TRecord=Ie;function Ae(r){return L(r)&&r[a.Kind]==="Ref"&&j(r.$id)&&l(r.$ref)}o.TRef=Ae;function Z(r){return L(r)&&r[a.Kind]==="String"&&r.type==="string"&&j(r.$id)&&O(r.minLength)&&O(r.maxLength)&&S(r.pattern)&&I(r.format)}o.TString=Z;function Oe(r){return L(r)&&r[a.Kind]==="Symbol"&&r.type==="null"&&r.typeOf==="Symbol"&&j(r.$id)}o.TSymbol=Oe;function oe(r){return L(r)&&r[a.Kind]==="TemplateLiteral"&&r.type==="string"&&l(r.pattern)&&r.pattern[0]==="^"&&r.pattern[r.pattern.length-1]==="$"}o.TTemplateLiteral=oe;function v(r){return L(r)&&r[a.Kind]==="This"&&j(r.$id)&&l(r.$ref)}o.TThis=v;function Le(r){if(!(L(r)&&r[a.Kind]==="Tuple"&&r.type==="array"&&j(r.$id)&&T(r.minItems)&&T(r.maxItems)&&r.minItems===r.maxItems))return !1;if(r.items===void 0&&r.additionalItems===void 0&&r.minItems===0)return !0;if(!s(r.items))return !1;for(let b of r.items)if(!F(b))return !1;return !0}o.TTuple=Le;function xe(r){return L(r)&&r[a.Kind]==="Undefined"&&r.type==="null"&&r.typeOf==="Undefined"&&j(r.$id)}o.TUndefined=xe;function H(r){if(!(L(r)&&r[a.Kind]==="Union"&&s(r.anyOf)&&j(r.$id)))return !1;for(let b of r.anyOf)if(!F(b))return !1;return !0}o.TUnion=H;function ie(r){return H(r)&&r.anyOf.every(b=>h(b)&&typeof b.const=="string")}o.TUnionLiteral=ie;function z(r){return L(r)&&r[a.Kind]==="Uint8Array"&&r.type==="object"&&j(r.$id)&&r.instanceOf==="Uint8Array"&&O(r.minByteLength)&&O(r.maxByteLength)}o.TUint8Array=z;function Ne(r){return L(r)&&r[a.Kind]==="Unknown"&&j(r.$id)}o.TUnknown=Ne;function se(r){return L(r)&&r[a.Kind]==="Unsafe"}o.TUnsafe=se;function je(r){return L(r)&&r[a.Kind]==="Void"&&r.type==="null"&&r.typeOf==="Void"&&j(r.$id)}o.TVoid=je;function Ue(r){return t(r)&&r[a.Modifier]==="ReadonlyOptional"}o.TReadonlyOptional=Ue;function ke(r){return t(r)&&r[a.Modifier]==="Readonly"}o.TReadonly=ke;function ve(r){return t(r)&&r[a.Modifier]==="Optional"}o.TOptional=ve;function F(r){return typeof r=="object"&&(w(r)||m(r)||k(r)||E(r)||U(r)||Te(r)||fe(r)||ne(r)||ye(r)||h(r)||te(r)||ee(r)||re(r)||Me(r)||Se(r)||Ce(r)||Ie(r)||Ae(r)||Z(r)||Oe(r)||oe(r)||v(r)||Le(r)||xe(r)||H(r)||z(r)||Ne(r)||se(r)||je(r)||L(r)&&bn.Has(r[a.Kind]))}o.TSchema=F;})(i=a.TypeGuard||(a.TypeGuard={}));(function(o){function t(s){return s[a.Kind]==="Undefined"?!0:s[a.Kind]==="Union"?s.anyOf.some(c=>t(c)):!1}o.Check=t;})(a.ExtendsUndefined||(a.ExtendsUndefined={}));var p;(function(o){o[o.Union=0]="Union",o[o.True=1]="True",o[o.False=2]="False";})(p=a.TypeExtendsResult||(a.TypeExtendsResult={}));var Q;(function(o){function t(n){return n===p.False?p.False:p.True}function s(n,e){return p.True}function d(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)&&e.anyOf.some(D=>i.TAny(D)||i.TUnknown(D))?p.True:i.TUnion(e)?p.Union:i.TUnknown(e)||i.TAny(e)?p.True:p.Union}function c(n,e){return i.TUnknown(n)?p.False:i.TAny(n)?p.Union:i.TNever(n)?p.True:p.False}function u(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)&&Z(e)?p.True:i.TArray(e)?t(R(n.items,e.items)):p.False}function l(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TNever(e)?U():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TBigInt(e)?p.True:p.False}function T(n,e){return i.TLiteral(n)&&typeof n.const=="boolean"||i.TBoolean(n)?p.True:p.False}function y(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TNever(e)?U():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TBoolean(e)?p.True:p.False}function A(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):!i.TConstructor(e)||n.parameters.length>e.parameters.length||!n.parameters.every((D,$)=>t(R(e.parameters[$],D))===p.True)?p.False:t(R(n.returns,e.returns))}function O(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TDate(e)?p.True:p.False}function N(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):!i.TFunction(e)||n.parameters.length>e.parameters.length||!n.parameters.every((D,$)=>t(R(e.parameters[$],D))===p.True)?p.False:t(R(n.returns,e.returns))}function j(n,e){return i.TLiteral(n)&&typeof n.const=="number"||i.TNumber(n)||i.TInteger(n)?p.True:p.False}function S(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TNever(e)?U():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TInteger(e)||i.TNumber(e)?p.True:p.False}function I(n,e){return e.allOf.every(D=>R(n,D)===p.True)?p.True:p.False}function P(n,e){return n.allOf.some(D=>R(D,e)===p.True)?p.True:p.False}function w(n){return typeof n.const=="string"}function m(n){return typeof n.const=="number"}function E(n){return typeof n.const=="boolean"}function k(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TNever(e)?U():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TString(e)?se(n):i.TNumber(e)?ne(n):i.TInteger(e)?j(n):i.TBoolean(e)?T(n):i.TLiteral(e)&&e.const===n.const?p.True:p.False}function U(n,e){return p.False}function Te(n,e){return p.True}function fe(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TNever(e)?U():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TNull(e)?p.True:p.False}function ne(n,e){return i.TLiteral(n)&&m(n)||i.TNumber(n)||i.TInteger(n)?p.True:p.False}function ye(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TNever(e)?U():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TInteger(e)||i.TNumber(e)?p.True:p.False}function L(n,e){return globalThis.Object.keys(n.properties).length===e}function h(n){return Z(n)}function te(n){return L(n,0)||L(n,1)&&"description"in n.properties&&i.TUnion(n.properties.description)&&n.properties.description.anyOf.length===2&&(i.TString(n.properties.description.anyOf[0])&&i.TUndefined(n.properties.description.anyOf[1])||i.TString(n.properties.description.anyOf[1])&&i.TUndefined(n.properties.description.anyOf[0]))}function ee(n){return L(n,0)}function re(n){return L(n,0)}function Me(n){return L(n,0)}function Se(n){return L(n,0)}function Ce(n){return Z(n)}function Ie(n){let e=a.Type.Number();return L(n,0)||L(n,1)&&"length"in n.properties&&t(R(n.properties.length,e))===p.True}function Ae(n){return L(n,0)}function Z(n){let e=a.Type.Number();return L(n,0)||L(n,1)&&"length"in n.properties&&t(R(n.properties.length,e))===p.True}function Oe(n){let e=a.Type.Function([a.Type.Any()],a.Type.Any());return L(n,0)||L(n,1)&&"then"in n.properties&&t(R(n.properties.then,e))===p.True}function oe(n,e){return R(n,e)===p.False||i.TOptional(n)&&!i.TOptional(e)?p.False:p.True}function v(n,e){return i.TUnknown(n)?p.False:i.TAny(n)?p.Union:i.TNever(n)||i.TLiteral(n)&&w(n)&&h(e)||i.TLiteral(n)&&m(n)&&ee(e)||i.TLiteral(n)&&E(n)&&re(e)||i.TSymbol(n)&&te(e)||i.TBigInt(n)&&Me(e)||i.TString(n)&&h(e)||i.TSymbol(n)&&te(e)||i.TNumber(n)&&ee(e)||i.TInteger(n)&&ee(e)||i.TBoolean(n)&&re(e)||i.TUint8Array(n)&&Ce(e)||i.TDate(n)&&Se(e)||i.TConstructor(n)&&Ae(e)||i.TFunction(n)&&Ie(e)?p.True:i.TRecord(n)&&i.TString(H(n))?e[a.Hint]==="Record"?p.True:p.False:i.TRecord(n)&&i.TNumber(H(n))&&L(e,0)?p.True:p.False}function Le(n,e){if(i.TIntersect(e))return I(n,e);if(i.TUnion(e))return g(n,e);if(i.TUnknown(e))return _();if(i.TAny(e))return s();if(i.TRecord(e))return z(n,e);if(!i.TObject(e))return p.False;for(let D of globalThis.Object.keys(e.properties))if(!(D in n.properties)||oe(n.properties[D],e.properties[D])===p.False)return p.False;return p.True}function xe(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)&&Oe(e)?p.True:i.TPromise(e)?t(R(n.item,e.item)):p.False}function H(n){if(a.PatternNumberExact in n.patternProperties)return a.Type.Number();if(a.PatternStringExact in n.patternProperties)return a.Type.String();throw Error("TypeExtends: Cannot get record key")}function ie(n){if(a.PatternNumberExact in n.patternProperties)return n.patternProperties[a.PatternNumberExact];if(a.PatternStringExact in n.patternProperties)return n.patternProperties[a.PatternStringExact];throw Error("TypeExtends: Cannot get record value")}function z(n,e){let D=H(e),$=ie(e);if(i.TLiteral(n)&&w(n)&&i.TNumber(D)&&t(R(n,$))===p.True)return p.True;if(i.TUint8Array(n)&&i.TNumber(D)||i.TString(n)&&i.TNumber(D)||i.TArray(n)&&i.TNumber(D))return R(n,$);if(i.TObject(n)){for(let $n of globalThis.Object.keys(n.properties))if(oe($,n.properties[$n])===p.False)return p.False;return p.True}return p.False}function Ne(n,e){let D=ie(n);return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?R(D,ie(e)):p.False}function se(n,e){return i.TLiteral(n)&&typeof n.const=="string"||i.TString(n)?p.True:p.False}function je(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TNever(e)?U():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TString(e)?p.True:p.False}function Ue(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TNever(e)?U():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TSymbol(e)?p.True:p.False}function ke(n,e){return i.TUnknown(n)?p.False:i.TAny(n)?p.Union:i.TNever(n)?p.True:p.False}function ve(n,e){return i.TArray(e)&&n.items!==void 0&&n.items.every(D=>R(D,e.items)===p.True)}function F(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)&&Z(e)||i.TArray(e)&&ve(n,e)?p.True:!i.TTuple(e)||n.items===void 0&&e.items!==void 0||n.items!==void 0&&e.items===void 0?p.False:n.items===void 0&&e.items===void 0||n.items.every((D,$)=>R(D,e.items[$])===p.True)?p.True:p.False}function r(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TUint8Array(e)?p.True:p.False}function b(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TNever(e)?U():i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TRecord(e)?z(n,e):i.TVoid(e)?Kn(n):i.TUndefined(e)?p.True:p.False}function g(n,e){return e.anyOf.some(D=>R(n,D)===p.True)?p.True:p.False}function Bn(n,e){return n.anyOf.every(D=>R(D,e)===p.True)?p.True:p.False}function _(n,e){return p.True}function zn(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TAny(e)?s():i.TString(e)?se(n):i.TNumber(e)?ne(n):i.TInteger(e)?j(n):i.TBoolean(e)?T(n):i.TArray(e)?c(n):i.TTuple(e)?ke(n):i.TObject(e)?v(n,e):i.TUnknown(e)?p.True:p.False}function Kn(n,e){return i.TUndefined(n)||i.TUndefined(n)?p.True:p.False}function Yn(n,e){return i.TIntersect(e)?I(n,e):i.TUnion(e)?g(n,e):i.TUnknown(e)?_():i.TAny(e)?s():i.TObject(e)?v(n,e):i.TVoid(e)?p.True:p.False}function R(n,e){if(i.TTemplateLiteral(n))return R(V.Resolve(n),e);if(i.TTemplateLiteral(e))return R(n,V.Resolve(e));if(i.TAny(n))return d(n,e);if(i.TArray(n))return u(n,e);if(i.TBigInt(n))return l(n,e);if(i.TBoolean(n))return y(n,e);if(i.TConstructor(n))return A(n,e);if(i.TDate(n))return O(n,e);if(i.TFunction(n))return N(n,e);if(i.TInteger(n))return S(n,e);if(i.TIntersect(n))return P(n,e);if(i.TLiteral(n))return k(n,e);if(i.TNever(n))return Te();if(i.TNull(n))return fe(n,e);if(i.TNumber(n))return ye(n,e);if(i.TObject(n))return Le(n,e);if(i.TRecord(n))return Ne(n,e);if(i.TString(n))return je(n,e);if(i.TSymbol(n))return Ue(n,e);if(i.TTuple(n))return F(n,e);if(i.TPromise(n))return xe(n,e);if(i.TUint8Array(n))return r(n,e);if(i.TUndefined(n))return b(n,e);if(i.TUnion(n))return Bn(n,e);if(i.TUnknown(n))return zn(n,e);if(i.TVoid(n))return Yn(n,e);throw Error(`TypeExtends: Unknown left type operand '${n[a.Kind]}'`)}function Gn(n,e){return R(n,e)}o.Extends=Gn;})(Q=a.TypeExtends||(a.TypeExtends={}));var x;(function(o){function t(T){return typeof T=="object"&&T!==null}function s(T){return globalThis.Array.isArray(T)}function d(T){return T.map(y=>u(y))}function c(T){let y=globalThis.Object.getOwnPropertyNames(T).reduce((O,N)=>C(f({},O),{[N]:u(T[N])}),{}),A=globalThis.Object.getOwnPropertySymbols(T).reduce((O,N)=>C(f({},O),{[N]:u(T[N])}),{});return f(f({},y),A)}function u(T){return s(T)?d(T):t(T)?c(T):T}function l(T,y){return f(f({},u(T)),y)}o.Clone=l;})(x=a.TypeClone||(a.TypeClone={}));var de;(function(o){function t(l,T){return a.Type.Intersect(l.allOf.map(y=>c(y,T)),f({},l))}function s(l,T){return a.Type.Union(l.anyOf.map(y=>c(y,T)),f({},l))}function d(l,T){return T(l)}function c(l,T){return l[a.Kind]==="Intersect"?t(l,T):l[a.Kind]==="Union"?s(l,T):l[a.Kind]==="Object"?d(l,T):l}function u(l,T,y){return f(f({},c(x.Clone(l,{}),T)),y)}o.Map=u;})(de=a.ObjectMap||(a.ObjectMap={}));var wn;(function(o){function t(T){return i.TIntersect(T)||i.TUnion(T)||i.TObject(T)&&globalThis.Object.getOwnPropertyNames(T.properties).length>0}function s(T){return [...T.allOf.filter(y=>t(y)).reduce((y,A)=>u(A).map(O=>y.add(O))[0],new Set)]}function d(T){let y=T.anyOf.filter(A=>t(A)).map(A=>u(A));return [...y.reduce((A,O)=>O.map(N=>y.every(j=>j.includes(N))?A.add(N):A)[0],new Set)]}function c(T){return globalThis.Object.keys(T.properties)}function u(T){return i.TIntersect(T)?s(T):i.TUnion(T)?d(T):i.TObject(T)?c(T):[]}function l(T){return u(T)}o.Resolve=l;})(wn=a.KeyResolver||(a.KeyResolver={}));var En;(function(o){function t(c){return c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function s(c,u){if(i.TTemplateLiteral(c))return c.pattern.slice(1,c.pattern.length-1);if(i.TUnion(c))return `(${c.anyOf.map(T=>s(T,u)).join("|")})`;if(i.TNumber(c))return `${u}${a.PatternNumber}`;if(i.TInteger(c))return `${u}${a.PatternNumber}`;if(i.TBigInt(c))return `${u}${a.PatternNumber}`;if(i.TString(c))return `${u}${a.PatternString}`;if(i.TLiteral(c))return `${u}${t(c.const.toString())}`;if(i.TBoolean(c))return `${u}${a.PatternBoolean}`;throw i.TNever(c)?Error("TemplateLiteralPattern: TemplateLiteral cannot operate on types of TNever"):Error(`TemplateLiteralPattern: Unexpected Kind '${c[a.Kind]}'`)}function d(c){return `^${c.map(u=>s(u,"")).join("")}$`}o.Create=d;})(En=a.TemplateLiteralPattern||(a.TemplateLiteralPattern={}));var V;(function(o){function t(s){let d=cn.ParseExact(s.pattern);if(!dn.Check(d))return a.Type.String();let c=[...pn.Generate(d)].map(u=>a.Type.Literal(u));return a.Type.Union(c)}o.Resolve=t;})(V=a.TemplateLiteralResolver||(a.TemplateLiteralResolver={}));var pe=class extends Error{constructor(t){super(t);}};a.TemplateLiteralParserError=pe;var cn;(function(o){function t(S,I,P){return S[I]===P&&S.charCodeAt(I-1)!==92}function s(S,I){return t(S,I,"(")}function d(S,I){return t(S,I,")")}function c(S,I){return t(S,I,"|")}function u(S){if(!(s(S,0)&&d(S,S.length-1)))return !1;let I=0;for(let P=0;P<S.length;P++)if(s(S,P)&&(I+=1),d(S,P)&&(I-=1),I===0&&P!==S.length-1)return !1;return !0}function l(S){return S.slice(1,S.length-1)}function T(S){let I=0;for(let P=0;P<S.length;P++)if(s(S,P)&&(I+=1),d(S,P)&&(I-=1),c(S,P)&&I===0)return !0;return !1}function y(S){for(let I=0;I<S.length;I++)if(s(S,I))return !0;return !1}function A(S){let[I,P]=[0,0],w=[];for(let E=0;E<S.length;E++)if(s(S,E)&&(I+=1),d(S,E)&&(I-=1),c(S,E)&&I===0){let k=S.slice(P,E);k.length>0&&w.push(N(k)),P=E+1;}let m=S.slice(P);return m.length>0&&w.push(N(m)),w.length===0?{type:"const",const:""}:w.length===1?w[0]:{type:"or",expr:w}}function O(S){function I(m,E){if(!s(m,E))throw new pe("TemplateLiteralParser: Index must point to open parens");let k=0;for(let U=E;U<m.length;U++)if(s(m,U)&&(k+=1),d(m,U)&&(k-=1),k===0)return [E,U];throw new pe("TemplateLiteralParser: Unclosed group parens in expression")}function P(m,E){for(let k=E;k<m.length;k++)if(s(m,k))return [E,k];return [E,m.length]}let w=[];for(let m=0;m<S.length;m++)if(s(S,m)){let[E,k]=I(S,m),U=S.slice(E,k+1);w.push(N(U)),m=k;}else {let[E,k]=P(S,m),U=S.slice(E,k);U.length>0&&w.push(N(U)),m=k-1;}return w.length===0?{type:"const",const:""}:w.length===1?w[0]:{type:"and",expr:w}}function N(S){return u(S)?N(l(S)):T(S)?A(S):y(S)?O(S):{type:"const",const:S}}o.Parse=N;function j(S){return N(S.slice(1,S.length-1))}o.ParseExact=j;})(cn=a.TemplateLiteralParser||(a.TemplateLiteralParser={}));var dn;(function(o){function t(u){return u.type==="or"&&u.expr.length===2&&u.expr[0].type==="const"&&u.expr[0].const==="0"&&u.expr[1].type==="const"&&u.expr[1].const==="[1-9][0-9]*"}function s(u){return u.type==="or"&&u.expr.length===2&&u.expr[0].type==="const"&&u.expr[0].const==="true"&&u.expr[1].type==="const"&&u.expr[1].const==="false"}function d(u){return u.type==="const"&&u.const===".*"}function c(u){if(s(u))return !0;if(t(u)||d(u))return !1;if(u.type==="and")return u.expr.every(l=>c(l));if(u.type==="or")return u.expr.every(l=>c(l));if(u.type==="const")return !0;throw Error("TemplateLiteralFinite: Unknown expression type")}o.Check=c;})(dn=a.TemplateLiteralFinite||(a.TemplateLiteralFinite={}));var pn;(function(o){function*t(l){if(l.length===1)return yield*W(l[0]);for(let T of l[0])for(let y of t(l.slice(1)))yield `${T}${y}`;}function*s(l){return yield*W(t(l.expr.map(T=>[...u(T)])))}function*d(l){for(let T of l.expr)yield*W(u(T));}function*c(l){return yield l.const}function*u(l){if(l.type==="and")return yield*W(s(l));if(l.type==="or")return yield*W(d(l));if(l.type==="const")return yield*W(c(l));throw Error("TemplateLiteralGenerator: Unknown expression")}o.Generate=u;})(pn=a.TemplateLiteralGenerator||(a.TemplateLiteralGenerator={}));var ir=0,we=class{Create(t){return t}Strict(t){return JSON.parse(JSON.stringify(t))}};a.TypeBuilder=we;var le=class extends we{Optional(t){return f({[a.Modifier]:"Optional"},x.Clone(t,{}))}ReadonlyOptional(t){return f({[a.Modifier]:"ReadonlyOptional"},x.Clone(t,{}))}Readonly(t){return f({[a.Modifier]:"Readonly"},t)}Any(t={}){return this.Create(C(f({},t),{[a.Kind]:"Any"}))}Array(t,s={}){return this.Create(C(f({},s),{[a.Kind]:"Array",type:"array",items:x.Clone(t,{})}))}Boolean(t={}){return this.Create(C(f({},t),{[a.Kind]:"Boolean",type:"boolean"}))}Composite(t,s){let d=(y,A)=>y.every(O=>!(A in O.properties)||c(O.properties[A])),c=y=>i.TOptional(y)||i.TReadonlyOptional(y),[u,l]=[new Set,new Set];for(let y of t)for(let A of globalThis.Object.getOwnPropertyNames(y.properties))d(t,A)&&l.add(A);for(let y of t)for(let A of globalThis.Object.getOwnPropertyNames(y.properties))l.has(A)||u.add(A);let T={};for(let y of t)for(let[A,O]of Object.entries(y.properties)){let N=x.Clone(O,{});if(l.has(A)||delete N[a.Modifier],A in T){let j=Q.Extends(T[A],N)!==p.False,S=Q.Extends(N,T[A])!==p.False;!j&&!S&&(T[A]=a.Type.Never()),!j&&S&&(T[A]=N);}else T[A]=N;}return u.size>0?this.Create(C(f({},s),{[a.Kind]:"Object",[a.Hint]:"Composite",type:"object",properties:T,required:[...u]})):this.Create(C(f({},s),{[a.Kind]:"Object",[a.Hint]:"Composite",type:"object",properties:T}))}Enum(t,s={}){let c=globalThis.Object.keys(t).filter(u=>isNaN(u)).map(u=>t[u]).map(u=>typeof u=="string"?{[a.Kind]:"Literal",type:"string",const:u}:{[a.Kind]:"Literal",type:"number",const:u});return this.Create(C(f({},s),{[a.Kind]:"Union",anyOf:c}))}Extends(t,s,d,c,u={}){switch(Q.Extends(t,s)){case p.Union:return this.Union([x.Clone(d,u),x.Clone(c,u)]);case p.True:return x.Clone(d,u);case p.False:return x.Clone(c,u)}}Exclude(t,s,d={}){if(i.TTemplateLiteral(t))return this.Exclude(V.Resolve(t),s,d);if(i.TTemplateLiteral(s))return this.Exclude(t,V.Resolve(s),d);if(i.TUnion(t)){let c=t.anyOf.filter(u=>Q.Extends(u,s)===p.False);return c.length===1?x.Clone(c[0],d):this.Union(c,d)}else return Q.Extends(t,s)!==p.False?this.Never(d):x.Clone(t,d)}Extract(t,s,d={}){if(i.TTemplateLiteral(t))return this.Extract(V.Resolve(t),s,d);if(i.TTemplateLiteral(s))return this.Extract(t,V.Resolve(s),d);if(i.TUnion(t)){let c=t.anyOf.filter(u=>Q.Extends(u,s)!==p.False);return c.length===1?x.Clone(c[0],d):this.Union(c,d)}else return Q.Extends(t,s)!==p.False?x.Clone(t,d):this.Never(d)}Integer(t={}){return this.Create(C(f({},t),{[a.Kind]:"Integer",type:"integer"}))}Intersect(t,s={}){if(t.length===0)return a.Type.Never();if(t.length===1)return x.Clone(t[0],s);let d=t.every(l=>i.TObject(l)),c=t.map(l=>x.Clone(l,{})),u=i.TSchema(s.unevaluatedProperties)?{unevaluatedProperties:x.Clone(s.unevaluatedProperties,{})}:{};return s.unevaluatedProperties===!1||i.TSchema(s.unevaluatedProperties)||d?this.Create(C(f(f({},s),u),{[a.Kind]:"Intersect",type:"object",allOf:c})):this.Create(C(f(f({},s),u),{[a.Kind]:"Intersect",allOf:c}))}KeyOf(t,s={}){if(i.TRecord(t)){let d=Object.getOwnPropertyNames(t.patternProperties)[0];if(d===a.PatternNumberExact)return this.Number(s);if(d===a.PatternStringExact)return this.String(s);throw Error("StandardTypeBuilder: Unable to resolve key type from Record key pattern")}else {let d=wn.Resolve(t);if(d.length===0)return this.Never(s);let c=d.map(u=>this.Literal(u));return this.Union(c,s)}}Literal(t,s={}){return this.Create(C(f({},s),{[a.Kind]:"Literal",const:t,type:typeof t}))}Never(t={}){return this.Create(C(f({},t),{[a.Kind]:"Never",not:{}}))}Not(t,s,d){return this.Create(C(f({},d),{[a.Kind]:"Not",allOf:[{not:x.Clone(t,{})},x.Clone(s,{})]}))}Null(t={}){return this.Create(C(f({},t),{[a.Kind]:"Null",type:"null"}))}Number(t={}){return this.Create(C(f({},t),{[a.Kind]:"Number",type:"number"}))}Object(t,s={}){let d=globalThis.Object.getOwnPropertyNames(t),c=d.filter(y=>i.TOptional(t[y])||i.TReadonlyOptional(t[y])),u=d.filter(y=>!c.includes(y)),l=i.TSchema(s.additionalProperties)?{additionalProperties:x.Clone(s.additionalProperties,{})}:{},T=d.reduce((y,A)=>C(f({},y),{[A]:x.Clone(t[A],{})}),{});return u.length>0?this.Create(C(f(f({},s),l),{[a.Kind]:"Object",type:"object",properties:T,required:u})):this.Create(C(f(f({},s),l),{[a.Kind]:"Object",type:"object",properties:T}))}Omit(t,s,d={}){let c=i.TUnionLiteral(s)?s.anyOf.map(u=>u.const):i.TLiteral(s)?[s.const]:i.TNever(s)?[]:s;return de.Map(x.Clone(t,{}),u=>{u.required&&(u.required=u.required.filter(l=>!c.includes(l)),u.required.length===0&&delete u.required);for(let l of globalThis.Object.keys(u.properties))c.includes(l)&&delete u.properties[l];return this.Create(u)},d)}Partial(t,s={}){function d(c){switch(c[a.Modifier]){case"ReadonlyOptional":c[a.Modifier]="ReadonlyOptional";break;case"Readonly":c[a.Modifier]="ReadonlyOptional";break;case"Optional":c[a.Modifier]="Optional";break;default:c[a.Modifier]="Optional";break}}return de.Map(x.Clone(t,{}),c=>(delete c.required,globalThis.Object.keys(c.properties).forEach(u=>d(c.properties[u])),c),s)}Pick(t,s,d={}){let c=i.TUnionLiteral(s)?s.anyOf.map(u=>u.const):i.TLiteral(s)?[s.const]:i.TNever(s)?[]:s;return de.Map(x.Clone(t,{}),u=>{u.required&&(u.required=u.required.filter(l=>c.includes(l)),u.required.length===0&&delete u.required);for(let l of globalThis.Object.keys(u.properties))c.includes(l)||delete u.properties[l];return this.Create(u)},d)}Record(t,s,d={}){if(i.TTemplateLiteral(t)){let c=cn.ParseExact(t.pattern);return dn.Check(c)?this.Object([...pn.Generate(c)].reduce((u,l)=>C(f({},u),{[l]:x.Clone(s,{})}),{}),d):this.Create(C(f({},d),{[a.Kind]:"Record",type:"object",patternProperties:{[t.pattern]:x.Clone(s,{})},additionalProperties:!1}))}else if(i.TUnionLiteral(t))if(t.anyOf.every(c=>i.TLiteral(c)&&(typeof c.const=="string"||typeof c.const=="number"))){let c=t.anyOf.reduce((u,l)=>C(f({},u),{[l.const]:x.Clone(s,{})}),{});return this.Object(c,C(f({},d),{[a.Hint]:"Record"}))}else throw Error("TypeBuilder: Record key can only be derived from union literal of number or string");else if(i.TLiteral(t)){if(typeof t.const=="string"||typeof t.const=="number")return this.Object({[t.const]:x.Clone(s,{})},d);throw Error("TypeBuilder: Record key can only be derived from literals of number or string")}else if(i.TInteger(t)||i.TNumber(t)){let c=a.PatternNumberExact;return this.Create(C(f({},d),{[a.Kind]:"Record",type:"object",patternProperties:{[c]:x.Clone(s,{})},additionalProperties:!1}))}else if(i.TString(t)){let c=t.pattern===void 0?a.PatternStringExact:t.pattern;return this.Create(C(f({},d),{[a.Kind]:"Record",type:"object",patternProperties:{[c]:x.Clone(s,{})},additionalProperties:!1}))}else throw Error("StandardTypeBuilder: Invalid Record Key")}Recursive(t,s={}){s.$id===void 0&&(s.$id=`T${ir++}`);let d=t({[a.Kind]:"This",$ref:`${s.$id}`});return d.$id=s.$id,this.Create(f(C(f({},s),{[a.Hint]:"Recursive"}),d))}Ref(t,s={}){if(t.$id===void 0)throw Error("StandardTypeBuilder.Ref: Target type must specify an $id");return this.Create(C(f({},s),{[a.Kind]:"Ref",$ref:t.$id}))}Required(t,s={}){function d(c){switch(c[a.Modifier]){case"ReadonlyOptional":c[a.Modifier]="Readonly";break;case"Readonly":c[a.Modifier]="Readonly";break;case"Optional":delete c[a.Modifier];break;default:delete c[a.Modifier];break}}return de.Map(x.Clone(t,{}),c=>(c.required=globalThis.Object.keys(c.properties),globalThis.Object.keys(c.properties).forEach(u=>d(c.properties[u])),c),s)}String(t={}){return this.Create(C(f({},t),{[a.Kind]:"String",type:"string"}))}TemplateLiteral(t,s={}){let d=En.Create(t);return this.Create(C(f({},s),{[a.Kind]:"TemplateLiteral",type:"string",pattern:d}))}Tuple(t,s={}){let[d,c,u]=[!1,t.length,t.length],l=t.map(y=>x.Clone(y,{})),T=t.length>0?C(f({},s),{[a.Kind]:"Tuple",type:"array",items:l,additionalItems:d,minItems:c,maxItems:u}):C(f({},s),{[a.Kind]:"Tuple",type:"array",minItems:c,maxItems:u});return this.Create(T)}Union(t,s={}){if(i.TTemplateLiteral(t))return V.Resolve(t);{let d=t;if(d.length===0)return this.Never(s);if(d.length===1)return this.Create(x.Clone(d[0],s));let c=d.map(u=>x.Clone(u,{}));return this.Create(C(f({},s),{[a.Kind]:"Union",anyOf:c}))}}Unknown(t={}){return this.Create(C(f({},t),{[a.Kind]:"Unknown"}))}Unsafe(t={}){return this.Create(C(f({},t),{[a.Kind]:t[a.Kind]||"Unsafe"}))}};a.StandardTypeBuilder=le;var Ee=class extends le{BigInt(t={}){return this.Create(C(f({},t),{[a.Kind]:"BigInt",type:"null",typeOf:"BigInt"}))}ConstructorParameters(t,s={}){return this.Tuple([...t.parameters],f({},s))}Constructor(t,s,d={}){let c=x.Clone(s,{});if(i.TTuple(t)){let u=t.items===void 0?[]:t.items.map(l=>x.Clone(l,{}));return this.Create(C(f({},d),{[a.Kind]:"Constructor",type:"object",instanceOf:"Constructor",parameters:u,returns:c}))}else if(globalThis.Array.isArray(t)){let u=t.map(l=>x.Clone(l,{}));return this.Create(C(f({},d),{[a.Kind]:"Constructor",type:"object",instanceOf:"Constructor",parameters:u,returns:c}))}else throw new Error("ExtendedTypeBuilder.Constructor: Invalid parameters")}Date(t={}){return this.Create(C(f({},t),{[a.Kind]:"Date",type:"object",instanceOf:"Date"}))}Function(t,s,d={}){let c=x.Clone(s,{});if(i.TTuple(t)){let u=t.items===void 0?[]:t.items.map(l=>x.Clone(l,{}));return this.Create(C(f({},d),{[a.Kind]:"Function",type:"object",instanceOf:"Function",parameters:u,returns:c}))}else if(globalThis.Array.isArray(t)){let u=t.map(l=>x.Clone(l,{}));return this.Create(C(f({},d),{[a.Kind]:"Function",type:"object",instanceOf:"Function",parameters:u,returns:c}))}else throw new Error("ExtendedTypeBuilder.Function: Invalid parameters")}InstanceType(t,s={}){return x.Clone(t.returns,s)}Parameters(t,s={}){return this.Tuple(t.parameters,f({},s))}Promise(t,s={}){return this.Create(C(f({},s),{[a.Kind]:"Promise",type:"object",instanceOf:"Promise",item:x.Clone(t,{})}))}RegEx(t,s={}){return this.Create(C(f({},s),{[a.Kind]:"String",type:"string",pattern:t.source}))}ReturnType(t,s={}){return x.Clone(t.returns,s)}Symbol(t){return this.Create(C(f({},t),{[a.Kind]:"Symbol",type:"null",typeOf:"Symbol"}))}Undefined(t={}){return this.Create(C(f({},t),{[a.Kind]:"Undefined",type:"null",typeOf:"Undefined"}))}Uint8Array(t={}){return this.Create(C(f({},t),{[a.Kind]:"Uint8Array",type:"object",instanceOf:"Uint8Array"}))}Void(t={}){return this.Create(C(f({},t),{[a.Kind]:"Void",type:"null",typeOf:"Void"}))}};a.ExtendedTypeBuilder=Ee;a.StandardType=new le;a.Type=new Ee;});function B(){return connectUi.getProviderFromId(connectUi.getSelectedProviderId())||window.StacksProvider||window.BlockstackProvider}function ut(){return !!B()}function Cn(o){return o?typeof o=="string"?networkV6.StacksNetwork.fromName(o):"version"in o?o:"url"in o?new networkV6.StacksMainnet({url:o.url}):o.transactionVersion===network.TransactionVersion.Mainnet?new networkV6.StacksMainnet({url:o.client.baseUrl}):new networkV6.StacksTestnet({url:o.client.baseUrl}):new networkV6.StacksTestnet}function Pe(o,t){var s,d;return o instanceof t||((d=(s=o==null?void 0:o.constructor)==null?void 0:s.name)==null?void 0:d.toLowerCase())===t.name}function De(o){return o?typeof o=="string"?o:Pe(o,networkV6.StacksMainnet)?"mainnet":Pe(o,networkV6.StacksTestnet)?"testnet":Pe(o,networkV6.StacksDevnet)||Pe(o,networkV6.StacksMocknet)?"devnet":"coreApiUrl"in o?o.coreApiUrl:"url"in o?o.url:"transactionVersion"in o?o.transactionVersion===network.TransactionVersion.Mainnet?"mainnet":"testnet":"mainnet":"mainnet"}function q(o){if(typeof o.type=="string")return o;switch(o.type){case transactionsV6.ClarityType.BoolFalse:return transactions.Cl.bool(!1);case transactionsV6.ClarityType.BoolTrue:return transactions.Cl.bool(!0);case transactionsV6.ClarityType.Int:return transactions.Cl.int(o.value);case transactionsV6.ClarityType.UInt:return transactions.Cl.uint(o.value);case transactionsV6.ClarityType.Buffer:return transactions.Cl.buffer(o.buffer);case transactionsV6.ClarityType.StringASCII:return transactions.Cl.stringAscii(o.data);case transactionsV6.ClarityType.StringUTF8:return transactions.Cl.stringUtf8(o.data);case transactionsV6.ClarityType.List:return transactions.Cl.list(o.list.map(q));case transactionsV6.ClarityType.Tuple:return transactions.Cl.tuple(Object.fromEntries(Object.entries(o.data).map(([s,d])=>[s,q(d)])));case transactionsV6.ClarityType.OptionalNone:return transactions.Cl.none();case transactionsV6.ClarityType.OptionalSome:return transactions.Cl.some(q(o.value));case transactionsV6.ClarityType.ResponseErr:return transactions.Cl.error(q(o.value));case transactionsV6.ClarityType.ResponseOk:return transactions.Cl.ok(q(o.value));case transactionsV6.ClarityType.PrincipalContract:return transactions.Cl.contractPrincipal(transactions.Address.stringify(o.address),o.contractName.content);case transactionsV6.ClarityType.PrincipalStandard:return transactions.Cl.standardPrincipal(transactions.Address.stringify(o.address));default:let t=o;throw new Error(`Unknown clarity type: ${t}`)}}function In(o){return C(f({},o),{onFinish:void 0,onCancel:void 0})}var Ke=class extends Error{constructor(s,d,c,u){super(c?`${s} (${c})`:s);this.code=d;this.data=c;this.cause=u;this.name="JsonRpcError",this.cause=u;}},ae=class extends Ke{constructor(t="User canceled provider selection"){super(t,32001),this.name="ConnectCanceledError";}};var On="asigna-stx",An=(o,t)=>new Promise(s=>{function d(c){c.data.source===On&&c.data[t]&&(s(c.data[t]),window.removeEventListener("message",d));}window.addEventListener("message",d),window.top.postMessage(dt(o,t),"*");}),ct={authenticationRequest:async o=>An(o,"authenticationRequest"),transactionRequest:async o=>An(o,"transactionRequest")},dt=(o,t)=>({source:On,[t]:o}),Ln=()=>{!!window.top&&document.referrer.endsWith(".asigna.io/")&&(window.AsignaProvider=ct);};Ln();var xn=[{id:"LeatherProvider",name:"Leather",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiByeD0iMjYuODM4NyIgZmlsbD0iIzEyMTAwRiIvPgo8cGF0aCBkPSJNNzQuOTE3MSA1Mi43MTE0QzgyLjQ3NjYgNTEuNTQwOCA5My40MDg3IDQzLjU4MDQgOTMuNDA4NyAzNy4zNzYxQzkzLjQwODcgMzUuNTAzMSA5MS44OTY4IDM0LjIxNTQgODkuNjg3MSAzNC4yMTU0Qzg1LjUwMDQgMzQuMjE1NCA3OC40MDYxIDQwLjUzNjggNzQuOTE3MSA1Mi43MTE0Wk0zOS45MTEgODMuNDk5MUMzMC4wMjU2IDgzLjQ5OTEgMjkuMjExNSA5My4zMzI0IDM5LjA5NjkgOTMuMzMyNEM0My41MTYzIDkzLjMzMjQgNDguODY2MSA5MS41NzY0IDUxLjY1NzMgODguNDE1N0M0Ny41ODY4IDg0LjkwMzggNDQuMjE0MSA4My40OTkxIDM5LjkxMSA4My40OTkxWk0xMDIuODI5IDc5LjI4NDhDMTAzLjQxIDk1Ljc5MDcgOTUuMDM2OSAxMDUuMDM5IDgwLjg0ODQgMTA1LjAzOUM3Mi40NzQ4IDEwNS4wMzkgNjguMjg4MSAxMDEuODc4IDU5LjMzMyA5Ni4wMjQ5QzU0LjY4MSAxMDEuMTc2IDQ1Ljg0MjMgMTA1LjAzOSAzOC41MTU0IDEwNS4wMzlDMTMuMjc4NSAxMDUuMDM5IDE0LjMyNTIgNzIuODQ2MyA0MC4wMjczIDcyLjg0NjNDNDUuMzc3MSA3Mi44NDYzIDQ5LjkxMjggNzQuMjUxMSA1NS43Mjc3IDc3Ljg4TDU5LjU2NTYgNjQuNDE3N0M0My43NDg5IDYwLjA4NjQgMzUuODQwNSA0Ny45MTE4IDQzLjYzMjYgMzAuNDY5M0g1Ni4xOTI5QzQ5LjIxNSA0Mi4wNTg2IDUzLjk4MzIgNTEuNjU3OCA2Mi44MjIgNTIuNzExNEM2Ny41OTAzIDM1LjczNzIgNzcuODI0NiAyMi41MDkgOTEuNDMxNiAyMi41MDlDOTkuMTA3NCAyMi41MDkgMTA1LjE1NSAyNy41NDI4IDEwNS4xNTUgMzYuNjczN0MxMDUuMTU1IDUxLjMwNjYgODYuMDgxOSA2My4yNDcxIDcxLjY2MDcgNjQuNDE3N0w2NS43Mjk1IDg1LjM3MjFDNzIuNDc0OCA5My4yMTUzIDkxLjE5OSAxMDAuODI0IDkxLjE5OSA3OS4yODQ4SDEwMi44MjlaIiBmaWxsPSIjRjVGMUVEIi8+Cjwvc3ZnPgo=",webUrl:"https://leather.io",chromeWebStoreUrl:"https://chrome.google.com/webstore/detail/hiro-wallet/ldinpeekobnhjjdofggfgjlcehhmanlj",mozillaAddOnsUrl:"https://leather.io/install-extension"},{id:"XverseProviders.BitcoinProvider",name:"Xverse Wallet",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9IiMxNzE3MTciIGQ9Ik0wIDBoNjAwdjYwMEgweiIvPjxwYXRoIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTQ0MCA0MzUuNHYtNTFjMC0yLS44LTMuOS0yLjItNS4zTDIyMCAxNjIuMmE3LjYgNy42IDAgMCAwLTUuNC0yLjJoLTUxLjFjLTIuNSAwLTQuNiAyLTQuNiA0LjZ2NDcuM2MwIDIgLjggNCAyLjIgNS40bDc4LjIgNzcuOGE0LjYgNC42IDAgMCAxIDAgNi41bC03OSA3OC43Yy0xIC45LTEuNCAyLTEuNCAzLjJ2NTJjMCAyLjQgMiA0LjUgNC42IDQuNUgyNDljMi42IDAgNC42LTIgNC42LTQuNlY0MDVjMC0xLjIuNS0yLjQgMS40LTMuM2w0Mi40LTQyLjJhNC42IDQuNiAwIDAgMSA2LjQgMGw3OC43IDc4LjRhNy42IDcuNiAwIDAgMCA1LjQgMi4yaDQ3LjVjMi41IDAgNC42LTIgNC42LTQuNloiLz48cGF0aCBmaWxsPSIjRUU3QTMwIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik0zMjUuNiAyMjcuMmg0Mi44YzIuNiAwIDQuNiAyLjEgNC42IDQuNnY0Mi42YzAgNCA1IDYuMSA4IDMuMmw1OC43LTU4LjVjLjgtLjggMS4zLTIgMS4zLTMuMnYtNTEuMmMwLTIuNi0yLTQuNi00LjYtNC42TDM4NCAxNjBjLTEuMiAwLTIuNC41LTMuMyAxLjNsLTU4LjQgNTguMWE0LjYgNC42IDAgMCAwIDMuMiA3LjhaIi8+PC9nPjwvc3ZnPg==",webUrl:"https://xverse.app",chromeWebStoreUrl:"https://chrome.google.com/webstore/detail/xverse-wallet/idnnbdplmphpflfnlkomgpfbpcgelopg",googlePlayStoreUrl:"https://play.google.com/store/apps/details?id=com.secretkeylabs.xverse",iOSAppStoreUrl:"https://apps.apple.com/app/xverse-bitcoin-web3-wallet/id1552272513",mozillaAddOnsUrl:"https://www.xverse.app/download"},{id:"AsignaProvider",name:"Asigna Multisig",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMDEwMCIgZD0iTTAgMGgzMnYzMkgweiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik0xNS4xMSA1LjU1YTMgMyAwIDAgMC0xLjgyIDEuM2wtLjA1LjA4LS40My43Mi0uMDcuMTEtLjUuODUtLjA1LjA5LTEuMjkgMi4xOC0uMDQuMDctLjQ3LjgtLjA2LjEtLjQ2Ljc4LS4wNy4xMS0xLjYzIDIuNzYtLjA3LjExLS4zOC42Ni0uMDUuMDgtLjczIDEuMjQtLjM1LjYtLjQuNjctLjA1LjA5TDUuMSAyMC43bC0uMTEuMTgtLjE0LjIzLS4wNy4xMy0uMzMuNTUtLjA0LjA3di4wMWExLjI2IDEuMjYgMCAwIDAtLjE0LjQ3IDEuMzEgMS4zMSAwIDAgMCAxLjI0IDEuNGgxLjVsLjA1LS4wNi4wNC0uMDYuODctMS4yMS4wNS0uMDguNzctMS4wNy4wNS0uMDcuNC0uNTcuMDUtLjA2LjI0LS4zNGExLjUyIDEuNTIgMCAwIDEgMS4zOS0uNjIgMS41IDEuNSAwIDAgMSAuNjQuMiAxLjQ3IDEuNDcgMCAwIDEgLjczIDEuMjcgMS40NCAxLjQ0IDAgMCAxLS4yNy44NGwtLjYzLjg4LS4wNS4wNy0uMzIuNDUtLjA2LjA4LS4wOC4xMi0uMTIuMTYtLjA1LjA4aDIuMTNhMi4zMiAyLjMyIDAgMCAwIDEuNzctLjk2bDEuMTgtMS42My43Ny0xLjA4IDEuMy0xLjhhMS4yNCAxLjI0IDAgMCAxIC41NS0uNDNsLjA4LS4wM2ExLjMgMS4zIDAgMCAxIC4zLS4wNiAxLjI4IDEuMjggMCAwIDEgMS4xNS41NGwuMTEuMmExLjEzIDEuMTMgMCAwIDEgLjEuNDEgMS4xOSAxLjE5IDAgMCAxLS4yMy43N2wtLjAzLjA1LS41Ny44LS43Ljk4LS4yNy4zN2ExLjIyIDEuMjIgMCAwIDAtLjIuNSAxLjA1IDEuMDUgMCAwIDAtLjAyLjIzdi4wNmExLjE3IDEuMTcgMCAwIDAgLjE0LjQzbC4wMi4wNS4wNy4xYTEuNDQgMS40NCAwIDAgMCAuMS4xMWwuMDUuMDYuMDEuMDFhMS44IDEuOCAwIDAgMCAuMTQuMWMwIC4wMi4wMi4wMy4wNC4wM2ExIDEgMCAwIDAgLjA4LjA1bC4wNy4wNGExLjI1IDEuMjUgMCAwIDAgLjUuMWg2LjljLjEgMCAuMi0uMDEuMjktLjAzbC4wNi0uMDJhMS4yNyAxLjI3IDAgMCAwIC4yNy0uMS41Ny41NyAwIDAgMCAuMDctLjAzIDEuMjEgMS4yMSAwIDAgMCAuMjYtLjE5bC4wOC0uMDdhLjkyLjkyIDAgMCAwIC4xNS0uMTkgMS41NSAxLjU1IDAgMCAwIC4wOS0uMTdsLjAyLS4wNWExLjIyIDEuMjIgMCAwIDAgLjA4LS4yNnYtLjA0bC4wMi0uMDh2LS4wOGExLjMyIDEuMzIgMCAwIDAtLjItLjc0bC0xLjYtMi42NC0uMDYtLjEtLjItLjMyLS4zMy0uNTR2LS4wMWwtLjA1LS4wOC0xLjMtMi4xNS0uMDctLjEtLjA0LS4wNi0uOC0xLjMyLS4wNC0uMDctLjItLjM0LS4xLS4xNC0uMS0uMTYtLjUzLS45LS4xMy0uMi0uMDktLjE0LTIuMTctMy41Ny0uMDQtLjA3LS43Mi0xLjE5LS4wNS0uMDctLjQtLjY1YTIuNjUgMi42NSAwIDAgMC0uMy0uNCAyLjk2IDIuOTYgMCAwIDAtLjk3LS43NCAzLjA0IDMuMDQgMCAwIDAtMS4zLS4zYy0uMjUgMC0uNS4wNC0uNzQuMVoiLz48cGF0aCBmaWxsPSJ1cmwoI2IpIiBkPSJNMTkgMTYuM2E1LjQ1IDUuNDUgMCAwIDAtLjgzIDEuNTZsLS4wNC4xNWExLjM2IDEuMzYgMCAwIDEgLjI4LS4xNiAxLjI0IDEuMjQgMCAwIDEgLjM4LS4wOGguMWExLjI4IDEuMjggMCAwIDEgMS4wNS41NGMuMDQuMDYuMDguMTMuMS4yYTEuMjQgMS4yNCAwIDAgMSAuMDkuMjcgMS4xOSAxLjE5IDAgMCAxLS4yLjkxbC0uMDQuMDUtLjU3Ljc5LS43Ljk5LS4yNy4zN2ExLjIzIDEuMjMgMCAwIDAtLjIuNDIgMS4wNiAxLjA2IDAgMCAwLS4wMi4zMXYuMDZhMS4xNyAxLjE3IDAgMCAwIC4xNi40Ny45My45MyAwIDAgMCAuMDcuMSAxLjUgMS41IDAgMCAwIC4xLjEybC4wNS4wNmguMDFhMS45NCAxLjk0IDAgMCAwIC4wOS4wOCAxIDEgMCAwIDAgLjE3LjFsLjA3LjA0YTEuMjUgMS4yNSAwIDAgMCAuNS4xaDYuOWMuMSAwIC4yIDAgLjI4LS4wMmwuMDctLjAyYTEuMzIgMS4zMiAwIDAgMCAuMzQtLjEzbC4xNi0uMS4wMy0uMDNhMS4yOSAxLjI5IDAgMCAwIC4yLS4yIDIuNDMgMi40MyAwIDAgMCAuMTItLjE3Yy4wMy0uMDMuMDUtLjA4LjA3LS4xMmwuMDItLjA1YTEuMjEgMS4yMSAwIDAgMCAuMDktLjN2LS4wOGwuMDEtLjA5YTEuMzIgMS4zMiAwIDAgMC0uMi0uNzNsLTEuNi0yLjY0LS4wNi0uMS0uMi0uMzItLjMzLS41NHYtLjAybC0uMDUtLjA3LTEuMy0yLjE1LS4xMi0uMDctLjA3LS4wNGE0Ljk0IDQuOTQgMCAwIDAtMi40Ni0uNjdjLTEuMDMgMC0xLjc2LjU3LTIuMjYgMS4yWiIvPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0xMi4yOSAyMS4wOGMwIC4yOS0uMDkuNTgtLjI3Ljg0bC0xLjMxIDEuODRIN2wyLjUyLTMuNTNhMS41NCAxLjU0IDAgMCAxIDIuMS0uMzZjLjQzLjI4LjY2Ljc0LjY2IDEuMloiLz48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTEuMTYgMjEuMjVhLjU2LjU2IDAgMCAxLS41Ny41NS41Ni41NiAwIDAgMS0uNTctLjU2LjU2LjU2IDAgMCAxIC41Ny0uNTUuNTYuNTYgMCAwIDEgLjU3LjU2WiIvPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0iYSIgeDE9IjE1LjIzIiB4Mj0iMTkuMyIgeTE9IjI1Ljc4IiB5Mj0iNi4xMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM2NTIyRjQiLz48c3RvcCBvZmZzZXQ9Ii41NSIgc3RvcC1jb2xvcj0iIzlCNkJGRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0E1ODVGRiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJiIiB4MT0iMjIuNTkiIHgyPSIyNC44IiB5MT0iMjQuNzEiIHkyPSIxNS41MyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM0MjFGOEIiLz48c3RvcCBvZmZzZXQ9Ii41NSIgc3RvcC1jb2xvcj0iIzcyMzBGRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzk3NzNGRiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjwvc3ZnPg==",webUrl:"https://asigna.io",chromeWebStoreUrl:"https://stx.asigna.io/"}];async function ue(o,t,s){console.log("requestRaw",arguments);try{let d=await o.request(t,s);return console.log("requestRaw response",d),d.result}catch(d){throw console.error("requestRaw error",d),d}}async function ce(...o){let{options:t,method:s,params:d}=ft(o),c=Object.assign({defaultProviders:xn,provider:connectUi.getProvider(),persistSelection:!0,forceSelection:!1,enableOverrides:!0},t);if(c.provider&&!c.forceSelection)return await ue(c.provider,s,d);if(typeof window!="undefined")return loader.defineCustomElements(window),new Promise((u,l)=>{let T=document.createElement("connect-modal");T.defaultProviders=c.defaultProviders,T.installedProviders=connectUi.getInstalledProviders(c.defaultProviders),T.persistSelection=c.persistSelection;let y=document.body.style.overflow;document.body.style.overflow="hidden";let A=()=>{T.remove(),document.body.style.overflow=y;};T.callback=N=>{if(A(),c.enableOverrides&&"signMultipleTransactions"in N&&"createRepeatInscriptions"in N&&["getAddresses","stx_getAddresses","stx_getAccounts"].includes(s))return u(ue(N,"wallet_connect",d));u(ue(N,s,d));},T.cancelCallback=()=>{A(),l(new ae);},document.body.appendChild(T);let O=N=>{N.key==="Escape"&&(document.removeEventListener("keydown",O),T.remove(),l(new ae));};document.addEventListener("keydown",O);})}function ft(o){return typeof o[0]=="string"?{method:o[0],params:o[1]}:{options:o[0],method:o[1],params:o[2]}}function G(o,t,s){return (d,c)=>{if(!c)throw new Error("[Connect] No installed Stacks wallet found");let u=t(d),l=d;ue(c,o,u).then(T=>{var A;let y=s(T);(A=l.onFinish)==null||A.call(l,y);}).catch(l.onCancel);}}var qr="https://app.blockstack.org";typeof window!="undefined"&&(window.__CONNECT_VERSION__="__VERSION__");var Qr=()=>{let o=navigator.userAgent;return /android/i.test(o)||/iPad|iPhone|iPod/.test(o)?!0:/windows phone/i.test(o)},Nn=async(o,t=B())=>{var l,T,y,A,O;if(!t)throw new Error("[Connect] No installed Stacks wallet found");let{onFinish:s,onCancel:d,userSession:c}=o,u=jn(c);u.isUserSignedIn()&&u.signUserOut();try{let S=(await ce({forceSelection:!0},"stx_getAddresses")).addresses.find(w=>(w==null?void 0:w.symbol)==="STX"||w.address.startsWith("S")).address.toUpperCase(),I=S[1]==="P"||S[1]==="M",P=u.store.getSessionData();(l=P.userData)!=null||(P.userData={profile:{}}),(y=(T=P.userData).profile)!=null||(T.profile={}),(O=(A=P.userData.profile).stxAddress)!=null||(A.stxAddress={mainnet:"",testnet:""}),Object.assign(P.userData.profile.stxAddress,{[I?"mainnet":"testnet"]:S}),u.store.setSessionData(P),s==null||s({userSession:u});}catch(N){console.error("[Connect] Error during auth request",N),d==null||d();}},yt="blockstack-session",ge=class{constructor(t,s,d,c,u,l){}},X=class{constructor(t){t!=null&&t.appConfig&&(this.appConfig=t.appConfig),typeof window=="undefined"&&typeof self=="undefined"?this.store=new Ye:this.store=new Ge;}makeAuthRequestToken(){}generateAndStoreTransitKey(){}getAuthResponseToken(){}isSignInPending(){return !1}isUserSignedIn(){return !!this.store.getSessionData().userData}async handlePendingSignIn(){return Promise.resolve(this.loadUserData())}loadUserData(){let t=this.store.getSessionData().userData;if(!t)throw new common.NoSessionDataError("No user data found. Did the user sign in?");return t}encryptContent(){}decryptContent(){}signUserOut(t){this.store.deleteSessionData(),t&&typeof location!="undefined"&&location.href&&(location.href=t);}},me=class{constructor(t){t&&this.setSessionData(t);}getSessionData(){throw new Error("Abstract class")}setSessionData(t){throw new Error("Abstract class")}deleteSessionData(){throw new Error("Abstract class")}},Ye=class extends me{constructor(t){super(t),this.sessionData||this.setSessionData({});}getSessionData(){if(!this.sessionData)throw new common.NoSessionDataError("No session data was found.");return this.sessionData}setSessionData(t){return this.sessionData=t,!0}deleteSessionData(){return this.setSessionData({}),!0}},Ge=class extends me{constructor(t){var d;super(t),this.key=typeof((d=t==null?void 0:t.storeOptions)==null?void 0:d.localStorageKey)=="string"?t.storeOptions.localStorageKey:yt,localStorage.getItem(this.key)||this.setSessionData({});}getSessionData(){let t=localStorage.getItem(this.key);if(!t)throw new common.NoSessionDataError("No session data was found in localStorage");return JSON.parse(t)}setSessionData(t){return localStorage.setItem(this.key,JSON.stringify(t)),!0}deleteSessionData(){return localStorage.removeItem(this.key),this.setSessionData({}),!0}},jn=o=>o||new X,Vr=async o=>(o=jn(o),o.isUserSignedIn()?Promise.resolve(o.loadUserData()):Promise.resolve(null));var Mt=(d=>(d.ContractCall="contract_call",d.ContractDeploy="smart_contract",d.STXTransfer="token_transfer",d))(Mt||{}),St=(u=>(u.BUFFER="buffer",u.UINT="uint",u.INT="int",u.PRINCIPAL="principal",u.BOOL="bool",u))(St||{});var qe=(u=>(u[u.DEFAULT=0]="DEFAULT",u[u.ALL=1]="ALL",u[u.NONE=2]="NONE",u[u.SINGLE=3]="SINGLE",u[u.ANYONECANPAY=128]="ANYONECANPAY",u))(qe||{});function Ct(o){}var It=async o=>{},At="stx_updateProfile",Qe=o=>o,Ve=o=>o.profile;function Ot(o,t=B()){G(At,Qe,Ve)(o,t);}function Lt(o){}var xt=async o=>{},Nt="stx_signMessage",Ze=o=>o,He=o=>o;function jt(o,t=B()){G(Nt,Ze,He)(o,t);}async function Dt(o){}var gt="stx_signStructuredMessage",We=o=>({message:q(o.message),domain:q(o.domain)}),Xe=o=>o;function mt(o,t=B()){if(o.domain.type!==transactionsV6.ClarityType.Tuple)throw new Error("Domain must be a tuple");G(gt,We,Xe)(o,t);}var Je=o=>{let t=o;if(!t){let s=new ge(["store_write"],document.location.href);t=new X({appConfig:s});}return t};function Ut(o){try{return Je(o).loadUserData().appPrivateKey}catch(t){return !1}}var kt=o=>{let s=Je(o).loadUserData().appPrivateKey,d=jsontokens.SECP256K1Client.derivePublicKey(s);return {privateKey:s,publicKey:d}};function vt(o){var y;let{stxAddress:t,userSession:s,network:d}=o;if(t)return t;if(!s||!d)return;let c=(y=s==null?void 0:s.loadUserData().profile)==null?void 0:y.stxAddress,u={[network.ChainId.Mainnet]:"mainnet",[network.ChainId.Testnet]:"testnet"},l=Cn(d);return c==null?void 0:c[u[l.chainId]]}var _t=async o=>{},Ft=async o=>{},Bt=async o=>{},zt=async o=>{},Kt="stx_callContract",he=o=>{var s;let t=(s=o.functionArgs)==null?void 0:s.map(d=>typeof d=="string"?transactions.Cl.deserialize(d):q(d));return C(f({},o),{contract:`${o.contractAddress}.${o.contractName}`,functionArgs:t,network:De(o.network),postConditionMode:mn(o.postConditionMode),postConditions:gn(o.postConditions),address:o.stxAddress})},en=o=>({txId:o.txid,txRaw:o.transaction,stacksTransaction:transactions.deserializeTransaction(o.transaction)});function Yt(o,t=B()){G(Kt,he,en)(o,t);}var Gt="stx_deployContract",nn=o=>C(f({},o),{name:o.contractName,clarityCode:o.codeBody,network:De(o.network),postConditionMode:mn(o.postConditionMode),postConditions:gn(o.postConditions),address:o.stxAddress}),tn=o=>({txId:o.txid,txRaw:o.transaction,stacksTransaction:transactions.deserializeTransaction(o.transaction)});function $t(o,t=B()){G(Gt,nn,tn)(o,t);}var qt="stx_transferStx",rn=o=>C(f({},o),{amount:o.amount.toString(),network:De(o.network),address:o.stxAddress}),on=o=>({txId:o.txid,txRaw:o.transaction,stacksTransaction:transactions.deserializeTransaction(o.transaction)});function Qt(o,t=B()){G(qt,rn,on)(o,t);}var Vt="stx_signTransaction",sn=o=>C(f({},o),{transaction:o.txHex}),an=o=>C(f({},o),{stacksTransaction:transactions.deserializeTransaction(o.transaction)});function Zt(o,t=B()){G(Vt,sn,an)(o,t);}function gn(o){if(typeof o!="undefined")return o.map(t=>typeof t=="string"?t:typeof t.type=="string"?C(f({},t),{amount:"amount"in t?t.amount.toString():void 0}):common.bytesToHex(transactionsV6.serializePostCondition(t)))}function mn(o){if(typeof o!="undefined"){if(typeof o=="string")return o;switch(o){case transactions.PostConditionMode.Allow:return "allow";case transactions.PostConditionMode.Deny:return "deny";default:let t=o;throw new Error(`Unknown post condition mode: ${t}. Should be one of: 'allow', 'deny'`)}}}function J(o,t,s,d={forceSelection:!0}){return (c,u)=>{let l=f({},d);u&&(l.provider=u);let T=t(In(c)),y=c;ce(l,o,T).then(A=>{var N;let O=s(A);(N=y.onFinish)==null||N.call(y,O);}).catch(y.onCancel);}}var Wt=Nn,bo=J("stx_transferStx",rn,on),wo=J("stx_callContract",he,en),Eo=J("stx_deployContract",nn,tn),Ro=J("stx_signTransaction",sn,an),Uo=J("stx_updateProfile",Qe,Ve),ko=J("stx_signMessage",Ze,He),vo=J("stx_signStructuredMessage",We,Xe);function _o(){connectUi.clearSelectedProviderId(),new X().store.deleteSessionData();}var Fo=Wt;function Xt(o){}var Jt=async o=>{},ht="signPsbt",er=o=>{var t;return {psbt:o.hex,signInputs:typeof o.signAtIndex=="number"?[o.signAtIndex]:o.signAtIndex,allowedSigHash:(t=o.allowedSighash)==null?void 0:t.map(s=>qe[s])}},nr=o=>({hex:o.psbt});function tr(o,t=B()){G(ht,er,nr)(o,t);}var M=nt(Rn()),Re=M.Type.Union([M.Type.Number(),M.Type.BigInt(),M.Type.String()]),sr=M.Type.RegEx(/^(?:0x)?[A-Fa-f0-9]+$/),Un=M.Type.RegEx(/^[A-Za-z0-9]+$/),kn=M.Type.RegEx(/^[A-Za-z0-9]+\.[A-Za-z0-9-]+$/),ln=M.Type.Union([M.Type.Literal("origin"),Un,kn]),vn=M.Type.RegEx(/^[A-Z0-9]+\.[A-Za-z0-9]+::[A-Za-z0-9]+$/),_n=M.Type.Union([M.Type.Literal("eq"),M.Type.Literal("gt"),M.Type.Literal("gte"),M.Type.Literal("lt"),M.Type.Literal("lte")]),ar=M.Type.Object({type:M.Type.Literal("uint"),value:Re},{$id:"UInt"}),ur=M.Type.Object({type:M.Type.Literal("int"),value:Re},{$id:"Int"}),cr=M.Type.Object({type:M.Type.Literal("buffer"),value:sr},{$id:"Buffer"}),dr=M.Type.Object({type:M.Type.Literal("true")},{$id:"True"}),pr=M.Type.Object({type:M.Type.Literal("false")},{$id:"False"}),lr=M.Type.Union([dr,pr],{$id:"Boolean"}),Tr=M.Type.Object({type:M.Type.Literal("address"),value:Un},{$id:"StandardPrincipal"}),fr=M.Type.Object({type:M.Type.Literal("contract"),value:kn},{$id:"ContractPrincipal"}),yr=M.Type.Object({type:M.Type.Literal("ascii"),value:M.Type.String()},{$id:"StringAscii"}),Mr=M.Type.Object({type:M.Type.Literal("utf8"),value:M.Type.String()},{$id:"StringUtf8"}),Sr=M.Type.Object({type:M.Type.Literal("none")},{$id:"None"}),Fn=M.Type.Recursive(o=>M.Type.Union([ar,ur,cr,lr,Tr,fr,yr,Mr,Sr,M.Type.Object({type:M.Type.Literal("some"),value:o},{$id:"Some"}),M.Type.Object({type:M.Type.Literal("tuple"),value:M.Type.Record(M.Type.String(),o)},{$id:"Tuple"}),M.Type.Object({type:M.Type.Literal("list"),value:M.Type.Array(o)},{$id:"List"}),M.Type.Union([M.Type.Object({type:M.Type.Literal("ok"),value:o}),M.Type.Object({type:M.Type.Literal("err"),value:o})],{$id:"Response"})],{$id:"ClarityValue"})),Cr=M.Type.Object({type:M.Type.Literal("stx-postcondition"),address:ln,condition:_n,amount:Re},{$id:"StxPostCondition"}),Ir=M.Type.Object({type:M.Type.Literal("ft-postcondition"),address:ln,condition:_n,amount:Re,asset:vn},{$id:"FungiblePostCondition"}),Ar=M.Type.Object({type:M.Type.Literal("nft-postcondition"),address:ln,condition:M.Type.Union([M.Type.Literal("sent"),M.Type.Literal("not-sent")]),asset:vn,assetId:Fn},{$id:"NonFungiblePostCondition"}),Or=M.Type.Union([Cr,Ir,Ar]);
Object.defineProperty(exports,"clearSelectedProviderId",{enumerable:true,get:function(){return connectUi.clearSelectedProviderId}});Object.defineProperty(exports,"getSelectedProviderId",{enumerable:true,get:function(){return connectUi.getSelectedProviderId}});Object.defineProperty(exports,"isProviderSelected",{enumerable:true,get:function(){return connectUi.isProviderSelected}});Object.defineProperty(exports,"setSelectedProviderId",{enumerable:true,get:function(){return connectUi.setSelectedProviderId}});exports.AppConfig=ge;exports.ClarityValueTypeBoxSchema=Fn;exports.ContractCallArgumentType=St;exports.DEFAULT_PROVIDERS=xn;exports.InstanceDataStore=Ye;exports.LOCALSTORAGE_SESSION_KEY=yt;exports.LocalStorageStore=Ge;exports.PostConditionTypeBoxSchema=Or;exports.SessionDataStore=me;exports.SignatureHash=qe;exports.TransactionTypes=Mt;exports.UserSession=X;exports.authenticate=Nn;exports.defaultAuthURL=qr;exports.disconnect=_o;exports.getDefaultProfileUpdateRequestOptions=Ct;exports.getDefaultPsbtRequestOptions=Xt;exports.getDefaultSignatureRequestOptions=Lt;exports.getKeys=kt;exports.getOrCreateUserSession=jn;exports.getStacksProvider=B;exports.getStxAddress=vt;exports.getUserData=Vr;exports.getUserSession=Je;exports.hasAppPrivateKey=Ut;exports.isMobile=Qr;exports.isStacksWalletInstalled=ut;exports.makeContractCallToken=_t;exports.makeContractDeployToken=Ft;exports.makeProfileUpdateToken=It;exports.makePsbtToken=Jt;exports.makeSTXTransferToken=Bt;exports.makeSignTransaction=zt;exports.openContractCall=Yt;exports.openContractDeploy=$t;exports.openProfileUpdateRequestPopup=Ot;exports.openPsbtRequestPopup=tr;exports.openSTXTransfer=Qt;exports.openSignTransaction=Zt;exports.openSignatureRequestPopup=jt;exports.openStructuredDataSignatureRequestPopup=mt;exports.request=ce;exports.requestRaw=ue;exports.showBlockstackConnect=Fo;exports.showConnect=Wt;exports.showContractCall=wo;exports.showContractDeploy=Eo;exports.showProfileUpdate=Uo;exports.showSTXTransfer=bo;exports.showSignMessage=ko;exports.showSignStructuredMessage=vo;exports.showSignTransaction=Ro;exports.signMessage=xt;exports.signStructuredMessage=Dt;//# sourceMappingURL=index.js.map
//# sourceMappingURL=index.js.map

@@ -14,2 +14,10 @@ import { AuthOptions, StacksProvider } from './types';

/**
* Semi-compatible `AppConfig` type for configuring `UserSession`.
*
* @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession.
*/
export declare class AppConfig {
constructor(_scopes?: any, _appDomain?: any, _redirectPath?: string, _manifestPath?: string, _coreNode?: string, _authenticatorURL?: string);
}
/**
* Semi-compatible `SessionOptions` type for accessing `userData`.

@@ -16,0 +24,0 @@ *

@@ -7,2 +7,3 @@ import type { AddressString, ClarityValue, ContractIdString, PostCondition, PostConditionModeName, TupleCV } from '@stacks/transactions';

export interface AddressEntry {
symbol?: string;
address: string;

@@ -9,0 +10,0 @@ publicKey: string;

import { WebBTCProvider } from '@stacks/connect-ui';
import { MethodParams, MethodResult, Methods } from './methods';
import { StacksProvider } from './types';
import { Methods, MethodParams, MethodResult } from './methods';
export interface ConnectRequestOptions {

@@ -9,2 +9,3 @@ defaultProviders?: WebBTCProvider[];

forceSelection?: boolean;
enableOverrides?: boolean;
}

@@ -18,5 +19,2 @@ export declare function requestRaw<M extends keyof Methods>(provider: StacksProvider, method: M, params?: MethodParams<M>): Promise<MethodResult<M>>;

*/
export declare function requestRawLegacy<M extends keyof Methods, O extends {
onCancel?: () => void;
onFinish?: (response: R) => void;
}, R>(method: M, mapOptions: (options: O) => MethodParams<M>, mapResponse: (response: MethodResult<M>) => R): (options: O, provider?: StacksProvider) => void;
export declare function requestRawLegacy<M extends keyof Methods, O, R>(method: M, mapOptions: (options: O) => MethodParams<M>, mapResponse: (response: MethodResult<M>) => R): (options: O, provider?: StacksProvider) => void;

@@ -1,5 +0,5 @@

import { UserSession } from '@stacks/auth';
import { MethodParams, MethodResult } from '../methods';
import { StacksProvider } from '../types';
import { ContractCallOptions, ContractCallRegularOptions, ContractCallSponsoredOptions, ContractDeployOptions, FinishedTxData, SignTransactionFinishedTxData, SignTransactionOptions, SponsoredFinishedTxData, STXTransferOptions, STXTransferRegularOptions, STXTransferSponsoredOptions, TransactionOptions } from '../types/transactions';
import { UserSession } from '../auth';
/** @deprecated Update to the latest `request` RPC methods. It's not recommended to use the UserSession. */

@@ -6,0 +6,0 @@ export declare const getUserSession: (_userSession?: UserSession) => UserSession;

@@ -57,3 +57,3 @@ import { UserSession } from '../auth';

userSession?: UserSession;
appDetails: {
appDetails?: {
/** A human-readable name for your application */

@@ -60,0 +60,0 @@ name: string;

@@ -1,2 +0,2 @@

import { UserSession } from '@stacks/auth';
import { UserSession } from '../auth';
import { AuthOptions } from './auth';

@@ -3,0 +3,0 @@ import { ConnectNetwork } from './network';

@@ -1,5 +0,5 @@

import { UserSession } from '@stacks/auth';
import { AuthOptions } from './auth';
import { PublicPersonProfile } from '@stacks/profile';
import { ConnectNetwork } from './network';
import { UserSession } from '../auth';
/** @deprecated Update to the latest `request` RPC methods. */

@@ -6,0 +6,0 @@ export type ProfileUpdateFinished = (data: PublicPersonProfile) => void;

@@ -1,2 +0,2 @@

import { UserSession } from '@stacks/auth';
import { UserSession } from '../auth';
import type { AuthOptions } from '../types/auth';

@@ -3,0 +3,0 @@ import { ConnectNetwork } from './network';

@@ -1,2 +0,1 @@

import { UserSession } from '@stacks/auth';
import type { AuthOptions } from '../types/auth';

@@ -6,2 +5,3 @@ import { ClarityValue as LegacyClarityValue, PostCondition as LegacyPostCondition, PostConditionMode as LegacyPostConditionMode } from '@stacks/transactions-v6';

import { ConnectNetwork } from './network';
import { UserSession } from '../auth';
export interface TxBase {

@@ -8,0 +8,0 @@ appDetails?: AuthOptions['appDetails'];

@@ -18,4 +18,5 @@ import { StacksProvider } from './types';

export declare const showSignStructuredMessage: (options: import("./types").StructuredDataSignatureRequestOptions, provider?: StacksProvider) => void;
/** Disconnect selected wallet. Alias for {@link clearSelectedProviderId} */
export declare const disconnect: () => void;
/** Disconnect selected wallet and clear session data. */
export declare function disconnect(): void;
export { isProviderSelected } from '@stacks/connect-ui';
/**

@@ -22,0 +23,0 @@ * @deprecated Use the renamed {@link showConnect} method

@@ -17,1 +17,6 @@ import { StacksNetwork as LegacyStacksNetwork } from '@stacks/network-v6';

export declare function legacyCVToCV(cv: LegacyClarityValue | ClarityValue): ClarityValue;
/** @internal */
export declare function removeUnserializableKeys<O>(obj: O | {
onFinish?: Function;
onCancel?: Function;
}): O;
{
"name": "@stacks/connect",
"version": "7.10.1-alpha.7b0bf69.0",
"version": "7.10.1-alpha.ab8b769.0",
"license": "MIT",

@@ -18,5 +18,4 @@ "scripts": {

"dependencies": {
"@stacks/auth": "^7.0.0",
"@stacks/common": "^7.0.0",
"@stacks/connect-ui": "^6.6.1-alpha.7b0bf69.0",
"@stacks/connect-ui": "^6.6.1-alpha.ab8b769.0",
"@stacks/network": "^7.0.0",

@@ -63,3 +62,3 @@ "@stacks/network-v6": "npm:@stacks/network@^6.16.0",

},
"gitHead": "d8daaaf27d67f6d417a48fc8da7de5768ea09d3c"
"gitHead": "c73df98943d52e14a056c1566de6f34e5d6af109"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet