(function(p,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("tailwind-merge"),require("react"),require("@headlessui/react"),require("react-use-clipboard"),require("prism-react-renderer"),require("@radix-ui/react-tooltip"),require("@unlock-protocol/unlock-assets"),require("@unlock-protocol/networks"),require("ethers")):typeof define=="function"&&define.amd?define(["exports","tailwind-merge","react","@headlessui/react","react-use-clipboard","prism-react-renderer","@radix-ui/react-tooltip","@unlock-protocol/unlock-assets","@unlock-protocol/networks","ethers"],k):(p=typeof globalThis<"u"?globalThis:p||self,k(p["@unlock-protocol/ui"]={},p.tailwindMerge,p.React,p.react,p.useClipboard,p.Highlight,p.reactTooltip,p.UnlockAssets,p.networks,p.ethers))})(this,function(p,k,P,E,or,xe,U,lr,sr,cr){"use strict";const G=r=>r&&typeof r=="object"&&"default"in r?r:{default:r},j=G(P),ur=G(or),dr=G(xe),fr=G(lr),gt="",J=P.forwardRef(({as:r="div",...i},n)=>P.createElement(r,{...i,ref:n}));J.displayName="Box";var ie={exports:{}},B={};/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var oe,we;function _e(){if(we)return oe;we=1;var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function l(d){if(d==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(d)}function s(){try{if(!Object.assign)return!1;var d=new String("abc");if(d[5]="de",Object.getOwnPropertyNames(d)[0]==="5")return!1;for(var x={},h=0;h<10;h++)x["_"+String.fromCharCode(h)]=h;var f=Object.getOwnPropertyNames(x).map(function(u){return x[u]});if(f.join("")!=="0123456789")return!1;var g={};return"abcdefghijklmnopqrst".split("").forEach(function(u){g[u]=u}),Object.keys(Object.assign({},g)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return oe=s()?Object.assign:function(d,x){for(var h,f=l(d),g,u=1;u<arguments.length;u++){h=Object(arguments[u]);for(var b in h)i.call(h,b)&&(f[b]=h[b]);if(r){g=r(h);for(var C=0;C<g.length;C++)n.call(h,g[C])&&(f[g[C]]=h[g[C]])}}return f},oe}/** @license React v17.0.2
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ce;function hr(){if(Ce)return B;Ce=1,_e();var r=j.default,i=60103;if(B.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var n=Symbol.for;i=n("react.element"),B.Fragment=n("react.fragment")}var l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,d={key:!0,ref:!0,__self:!0,__source:!0};function x(h,f,g){var u,b={},C=null,I=null;g!==void 0&&(C=""+g),f.key!==void 0&&(C=""+f.key),f.ref!==void 0&&(I=f.ref);for(u in f)s.call(f,u)&&!d.hasOwnProperty(u)&&(b[u]=f[u]);if(h&&h.defaultProps)for(u in f=h.defaultProps,f)b[u]===void 0&&(b[u]=f[u]);return{$$typeof:i,type:h,key:C,ref:I,props:b,_owner:l.current}}return B.jsx=x,B.jsxs=x,B}var le={};/** @license React v17.0.2
 * react-jsx-runtime.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ee;function vr(){return Ee||(Ee=1,function(r){process.env.NODE_ENV!=="production"&&function(){var i=j.default,n=_e(),l=60103,s=60106;r.Fragment=60107;var d=60108,x=60114,h=60109,f=60110,g=60112,u=60113,b=60120,C=60115,I=60116,M=60121,X=60122,Y=60117,Q=60129,ee=60131;if(typeof Symbol=="function"&&Symbol.for){var N=Symbol.for;l=N("react.element"),s=N("react.portal"),r.Fragment=N("react.fragment"),d=N("react.strict_mode"),x=N("react.profiler"),h=N("react.provider"),f=N("react.context"),g=N("react.forward_ref"),u=N("react.suspense"),b=N("react.suspense_list"),C=N("react.memo"),I=N("react.lazy"),M=N("react.block"),X=N("react.server.block"),Y=N("react.fundamental"),N("react.scope"),N("react.opaque.id"),Q=N("react.debug_trace_mode"),N("react.offscreen"),ee=N("react.legacy_hidden")}var ze=typeof Symbol=="function"&&Symbol.iterator,Wr="@@iterator";function Ur(e){if(e===null||typeof e!="object")return null;var a=ze&&e[ze]||e[Wr];return typeof a=="function"?a:null}var $=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(e){{for(var a=arguments.length,o=new Array(a>1?a-1:0),c=1;c<a;c++)o[c-1]=arguments[c];qr("error",e,o)}}function qr(e,a,o){{var c=$.ReactDebugCurrentFrame,w=c.getStackAddendum();w!==""&&(a+="%s",o=o.concat([w]));var _=o.map(function(y){return""+y});_.unshift("Warning: "+a),Function.prototype.apply.call(console[e],console,_)}}var Hr=!1;function Zr(e){return!!(typeof e=="string"||typeof e=="function"||e===r.Fragment||e===x||e===Q||e===d||e===u||e===b||e===ee||Hr||typeof e=="object"&&e!==null&&(e.$$typeof===I||e.$$typeof===C||e.$$typeof===h||e.$$typeof===f||e.$$typeof===g||e.$$typeof===Y||e.$$typeof===M||e[0]===X))}function Gr(e,a,o){var c=a.displayName||a.name||"";return e.displayName||(c!==""?o+"("+c+")":o)}function Fe(e){return e.displayName||"Context"}function A(e){if(e==null)return null;if(typeof e.tag=="number"&&S("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case r.Fragment:return"Fragment";case s:return"Portal";case x:return"Profiler";case d:return"StrictMode";case u:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case f:var a=e;return Fe(a)+".Consumer";case h:var o=e;return Fe(o._context)+".Provider";case g:return Gr(e,e.render,"ForwardRef");case C:return A(e.type);case M:return A(e._render);case I:{var c=e,w=c._payload,_=c._init;try{return A(_(w))}catch{return null}}}return null}var H=0,Be,Me,Ye,$e,Ve,We,Ue;function qe(){}qe.__reactDisabledLog=!0;function Jr(){{if(H===0){Be=console.log,Me=console.info,Ye=console.warn,$e=console.error,Ve=console.group,We=console.groupCollapsed,Ue=console.groupEnd;var e={configurable:!0,enumerable:!0,value:qe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}H++}}function Kr(){{if(H--,H===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:n({},e,{value:Be}),info:n({},e,{value:Me}),warn:n({},e,{value:Ye}),error:n({},e,{value:$e}),group:n({},e,{value:Ve}),groupCollapsed:n({},e,{value:We}),groupEnd:n({},e,{value:Ue})})}H<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var fe=$.ReactCurrentDispatcher,he;function re(e,a,o){{if(he===void 0)try{throw Error()}catch(w){var c=w.stack.trim().match(/\n( *(at )?)/);he=c&&c[1]||""}return`
`+he+e}}var ve=!1,te;{var Xr=typeof WeakMap=="function"?WeakMap:Map;te=new Xr}function He(e,a){if(!e||ve)return"";{var o=te.get(e);if(o!==void 0)return o}var c;ve=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var _;_=fe.current,fe.current=null,Jr();try{if(a){var y=function(){throw Error()};if(Object.defineProperty(y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(y,[])}catch(z){c=z}Reflect.construct(e,[],y)}else{try{y.call()}catch(z){c=z}e.call(y.prototype)}}else{try{throw Error()}catch(z){c=z}e()}}catch(z){if(z&&c&&typeof z.stack=="string"){for(var m=z.stack.split(`
`),O=c.stack.split(`
`),T=m.length-1,R=O.length-1;T>=1&&R>=0&&m[T]!==O[R];)R--;for(;T>=1&&R>=0;T--,R--)if(m[T]!==O[R]){if(T!==1||R!==1)do if(T--,R--,R<0||m[T]!==O[R]){var D=`
`+m[T].replace(" at new "," at ");return typeof e=="function"&&te.set(e,D),D}while(T>=1&&R>=0);break}}}finally{ve=!1,fe.current=_,Kr(),Error.prepareStackTrace=w}var W=e?e.displayName||e.name:"",ir=W?re(W):"";return typeof e=="function"&&te.set(e,ir),ir}function Ze(e,a,o){return He(e,!1)}function Qr(e){var a=e.prototype;return!!(a&&a.isReactComponent)}function ae(e,a,o){if(e==null)return"";if(typeof e=="function")return He(e,Qr(e));if(typeof e=="string")return re(e);switch(e){case u:return re("Suspense");case b:return re("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case g:return Ze(e.render);case C:return ae(e.type,a,o);case M:return Ze(e._render);case I:{var c=e,w=c._payload,_=c._init;try{return ae(_(w),a,o)}catch{}}}return""}var Ge={},Je=$.ReactDebugCurrentFrame;function ne(e){if(e){var a=e._owner,o=ae(e.type,e._source,a?a.type:null);Je.setExtraStackFrame(o)}else Je.setExtraStackFrame(null)}function et(e,a,o,c,w){{var _=Function.call.bind(Object.prototype.hasOwnProperty);for(var y in e)if(_(e,y)){var m=void 0;try{if(typeof e[y]!="function"){var O=Error((c||"React class")+": "+o+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}m=e[y](a,y,c,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(T){m=T}m&&!(m instanceof Error)&&(ne(w),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",c||"React class",o,y,typeof m),ne(null)),m instanceof Error&&!(m.message in Ge)&&(Ge[m.message]=!0,ne(w),S("Failed %s type: %s",o,m.message),ne(null))}}}var Z=$.ReactCurrentOwner,me=Object.prototype.hasOwnProperty,rt={key:!0,ref:!0,__self:!0,__source:!0},Ke,Xe,pe;pe={};function tt(e){if(me.call(e,"ref")){var a=Object.getOwnPropertyDescriptor(e,"ref").get;if(a&&a.isReactWarning)return!1}return e.ref!==void 0}function at(e){if(me.call(e,"key")){var a=Object.getOwnPropertyDescriptor(e,"key").get;if(a&&a.isReactWarning)return!1}return e.key!==void 0}function nt(e,a){if(typeof e.ref=="string"&&Z.current&&a&&Z.current.stateNode!==a){var o=A(Z.current.type);pe[o]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',A(Z.current.type),e.ref),pe[o]=!0)}}function it(e,a){{var o=function(){Ke||(Ke=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function ot(e,a){{var o=function(){Xe||(Xe=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var lt=function(e,a,o,c,w,_,y){var m={$$typeof:l,type:e,key:a,ref:o,props:y,_owner:_};return m._store={},Object.defineProperty(m._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(m,"_self",{configurable:!1,enumerable:!1,writable:!1,value:c}),Object.defineProperty(m,"_source",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.freeze&&(Object.freeze(m.props),Object.freeze(m)),m};function st(e,a,o,c,w){{var _,y={},m=null,O=null;o!==void 0&&(m=""+o),at(a)&&(m=""+a.key),tt(a)&&(O=a.ref,nt(a,w));for(_ in a)me.call(a,_)&&!rt.hasOwnProperty(_)&&(y[_]=a[_]);if(e&&e.defaultProps){var T=e.defaultProps;for(_ in T)y[_]===void 0&&(y[_]=T[_])}if(m||O){var R=typeof e=="function"?e.displayName||e.name||"Unknown":e;m&&it(y,R),O&&ot(y,R)}return lt(e,m,O,w,c,Z.current,y)}}var ge=$.ReactCurrentOwner,Qe=$.ReactDebugCurrentFrame;function V(e){if(e){var a=e._owner,o=ae(e.type,e._source,a?a.type:null);Qe.setExtraStackFrame(o)}else Qe.setExtraStackFrame(null)}var be;be=!1;function ye(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function er(){{if(ge.current){var e=A(ge.current.type);if(e)return`

Check the render method of \``+e+"`."}return""}}function ct(e){{if(e!==void 0){var a=e.fileName.replace(/^.*[\\\/]/,""),o=e.lineNumber;return`

Check your code at `+a+":"+o+"."}return""}}var rr={};function ut(e){{var a=er();if(!a){var o=typeof e=="string"?e:e.displayName||e.name;o&&(a=`

Check the top-level render call using <`+o+">.")}return a}}function tr(e,a){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=ut(a);if(rr[o])return;rr[o]=!0;var c="";e&&e._owner&&e._owner!==ge.current&&(c=" It was passed a child from "+A(e._owner.type)+"."),V(e),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,c),V(null)}}function ar(e,a){{if(typeof e!="object")return;if(Array.isArray(e))for(var o=0;o<e.length;o++){var c=e[o];ye(c)&&tr(c,a)}else if(ye(e))e._store&&(e._store.validated=!0);else if(e){var w=Ur(e);if(typeof w=="function"&&w!==e.entries)for(var _=w.call(e),y;!(y=_.next()).done;)ye(y.value)&&tr(y.value,a)}}}function dt(e){{var a=e.type;if(a==null||typeof a=="string")return;var o;if(typeof a=="function")o=a.propTypes;else if(typeof a=="object"&&(a.$$typeof===g||a.$$typeof===C))o=a.propTypes;else return;if(o){var c=A(a);et(o,e.props,"prop",c,e)}else if(a.PropTypes!==void 0&&!be){be=!0;var w=A(a);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w||"Unknown")}typeof a.getDefaultProps=="function"&&!a.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ft(e){{for(var a=Object.keys(e.props),o=0;o<a.length;o++){var c=a[o];if(c!=="children"&&c!=="key"){V(e),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c),V(null);break}}e.ref!==null&&(V(e),S("Invalid attribute `ref` supplied to `React.Fragment`."),V(null))}}function nr(e,a,o,c,w,_){{var y=Zr(e);if(!y){var m="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(m+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var O=ct(w);O?m+=O:m+=er();var T;e===null?T="null":Array.isArray(e)?T="array":e!==void 0&&e.$$typeof===l?(T="<"+(A(e.type)||"Unknown")+" />",m=" Did you accidentally export a JSX literal instead of a component?"):T=typeof e,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",T,m)}var R=st(e,a,o,w,_);if(R==null)return R;if(y){var D=a.children;if(D!==void 0)if(c)if(Array.isArray(D)){for(var W=0;W<D.length;W++)ar(D[W],e);Object.freeze&&Object.freeze(D)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ar(D,e)}return e===r.Fragment?ft(R):dt(R),R}}function ht(e,a,o){return nr(e,a,o,!0)}function vt(e,a,o){return nr(e,a,o,!1)}var mt=vt,pt=ht;r.jsx=mt,r.jsxs=pt}()}(le)),le}(function(r){process.env.NODE_ENV==="production"?r.exports=hr():r.exports=vr()})(ie);const t=ie.exports.jsx,v=ie.exports.jsxs,mr={large:20,medium:18,small:16,tiny:14};function se({className:r,size:i="small",icon:n,...l}){const s=n,d=typeof i=="string"?mr[i]:i;return t(s,{className:r,size:d,...l})}var Te={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ne=j.default.createContext&&j.default.createContext(Te),F=globalThis&&globalThis.__assign||function(){return F=Object.assign||function(r){for(var i,n=1,l=arguments.length;n<l;n++){i=arguments[n];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])}return r},F.apply(this,arguments)},pr=globalThis&&globalThis.__rest||function(r,i){var n={};for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&i.indexOf(l)<0&&(n[l]=r[l]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,l=Object.getOwnPropertySymbols(r);s<l.length;s++)i.indexOf(l[s])<0&&Object.prototype.propertyIsEnumerable.call(r,l[s])&&(n[l[s]]=r[l[s]]);return n};function Re(r){return r&&r.map(function(i,n){return j.default.createElement(i.tag,F({key:n},i.attr),Re(i.child))})}function L(r){return function(i){return t(gr,{...F({attr:F({},r.attr)},i),children:Re(r.child)})}}function gr(r){var i=function(n){var l=r.attr,s=r.size,d=r.title,x=pr(r,["attr","size","title"]),h=s||n.size||"1em",f;return n.className&&(f=n.className),r.className&&(f=(f?f+" ":"")+r.className),v("svg",{...F({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,l,x,{className:f,style:F(F({color:r.color||n.color},n.style),r.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),children:[d&&t("title",{children:d}),r.children]})};return Ne!==void 0?t(Ne.Consumer,{children:function(n){return i(n)}}):i(Te)}function br(r){return L({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"}},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"}}]})(r)}const yr={small:"px-4 py-2 text-sm",medium:"px-6 py-2.5 text-base",large:"px-8 py-3.5 text-lg",tiny:"px-2 py-1 text-xs"},xr={primary:"bg-brand-ui-primary  transition ease-in-out duration-300 hover:bg-brand-dark text-white disabled:hover:bg-brand-ui-primary disabled:hover:bg-opacity-75",secondary:"bg-white transition ease-in-out duration-300 text-brand-dark [box-shadow:0px_8px_30px_0px_rgba(0,_0,_0,_0.08)] hover:[box-shadow:0px_0px_10px_0px_rgba(183,_19,_255,_0.1)] disabled:hover:[box-shadow:0px_8px_30px_0px_rgba(0,_0,_0,_0.08)] disabled:hover:bg-opacity-75","outlined-primary":"border-2 border-brand-ui-primary transition ease-in-out duration-300 hover:text-brand-ui-primary disabled:text-brand-gray disabled:hover:text-brand-gray disabled:hover:bg-opacity-75 font-medium",transparent:"bg-transparent text-black transition ease-in-out duration-300 hover:text-brand-ui-primary disabled:text-brand-gray disabled:hover:text-brand-gray disabled:hover:bg-opacity-75 font-medium"},ke=P.forwardRef((r,i)=>{const{children:n,size:l="medium",variant:s="primary",loading:d,iconLeft:x,iconRight:h,className:f,as:g="button",...u}=r,b=k.twMerge("rounded-full flex justify-center cursor-pointer font-semibold items-center gap-2 disabled:bg-opacity-75  disabled:cursor-not-allowed",yr[l],xr[s],f);return v(J,{as:g,className:b,...u,ref:i,children:[d?t(se,{icon:br,size:l,className:"animate-spin motion-reduce:invisible"}):x,v("span",{children:[" ",n]}),!d&&h]})});function Oe({isOpen:r,setIsOpen:i,children:n}){return t(E.Transition.Root,{show:r,as:j.default.Fragment,children:t(E.Dialog,{as:"div",className:"fixed inset-0 z-10 overflow-y-auto",onClose:i,children:v("div",{className:"flex items-end justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0",children:[t(E.Transition.Child,{as:j.default.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:t(E.Dialog.Overlay,{className:"fixed inset-0 transition-opacity bg-gray-100 bg-opacity-75 filter blur"})}),t("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"\u200B"}),t(E.Transition.Child,{as:j.default.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:t("div",{className:"inline-block overflow-hidden transition-all transform bg-white border border-gray-100 rounded-lg shadow-xl shadow-gray-200 sm:max-w-lg sm:w-full",children:n})})]})})})}const Se={small:"p-1",medium:"p-2",large:"p-3"},ce=P.forwardRef((r,i)=>{const n=k.twMerge("rounded hover:fill-brand-ui-primary",r.size?Se[r.size]:Se.medium,r.className);return t("button",{className:n,...r,ref:i,"aria-label":r.label,children:r.icon})});function je(r){return L({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]})(r)}function wr({isOpen:r,setIsOpen:i,text:n,title:l}){return v(Oe,{isOpen:r,setIsOpen:i,children:[t("div",{className:"absolute top-0 right-0 w-12 h-12 p-4",children:t(ce,{icon:t(je,{}),label:"close",size:"small",onClick:()=>i(!1)})}),t("div",{className:"px-4 pt-5 pb-4",children:t("div",{className:"sm:flex sm:items-start",children:v("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[l&&t(E.Dialog.Title,{as:"h2",className:"text-lg font-medium leading-6 text-gray-900",children:l}),t("div",{className:"mt-2",children:t("p",{className:"text-sm text-gray-500",children:n})})]})})})]})}const _r=({isOpen:r,setIsOpen:i,children:n,title:l,description:s})=>{const d={as:j.default.Fragment,enter:"ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0"};return t(E.Transition.Root,{show:r,as:j.default.Fragment,children:t(E.Dialog,{as:"div",className:"fixed inset-0 overflow-y-auto",onClose:i,children:v("div",{className:"absolute inset-0 overflow-y-auto",children:[t(E.Transition.Child,{...d,children:t(E.Dialog.Overlay,{className:"absolute inset-0 transition-opacity bg-gray-500 bg-opacity-50 backdrop-blur"})}),t("div",{className:"fixed inset-y-0 right-0 w-full max-w-lg",children:t(E.Transition.Child,{as:j.default.Fragment,enter:"transform transition ease-in-out duration-300 sm:duration-500",enterFrom:"translate-x-full",enterTo:"translate-x-0",leave:"transform transition ease-in-out duration-300 sm:duration-500",leaveFrom:"translate-x-0",leaveTo:"translate-x-full",children:v("div",{className:"relative w-full h-screen p-6 overflow-y-auto sm:max-w-lg bg-ui-secondary-100",children:[t(E.Transition.Child,{...d,children:t(ce,{icon:t(je,{className:"fill-inherit",size:20}),label:"close",size:"tiny",onClick:()=>i(!1)})}),v("div",{className:"mt-4 space-y-2",children:[t(E.Dialog.Title,{className:"text-xl font-medium text-gray-800",children:l}),s&&t(E.Dialog.Description,{className:"text-base text-gray-800",children:s})]}),t("div",{className:"relative flex-1",children:n})]})})})]})})})},Cr={small:"text-sm",medium:"text-base",large:"text-lg"},ue={small:"text-xs",medium:"text-sm",large:"text-base"};function Pe(r){const{children:i,label:n,size:l="medium",error:s,success:d,description:x}=r,h=Cr[l],f=k.twMerge("px-1",h),g=k.twMerge("text-gray-600",ue[l]),u=k.twMerge("text-red-500",ue[l]),b=k.twMerge("text-green-500",ue[l]);function C(){return s?t("p",{id:n,className:u,children:s}):d?t("p",{id:n,className:b,children:d}):x?t("p",{id:n,className:g,children:x}):null}return v("div",{className:"grid gap-1.5",children:[n&&t("label",{className:f,htmlFor:n,children:n}),i,t("div",{className:"pl-1",children:t(C,{})})]})}function Er(r){return L({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"18 15 12 9 6 15"}}]})(r)}function Tr(r){return L({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}}]})(r)}const Nr={small:"pl-2.5 py-1.5 text-sm",medium:"pl-4 py-2 text-base",large:"pl-4 py-2.5"},Ae={error:"border-brand-secondary hover:border-brand-secondary focus:border-brand-secondary focus:ring-brand-secondary",success:"border-green-500 hover:border-green-500 focus:border-green-500 focus:ring-green-500"},Rr={small:"text-sm",medium:"text-base",large:"text-lg"},Le=P.forwardRef((r,i)=>{const{size:n="medium",value:l,copy:s,className:d,error:x,success:h,description:f,label:g,icon:u,...b}=r,[C,I]=ur.default(r.value),M=b.type==="password"||b.hidden,X=Nr[n];let Y="";x?Y=Ae.error:h&&(Y=Ae.success);const Q=k.twMerge("px-2 py-0.5 border border-gray-300 flex items-center gap-2 hover:border-gray-400 text-gray-600 hover:text-black shadow-sm rounded-lg",Rr[n]),ee=k.twMerge("block w-full box-border rounded-lg transition-all shadow-sm border border-gray-400 hover:border-gray-500 focus:ring-gray-500 focus:border-gray-500 focus:outline-none flex-1 disabled:bg-gray-100",X,Y,u?"pl-10":void 0);return t(Pe,{label:g,size:n,error:x,success:h,description:f,children:v("div",{className:"relative",children:[u&&t("span",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none",children:t(se,{size:n,icon:u})}),t("input",{...b,id:g,value:l,ref:i,className:ee}),t("div",{className:"absolute inset-y-0 right-0 flex items-center pr-1 ml-4",children:s&&!M&&v("button",{onClick:()=>I(),className:Q,children:[t(Tr,{})," ",C?"Copied":"Copy"]})})]})})});Le.displayName="Input";const Ie={plain:{color:"#FFF7E8",backgroundColor:"#020207"},styles:[{types:["prolog","constant","builtin"],style:{color:"#FF6771"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"#FF6771"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]};function De({lang:r,code:i}){return t(dr.default,{...xe.defaultProps,theme:Ie,code:i,language:r,children:({className:n,style:l,tokens:s,getLineProps:d,getTokenProps:x})=>t("pre",{style:l,className:k.twMerge(n,"rounded-xl font-mono p-2 overflow-auto text-sm"),children:s.map((h,f)=>v("div",{...d({line:h,key:f,className:"table-row"}),children:[v("span",{className:"table-cell pr-2 opacity-50",children:[" ",f+1," "]}),h.map((g,u)=>t("span",{...x({token:g,key:u})}))]}))})})}function kr({blocks:r}){return t("div",{style:{backgroundColor:Ie.plain.backgroundColor},className:"relative p-4 sm:p-8 rounded-3xl",children:v(E.Tab.Group,{children:[t(E.Tab.List,{className:"flex justify-between w-full",children:r.map((i,n)=>t(E.Tab,{className:({selected:l})=>k.twMerge("w-full p-2.5 border border-white text-white font-medium opacity-90 hover:opacity-100 hover:bg-white hover:text-brand-ui-primary",l&&"bg-white text-brand-ui-primary opacity-100",!n&&"rounded-l-xl",n===r.length-1&&"rounded-r-xl"),children:i.name}))}),t(E.Tab.Panels,{className:"py-4",children:r.map(({lang:i,name:n,code:l})=>t(E.Tab.Panel,{children:t(De,{lang:i,code:l})},n))})]})})}const Or={tiny:"text-xs",small:"text-sm",medium:"text-base",large:"text-lg"},Sr={default:"bg-[#dfd8fb] text-brand-ui-primary",green:"bg-green-100 text-green-800",yellow:"bg-yellow-100 text-yellow-800",orange:"bg-orange-100 text-orange-800",blue:"bg-blue-100 text-blue-800",dark:"bg-gray-100 text-gray-800",red:"bg-[#ffe1e3] text-brand-secondary"};function jr(r){const{children:i,size:n="small",variant:l="default",iconLeft:s,iconRight:d,className:x,as:h="div",...f}=r,g=k.twMerge("font-medium rounded-full px-2.5 py-1 inline-flex items-center gap-2",Or[n],Sr[l],x);return v(J,{as:h,className:g,...f,children:[s,v("span",{children:[" ",i]}),d]})}function Pr({children:r,delay:i=600,tip:n,label:l,side:s,sideOffset:d=6}){return t(U.Provider,{children:v(U.Root,{delayDuration:i,children:[t(U.TooltipTrigger,{className:"cursor-pointer","aria-label":l,asChild:!0,children:r}),v(U.Content,{side:s,sideOffset:d,className:"rounded text-brand-dark text-sm bg-white [box-shadow:0px_8px_30px_rgba(0,0,0,0.08)] px-4 py-0.5",children:[t(U.TooltipArrow,{className:"fill-white"}),n]})]})})}function Ar(r){return L({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.267.267 0 0 1 .02-.022z"}}]})(r)}function Lr(r){return L({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}}]})(r)}const Ir={tiny:"p-1 text-sm",small:"px-2.5 py-1.5 text-sm",medium:"px-4 py-2 text-base",large:"px-4 py-2.5"},Dr=({options:r,onChange:i,label:n="Select",size:l="medium",defaultValue:s})=>{const[d,x]=P.useState(null),h=u=>{const b=r?.find(C=>C.value==u);x(b||null),b&&typeof i=="function"&&i(b?.value)};P.useEffect(()=>{if(!s)return;const u=r?.find(b=>b.value==`${s}`)||null;x(u)},[]);const f=Ir[l],g=k.twMerge("box-border flex-1 block w-full text-base text-left transition-all bg-white border border-gray-400 rounded-lg shadow-sm hover:border-gray-500 focus:ring-gray-500 focus:border-gray-500 focus:outline-none",f);return t(E.Listbox,{value:d?.value||"",onChange:h,children:v("div",{className:"relative",children:[n?.length>0&&t("label",{className:"block px-1 mb-1 text-base",htmlFor:"",children:n}),t(E.Listbox.Button,{className:g,children:v("div",{className:"flex items-center justify-between",children:[t("span",{children:d?.label||"Choose option"}),t(Lr,{size:20})]})}),t(E.Listbox.Options,{className:"absolute z-10 w-full mt-1 overflow-hidden bg-white border border-gray-400 rounded-xl",children:r?.map(u=>t(E.Listbox.Option,{value:u.value,className:"cursor-pointer",children:({selected:b})=>{const C=k.twMerge(`${b?"bg-gray-100":""} flex items-center justify-between p-3 hover:bg-gray-100`,f);return v("div",{className:C,children:[t("span",{className:b?"font-bold":"",children:u.label}),b&&t(Ar,{size:20})]})}},u.value))})]})})},zr=({children:r,content:i,disabled:n=!1})=>{const[l,s]=P.useState(!1);return v("div",{className:"bg-white border border-gray-200 rounded-2xl",children:[v("div",{className:"flex items-start gap-3 p-4",children:[t("div",{className:"col-span-full md:col-span-1",children:t(ke,{variant:"transparent",className:"p-0 m-0",onClick:()=>{n||s(!l)},disabled:n,children:t("div",{className:"flex items-center justify-center w-8 h-8 border border-black rounded-full click:border-brand-secondary ",children:t(Er,{className:`transition duration-200 ease-in-out ${l?"rotate-180":""}`})})})}),t("div",{className:"w-full",children:i})]}),l&&t("div",{className:"p-6",children:r})]})},Fr=({title:r="",enabled:i,setEnabled:n,onChange:l,disabled:s=!1})=>{const d=k.twMerge(i?"bg-brand-ui-primary":"bg-gray-400","disabled:opacity-50 relative inline-flex h-8 w-14 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75"),x=k.twMerge(i?"translate-x-6":"translate-x-0","pointer-events-none inline-block h-7 w-7 transform rounded-full bg-white shadow-lg ring-0 transition duration-100");return P.useEffect(()=>{typeof l=="function"&&l(i)},[i]),v("div",{className:"flex items-center gap-4",children:[r?.length>0&&t("span",{className:"text-sm font-semibold",children:r}),t(E.Switch,{checked:i,onChange:n,className:d,disabled:s,children:t("span",{"aria-hidden":"true",className:x})})]})};function Br(r){return L({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 3h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1h2v2h6V1h2v2zm-2 2H9v2H7V5H4v4h16V5h-3v2h-2V5zm5 6H4v8h16v-8z"}}]}]})(r)}function Mr(r){return L({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 20.9l4.95-4.95a7 7 0 1 0-9.9 0L12 20.9zm0 2.828l-6.364-6.364a9 9 0 1 1 12.728 0L12 23.728zM12 13a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 2a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"}}]}]})(r)}function Yr(r){return L({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2zm0 18c4.42 0 8-3.58 8-8s-3.58-8-8-8-8 3.58-8 8 3.58 8 8 8zm3.536-12.95l1.414 1.414-4.95 4.95L10.586 12l4.95-4.95z"}}]}]})(r)}const de=r=>cr.ethers.utils.isAddress(r)?`${r.slice(0,5)}...${r.slice(r.length-5)}`:r,{SvgComponents:$r}=fr.default;function Vr({iconURL:r,title:i,bottomItems:n,topItems:l,recipient:s,id:d,QRCodeURL:x,date:h,time:f,location:g,lockAddress:u,network:b}){const C=sr.networks[b];return v("div",{className:"flex flex-col max-w-sm",children:[v("div",{className:"p-6 space-y-6 bg-white rounded-3xl",children:[v("div",{className:"flex gap-6",children:[t("img",{width:64,height:64,src:r,className:"w-16 h-16 overflow-hidden rounded-xl aspect-1",alt:i}),v("h3",{className:"text-xl font-bold sm:text-2xl",children:[" ",i]})]}),v("div",{className:"space-y-2",children:[h&&t(K,{icon:t(Br,{}),value:h}),f&&t(K,{icon:t(Yr,{}),value:f}),g&&t(K,{icon:t(Mr,{}),value:g}),l]})]}),v("div",{className:"p-6 bg-white border-t-2 border-dashed rounded-3xl",children:[t("img",{src:x,alt:""}),v("div",{className:"flex items-center justify-center gap-1 text-xs",children:["Powered by ",t($r.UnlockWordMark,{width:56})]})]}),v("div",{className:"p-6 space-y-6 bg-white border-t-2 border-dashed rounded-3xl",children:[!!n?.length&&t("div",{className:"space-y-2",children:n}),v("div",{className:"grid gap-4 sm:grid-cols-2",children:[t(q,{label:"Network",value:C.name}),t(q,{label:"Lock Address",value:de(u)}),t(q,{label:"Token ID",value:d}),t(q,{label:"Recipient",value:de(s)})]})]})]})}function q({label:r,value:i}){return v("div",{className:"flex-col space-y-1",children:[t("div",{className:"text-sm text-brand-dark",children:r}),t("div",{className:"text-lg font-semibold text-brand-dark",children:i})]})}function K({icon:r,value:i}){return v("div",{className:"flex items-center gap-2",children:[t("div",{children:r}),t("div",{className:"text-base font-bold text-brand-dark",children:i})]})}p.Alert=wr,p.Badge=jr,p.Box=J,p.Button=ke,p.CodeBox=De,p.Collapse=zr,p.Drawer=_r,p.FieldLayout=Pe,p.Icon=se,p.IconButton=ce,p.Input=Le,p.Modal=Oe,p.Select=Dr,p.TabbedCodeBox=kr,p.Ticket=Vr,p.TicketItem=K,p.TicketLabel=q,p.ToggleSwitch=Fr,p.Tooltip=Pr,p.minifyAddress=de,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
//# sourceMappingURL=index.umd.js.map
