@payai/x402-solana-react 1.0.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2 +1,14 @@
1
- "use strict";var _e=Object.defineProperty;var Oe=(r,a,n)=>a in r?_e(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n;var ve=(r,a,n)=>Oe(r,typeof a!="symbol"?a+"":a,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),A=require("react"),ue=require("@solana/wallet-adapter-react"),Pe=require("@solana/wallet-adapter-react-ui"),ye=require("@solana/wallet-adapter-base"),je=require("@solana/wallet-adapter-wallets"),P=require("@solana/web3.js"),K=require("@solana/spl-token");function We(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(a,n,o.get?o:{enumerable:!0,get:()=>r[n]})}}return a.default=r,Object.freeze(a)}const N=We(A);function Ve(r){return r==="solana"?"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v":"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"}function He(r){return r==="solana"?`https://mainnet.helius-rpc.com/?api-key=${process.env.VITE_HELIUS_API_KEY}`:"https://api.devnet.solana.com"}async function Xe(r,a,n){try{const o=n||He(a),i=new P.Connection(o,"confirmed"),l=new P.PublicKey(r),c=new P.PublicKey(Ve(a)),u=await K.getAssociatedTokenAddress(c,l),e=await K.getAccount(i,u);return(Number(e.amount)/1e6).toFixed(2)}catch(o){return console.error("Error fetching USDC balance:",o),"0.00"}}function Ee(r){var a,n,o="";if(typeof r=="string"||typeof r=="number")o+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(a=0;a<i;a++)r[a]&&(n=Ee(r[a]))&&(o&&(o+=" "),o+=n)}else for(n in r)r[n]&&(o&&(o+=" "),o+=n);return o}function De(){for(var r,a,n=0,o="",i=arguments.length;n<i;n++)(r=arguments[n])&&(a=Ee(r))&&(o&&(o+=" "),o+=a);return o}const xe="-",qe=r=>{const a=Se(r),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=r;return{getClassGroupId:c=>{const u=c.split(xe);return u[0]===""&&u.length!==1&&u.shift(),ze(u,a)||Je(c)},getConflictingClassGroupIds:(c,u)=>{const e=n[c]||[];return u&&o[c]?[...e,...o[c]]:e}}},ze=(r,a)=>{var c;if(r.length===0)return a.classGroupId;const n=r[0],o=a.nextPart.get(n),i=o?ze(r.slice(1),o):void 0;if(i)return i;if(a.validators.length===0)return;const l=r.join(xe);return(c=a.validators.find(({validator:u})=>u(l)))==null?void 0:c.classGroupId},Ne=/^\[(.+)\]$/,Je=r=>{if(Ne.test(r)){const a=Ne.exec(r)[1],n=a==null?void 0:a.substring(0,a.indexOf(":"));if(n)return"arbitrary.."+n}},Se=r=>{const{theme:a,prefix:n}=r,o={nextPart:new Map,validators:[]};return Ze(Object.entries(r.classGroups),n).forEach(([l,c])=>{be(c,o,l,a)}),o},be=(r,a,n,o)=>{r.forEach(i=>{if(typeof i=="string"){const l=i===""?a:Ce(a,i);l.classGroupId=n;return}if(typeof i=="function"){if(Ye(i)){be(i(o),a,n,o);return}a.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([l,c])=>{be(c,Ce(a,l),n,o)})})},Ce=(r,a)=>{let n=r;return a.split(xe).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},Ye=r=>r.isThemeGetter,Ze=(r,a)=>a?r.map(([n,o])=>{const i=o.map(l=>typeof l=="string"?a+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([c,u])=>[a+c,u])):l);return[n,i]}):r,Qe=r=>{if(r<1)return{get:()=>{},set:()=>{}};let a=0,n=new Map,o=new Map;const i=(l,c)=>{n.set(l,c),a++,a>r&&(a=0,o=n,n=new Map)};return{get(l){let c=n.get(l);if(c!==void 0)return c;if((c=o.get(l))!==void 0)return i(l,c),c},set(l,c){n.has(l)?n.set(l,c):i(l,c)}}},Ie="!",er=r=>{const{separator:a,experimentalParseClassName:n}=r,o=a.length===1,i=a[0],l=a.length,c=u=>{const e=[];let x=0,f=0,p;for(let w=0;w<u.length;w++){let y=u[w];if(x===0){if(y===i&&(o||u.slice(w,w+l)===a)){e.push(u.slice(f,w)),f=w+l;continue}if(y==="/"){p=w;continue}}y==="["?x++:y==="]"&&x--}const b=e.length===0?u:u.substring(f),s=b.startsWith(Ie),C=s?b.substring(1):b,m=p&&p>f?p-f:void 0;return{modifiers:e,hasImportantModifier:s,baseClassName:C,maybePostfixModifierPosition:m}};return n?u=>n({className:u,parseClassName:c}):c},rr=r=>{if(r.length<=1)return r;const a=[];let n=[];return r.forEach(o=>{o[0]==="["?(a.push(...n.sort(),o),n=[]):n.push(o)}),a.push(...n.sort()),a},tr=r=>({cache:Qe(r.cacheSize),parseClassName:er(r),...qe(r)}),nr=/\s+/,ar=(r,a)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=a,l=[],c=r.trim().split(nr);let u="";for(let e=c.length-1;e>=0;e-=1){const x=c[e],{modifiers:f,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:s}=n(x);let C=!!s,m=o(C?b.substring(0,s):b);if(!m){if(!C){u=x+(u.length>0?" "+u:u);continue}if(m=o(b),!m){u=x+(u.length>0?" "+u:u);continue}C=!1}const w=rr(f).join(":"),y=p?w+Ie:w,F=y+m;if(l.includes(F))continue;l.push(F);const M=i(m,C);for(let k=0;k<M.length;++k){const g=M[k];l.push(y+g)}u=x+(u.length>0?" "+u:u)}return u};function or(){let r=0,a,n,o="";for(;r<arguments.length;)(a=arguments[r++])&&(n=Re(a))&&(o&&(o+=" "),o+=n);return o}const Re=r=>{if(typeof r=="string")return r;let a,n="";for(let o=0;o<r.length;o++)r[o]&&(a=Re(r[o]))&&(n&&(n+=" "),n+=a);return n};function sr(r,...a){let n,o,i,l=c;function c(e){const x=a.reduce((f,p)=>p(f),r());return n=tr(x),o=n.cache.get,i=n.cache.set,l=u,u(e)}function u(e){const x=o(e);if(x)return x;const f=ar(e,n);return i(e,f),f}return function(){return l(or.apply(null,arguments))}}const j=r=>{const a=n=>n[r]||[];return a.isThemeGetter=!0,a},Le=/^\[(?:([a-z-]+):)?(.+)\]$/i,ir=/^\d+\/\d+$/,lr=new Set(["px","full","screen"]),dr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ur=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,br=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,U=r=>J(r)||lr.has(r)||ir.test(r),O=r=>S(r,"length",vr),J=r=>!!r&&!Number.isNaN(Number(r)),ce=r=>S(r,"number",J),ee=r=>!!r&&Number.isInteger(Number(r)),gr=r=>r.endsWith("%")&&J(r.slice(0,-1)),h=r=>Le.test(r),W=r=>dr.test(r),pr=new Set(["length","size","percentage"]),fr=r=>S(r,pr,Be),hr=r=>S(r,"position",Be),wr=new Set(["image","url"]),mr=r=>S(r,wr,jr),kr=r=>S(r,"",yr),re=()=>!0,S=(r,a,n)=>{const o=Le.exec(r);return o?o[1]?typeof a=="string"?o[1]===a:a.has(o[1]):n(o[2]):!1},vr=r=>cr.test(r)&&!ur.test(r),Be=()=>!1,yr=r=>br.test(r),jr=r=>xr.test(r),Nr=()=>{const r=j("colors"),a=j("spacing"),n=j("blur"),o=j("brightness"),i=j("borderColor"),l=j("borderRadius"),c=j("borderSpacing"),u=j("borderWidth"),e=j("contrast"),x=j("grayscale"),f=j("hueRotate"),p=j("invert"),b=j("gap"),s=j("gradientColorStops"),C=j("gradientColorStopPositions"),m=j("inset"),w=j("margin"),y=j("opacity"),F=j("padding"),M=j("saturate"),k=j("scale"),g=j("sepia"),I=j("skew"),z=j("space"),T=j("translate"),R=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",h,a],v=()=>[h,a],V=()=>["",U,O],H=()=>["auto",J,h],E=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],X=()=>["","0",h],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[J,h];return{cacheSize:500,separator:":",theme:{colors:[re],spacing:[U,O],blur:["none","",W,h],brightness:D(),borderColor:[r],borderRadius:["none","","full",W,h],borderSpacing:v(),borderWidth:V(),contrast:D(),grayscale:X(),hueRotate:D(),invert:X(),gap:v(),gradientColorStops:[r],gradientColorStopPositions:[gr,O],inset:B(),margin:B(),opacity:D(),padding:v(),saturate:D(),scale:D(),sepia:X(),skew:D(),space:v(),translate:v()},classGroups:{aspect:[{aspect:["auto","square","video",h]}],container:["container"],columns:[{columns:[W]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...E(),h]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ee,h]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",h]}],grow:[{grow:X()}],shrink:[{shrink:X()}],order:[{order:["first","last","none",ee,h]}],"grid-cols":[{"grid-cols":[re]}],"col-start-end":[{col:["auto",{span:["full",ee,h]},h]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[re]}],"row-start-end":[{row:["auto",{span:[ee,h]},h]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",h]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",h]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[F]}],px:[{px:[F]}],py:[{py:[F]}],ps:[{ps:[F]}],pe:[{pe:[F]}],pt:[{pt:[F]}],pr:[{pr:[F]}],pb:[{pb:[F]}],pl:[{pl:[F]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",h,a]}],"min-w":[{"min-w":[h,a,"min","max","fit"]}],"max-w":[{"max-w":[h,a,"none","full","min","max","fit","prose",{screen:[W]},W]}],h:[{h:[h,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[h,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[h,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[h,a,"auto","min","max","fit"]}],"font-size":[{text:["base",W,O]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ce]}],"font-family":[{font:[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",h]}],"line-clamp":[{"line-clamp":["none",J,ce]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",U,h]}],"list-image":[{"list-image":["none",h]}],"list-style-type":[{list:["none","disc","decimal",h]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",U,O]}],"underline-offset":[{"underline-offset":["auto",U,h]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",h]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...E(),hr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",fr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},mr]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[s]}],"gradient-via":[{via:[s]}],"gradient-to":[{to:[s]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[..._(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:_()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",..._()]}],"outline-offset":[{"outline-offset":[U,h]}],"outline-w":[{outline:[U,O]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[U,O]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",W,kr]}],"shadow-color":[{shadow:[re]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[e]}],"drop-shadow":[{"drop-shadow":["","none",W,h]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[M]}],sepia:[{sepia:[g]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[e]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[g]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",h]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",h]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",h]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[ee,h]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",h]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",h]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",h]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[U,O,ce]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Cr=sr(Nr);function d(...r){return Cr(De(r))}const ne=N.forwardRef(({className:r,...a},n)=>t.jsx("div",{ref:n,className:d("rounded-xl border bg-card text-card-foreground shadow",r),...a}));ne.displayName="Card";const ie=N.forwardRef(({className:r,...a},n)=>t.jsx("div",{ref:n,className:d("flex flex-col space-y-1.5 p-6",r),...a}));ie.displayName="CardHeader";const le=N.forwardRef(({className:r,...a},n)=>t.jsx("div",{ref:n,className:d("font-semibold leading-none tracking-tight",r),...a}));le.displayName="CardTitle";const de=N.forwardRef(({className:r,...a},n)=>t.jsx("div",{ref:n,className:d("text-sm text-muted-foreground",r),...a}));de.displayName="CardDescription";const ae=N.forwardRef(({className:r,...a},n)=>t.jsx("div",{ref:n,className:d("p-6 pt-0",r),...a}));ae.displayName="CardContent";const Fr=N.forwardRef(({className:r,...a},n)=>t.jsx("div",{ref:n,className:d("flex items-center p-6 pt-0",r),...a}));Fr.displayName="CardFooter";function Fe(r,a){if(typeof r=="function")return r(a);r!=null&&(r.current=a)}function Ar(...r){return a=>{let n=!1;const o=r.map(i=>{const l=Fe(i,a);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<o.length;i++){const l=o[i];typeof l=="function"?l():Fe(r[i],null)}}}}function Mr(r){const a=Pr(r),n=N.forwardRef((o,i)=>{const{children:l,...c}=o,u=N.Children.toArray(l),e=u.find(Dr);if(e){const x=e.props.children,f=u.map(p=>p===e?N.Children.count(x)>1?N.Children.only(null):N.isValidElement(x)?x.props.children:null:p);return t.jsx(a,{...c,ref:i,children:N.isValidElement(x)?N.cloneElement(x,void 0,f):null})}return t.jsx(a,{...c,ref:i,children:l})});return n.displayName=`${r}.Slot`,n}var Tr=Mr("Slot");function Pr(r){const a=N.forwardRef((n,o)=>{const{children:i,...l}=n;if(N.isValidElement(i)){const c=Ir(i),u=zr(l,i.props);return i.type!==N.Fragment&&(u.ref=o?Ar(o,c):c),N.cloneElement(i,u)}return N.Children.count(i)>1?N.Children.only(null):null});return a.displayName=`${r}.SlotClone`,a}var Er=Symbol("radix.slottable");function Dr(r){return N.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===Er}function zr(r,a){const n={...a};for(const o in a){const i=r[o],l=a[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...u)=>{const e=l(...u);return i(...u),e}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...r,...n}}function Ir(r){var o,i;let a=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,n=a&&"isReactWarning"in a&&a.isReactWarning;return n?r.ref:(a=(i=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:i.get,n=a&&"isReactWarning"in a&&a.isReactWarning,n?r.props.ref:r.props.ref||r.ref)}const Ae=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,Me=De,$e=(r,a)=>n=>{var o;if((a==null?void 0:a.variants)==null)return Me(r,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:l}=a,c=Object.keys(i).map(x=>{const f=n==null?void 0:n[x],p=l==null?void 0:l[x];if(f===null)return null;const b=Ae(f)||Ae(p);return i[x][b]}),u=n&&Object.entries(n).reduce((x,f)=>{let[p,b]=f;return b===void 0||(x[p]=b),x},{}),e=a==null||(o=a.compoundVariants)===null||o===void 0?void 0:o.reduce((x,f)=>{let{class:p,className:b,...s}=f;return Object.entries(s).every(C=>{let[m,w]=C;return Array.isArray(w)?w.includes({...l,...u}[m]):{...l,...u}[m]===w})?[...x,p,b]:x},[]);return Me(r,c,e,n==null?void 0:n.class,n==null?void 0:n.className)},Rr=$e("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ge=N.forwardRef(({className:r,variant:a,size:n,asChild:o=!1,...i},l)=>{const c=o?Tr:"button";return t.jsx(c,{className:d(Rr({variant:a,size:n,className:r})),ref:l,...i})});ge.displayName="Button";const oe=N.forwardRef(({className:r,size:a="md",variant:n="default",...o},i)=>{const l={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},c={default:"border-gray-200 border-t-gray-900",solana:"border-gray-200 border-t-solana-primary"};return t.jsx("div",{ref:i,className:d("inline-block animate-spin rounded-full border-2",l[a],c[n],r),role:"status","aria-label":"Loading",...o,children:t.jsx("span",{className:"sr-only",children:"Loading..."})})});oe.displayName="Spinner";const te=N.forwardRef(({amount:r,description:a,onClick:n,disabled:o=!1,loading:i=!1,className:l,style:c,customText:u,...e},x)=>{const f=p=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2}).format(p);return t.jsx(ge,{ref:x,onClick:n,disabled:o||i,className:d("w-full hover:opacity-90 text-white font-normal shadow-lg hover:shadow-xl transition-all duration-200 transform hover:scale-[1.02] rounded-xl",!c&&"bg-solana-gradient",o||i?"opacity-50 cursor-not-allowed":"",l),style:c,...e,children:i?t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(oe,{size:"sm",variant:"default",className:"border-white/30 border-t-white"}),t.jsx("span",{children:"Processing Payment..."})]}):t.jsx("span",{children:u||`Pay ${f(r)} USDC`})})});te.displayName="PaymentButton";const Lr=$e("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function pe({className:r,variant:a,...n}){return t.jsx("div",{className:d(Lr({variant:a}),r),...n})}const fe=({wallet:r,balance:a,network:n,showBalance:o=!0,onDisconnect:i,theme:l,className:c,style:u})=>{var p;const e=((p=r==null?void 0:r.publicKey)==null?void 0:p.toString())||(r==null?void 0:r.address),x=b=>`${b.slice(0,4)}...${b.slice(-4)}`,f=()=>n==="solana"?"Mainnet":"Devnet";return!r||!e?t.jsx(ne,{className:d("border-dashed",c),style:u,children:t.jsx(ae,{className:"p-4 text-center text-muted-foreground",children:t.jsx("p",{className:"text-sm",children:"No wallet connected"})})}):t.jsx("div",{className:d("rounded-lg p-4 border",l==="seeker"||l==="seeker-2"?"border-[#FFFFFF1F]":"bg-slate-50 border-slate-200",c),style:u,children:t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"w-10 h-10 bg-gradient-to-r from-blue-500 to-purple-500 rounded-full flex items-center justify-center",children:t.jsx("span",{className:"text-white font-semibold text-sm",children:e.slice(0,2).toUpperCase()})}),t.jsxs("div",{children:[t.jsx("div",{className:d("text-xs font-medium drop-shadow-sm shadow-sm",l==="light"||l==="solana-light"?"text-[#71717A]":"text-[#FFFFFF66]"),children:"Connected Wallet"}),t.jsx("div",{className:d("text-sm font-mono",l==="light"||l==="solana-light"?"text-black":"text-white"),children:x(e)})]})]}),t.jsx("button",{onClick:i,className:d("text-sm font-medium transition-colors",l==="light"||l==="solana-light"?"text-red-500 hover:text-red-700":"text-[#FFFFFF66] hover:opacity-80"),children:"Disconnect"})]}),o&&a&&t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium text-slate-600",children:"USDC Balance"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-lg font-bold text-slate-900",children:a}),t.jsx("span",{className:"text-xs font-semibold text-slate-500 bg-slate-200 px-2 py-1 rounded-md",children:"USDC"})]})]}),n&&t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium text-slate-600",children:"Network"}),t.jsx(pe,{variant:"outline",className:"text-xs border-slate-300 text-slate-700",children:f()})]})]})})};fe.displayName="WalletSection";function Br(r,a,n){const o=Buffer.from(r.serialize()).toString("base64"),i={x402Version:n,scheme:a.scheme,network:a.network,payload:{transaction:o}};return Buffer.from(JSON.stringify(i)).toString("base64")}function $r(r){if(r==="solana")return"https://api.mainnet-beta.solana.com";if(r==="solana-devnet")return"https://api.devnet.solana.com";throw new Error(`Unexpected network: ${r}`)}async function Gr(r,a,n,o){var T,R,L;const i=new P.Connection(o,"confirmed"),l=(T=n==null?void 0:n.extra)==null?void 0:T.feePayer;if(typeof l!="string"||!l)throw new Error("Missing facilitator feePayer in payment requirements (extra.feePayer).");const c=new P.PublicKey(l),u=((R=r==null?void 0:r.publicKey)==null?void 0:R.toString())||(r==null?void 0:r.address);if(!u)throw new Error("Missing connected Solana wallet address or publicKey");const e=new P.PublicKey(u);if(!(n!=null&&n.payTo))throw new Error("Missing payTo in payment requirements");const x=new P.PublicKey(n.payTo),f=[];if(f.push(P.ComputeBudgetProgram.setComputeUnitLimit({units:4e4})),f.push(P.ComputeBudgetProgram.setComputeUnitPrice({microLamports:1})),!n.asset)throw new Error("Missing token mint for SPL transfer");const p=new P.PublicKey(n.asset),b=await i.getAccountInfo(p,"confirmed"),s=((L=b==null?void 0:b.owner)==null?void 0:L.toBase58())===K.TOKEN_2022_PROGRAM_ID.toBase58()?K.TOKEN_2022_PROGRAM_ID:K.TOKEN_PROGRAM_ID,C=await K.getMint(i,p,void 0,s),m=await K.getAssociatedTokenAddress(p,e,!1,s),w=await K.getAssociatedTokenAddress(p,x,!1,s);if(!await i.getAccountInfo(m,"confirmed"))throw new Error(`User does not have an Associated Token Account for ${n.asset}. Please create one first or ensure you have the required token.`);if(!await i.getAccountInfo(w,"confirmed")){const B=new P.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),v=new P.TransactionInstruction({keys:[{pubkey:c,isSigner:!0,isWritable:!0},{pubkey:w,isSigner:!1,isWritable:!0},{pubkey:x,isSigner:!1,isWritable:!1},{pubkey:p,isSigner:!1,isWritable:!1},{pubkey:P.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:s,isSigner:!1,isWritable:!1}],programId:B,data:Buffer.from([0])});f.push(v)}const M=BigInt(n.maxAmountRequired);f.push(K.createTransferCheckedInstruction(m,p,w,e,M,C.decimals,[],s));const{blockhash:k}=await i.getLatestBlockhash("confirmed"),g=new P.TransactionMessage({payerKey:c,recentBlockhash:k,instructions:f}).compileToV0Message(),I=new P.VersionedTransaction(g);if(typeof(r==null?void 0:r.signTransaction)!="function")throw new Error("Connected wallet does not support signTransaction");const z=await r.signTransaction(I);return Br(z,n,a)}function Ur(r,a,n,o=BigInt(0)){return async(i,l)=>{const c=await r(i,l);if(c.status!==402)return c;const u=await c.json(),e=u.x402Version,x=u.accepts||[],f=x.find(s=>s.scheme==="exact"&&(s.network==="solana-devnet"||s.network==="solana"));if(!f)throw console.error("❌ No suitable Solana payment requirements found. Available networks:",x.map(s=>s.network)),new Error("No suitable Solana payment requirements found");if(o>BigInt(0)&&BigInt(f.maxAmountRequired)>o)throw new Error("Payment amount exceeds maximum allowed");const p=await Gr(a,e,f,n),b={...l,headers:{...(l==null?void 0:l.headers)||{},"X-PAYMENT":p,"Access-Control-Expose-Headers":"X-PAYMENT-RESPONSE"}};return await r(i,b)}}var Kr=class{constructor(r){ve(this,"paymentFetch");const a=r.rpcUrl||$r(r.network);this.paymentFetch=Ur(fetch.bind(window),r.wallet,a,r.maxPaymentAmount||BigInt(0))}async fetch(r,a){return this.paymentFetch(r,a)}};function _r(r){return new Kr(r)}function Ge(r){const[a,n]=A.useState("idle"),[o,i]=A.useState(null),[l,c]=A.useState(null),[u,e]=A.useState(!1),x=A.useCallback(()=>{n("idle"),i(null),c(null),e(!1)},[]);return{pay:A.useCallback(async(p,b)=>{var s;try{if(e(!0),n("pending"),i(null),r.maxPaymentAmount&&p>r.maxPaymentAmount)throw new Error(`Payment amount ${p} exceeds maximum allowed ${r.maxPaymentAmount}`);const C=((s=r.wallet.publicKey)==null?void 0:s.toString())||r.wallet.address;if(!C)throw new Error("Wallet not connected");const m=_r({wallet:r.wallet,network:r.network,rpcUrl:r.rpcUrl,maxPaymentAmount:r.maxPaymentAmount?BigInt(Math.floor(r.maxPaymentAmount*1e6)):void 0}),w="https://x402.payai.network/api/solana/paid-content",y=r.apiEndpoint||w;console.log("Initiating x402 payment:",{endpoint:y,isDemo:y===w,amount:p,description:b,wallet:C,network:r.network});const M=await m.fetch(y,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:b,amount:p})});if(!M.ok)throw new Error(`Payment request failed: ${M.statusText}`);let k;const g=M.headers.get("content-type");g&&g.includes("application/json")?k=await M.json():k={content:await M.text()},console.log("Payment successful:",k);const I=M.headers.get("X-PAYMENT-RESPONSE");let z=`tx_${Date.now()}`;if(I)try{const T=JSON.parse(atob(I));z=T.transactionId||T.signature||z,console.log("Payment details:",T)}catch(T){console.warn("Could not decode payment response:",T)}return c(z),n("success"),e(!1),z}catch(C){const m=C instanceof Error?C:new Error("Payment failed");return i(m),n("error"),e(!1),null}},[r]),isLoading:u,status:a,error:o,transactionId:l,reset:x}}const Te=({amount:r,description:a,wallet:n,network:o="solana-devnet",rpcUrl:i,apiEndpoint:l,treasuryAddress:c,facilitatorUrl:u,theme:e="solana-light",logoUrl:x="https://raw.githubusercontent.com/PayAINetwork/x402-solana-react/main/src/components/ui/SolanaLogo.svg",showPaymentDetails:f=!0,onDisconnect:p,classNames:b,customStyles:s,maxPaymentAmount:C,onPaymentStart:m,onPaymentSuccess:w,onPaymentError:y,onWalletConnect:F,children:M})=>{var he,we,me;const k=ue.useWallet(),g=A.useMemo(()=>n||{publicKey:k.publicKey?{toString:()=>k.publicKey.toString()}:void 0,signTransaction:k.signTransaction},[n,k.publicKey,k.signTransaction]),[I,z]=A.useState(!1),[T,R]=A.useState("0.00"),L=A.useRef(null),B=o==="solana"?"Mainnet":"Devnet",{pay:v,isLoading:V,status:H,error:E,transactionId:_,reset:se}=Ge({wallet:g,network:o,rpcUrl:i,apiEndpoint:l,treasuryAddress:c,facilitatorUrl:u,maxPaymentAmount:C}),Y=()=>{p?p():!n&&k.disconnect&&k.disconnect()},X=n?!!(n.publicKey||n.address):!!(k.connected||k.publicKey);A.useEffect(()=>(document.body.className=document.body.className.replace(/wallet-modal-theme-\w+/g,"").replace(/\s+/g," ").trim(),e&&(document.body.className+=` wallet-modal-theme-${e}`),()=>{document.body.className=document.body.className.replace(/wallet-modal-theme-\w+/g,"").replace(/\s+/g," ").trim()}),[e]),A.useEffect(()=>{var G,q;const Q=((G=k.publicKey)==null?void 0:G.toString())||((q=n==null?void 0:n.publicKey)==null?void 0:q.toString())||(n==null?void 0:n.address);Q&&k.connected&&(console.log("Wallet connected:",Q),F==null||F(Q),Xe(Q,o,i).then(R)),!k.connected&&!n&&R("0.00")},[k.publicKey,k.connected,k.connecting,n,o,i,F]),A.useEffect(()=>{H==="success"&&_&&(z(!0),w==null||w(_))},[H,_,w]),A.useEffect(()=>{E&&(y==null||y(E))},[E,y]);const Z=async()=>{m==null||m(),await v(r,a)};if(I)return t.jsx(t.Fragment,{children:M});const D=E&&(e==="dark"||e==="solana-dark"||e==="light"||e==="solana-light"||e==="seeker"||e==="seeker-2"),$=(()=>{switch(e){case"solana-dark":return{container:"",card:"!bg-[#171719] border-0 text-white rounded-xl",icon:"bg-slate-600",title:"",button:"bg-solana-gradient hover:opacity-90 text-white rounded-full",paymentDetails:"bg-[#0000001F] border-slate-600 text-white rounded-lg",walletSection:"bg-[#0000001F] border-slate-600 text-white rounded-lg",notice:"bg-amber-900/50 border-amber-700 text-white rounded-lg",securityMessage:"text-slate-400",helperText:"text-white",helperLink:void 0};case"seeker":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",icon:"bg-gradient-to-r from-emerald-500 to-teal-500",title:"text-white",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",notice:"bg-cyan-50 border-cyan-200 text-cyan-800 rounded-lg",securityMessage:"text-white",helperText:"text-white"};case"seeker-2":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",icon:"bg-gradient-to-r from-emerald-500 to-teal-500",title:"text-white",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",notice:"bg-cyan-50 border-cyan-200 text-cyan-800 rounded-lg",securityMessage:"text-white",helperText:"text-white"};case"terminal":return{container:"bg-gradient-to-br from-gray-900 via-black to-gray-800",card:"bg-black/90 backdrop-blur-sm border-green-400/30 text-green-400 rounded-xl",icon:"bg-green-400 text-black",title:"text-green-400 font-mono",button:"bg-green-400 text-black hover:bg-green-300 font-mono rounded-full",paymentDetails:"bg-gray-900/50 border-green-400/20 text-green-300 rounded-lg",notice:"bg-yellow-900/50 border-yellow-400/30 text-yellow-300 rounded-lg"};case"solana-light":return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",icon:"bg-gradient-to-r from-blue-600 to-purple-600",title:"text-slate-900",button:"bg-solana-gradient hover:opacity-90 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",notice:"text-slate-600",walletSection:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600",helperLink:"text-purple-600 underline"};case"dark":return{container:"",card:"!bg-[#171719] border-slate-700 text-white rounded-xl",icon:"bg-slate-600",title:"",button:"bg-slate-600 hover:bg-slate-700 rounded-full",paymentDetails:"bg-[#0000001F] border-slate-600 text-white rounded-lg",walletSection:"bg-[#0000001F] border-slate-600 text-white rounded-lg",notice:"bg-amber-900/50 border-amber-700 text-white rounded-lg",securityMessage:"text-slate-400",helperText:"text-white",helperLink:void 0};case"light":return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",icon:"bg-gradient-to-r from-blue-600 to-purple-600",title:"text-slate-900",button:"bg-black hover:bg-gray-800 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",notice:"text-slate-600",walletSection:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600",helperLink:"text-purple-600 underline"};default:return{container:"bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",card:"bg-white/95 backdrop-blur-sm rounded-xl",icon:"bg-slate-600",title:"text-slate-900",button:"bg-slate-600 hover:bg-slate-700 text-white rounded-full",paymentDetails:"bg-slate-50 border-slate-200 rounded-lg",notice:"bg-amber-50 border-amber-200 text-amber-800 rounded-lg"}}})();if(!X){const G=(()=>{switch(e){case"solana-dark":return{container:"",card:"!bg-[#171719] border-0 text-white rounded-xl",button:"bg-solana-gradient hover:opacity-90 text-white rounded-full",paymentDetails:"bg-[#0000001F] border-slate-600 text-white rounded-lg",securityMessage:"text-slate-400",helperText:"text-white"};case"seeker":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",securityMessage:"text-white",helperText:"text-white"};case"seeker-2":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",securityMessage:"text-white",helperText:"text-white"};case"terminal":return{container:"bg-gradient-to-br from-gray-900 via-black to-gray-800",card:"bg-black/90 backdrop-blur-sm border-green-400/30 text-green-400 rounded-xl",button:"bg-green-400 text-black hover:bg-green-300 font-mono rounded-full",paymentDetails:"bg-gray-900/50 border-green-400/20 text-green-300 rounded-lg",securityMessage:"text-green-300",helperText:"text-green-300"};case"solana-light":return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",button:"bg-solana-gradient hover:opacity-90 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600"};case"dark":return{container:"",card:"!bg-[#171719] border-slate-700 text-white rounded-xl",button:"bg-slate-600 hover:bg-slate-700 rounded-full",paymentDetails:"bg-[#0000001F] border-slate-600 text-white rounded-lg",securityMessage:"text-slate-400",helperText:"text-white"};case"light":return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",button:"bg-black hover:bg-gray-800 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600"};default:return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",button:"bg-solana-gradient hover:opacity-90 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600"}}})();return t.jsx("div",{className:d("flex items-center justify-center min-h-screen p-4",G.container,b==null?void 0:b.container),style:e==="dark"?{background:"linear-gradient(to bottom left, #db2777 0%, #9333ea 50%, #1e40af 100%)",...s==null?void 0:s.container}:e==="light"?{background:"linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(236, 72, 153, 0.4) 33%, rgba(147, 51, 234, 0.4) 66%, rgba(34, 211, 238, 0.4) 100%)",...s==null?void 0:s.container}:e==="seeker"?{background:"radial-gradient(25% 200% at 50% 50%, #6CCEC6 0%, rgba(19, 77, 128, 0) 30%), radial-gradient(20% 20% at 50% 100%, rgba(66, 202, 189, 0.8) 0%, rgba(33, 100, 94, 0.8) 0%), linear-gradient(180deg, #001214 5%, #0D2734 100%)",...s==null?void 0:s.container}:e==="seeker-2"?{background:"radial-gradient(25% 200% at 50% 50%, #6CCEC6 0%, rgba(19, 77, 128, 0) 30%), radial-gradient(20% 20% at 50% 100%, rgba(66, 202, 189, 0.8) 0%, rgba(33, 100, 94, 0.8) 0%), linear-gradient(180deg, #001214 5%, #0D2734 100%)",...s==null?void 0:s.container}:s==null?void 0:s.container,children:t.jsxs(ne,{className:d("w-full max-w-lg shadow-2xl border-0",G.card,b==null?void 0:b.card),style:e==="seeker"?{backgroundColor:"#171719",...s==null?void 0:s.card}:e==="seeker-2"?{backgroundColor:"rgba(29, 35, 35, 1)",backdropFilter:"blur(12px)",...s==null?void 0:s.card}:s==null?void 0:s.card,children:[t.jsxs(ie,{className:"pb-6",children:[t.jsxs("div",{className:"flex items-center space-x-4 mb-6",children:[t.jsx("div",{className:"w-auto h-auto rounded-full p-[2px] flex items-center justify-center overflow-hidden",children:t.jsx("div",{className:"w-full h-full rounded-full flex items-center justify-center",children:t.jsx("img",{src:x,alt:"Logo",className:"w-12 h-auto"})})}),t.jsxs("div",{children:[t.jsx(le,{className:d("text-l fw-bold pb-1",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-400 font-mono":"text-slate-900",b==null?void 0:b.text),children:"Premium Content XYZ"}),t.jsx(de,{className:d("text-sm font-light",e==="terminal"?"text-green-300":e==="seeker"||e==="seeker-2"||e==="dark"||e==="solana-dark"?"text-white":"text-[#71717A]",b==null?void 0:b.text),children:"content.xyz"})]})]}),t.jsx("div",{className:d("border-b mb-6",e==="dark"||e==="solana-dark"?"border-slate-600":e==="seeker"||e==="seeker-2"?"":"border-slate-200"),style:e==="seeker"||e==="seeker-2"?{borderBottom:"1px solid #FFFFFF1F"}:void 0}),t.jsxs("div",{className:"text-center",children:[t.jsx("h2",{className:d("text-2xl font-normal mb-2",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-400 font-mono":"text-slate-900"),children:"Payment Required"}),t.jsxs("p",{className:d("text-sm font-light",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-300":"text-slate-600"),children:["Access to protected content. To access this content, please pay $",r.toFixed(2)," USDC"]})]})]}),t.jsxs(ae,{className:"space-y-6",children:[t.jsxs("div",{className:d("p-6",G.paymentDetails),style:e==="seeker"||e==="seeker-2"?{backgroundColor:"rgba(0, 0, 0, 0.12)"}:e==="dark"||e==="solana-dark"?{boxShadow:"0px 0px 16px 4px #000000 inset"}:void 0,children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-300":"text-slate-900"),children:"Amount"}),t.jsxs("div",{className:d("text-xl font-bold",e==="light"||e==="solana-light"?"text-purple-600":e==="seeker"||e==="seeker-2"?"":e==="terminal"?"text-green-400":"text-[#21ECAB]"),style:e==="seeker"||e==="seeker-2"?{color:"#95D2E6"}:void 0,children:["$",r.toFixed(2)]})]}),t.jsx("div",{className:d("border-t mb-4",e==="dark"||e==="solana-dark"?"border-slate-600":e==="seeker"||e==="seeker-2"?"":e==="terminal"?"border-green-400/20":"border-slate-200"),style:e==="seeker"||e==="seeker-2"?{borderTop:"1px solid #FFFFFF1F"}:void 0}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-300":"text-slate-900"),children:"Currency"}),t.jsx("div",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-300":"text-slate-900"),children:"USDC"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-300":"text-slate-900"),children:"Network"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-300":"text-slate-900"),children:o==="solana"?"Mainnet":"Devnet"})]})]})]})]}),t.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[t.jsxs("svg",{className:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",children:[t.jsx("path",{d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z"}),t.jsx("path",{d:"M9 12l2 2 4-4",strokeLinecap:"round",strokeLinejoin:"round"})]}),t.jsx("span",{className:d("text-sm",G.securityMessage),children:"Secure payment powered by Solana"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{ref:L,className:"absolute opacity-0 pointer-events-none -z-10",children:t.jsx(Pe.WalletMultiButton,{})}),t.jsx(te,{amount:r,description:a,customText:"Connect Wallet",onClick:()=>{var ke;const q=(ke=L.current)==null?void 0:ke.querySelector("button");q==null||q.click()},className:d("w-full h-12",G.button),style:e==="dark"?{backgroundColor:"#FFFFFF1F",boxShadow:"0 1px 0 0 rgba(255, 255, 255, 0.3) inset"}:e==="seeker"||e==="seeker-2"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent"}:void 0})]}),t.jsx("div",{className:"text-center",children:t.jsxs("p",{className:d("text-sm",G.helperText),children:["Don't have USDC?"," ",t.jsxs("a",{href:"#",className:"font-medium text-[#4ADE80] underline",children:["Get it here",t.jsx("svg",{className:"inline w-3 h-3 ml-1 text-[#4ADE80]",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"})})]})]})})]})]})})}return t.jsx("div",{className:d("flex items-center justify-center min-h-screen p-4",$.container,b==null?void 0:b.container),style:e==="dark"?{background:"radial-gradient(circle at center, #ec4899 0%, #3b82f6 50%, #9333ea 100%)",...s==null?void 0:s.container}:e==="light"?{background:"linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(236, 72, 153, 0.4) 33%, rgba(147, 51, 234, 0.4) 66%, rgba(34, 211, 238, 0.4) 100%)",...s==null?void 0:s.container}:e==="seeker"?{background:"radial-gradient(25% 200% at 50% 50%, #6CCEC6 0%, rgba(19, 77, 128, 0) 30%), radial-gradient(20% 20% at 50% 100%, rgba(66, 202, 189, 0.8) 0%, rgba(33, 100, 94, 0.8) 0%), linear-gradient(180deg, #001214 5%, #0D2734 100%)",...s==null?void 0:s.container}:e==="seeker-2"?{background:"radial-gradient(25% 200% at 50% 50%, #6CCEC6 0%, rgba(19, 77, 128, 0) 30%), radial-gradient(20% 20% at 50% 100%, rgba(66, 202, 189, 0.8) 0%, rgba(33, 100, 94, 0.8) 0%), linear-gradient(180deg, #001214 5%, #0D2734 100%)",...s==null?void 0:s.container}:s==null?void 0:s.container,children:t.jsxs(ne,{className:d("w-full max-w-lg shadow-2xl border-0",$.card,b==null?void 0:b.card),style:e==="seeker"?{backgroundColor:"#171719",...s==null?void 0:s.card}:e==="seeker-2"?{backgroundColor:"rgba(29, 35, 35, 1)",backdropFilter:"blur(12px)",...s==null?void 0:s.card}:s==null?void 0:s.card,children:[t.jsxs(ie,{className:"pb-6",children:[t.jsxs("div",{className:"flex items-center space-x-4 mb-6",children:[t.jsx("div",{className:"w-auto h-auto rounded-full p-[2px] flex items-center justify-center overflow-hidden",children:t.jsx("div",{className:"w-full h-full rounded-full flex items-center justify-center",children:t.jsx("img",{src:x,alt:"Logo",className:"w-12 h-auto"})})}),t.jsxs("div",{children:[t.jsx(le,{className:d("text-l fw-bold pb-1",$.title,b==null?void 0:b.text),style:s==null?void 0:s.text,children:"Premium Content XYZ"}),t.jsx(de,{className:d("text-sm font-light",e==="terminal"?"text-green-300":e==="seeker"||e==="seeker-2"?"text-white":"text-[#71717A]"),children:"content.xyz"})]})]}),t.jsx("div",{className:d("border-b mb-6",e==="dark"||e==="solana-dark"?"border-slate-600":e==="seeker"||e==="seeker-2"?"":"border-slate-200"),style:e==="seeker"?{borderBottom:"1px solid #FFFFFF1F"}:e==="seeker-2"?{borderBottom:"1px solid #FFFFFF1F"}:void 0}),!D&&t.jsxs("div",{className:"text-center",children:[t.jsx("h2",{className:d("text-2xl font-normal mb-2",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Payment Required"}),t.jsx("p",{className:d("text-sm font-light",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-600"),children:"Access to protected content on base-sepolia. To access this content, please pay $0.01 Base Sepolia USDC"})]})]}),t.jsx(ae,{className:"space-y-6",children:D?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex justify-center mb-4",children:t.jsx("div",{className:"w-16 h-16 rounded-full bg-red-500 flex items-center justify-center",children:t.jsx("svg",{className:"w-8 h-8 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"3",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})}),t.jsx("div",{className:"text-center mb-2",children:t.jsx("h3",{className:d("text-2xl font-semibold",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Payment Failed"})}),t.jsx("p",{className:d("text-center text-sm mb-6",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-gray-400":"text-slate-600"),children:(E==null?void 0:E.message)||"It looks like your wallet doesn't have enough funds or the transaction was declined. Please review the details and try again."}),t.jsx("div",{className:d("rounded-lg p-6",e==="dark"||e==="solana-dark"?"bg-[#0000001F] border border-slate-600":e==="seeker"||e==="seeker-2"?"bg-[rgba(0,0,0,0.12)] border border-white/10":"bg-slate-50 border border-slate-200"),children:t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Amount Paid"}),t.jsxs("span",{className:d("text-sm font-semibold",e==="light"||e==="solana-light"?"text-purple-600":"text-green-500"),children:["$",r.toFixed(2)]})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Wallet"}),t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:(he=g==null?void 0:g.publicKey)!=null&&he.toString()?`${g.publicKey.toString().slice(0,6)}...${g.publicKey.toString().slice(-4)}`:g!=null&&g.address?`${g.address.slice(0,6)}...${g.address.slice(-4)}`:"Not connected"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Available Balance"}),t.jsxs("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:["$",T]})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Currency"}),t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"USDC"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Network"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:B})]})]})]})}),t.jsxs("div",{className:d("rounded-lg p-4 flex items-start space-x-3",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"bg-orange-900/50 border border-orange-700":"bg-orange-50 border border-orange-200"),children:[t.jsx("div",{className:"flex-shrink-0",children:t.jsx("div",{className:"w-6 h-6 rounded-full bg-orange-500 flex items-center justify-center",children:t.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})})}),t.jsx("p",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-orange-800"),children:"Make sure your Solana wallet has enough USDC to cover the amount before retrying the transaction."})]}),t.jsx(te,{amount:r,description:a,onClick:()=>{se(),Z()},loading:V,disabled:V||!(g!=null&&g.publicKey),className:d("w-full h-12",e==="dark"||e==="solana-dark"?e==="dark"?"bg-[#FFFFFF1F] rounded-full":"bg-solana-gradient rounded-full":e==="light"?"bg-black hover:bg-gray-800 text-white font-light rounded-full":e==="solana-light"?"bg-solana-gradient hover:opacity-90 text-white font-light rounded-full":e==="seeker"||e==="seeker-2"?"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full":"bg-solana-gradient rounded-full",b==null?void 0:b.button),style:e==="dark"?{backgroundColor:"#FFFFFF1F",boxShadow:"0 1px 0 0 rgba(255, 255, 255, 0.3) inset",...s==null?void 0:s.button}:e==="light"||e==="solana-light"?s==null?void 0:s.button:e==="seeker"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent",...s==null?void 0:s.button}:e==="seeker-2"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent",...s==null?void 0:s.button}:s==null?void 0:s.button,customText:"Try Again"}),t.jsx("div",{className:"text-center",children:t.jsxs("p",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:[t.jsxs("span",{className:d(e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-gray-400":"text-slate-600"),children:["Don't have USDC?"," "]}),t.jsxs("a",{href:"https://www.coinbase.com/how-to-buy/usdc",target:"_blank",rel:"noopener noreferrer",className:d("font-medium hover:opacity-80",e==="light"||e==="solana-light"?"text-purple-600":"text-green-400 hover:text-green-300"),children:["Get it here",t.jsx("svg",{className:d("inline w-3 h-3 ml-1",e==="light"||e==="solana-light"?"text-purple-600":"text-green-400"),fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"})})]})]})})]}):t.jsxs(t.Fragment,{children:[t.jsx(fe,{wallet:g,onDisconnect:Y,theme:e,className:d("mb-4",(e==="dark"||e==="solana-dark")&&"bg-[#0000001F] border-slate-600 text-white"),style:e==="dark"||e==="solana-dark"?{boxShadow:"0px 0px 16px 4px #000000 inset"}:void 0}),f&&(e==="seeker"||e==="seeker-2"?t.jsxs("div",{className:d("p-6",$.paymentDetails),style:{backgroundColor:"rgba(0, 0, 0, 0.12)"},children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("span",{className:"text-sm text-white",children:"Amount"}),t.jsx("div",{className:"text-xl font-bold",style:{color:"#95D2E6"},children:r.toFixed(2)})]}),t.jsx("div",{className:"border-t mb-4",style:{borderTop:"1px solid #FFFFFF1F"}}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm text-white",children:"Wallet"}),t.jsx("div",{className:"text-sm text-white",children:(we=g==null?void 0:g.publicKey)!=null&&we.toString()?`${g.publicKey.toString().slice(0,6)}...${g.publicKey.toString().slice(-4)}`:g!=null&&g.address?`${g.address.slice(0,6)}...${g.address.slice(-4)}`:"Not connected"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm text-white",children:"Available Balance"}),t.jsxs("div",{className:"text-sm text-white",children:["$",T]})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm text-white",children:"Currency"}),t.jsx("div",{className:"text-sm text-white",children:"USDC"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm text-white",children:"Network"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"#95D2E6"}}),t.jsx("span",{className:"text-sm text-white",children:B})]})]})]})]}):t.jsxs("div",{className:d("p-6",$.paymentDetails),style:e==="dark"||e==="solana-dark"?{boxShadow:"0px 0px 16px 4px #000000 inset"}:void 0,children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-black"),children:"Amount"}),t.jsxs("div",{className:d("text-xl font-bold",e==="light"||e==="solana-light"?"text-purple-600":"text-[#21ECAB]"),children:["$",r.toFixed(2)]})]}),t.jsx("div",{className:d("border-t mb-4",e==="dark"||e==="solana-dark"?"border-slate-600":"border-slate-200")}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-black"),children:"Wallet"}),t.jsx("div",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-slate-900"),children:(me=g==null?void 0:g.publicKey)!=null&&me.toString()?`${g.publicKey.toString().slice(0,6)}...${g.publicKey.toString().slice(-4)}`:g!=null&&g.address?`${g.address.slice(0,6)}...${g.address.slice(-4)}`:"Not connected"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-black"),children:"Available Balance"}),t.jsxs("div",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-slate-900"),children:["$",T]})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-black"),children:"Currency"}),t.jsx("div",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-slate-900"),children:"USDC"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-black"),children:"Network"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:d("w-2 h-2 rounded-full","bg-green-500")}),t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-slate-900"),children:B})]})]})]})]})),t.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[t.jsxs("svg",{className:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",children:[t.jsx("path",{d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z"}),t.jsx("path",{d:"M9 12l2 2 4-4",strokeLinecap:"round",strokeLinejoin:"round"})]}),t.jsx("span",{className:d("text-sm",$.securityMessage),style:e==="seeker"?{color:"#FFFFFF66"}:e==="seeker-2"?{color:"#FFFFFF66"}:void 0,children:"Secure payment powered by Solana"})]}),t.jsx(te,{amount:r,description:a,onClick:Z,loading:V,disabled:V||!(g!=null&&g.publicKey),className:d("w-full h-12",e==="dark"||e==="solana-dark"?e==="dark"?"bg-[#FFFFFF1F] rounded-full":"bg-solana-gradient rounded-full":$.button,b==null?void 0:b.button),style:e==="dark"?{backgroundColor:"#FFFFFF1F",boxShadow:"0 1px 0 0 rgba(255, 255, 255, 0.3) inset",...s==null?void 0:s.button}:e==="seeker"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent",...s==null?void 0:s.button}:e==="seeker-2"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent",...s==null?void 0:s.button}:s==null?void 0:s.button}),E&&t.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:t.jsxs("p",{className:"text-sm text-red-800 text-center",children:[t.jsx("span",{className:"font-semibold",children:"Payment Error:"})," ",E.message]})}),t.jsx("div",{className:"text-center",children:t.jsxs("p",{className:d("text-sm",$.helperText),children:[t.jsxs("span",{style:e==="seeker"?{color:"#FFFFFF66"}:e==="seeker-2"?{color:"#FFFFFF66"}:void 0,children:["Don't have USDC?"," "]}),t.jsxs("a",{href:"#",className:d("font-medium",e==="seeker"||e==="seeker-2"?"text-[#4ADE80]":$.helperLink||"text-[#4ADE80]"),style:e==="seeker"?{color:"#4ADE80"}:e==="seeker-2"?{color:"#4ADE80"}:void 0,children:["Get it here",t.jsx("svg",{className:d("inline w-3 h-3 ml-1",e==="light"?"text-purple-600":"text-[#4ADE80]"),fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"})})]})]})})]})})]})})},Ue=({autoSetupProviders:r=!0,providerNetwork:a,providerEndpoint:n,...o})=>{const i=a??(o.network==="solana"?ye.WalletAdapterNetwork.Mainnet:ye.WalletAdapterNetwork.Devnet),l=A.useMemo(()=>n||o.rpcUrl||P.clusterApiUrl(i),[n,o.rpcUrl,i]),c=A.useMemo(()=>[new je.PhantomWalletAdapter,new je.SolflareWalletAdapter],[]);return r?t.jsx(ue.ConnectionProvider,{endpoint:l,children:t.jsx(ue.WalletProvider,{wallets:c,autoConnect:!0,children:t.jsx(Pe.WalletModalProvider,{children:t.jsx(Te,{...o})})})}):t.jsx(Te,{...o})};Ue.displayName="X402Paywall";const Ke=({status:r,message:a,progress:n,className:o,style:i})=>{const c=(()=>{switch(r){case"idle":return{label:"Ready",color:"bg-gray-100 text-gray-800",icon:null};case"connecting":return{label:"Connecting",color:"bg-blue-100 text-blue-800",icon:t.jsx(oe,{size:"sm",variant:"default"})};case"pending":return{label:"Processing",color:"bg-yellow-100 text-yellow-800",icon:t.jsx(oe,{size:"sm",variant:"solana"})};case"success":return{label:"Paid",color:"bg-green-100 text-green-800",icon:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})};case"error":return{label:"Failed",color:"bg-red-100 text-red-800",icon:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})};default:return{label:"Unknown",color:"bg-gray-100 text-gray-800",icon:null}}})();return t.jsxs("div",{className:d("flex flex-col gap-2",o),style:i,children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs(pe,{className:d("flex items-center gap-1.5",c.color),children:[c.icon,t.jsx("span",{children:c.label})]}),a&&t.jsx("span",{className:"text-sm text-muted-foreground",children:a})]}),n!==void 0&&n>0&&t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 overflow-hidden",children:t.jsx("div",{className:"bg-solana-gradient h-full transition-all duration-300",style:{width:`${n}%`}})})]})};Ke.displayName="PaymentStatus";exports.Badge=pe;exports.Button=ge;exports.Card=ne;exports.CardContent=ae;exports.CardDescription=de;exports.CardHeader=ie;exports.CardTitle=le;exports.PaymentButton=te;exports.PaymentStatus=Ke;exports.Spinner=oe;exports.WalletSection=fe;exports.X402Paywall=Ue;exports.cn=d;exports.useX402Payment=Ge;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),T=require("react"),Ce=require("@solana/wallet-adapter-react"),We=require("@solana/wallet-adapter-react-ui"),Se=require("@solana/wallet-adapter-base"),Pe=require("@solana/wallet-adapter-wallets"),W=require("@solana/web3.js"),q=require("@solana/spl-token");function it(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(a,o,n.get?n:{enumerable:!0,get:()=>t[o]})}}return a.default=t,Object.freeze(a)}const N=it(T);function ct(t){return t==="solana"?"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v":"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"}function dt(t){return t==="solana"?`https://mainnet.helius-rpc.com/?api-key=${process.env.VITE_HELIUS_API_KEY}`:"https://api.devnet.solana.com"}async function mt(t,a,o){try{const n=o||dt(a),l=new W.Connection(n,"confirmed"),s=new W.PublicKey(t),i=new W.PublicKey(ct(a)),m=await q.getAssociatedTokenAddress(i,s),u=await q.getAccount(l,m);return(Number(u.amount)/1e6).toFixed(2)}catch(n){return console.error("Error fetching USDC balance:",n),"0.00"}}function $e(t){var a,o,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(a=0;a<l;a++)t[a]&&(o=$e(t[a]))&&(n&&(n+=" "),n+=o)}else for(o in t)t[o]&&(n&&(n+=" "),n+=o);return n}function Ge(){for(var t,a,o=0,n="",l=arguments.length;o<l;o++)(t=arguments[o])&&(a=$e(t))&&(n&&(n+=" "),n+=a);return n}const ut=(t,a)=>{const o=new Array(t.length+a.length);for(let n=0;n<t.length;n++)o[n]=t[n];for(let n=0;n<a.length;n++)o[t.length+n]=a[n];return o},gt=(t,a)=>({classGroupId:t,validator:a}),Ke=(t=new Map,a=null,o)=>({nextPart:t,validators:a,classGroupId:o}),xe="-",Me=[],bt="arbitrary..",ht=t=>{const a=pt(t),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return xt(i);const m=i.split(xe),u=m[0]===""&&m.length>1?1:0;return Ve(m,u,a)},getConflictingClassGroupIds:(i,m)=>{if(m){const u=n[i],h=o[i];return u?h?ut(h,u):u:h||Me}return o[i]||Me}}},Ve=(t,a,o)=>{if(t.length-a===0)return o.classGroupId;const l=t[a],s=o.nextPart.get(l);if(s){const h=Ve(t,a+1,s);if(h)return h}const i=o.validators;if(i===null)return;const m=a===0?t.join(xe):t.slice(a).join(xe),u=i.length;for(let h=0;h<u;h++){const f=i[h];if(f.validator(m))return f.classGroupId}},xt=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=t.slice(1,-1),o=a.indexOf(":"),n=a.slice(0,o);return n?bt+n:void 0})(),pt=t=>{const{theme:a,classGroups:o}=t;return ft(o,a)},ft=(t,a)=>{const o=Ke();for(const n in t){const l=t[n];Ee(l,o,n,a)}return o},Ee=(t,a,o,n)=>{const l=t.length;for(let s=0;s<l;s++){const i=t[s];kt(i,a,o,n)}},kt=(t,a,o,n)=>{if(typeof t=="string"){wt(t,a,o);return}if(typeof t=="function"){yt(t,a,o,n);return}vt(t,a,o,n)},wt=(t,a,o)=>{const n=t===""?a:qe(a,t);n.classGroupId=o},yt=(t,a,o,n)=>{if(Ft(t)){Ee(t(n),a,o,n);return}a.validators===null&&(a.validators=[]),a.validators.push(gt(o,t))},vt=(t,a,o,n)=>{const l=Object.entries(t),s=l.length;for(let i=0;i<s;i++){const[m,u]=l[i];Ee(u,qe(a,m),o,n)}},qe=(t,a)=>{let o=t;const n=a.split(xe),l=n.length;for(let s=0;s<l;s++){const i=n[s];let m=o.nextPart.get(i);m||(m=Ke(),o.nextPart.set(i,m)),o=m}return o},Ft=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,jt=t=>{if(t<1)return{get:()=>{},set:()=>{}};let a=0,o=Object.create(null),n=Object.create(null);const l=(s,i)=>{o[s]=i,a++,a>t&&(a=0,n=o,o=Object.create(null))};return{get(s){let i=o[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return l(s,i),i},set(s,i){s in o?o[s]=i:l(s,i)}}},Ne="!",Be=":",Ct=[],Re=(t,a,o,n,l)=>({modifiers:t,hasImportantModifier:a,baseClassName:o,maybePostfixModifierPosition:n,isExternal:l}),Nt=t=>{const{prefix:a,experimentalParseClassName:o}=t;let n=l=>{const s=[];let i=0,m=0,u=0,h;const f=l.length;for(let j=0;j<f;j++){const C=l[j];if(i===0&&m===0){if(C===Be){s.push(l.slice(u,j)),u=j+1;continue}if(C==="/"){h=j;continue}}C==="["?i++:C==="]"?i--:C==="("?m++:C===")"&&m--}const k=s.length===0?l:l.slice(u);let d=k,E=!1;k.endsWith(Ne)?(d=k.slice(0,-1),E=!0):k.startsWith(Ne)&&(d=k.slice(1),E=!0);const D=h&&h>u?h-u:void 0;return Re(s,E,d,D)};if(a){const l=a+Be,s=n;n=i=>i.startsWith(l)?s(i.slice(l.length)):Re(Ct,!1,i,void 0,!0)}if(o){const l=n;n=s=>o({className:s,parseClassName:l})}return n},Et=t=>{const a=new Map;return t.orderSensitiveModifiers.forEach((o,n)=>{a.set(o,1e6+n)}),o=>{const n=[];let l=[];for(let s=0;s<o.length;s++){const i=o[s],m=i[0]==="[",u=a.has(i);m||u?(l.length>0&&(l.sort(),n.push(...l),l=[]),n.push(i)):l.push(i)}return l.length>0&&(l.sort(),n.push(...l)),n}},At=t=>({cache:jt(t.cacheSize),parseClassName:Nt(t),sortModifiers:Et(t),...ht(t)}),Tt=/\s+/,Dt=(t,a)=>{const{parseClassName:o,getClassGroupId:n,getConflictingClassGroupIds:l,sortModifiers:s}=a,i=[],m=t.trim().split(Tt);let u="";for(let h=m.length-1;h>=0;h-=1){const f=m[h],{isExternal:k,modifiers:d,hasImportantModifier:E,baseClassName:D,maybePostfixModifierPosition:j}=o(f);if(k){u=f+(u.length>0?" "+u:u);continue}let C=!!j,P=n(C?D.substring(0,j):D);if(!P){if(!C){u=f+(u.length>0?" "+u:u);continue}if(P=n(D),!P){u=f+(u.length>0?" "+u:u);continue}C=!1}const R=d.length===0?"":d.length===1?d[0]:s(d).join(":"),F=E?R+Ne:R,y=F+P;if(i.indexOf(y)>-1)continue;i.push(y);const I=l(P,C);for(let z=0;z<I.length;++z){const U=I[z];i.push(F+U)}u=f+(u.length>0?" "+u:u)}return u},St=(...t)=>{let a=0,o,n,l="";for(;a<t.length;)(o=t[a++])&&(n=Xe(o))&&(l&&(l+=" "),l+=n);return l},Xe=t=>{if(typeof t=="string")return t;let a,o="";for(let n=0;n<t.length;n++)t[n]&&(a=Xe(t[n]))&&(o&&(o+=" "),o+=a);return o},Pt=(t,...a)=>{let o,n,l,s;const i=u=>{const h=a.reduce((f,k)=>k(f),t());return o=At(h),n=o.cache.get,l=o.cache.set,s=m,m(u)},m=u=>{const h=n(u);if(h)return h;const f=Dt(u,o);return l(u,f),f};return s=i,(...u)=>s(St(...u))},Mt=[],S=t=>{const a=o=>o[t]||Mt;return a.isThemeGetter=!0,a},Ye=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,He=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Bt=/^\d+\/\d+$/,Rt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,It=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Lt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_t=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Z=t=>Bt.test(t),w=t=>!!t&&!Number.isNaN(Number(t)),Y=t=>!!t&&Number.isInteger(Number(t)),Fe=t=>t.endsWith("%")&&w(t.slice(0,-1)),V=t=>Rt.test(t),Ot=()=>!0,Ut=t=>It.test(t)&&!zt.test(t),Je=()=>!1,Wt=t=>Lt.test(t),$t=t=>_t.test(t),Gt=t=>!g(t)&&!b(t),Kt=t=>Q(t,et,Je),g=t=>Ye.test(t),H=t=>Q(t,tt,Ut),je=t=>Q(t,Ht,w),Ie=t=>Q(t,Ze,Je),Vt=t=>Q(t,Qe,$t),be=t=>Q(t,rt,Wt),b=t=>He.test(t),re=t=>ee(t,tt),qt=t=>ee(t,Jt),ze=t=>ee(t,Ze),Xt=t=>ee(t,et),Yt=t=>ee(t,Qe),he=t=>ee(t,rt,!0),Q=(t,a,o)=>{const n=Ye.exec(t);return n?n[1]?a(n[1]):o(n[2]):!1},ee=(t,a,o=!1)=>{const n=He.exec(t);return n?n[1]?a(n[1]):o:!1},Ze=t=>t==="position"||t==="percentage",Qe=t=>t==="image"||t==="url",et=t=>t==="length"||t==="size"||t==="bg-size",tt=t=>t==="length",Ht=t=>t==="number",Jt=t=>t==="family-name",rt=t=>t==="shadow",Zt=()=>{const t=S("color"),a=S("font"),o=S("text"),n=S("font-weight"),l=S("tracking"),s=S("leading"),i=S("breakpoint"),m=S("container"),u=S("spacing"),h=S("radius"),f=S("shadow"),k=S("inset-shadow"),d=S("text-shadow"),E=S("drop-shadow"),D=S("blur"),j=S("perspective"),C=S("aspect"),P=S("ease"),R=S("animate"),F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...y(),b,g],z=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],p=()=>[b,g,u],e=()=>[Z,"full","auto",...p()],L=()=>[Y,"none","subgrid",b,g],te=()=>["auto",{span:["full",Y,b,g]},Y,b,g],G=()=>[Y,"auto",b,g],le=()=>["auto","min","max","fr",b,g],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...p()],$=()=>[Z,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...p()],x=()=>[t,b,g],ie=()=>[...y(),ze,Ie,{position:[b,g]}],ce=()=>["no-repeat",{repeat:["","x","y","space","round"]}],de=()=>["auto","cover","contain",Xt,Kt,{size:[b,g]}],J=()=>[Fe,re,H],M=()=>["","none","full",h,b,g],_=()=>["",w,re,H],O=()=>["solid","dashed","dotted","double"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],v=()=>[w,Fe,ze,Ie],ye=()=>["","none",D,b,g],me=()=>["none",w,b,g],ue=()=>["none",w,b,g],ve=()=>[w,b,g],ge=()=>[Z,"full",...p()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[V],breakpoint:[V],color:[Ot],container:[V],"drop-shadow":[V],ease:["in","out","in-out"],font:[Gt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[V],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[V],shadow:[V],spacing:["px",w],text:[V],"text-shadow":[V],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Z,g,b,C]}],container:["container"],columns:[{columns:[w,g,b,m]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:e()}],"inset-x":[{"inset-x":e()}],"inset-y":[{"inset-y":e()}],start:[{start:e()}],end:[{end:e()}],top:[{top:e()}],right:[{right:e()}],bottom:[{bottom:e()}],left:[{left:e()}],visibility:["visible","invisible","collapse"],z:[{z:[Y,"auto",b,g]}],basis:[{basis:[Z,"full","auto",m,...p()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[w,Z,"auto","initial","none",g]}],grow:[{grow:["",w,b,g]}],shrink:[{shrink:["",w,b,g]}],order:[{order:[Y,"first","last","none",b,g]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:p()}],"gap-x":[{"gap-x":p()}],"gap-y":[{"gap-y":p()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:p()}],px:[{px:p()}],py:[{py:p()}],ps:[{ps:p()}],pe:[{pe:p()}],pt:[{pt:p()}],pr:[{pr:p()}],pb:[{pb:p()}],pl:[{pl:p()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":p()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":p()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[m,"screen",...$()]}],"min-w":[{"min-w":[m,"screen","none",...$()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[i]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",o,re,H]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,b,je]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fe,g]}],"font-family":[{font:[qt,g,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,b,g]}],"line-clamp":[{"line-clamp":[w,"none",b,je]}],leading:[{leading:[s,...p()]}],"list-image":[{"list-image":["none",b,g]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",b,g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:x()}],"text-color":[{text:x()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:[w,"from-font","auto",b,H]}],"text-decoration-color":[{decoration:x()}],"underline-offset":[{"underline-offset":[w,"auto",b,g]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:p()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",b,g]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",b,g]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:de()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Y,b,g],radial:["",b,g],conic:[Y,b,g]},Yt,Vt]}],"bg-color":[{bg:x()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:x()}],"gradient-via":[{via:x()}],"gradient-to":[{to:x()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:_()}],"border-w-x":[{"border-x":_()}],"border-w-y":[{"border-y":_()}],"border-w-s":[{"border-s":_()}],"border-w-e":[{"border-e":_()}],"border-w-t":[{"border-t":_()}],"border-w-r":[{"border-r":_()}],"border-w-b":[{"border-b":_()}],"border-w-l":[{"border-l":_()}],"divide-x":[{"divide-x":_()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":_()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"hidden","none"]}],"border-color":[{border:x()}],"border-color-x":[{"border-x":x()}],"border-color-y":[{"border-y":x()}],"border-color-s":[{"border-s":x()}],"border-color-e":[{"border-e":x()}],"border-color-t":[{"border-t":x()}],"border-color-r":[{"border-r":x()}],"border-color-b":[{"border-b":x()}],"border-color-l":[{"border-l":x()}],"divide-color":[{divide:x()}],"outline-style":[{outline:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[w,b,g]}],"outline-w":[{outline:["",w,re,H]}],"outline-color":[{outline:x()}],shadow:[{shadow:["","none",f,he,be]}],"shadow-color":[{shadow:x()}],"inset-shadow":[{"inset-shadow":["none",k,he,be]}],"inset-shadow-color":[{"inset-shadow":x()}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:x()}],"ring-offset-w":[{"ring-offset":[w,H]}],"ring-offset-color":[{"ring-offset":x()}],"inset-ring-w":[{"inset-ring":_()}],"inset-ring-color":[{"inset-ring":x()}],"text-shadow":[{"text-shadow":["none",d,he,be]}],"text-shadow-color":[{"text-shadow":x()}],opacity:[{opacity:[w,b,g]}],"mix-blend":[{"mix-blend":[...A(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":A()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[w]}],"mask-image-linear-from-pos":[{"mask-linear-from":v()}],"mask-image-linear-to-pos":[{"mask-linear-to":v()}],"mask-image-linear-from-color":[{"mask-linear-from":x()}],"mask-image-linear-to-color":[{"mask-linear-to":x()}],"mask-image-t-from-pos":[{"mask-t-from":v()}],"mask-image-t-to-pos":[{"mask-t-to":v()}],"mask-image-t-from-color":[{"mask-t-from":x()}],"mask-image-t-to-color":[{"mask-t-to":x()}],"mask-image-r-from-pos":[{"mask-r-from":v()}],"mask-image-r-to-pos":[{"mask-r-to":v()}],"mask-image-r-from-color":[{"mask-r-from":x()}],"mask-image-r-to-color":[{"mask-r-to":x()}],"mask-image-b-from-pos":[{"mask-b-from":v()}],"mask-image-b-to-pos":[{"mask-b-to":v()}],"mask-image-b-from-color":[{"mask-b-from":x()}],"mask-image-b-to-color":[{"mask-b-to":x()}],"mask-image-l-from-pos":[{"mask-l-from":v()}],"mask-image-l-to-pos":[{"mask-l-to":v()}],"mask-image-l-from-color":[{"mask-l-from":x()}],"mask-image-l-to-color":[{"mask-l-to":x()}],"mask-image-x-from-pos":[{"mask-x-from":v()}],"mask-image-x-to-pos":[{"mask-x-to":v()}],"mask-image-x-from-color":[{"mask-x-from":x()}],"mask-image-x-to-color":[{"mask-x-to":x()}],"mask-image-y-from-pos":[{"mask-y-from":v()}],"mask-image-y-to-pos":[{"mask-y-to":v()}],"mask-image-y-from-color":[{"mask-y-from":x()}],"mask-image-y-to-color":[{"mask-y-to":x()}],"mask-image-radial":[{"mask-radial":[b,g]}],"mask-image-radial-from-pos":[{"mask-radial-from":v()}],"mask-image-radial-to-pos":[{"mask-radial-to":v()}],"mask-image-radial-from-color":[{"mask-radial-from":x()}],"mask-image-radial-to-color":[{"mask-radial-to":x()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[w]}],"mask-image-conic-from-pos":[{"mask-conic-from":v()}],"mask-image-conic-to-pos":[{"mask-conic-to":v()}],"mask-image-conic-from-color":[{"mask-conic-from":x()}],"mask-image-conic-to-color":[{"mask-conic-to":x()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:de()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",b,g]}],filter:[{filter:["","none",b,g]}],blur:[{blur:ye()}],brightness:[{brightness:[w,b,g]}],contrast:[{contrast:[w,b,g]}],"drop-shadow":[{"drop-shadow":["","none",E,he,be]}],"drop-shadow-color":[{"drop-shadow":x()}],grayscale:[{grayscale:["",w,b,g]}],"hue-rotate":[{"hue-rotate":[w,b,g]}],invert:[{invert:["",w,b,g]}],saturate:[{saturate:[w,b,g]}],sepia:[{sepia:["",w,b,g]}],"backdrop-filter":[{"backdrop-filter":["","none",b,g]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[w,b,g]}],"backdrop-contrast":[{"backdrop-contrast":[w,b,g]}],"backdrop-grayscale":[{"backdrop-grayscale":["",w,b,g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w,b,g]}],"backdrop-invert":[{"backdrop-invert":["",w,b,g]}],"backdrop-opacity":[{"backdrop-opacity":[w,b,g]}],"backdrop-saturate":[{"backdrop-saturate":[w,b,g]}],"backdrop-sepia":[{"backdrop-sepia":["",w,b,g]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":p()}],"border-spacing-x":[{"border-spacing-x":p()}],"border-spacing-y":[{"border-spacing-y":p()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",b,g]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[w,"initial",b,g]}],ease:[{ease:["linear","initial",P,b,g]}],delay:[{delay:[w,b,g]}],animate:[{animate:["none",R,b,g]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,b,g]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[b,g,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ge()}],"translate-x":[{"translate-x":ge()}],"translate-y":[{"translate-y":ge()}],"translate-z":[{"translate-z":ge()}],"translate-none":["translate-none"],accent:[{accent:x()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:x()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",b,g]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":p()}],"scroll-mx":[{"scroll-mx":p()}],"scroll-my":[{"scroll-my":p()}],"scroll-ms":[{"scroll-ms":p()}],"scroll-me":[{"scroll-me":p()}],"scroll-mt":[{"scroll-mt":p()}],"scroll-mr":[{"scroll-mr":p()}],"scroll-mb":[{"scroll-mb":p()}],"scroll-ml":[{"scroll-ml":p()}],"scroll-p":[{"scroll-p":p()}],"scroll-px":[{"scroll-px":p()}],"scroll-py":[{"scroll-py":p()}],"scroll-ps":[{"scroll-ps":p()}],"scroll-pe":[{"scroll-pe":p()}],"scroll-pt":[{"scroll-pt":p()}],"scroll-pr":[{"scroll-pr":p()}],"scroll-pb":[{"scroll-pb":p()}],"scroll-pl":[{"scroll-pl":p()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",b,g]}],fill:[{fill:["none",...x()]}],"stroke-w":[{stroke:[w,re,H,je]}],stroke:[{stroke:["none",...x()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Qt=Pt(Zt);function c(...t){return Qt(Ge(t))}const ae=N.forwardRef(({className:t,...a},o)=>r.jsx("div",{ref:o,className:c("rounded-xl border bg-card text-card-foreground shadow",t),...a}));ae.displayName="Card";const pe=N.forwardRef(({className:t,...a},o)=>r.jsx("div",{ref:o,className:c("flex flex-col space-y-1.5 p-6",t),...a}));pe.displayName="CardHeader";const fe=N.forwardRef(({className:t,...a},o)=>r.jsx("div",{ref:o,className:c("font-semibold leading-none tracking-tight",t),...a}));fe.displayName="CardTitle";const ke=N.forwardRef(({className:t,...a},o)=>r.jsx("div",{ref:o,className:c("text-sm text-muted-foreground",t),...a}));ke.displayName="CardDescription";const ne=N.forwardRef(({className:t,...a},o)=>r.jsx("div",{ref:o,className:c("p-6 pt-0",t),...a}));ne.displayName="CardContent";const er=N.forwardRef(({className:t,...a},o)=>r.jsx("div",{ref:o,className:c("flex items-center p-6 pt-0",t),...a}));er.displayName="CardFooter";function Le(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function tr(...t){return a=>{let o=!1;const n=t.map(l=>{const s=Le(l,a);return!o&&typeof s=="function"&&(o=!0),s});if(o)return()=>{for(let l=0;l<n.length;l++){const s=n[l];typeof s=="function"?s():Le(t[l],null)}}}}var rr=Symbol.for("react.lazy"),we=N[" use ".trim().toString()];function or(t){return typeof t=="object"&&t!==null&&"then"in t}function ot(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===rr&&"_payload"in t&&or(t._payload)}function ar(t){const a=sr(t),o=N.forwardRef((n,l)=>{let{children:s,...i}=n;ot(s)&&typeof we=="function"&&(s=we(s._payload));const m=N.Children.toArray(s),u=m.find(ir);if(u){const h=u.props.children,f=m.map(k=>k===u?N.Children.count(h)>1?N.Children.only(null):N.isValidElement(h)?h.props.children:null:k);return r.jsx(a,{...i,ref:l,children:N.isValidElement(h)?N.cloneElement(h,void 0,f):null})}return r.jsx(a,{...i,ref:l,children:s})});return o.displayName=`${t}.Slot`,o}var nr=ar("Slot");function sr(t){const a=N.forwardRef((o,n)=>{let{children:l,...s}=o;if(ot(l)&&typeof we=="function"&&(l=we(l._payload)),N.isValidElement(l)){const i=dr(l),m=cr(s,l.props);return l.type!==N.Fragment&&(m.ref=n?tr(n,i):i),N.cloneElement(l,m)}return N.Children.count(l)>1?N.Children.only(null):null});return a.displayName=`${t}.SlotClone`,a}var lr=Symbol("radix.slottable");function ir(t){return N.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===lr}function cr(t,a){const o={...a};for(const n in a){const l=t[n],s=a[n];/^on[A-Z]/.test(n)?l&&s?o[n]=(...m)=>{const u=s(...m);return l(...m),u}:l&&(o[n]=l):n==="style"?o[n]={...l,...s}:n==="className"&&(o[n]=[l,s].filter(Boolean).join(" "))}return{...t,...o}}function dr(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,o=a&&"isReactWarning"in a&&a.isReactWarning;return o?t.ref:(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,o=a&&"isReactWarning"in a&&a.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}const _e=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Oe=Ge,at=(t,a)=>o=>{var n;if(a?.variants==null)return Oe(t,o?.class,o?.className);const{variants:l,defaultVariants:s}=a,i=Object.keys(l).map(h=>{const f=o?.[h],k=s?.[h];if(f===null)return null;const d=_e(f)||_e(k);return l[h][d]}),m=o&&Object.entries(o).reduce((h,f)=>{let[k,d]=f;return d===void 0||(h[k]=d),h},{}),u=a==null||(n=a.compoundVariants)===null||n===void 0?void 0:n.reduce((h,f)=>{let{class:k,className:d,...E}=f;return Object.entries(E).every(D=>{let[j,C]=D;return Array.isArray(C)?C.includes({...s,...m}[j]):{...s,...m}[j]===C})?[...h,k,d]:h},[]);return Oe(t,i,u,o?.class,o?.className)},mr=at("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ae=N.forwardRef(({className:t,variant:a,size:o,asChild:n=!1,...l},s)=>{const i=n?nr:"button";return r.jsx(i,{className:c(mr({variant:a,size:o,className:t})),ref:s,...l})});Ae.displayName="Button";const se=N.forwardRef(({className:t,size:a="md",variant:o="default",...n},l)=>{const s={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},i={default:"border-gray-200 border-t-gray-900",solana:"border-gray-200 border-t-solana-primary"};return r.jsx("div",{ref:l,className:c("inline-block animate-spin rounded-full border-2",s[a],i[o],t),role:"status","aria-label":"Loading",...n,children:r.jsx("span",{className:"sr-only",children:"Loading..."})})});se.displayName="Spinner";const oe=N.forwardRef(({amount:t,description:a,onClick:o,disabled:n=!1,loading:l=!1,className:s,style:i,customText:m,...u},h)=>{const f=k=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2}).format(k);return r.jsx(Ae,{ref:h,onClick:o,disabled:n||l,className:c("w-full hover:opacity-90 text-white font-normal shadow-lg hover:shadow-xl transition-all duration-200 transform hover:scale-[1.02] rounded-xl",!i&&"bg-solana-gradient",n||l?"opacity-50 cursor-not-allowed":"",s),style:i,...u,children:l?r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(se,{size:"sm",variant:"default",className:"border-white/30 border-t-white"}),r.jsx("span",{children:"Processing Payment..."})]}):r.jsx("span",{children:m||`Pay ${f(t)} USDC`})})});oe.displayName="PaymentButton";const ur=at("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Te({className:t,variant:a,...o}){return r.jsx("div",{className:c(ur({variant:a}),t),...o})}const De=({wallet:t,balance:a,network:o,showBalance:n=!0,onDisconnect:l,theme:s,className:i,style:m})=>{const u=t?.publicKey?.toString()||t?.address,h=k=>`${k.slice(0,4)}...${k.slice(-4)}`,f=()=>o==="solana"?"Mainnet":"Devnet";return!t||!u?r.jsx(ae,{className:c("border-dashed",i),style:m,children:r.jsx(ne,{className:"p-4 text-center text-muted-foreground",children:r.jsx("p",{className:"text-sm",children:"No wallet connected"})})}):r.jsx("div",{className:c(s==="terminal"||s==="terminal-light"?"rounded-none":"rounded-lg","p-4",i),style:m,children:r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:c("w-10 h-10 rounded-full flex items-center justify-center",s==="terminal"?"bg-green-400":"bg-gradient-to-r from-blue-500 to-purple-500"),children:r.jsx("span",{className:c("font-semibold text-sm",s==="terminal"?"text-black font-vt323":"text-white font-mono"),children:u.slice(0,2).toUpperCase()})}),r.jsxs("div",{children:[r.jsx("div",{className:c("text-xs font-medium",s==="light"||s==="solana-light"?"text-[#71717A]":s==="terminal"||s==="terminal-light"||s==="seeker-light"?"":"text-[#FFFFFF66]"),style:s==="terminal"?{color:"#FFFFFF66"}:s==="terminal-light"?{color:"#71717A"}:s==="seeker-light"?{color:"#71717A"}:void 0,children:"Connected Wallet"}),r.jsx("div",{className:c("text-sm",s==="light"||s==="solana-light"?"text-black":s==="terminal"?"text-white font-vt323":s==="terminal-light"?"text-black font-vt323":s==="seeker-light"?"text-black":"text-white font-mono"),children:h(u)})]})]}),r.jsx("button",{onClick:l,className:c("text-sm font-medium transition-colors",s==="light"||s==="solana-light"?"text-red-500 hover:text-red-700":s==="terminal"||s==="terminal-light"?"hover:opacity-80 font-vt323":s==="seeker-light"?"hover:opacity-80":"text-[#FFFFFF66] hover:opacity-80"),style:s==="terminal"?{color:"#FFFFFF66"}:s==="terminal-light"?{color:"#71717A"}:s==="seeker-light"?{color:"#71717A"}:void 0,children:"Disconnect"})]}),n&&a&&r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm font-medium",s==="terminal"?"text-white":"text-slate-600"),children:"USDC Balance"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:c("text-lg font-bold",s==="terminal"?"text-white font-vt323":"text-slate-900"),children:a}),r.jsx("span",{className:c("text-xs font-semibold px-2 py-1 rounded-md",s==="terminal"?"text-white bg-green-400 font-vt323":"text-slate-500 bg-slate-200"),children:"USDC"})]})]}),o&&r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm font-medium",s==="terminal"?"text-white":"text-slate-600"),children:"Network"}),r.jsx(Te,{variant:"outline",className:c("text-xs",s==="terminal"?"border-green-400/30 text-white font-vt323":"border-slate-300 text-slate-700"),children:f()})]})]})})};De.displayName="WalletSection";var gr="solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";function br(t){return t==="solana"||t==="solana-devnet"||t.startsWith("solana:")}function hr(t){return t==="solana"||t===gr}function xr(t,a,o){const n=Buffer.from(t.serialize()).toString("base64"),l={x402Version:2,resource:{url:o,description:a.extra?.description||"",mimeType:a.extra?.mimeType||"application/json"},accepted:a,payload:{transaction:n}};return Buffer.from(JSON.stringify(l)).toString("base64")}function pr(t){return hr(t)?"https://api.mainnet-beta.solana.com":"https://api.devnet.solana.com"}var fr=7e3,kr=1;async function wr(t,a,o){const n=new W.Connection(o,"confirmed"),l=a.extra?.feePayer;if(!l)throw new Error("Missing facilitator feePayer in payment requirements (extra.feePayer).");const s=new W.PublicKey(l),i=t?.publicKey?.toString()||t?.address;if(!i)throw new Error("Missing connected Solana wallet address or publicKey");const m=new W.PublicKey(i);if(!a.payTo)throw new Error("Missing payTo in payment requirements");const u=new W.PublicKey(a.payTo);if(!a.asset)throw new Error("Missing token mint for SPL transfer");const h=new W.PublicKey(a.asset),f=[];f.push(W.ComputeBudgetProgram.setComputeUnitLimit({units:fr})),f.push(W.ComputeBudgetProgram.setComputeUnitPrice({microLamports:kr}));const d=(await n.getAccountInfo(h,"confirmed"))?.owner?.toBase58()===q.TOKEN_2022_PROGRAM_ID.toBase58()?q.TOKEN_2022_PROGRAM_ID:q.TOKEN_PROGRAM_ID,E=await q.getMint(n,h,void 0,d),D=await q.getAssociatedTokenAddress(h,m,!1,d),j=await q.getAssociatedTokenAddress(h,u,!1,d);if(!await n.getAccountInfo(D,"confirmed"))throw new Error(`User does not have an Associated Token Account for ${a.asset}. Please create one first or ensure you have the required token.`);if(!await n.getAccountInfo(j,"confirmed"))throw new Error(`Destination does not have an Associated Token Account for ${a.asset}. The receiver must create their token account before receiving payments.`);const R=a.amount||a.maxAmountRequired;if(!R)throw new Error("Missing amount in payment requirements");const F=BigInt(R);f.push(q.createTransferCheckedInstruction(D,h,j,m,F,E.decimals,[],d));const{blockhash:y}=await n.getLatestBlockhash("confirmed"),I=new W.TransactionMessage({payerKey:s,recentBlockhash:y,instructions:f}).compileToV0Message(),z=new W.VersionedTransaction(I);if(typeof t?.signTransaction!="function")throw new Error("Connected wallet does not support signTransaction");return await t.signTransaction(z)}function yr(t,a,o,n=BigInt(0),l=!1){const s=(...i)=>{l&&console.log("[x402-solana]",...i)};return async(i,m)=>{const u=typeof i=="string"?i:i.url;s("Making initial request to:",u);const h=await t(i,m);if(s("Initial response status:",h.status),h.status!==402)return h;s("Got 402, parsing payment requirements...");const f=await h.json();s("Payment requirements:",JSON.stringify(f,null,2));const k=f.accepts||[],d=k.find(F=>F.scheme==="exact"&&br(F.network));if(!d)throw console.error("❌ No suitable Solana payment requirements found. Available networks:",k.map(F=>F.network)),new Error("No suitable Solana payment requirements found");const E=BigInt(d.amount||d.maxAmountRequired||"0");if(n>BigInt(0)&&E>n)throw new Error("Payment amount exceeds maximum allowed");const D=typeof i=="string"?i:i.url;s("Creating signed transaction...");const j=await wr(a,d,o);s("Transaction signed successfully");const C=xr(j,d,D);s("Payment header created, length:",C.length);const P={...m,headers:{...m?.headers||{},"PAYMENT-SIGNATURE":C}};s("Retrying request with PAYMENT-SIGNATURE header...");const R=await t(i,P);return s("Retry response status:",R.status),R}}var vr=class{paymentFetch;constructor(t){const a=t.rpcUrl||pr(t.network),o=t.customFetch||globalThis.fetch.bind(globalThis);this.paymentFetch=yr(o,t.wallet,a,t.amount||BigInt(0),t.verbose||!1)}async fetch(t,a){return this.paymentFetch(t,a)}};function Fr(t){return new vr(t)}function nt(t){const[a,o]=T.useState("idle"),[n,l]=T.useState(null),[s,i]=T.useState(null),[m,u]=T.useState(null),[h,f]=T.useState(!1),k=T.useCallback(()=>{o("idle"),l(null),i(null),u(null),f(!1)},[]);return{pay:T.useCallback(async(E,D)=>{try{if(f(!0),o("pending"),l(null),t.amount&&E>t.amount)throw new Error(`Payment amount ${E} exceeds maximum allowed ${t.amount}`);const j=t.wallet.publicKey?.toString()||t.wallet.address;if(!j)throw new Error("Wallet not connected");const C=Fr({wallet:t.wallet,network:t.network,rpcUrl:t.rpcUrl,amount:t.amount?BigInt(Math.floor(t.amount*1e6)):void 0,verbose:t.verbose});let P;t.network==="solana"?P="https://x402.payai.network/api/solana/paid-content":P="https://x402.payai.network/api/solana-devnet/paid-content";const R=t.apiEndpoint||P,F=R===P;t.verbose&&console.log("Initiating x402 payment:",{endpoint:R,isDemo:F,amount:E,description:D,wallet:j,network:t.network});const y=await C.fetch(R,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:D,amount:E})});if(!y.ok)throw new Error(`Payment request failed: ${y.statusText}`);let I,z=null;const U=y.headers.get("content-type");if(U&&U.includes("application/json"))I=await y.json(),z=JSON.stringify(I);else{const L=await y.text();I={content:L},z=L}u(z),t.verbose&&console.log("Payment successful:",I);const p=y.headers.get("PAYMENT-RESPONSE");let e=`tx_${Date.now()}`;if(p)try{const L=JSON.parse(atob(p));e=L.transactionId||L.signature||e,t.verbose&&console.log("Payment details:",L)}catch(L){t.verbose&&console.warn("Could not decode payment response:",L)}return i(e),o("success"),f(!1),e}catch(j){const C=j instanceof Error?j:new Error("Payment failed");return l(C),o("error"),f(!1),null}},[t]),isLoading:h,status:a,error:n,transactionId:s,responseContent:m,reset:k}}const Ue=({amount:t,description:a,wallet:o,network:n="solana-devnet",rpcUrl:l,apiEndpoint:s,facilitatorUrl:i,theme:m="solana-light",logoUrl:u="https://raw.githubusercontent.com/PayAINetwork/x402-solana-react/main/src/components/ui/SolanaLogo.svg",showPaymentDetails:h=!0,onDisconnect:f,classNames:k,customStyles:d,maxPaymentAmount:E,onPaymentStart:D,onPaymentSuccess:j,onPaymentError:C,onWalletConnect:P,children:R})=>{const F=Ce.useWallet(),y=T.useMemo(()=>o||{publicKey:F.publicKey?{toString:()=>F.publicKey.toString()}:void 0,signTransaction:F.signTransaction},[o,F.publicKey,F.signTransaction]),[I,z]=T.useState(!1),[U,p]=T.useState("0.00"),[e,L]=T.useState(()=>m==="system"?typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark":m),te=T.useRef(null),G=n==="solana"?"Mainnet":"Devnet",{pay:le,isLoading:X,status:K,error:B,transactionId:$,responseContent:x,reset:ie}=nt({wallet:y,network:n,rpcUrl:l,apiEndpoint:s,facilitatorUrl:i,amount:E}),ce=()=>{f?f():!o&&F.disconnect&&F.disconnect()},de=o?!!(o.publicKey||o.address):!!(F.connected||F.publicKey);T.useEffect(()=>{if(m==="system")if(typeof window<"u"&&window.matchMedia){const A=window.matchMedia("(prefers-color-scheme: dark)"),v=()=>{L(A.matches?"dark":"light")};if(A.addEventListener)return A.addEventListener("change",v),v(),()=>A.removeEventListener("change",v);if(A.addListener)return A.addListener(v),v(),()=>A.removeListener(v);v()}else L("dark");else L(m)},[m]),T.useEffect(()=>{document.body.className=document.body.className.replace(/wallet-modal-theme-\w+/g,"").replace(/\s+/g," ").trim();const A=m==="system"?e:m;return A&&(document.body.className+=` wallet-modal-theme-${A}`),()=>{document.body.className=document.body.className.replace(/wallet-modal-theme-\w+/g,"").replace(/\s+/g," ").trim()}},[m,e]),T.useEffect(()=>{const A=F.publicKey?.toString()||o?.publicKey?.toString()||o?.address;A&&F.connected&&(console.log("Wallet connected:",A),P?.(A),mt(A,n,l).then(p)),!F.connected&&!o&&p("0.00")},[F.publicKey,F.connected,F.connecting,o,n,l,P]),T.useEffect(()=>{K==="success"&&$&&(z(!0),j?.($,x))},[K,$,x,j]),T.useEffect(()=>{B&&C?.(B)},[B,C]);const J=async()=>{D?.(),await le(t,a)};if(I)return r.jsx(r.Fragment,{children:R});const M=B&&(e==="dark"||e==="solana-dark"||e==="light"||e==="solana-light"||e==="seeker"||e==="seeker-2"||e==="seeker-light"||e==="terminal"||e==="terminal-light"),O=(()=>{switch(e){case"solana-dark":return{container:"",card:"!bg-[#171719] border-0 text-white rounded-xl",icon:"bg-slate-600",title:"",button:"bg-solana-gradient hover:opacity-90 text-white rounded-full",paymentDetails:"bg-[#0000001F] border-slate-600 text-white rounded-lg",walletSection:"bg-[#0000001F] border-slate-600 text-white rounded-lg",notice:"bg-amber-900/50 border-amber-700 text-white rounded-lg",securityMessage:"text-slate-400",helperText:"text-white",helperLink:void 0};case"seeker":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",icon:"bg-gradient-to-r from-emerald-500 to-teal-500",title:"text-white",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",notice:"bg-cyan-50 border-cyan-200 text-cyan-800 rounded-lg",securityMessage:"text-white",helperText:"text-white"};case"seeker-2":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",icon:"bg-gradient-to-r from-emerald-500 to-teal-500",title:"text-white",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",notice:"bg-cyan-50 border-cyan-200 text-cyan-800 rounded-lg",securityMessage:"text-white",helperText:"text-white"};case"seeker-light":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",icon:"bg-gradient-to-r from-emerald-500 to-teal-500",title:"text-black",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",notice:"bg-cyan-50 border-cyan-200 text-cyan-800 rounded-lg",securityMessage:"text-black",helperText:"text-black"};case"terminal":return{container:"",card:"backdrop-blur-sm border-green-400/30 text-white rounded-none font-vt323",icon:"bg-green-400 text-black",title:"text-white font-vt323",button:"text-black hover:opacity-90 font-vt323 rounded-none",paymentDetails:"bg-gray-900/50 border-green-400/20 text-white rounded-none font-vt323",notice:"bg-yellow-900/50 border-yellow-400/30 text-white rounded-none font-vt323"};case"terminal-light":return{container:"",card:"backdrop-blur-sm border-[#E4E4E7] text-black rounded-none font-vt323",icon:"bg-[#E4E4E7] text-black",title:"text-black font-vt323",button:"text-black hover:opacity-90 font-vt323 rounded-none",paymentDetails:"bg-white/50 border-[#E4E4E7] text-black rounded-none font-vt323",notice:"bg-yellow-50 border-yellow-200 text-yellow-800 rounded-none font-vt323"};case"solana-light":return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",icon:"bg-gradient-to-r from-blue-600 to-purple-600",title:"text-slate-900",button:"bg-solana-gradient hover:opacity-90 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",notice:"text-slate-600",walletSection:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600",helperLink:"text-purple-600 underline"};case"dark":return{container:"",card:"!bg-[#171719] border-slate-700 text-white rounded-xl",icon:"bg-slate-600",title:"",button:"bg-slate-600 hover:bg-slate-700 rounded-full",paymentDetails:"bg-[#0000001F] border-slate-600 text-white rounded-lg",walletSection:"bg-[#0000001F] border-slate-600 text-white rounded-lg",notice:"bg-amber-900/50 border-amber-700 text-white rounded-lg",securityMessage:"text-slate-400",helperText:"text-white",helperLink:void 0};case"light":return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",icon:"bg-gradient-to-r from-blue-600 to-purple-600",title:"text-slate-900",button:"bg-black hover:bg-gray-800 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",notice:"text-slate-600",walletSection:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600",helperLink:"text-purple-600 underline"};default:return{container:"bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",card:"bg-white/95 backdrop-blur-sm rounded-xl",icon:"bg-slate-600",title:"text-slate-900",button:"bg-slate-600 hover:bg-slate-700 text-white rounded-full",paymentDetails:"bg-slate-50 border-slate-200 rounded-lg",notice:"bg-amber-50 border-amber-200 text-amber-800 rounded-lg"}}})();if(!de){const v=(()=>{switch(e){case"solana-dark":return{container:"",card:"!bg-[#171719] border-0 text-white rounded-xl",button:"bg-solana-gradient hover:opacity-90 text-white rounded-full",paymentDetails:"bg-[#0000001F] border-slate-600 text-white rounded-lg",securityMessage:"text-slate-400",helperText:"text-white"};case"seeker":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",securityMessage:"text-white",helperText:"text-white"};case"seeker-2":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",securityMessage:"text-white",helperText:"text-white"};case"seeker-light":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",securityMessage:"text-black",helperText:"text-black"};case"terminal":return{container:"",card:"backdrop-blur-sm border-green-400/30 text-white rounded-none font-vt323",button:"text-black hover:opacity-90 font-vt323 rounded-none",paymentDetails:"bg-gray-900/50 border-green-400/20 text-white rounded-none font-vt323",securityMessage:"text-white font-vt323",helperText:"text-white font-vt323"};case"terminal-light":return{container:"",card:"backdrop-blur-sm border-[#E4E4E7] text-black rounded-none font-vt323",button:"text-black hover:opacity-90 font-vt323 rounded-none",paymentDetails:"bg-white/50 border-[#E4E4E7] text-black rounded-none font-vt323",securityMessage:"text-black font-vt323",helperText:"text-black font-vt323"};case"solana-light":return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",button:"bg-solana-gradient hover:opacity-90 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600"};case"dark":return{container:"",card:"!bg-[#171719] border-slate-700 text-white rounded-xl",button:"bg-slate-600 hover:bg-slate-700 rounded-full",paymentDetails:"bg-[#0000001F] border-slate-600 text-white rounded-lg",securityMessage:"text-slate-400",helperText:"text-white"};case"light":return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",button:"bg-black hover:bg-gray-800 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600"};default:return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",button:"bg-solana-gradient hover:opacity-90 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600"}}})();return r.jsxs("div",{className:c("flex items-center justify-center min-h-screen p-4",v.container,k?.container),style:e==="dark"?{background:"linear-gradient(to bottom left, #db2777 0%, #9333ea 50%, #1e40af 100%)",...d?.container}:e==="solana-dark"?{background:"linear-gradient(to bottom left, #db2777 0%, #9333ea 50%, #1e40af 100%)",...d?.container}:e==="light"?{background:"linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(236, 72, 153, 0.4) 33%, rgba(147, 51, 234, 0.4) 66%, rgba(34, 211, 238, 0.4) 100%)",...d?.container}:e==="solana-light"?{background:"linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(236, 72, 153, 0.4) 33%, rgba(147, 51, 234, 0.4) 66%, rgba(34, 211, 238, 0.4) 100%)",...d?.container}:e==="seeker"?{background:"linear-gradient(to top,#21645E 0%, #0D2734 50%, #001214 100%)",...d?.container}:e==="seeker-2"?{background:"#0D1615",...d?.container}:e==="seeker-light"?{background:"linear-gradient(240.08deg, #B8CCD3 -0.56%, #FFFFFF 119.23%)",...d?.container}:e==="terminal"?{backgroundColor:"#0D1615",position:"relative",...d?.container}:e==="terminal-light"?{backgroundColor:"#F4F4F4",position:"relative",...d?.container}:d?.container,children:[(e==="terminal"||e==="terminal-light")&&r.jsx("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",style:{backgroundImage:e==="terminal"?`
2
+ linear-gradient(to right, #22EBAD33 1px, transparent 1px),
3
+ linear-gradient(to bottom, #22EBAD33 1px, transparent 1px)
4
+ `:`
5
+ linear-gradient(to right, #E4E4E7 1px, transparent 1px),
6
+ linear-gradient(to bottom, #E4E4E7 1px, transparent 1px)
7
+ `,backgroundSize:"calc(100% / 6) calc(100% / 6)"}}),r.jsxs(ae,{className:c("w-full max-w-lg shadow-2xl border-0",v.card,k?.card),style:e==="seeker"?{backgroundColor:"#171719",...d?.card}:e==="seeker-2"?{backgroundColor:"rgba(29, 35, 35, 1)",backdropFilter:"blur(12px)",...d?.card}:e==="seeker-light"?{backgroundColor:"#FFFFFF",...d?.card}:e==="terminal"?{backgroundColor:"#0D1615",border:"1px solid rgba(34, 235, 173, 0.2)",borderRadius:0,...d?.card}:e==="terminal-light"?{backgroundColor:"#FFFFFF",border:"1px solid #E4E4E7",borderRadius:0,...d?.card}:d?.card,children:[r.jsxs(pe,{className:"pb-6",children:[r.jsxs("div",{className:c("flex items-center space-x-4 mb-6 p-4",e==="terminal"||e==="terminal-light"?"-mx-6 -mt-6 relative":e==="light"||e==="seeker-light"?"mb-3":"mb-6"),style:e==="terminal"?{backgroundColor:"#1682601A",borderBottom:"1px solid rgba(34, 235, 173, 0.12)"}:e==="terminal-light"?{backgroundColor:"#FAFAFA",borderBottom:"1px solid #E4E4E7"}:void 0,children:[r.jsx("div",{className:c("w-auto p-[2px] flex items-center justify-center",e==="terminal"||e==="terminal-light"?"pr-4 mr-4 self-stretch -my-4":"h-auto rounded-full overflow-hidden"),style:e==="terminal"?{borderRight:"1px solid rgba(34, 235, 173, 0.25)"}:e==="terminal-light"?{borderRight:"1px solid #E4E4E7"}:void 0,children:r.jsx("div",{className:"w-full h-full rounded-full flex items-center justify-center",children:r.jsx("img",{src:u,alt:"Logo",className:"w-12 h-auto"})})}),r.jsxs("div",{children:[r.jsx(fe,{className:c("text-l fw-bold pb-1",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-white font-vt323":e==="terminal-light"?"text-black font-vt323":"text-slate-900",k?.text),children:"Premium Content XYZ"}),r.jsx(ke,{className:c("text-sm font-light",e==="terminal"?"":e==="seeker"||e==="seeker-2"?"text-white":e==="seeker-light"?"text-black":e==="dark"||e==="solana-dark"?"text-white":"text-[#71717A]",k?.text),style:e==="terminal"?{color:"#FFFFFF99"}:e==="terminal-light"?{color:"#71717A"}:void 0,children:"content.xyz"})]})]}),m!=="terminal"&&m!=="terminal-light"&&r.jsx("div",{className:c("border-b",e==="light"?"":"mb-6",e==="dark"||e==="solana-dark"?"border-slate-600":e==="seeker"||e==="seeker-2"||e==="seeker-light"?"":"border-slate-200"),style:e==="seeker"||e==="seeker-2"?{borderBottom:"1px solid #FFFFFF1F",marginBottom:"1rem"}:e==="seeker-light"?{marginBottom:"1rem"}:e==="light"||e==="solana-light"?{marginBottom:"1rem"}:e==="dark"||e==="solana-dark"?{marginBottom:"1rem"}:void 0}),r.jsxs("div",{className:"text-center",children:[r.jsx("h2",{className:c("text-2xl font-normal mb-2",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="seeker-light"?"text-black":e==="terminal"?"text-white font-vt323":"text-slate-900"),children:"Payment Required"}),r.jsxs("p",{className:c("text-sm font-light",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"||e==="terminal-light"?"":"text-slate-600"),style:e==="terminal"?{color:"#FFFFFF99"}:e==="terminal-light"?{color:"#71717A"}:void 0,children:["Access to protected content. To access this content, please pay $",t.toFixed(2)," ","USDC"]})]})]}),r.jsxs(ne,{className:"space-y-6",children:[r.jsxs("div",{className:c("p-6",e==="light"||e==="solana-light"?"bg-[#F4F4F5] border-none rounded-xl":v.paymentDetails),style:e==="seeker"?{backgroundColor:"rgba(0, 0, 0, 0.12)"}:e==="seeker-2"?{backgroundColor:"#171A1A"}:e==="seeker-light"?{backgroundColor:"#F4F4F5"}:e==="terminal"?{backgroundColor:"#0B2D2D",border:"1px solid #22EBAD33"}:e==="terminal-light"?{border:"1px solid #E4E4E7"}:e==="dark"||e==="solana-dark"?{boxShadow:"0px 0px 16px 4px #000000 inset"}:e==="light"||e==="solana-light"?{backgroundColor:"#F4F4F5",border:"none"}:void 0,children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="seeker-light"?"text-black":e==="terminal"?"text-white":e==="terminal-light"?"text-black":"text-slate-900"),children:"Amount"}),r.jsx("div",{className:c("text-xl font-bold",e==="light"||e==="solana-light"?"text-purple-600":e==="seeker"||e==="seeker-2"||e==="seeker-light"||e==="terminal"||e==="terminal-light"?"":"text-[#21ECAB]"),style:e==="seeker"||e==="seeker-2"?{color:"#95D2E6"}:e==="seeker-light"?{color:"#00BECC"}:e==="terminal"?{color:"#32FEFF"}:e==="terminal-light"?{color:"#009192"}:void 0,children:"$"+t.toFixed(2)})]}),r.jsx("div",{className:c("border-t mb-4",e==="dark"||e==="solana-dark"?"border-slate-600":e==="seeker"||e==="seeker-2"||e==="terminal"?"":"border-slate-200"),style:e==="terminal"?{borderTop:"1px solid #22EBAD1F"}:e==="seeker"||e==="seeker-2"?{borderTop:"1px solid #FFFFFF1F"}:void 0}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"||e==="terminal"?"text-white":e==="terminal-light"?"text-black":"text-slate-900"),children:"Currency"}),r.jsx("div",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"||e==="terminal"?"text-white":e==="terminal-light"?"text-black":"text-slate-900"),children:"USDC"})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"||e==="terminal"?"text-white":e==="terminal-light"?"text-black":"text-slate-900"),children:"Network"}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:c("w-2 h-2 rounded-full",e==="seeker"||e==="seeker-2"||e==="seeker-light"||e==="terminal"||e==="terminal-light"?"":"bg-green-500"),style:e==="seeker"?{backgroundColor:"#95D2E6"}:e==="seeker-2"?{backgroundColor:"#95D2E6"}:e==="seeker-light"?{backgroundColor:"#00BECC"}:e==="terminal"?{backgroundColor:"#32FEFF"}:e==="terminal-light"?{backgroundColor:"#009192"}:void 0}),r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"||e==="terminal"?"text-white":e==="terminal-light"?"text-black":"text-slate-900"),children:n==="solana"?"Mainnet":"Devnet"})]})]})]})]}),r.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[r.jsxs("svg",{className:c("w-4 h-4",e==="terminal"||e==="seeker-light"?"":"text-green-500"),style:e==="terminal"?{color:"#32FEFF"}:e==="terminal-light"?{color:"#009192"}:e==="seeker-light"?{color:"#00BECC"}:void 0,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",children:[r.jsx("path",{d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z"}),r.jsx("path",{d:"M9 12l2 2 4-4",strokeLinecap:"round",strokeLinejoin:"round"})]}),r.jsx("span",{className:c("text-sm",v.securityMessage),style:e==="terminal"?{color:"#FFFFFF99"}:e==="terminal-light"?{color:"#71717A"}:e==="seeker-light"?{color:"#000000"}:void 0,children:"Secure payment powered by Solana"})]}),r.jsxs("div",{className:"relative",children:[r.jsx("div",{ref:te,className:"absolute opacity-0 pointer-events-none -z-10",children:r.jsx(We.WalletMultiButton,{})}),r.jsx(oe,{amount:t,description:a,customText:"Connect Wallet",onClick:()=>{te.current?.querySelector("button")?.click()},className:c("w-full h-12",v.button),style:e==="dark"?{backgroundColor:"#FFFFFF1F",boxShadow:"0 1px 0 0 rgba(255, 255, 255, 0.3) inset"}:e==="terminal"?{backgroundColor:"#32FEFF",color:"#000000"}:e==="terminal-light"?{backgroundColor:"#000000",color:"#FFFFFF"}:e==="seeker"||e==="seeker-2"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent"}:e==="seeker-light"?{background:"linear-gradient(180deg, #00BECC -9.37%, #92F9FC 160.42%)",backgroundColor:"transparent"}:void 0})]}),r.jsx("div",{className:"text-center",children:r.jsxs("p",{className:c("text-sm",v.helperText),style:e==="terminal"?{color:"#FFFFFF99"}:e==="terminal-light"?{color:"#71717A"}:void 0,children:["Don't have USDC?"," ",r.jsxs("a",{href:"#",className:c("font-medium underline",e==="seeker"||e==="seeker-2"?"text-[#95D2E6]":e==="seeker-light"?"hover:opacity-90":e==="light"||e==="solana-light"?"text-purple-600":e==="terminal"||e==="terminal-light"?"hover:opacity-90":"text-[#4ADE80]"),style:e==="terminal"?{color:"#32FEFF"}:e==="terminal-light"?{color:"#000000"}:e==="seeker-light"?{color:"#00BECC"}:void 0,children:["Get it here",r.jsx("svg",{className:c("inline w-3 h-3 ml-1",e==="seeker"||e==="seeker-2"?"text-[#95D2E6]":e==="seeker-light"?"":e==="light"||e==="solana-light"?"text-purple-600":e==="terminal"||e==="terminal-light"?"":"text-[#4ADE80]"),style:e==="terminal"?{color:"#32FEFF"}:e==="terminal-light"?{color:"#000000"}:e==="seeker-light"?{color:"#00BECC"}:void 0,fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"})})]})]})})]})]})]})}return r.jsxs("div",{className:c("flex items-center justify-center min-h-screen p-4",O.container,k?.container),style:e==="dark"?{background:"linear-gradient(to bottom left, #db2777 0%, #9333ea 50%, #1e40af 100%)",...d?.container}:e==="solana-dark"?{background:"linear-gradient(to bottom left, #db2777 0%, #9333ea 50%, #1e40af 100%)",...d?.container}:e==="light"?{background:"linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(236, 72, 153, 0.4) 33%, rgba(147, 51, 234, 0.4) 66%, rgba(34, 211, 238, 0.4) 100%)",...d?.container}:e==="solana-light"?{background:"linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(236, 72, 153, 0.4) 33%, rgba(147, 51, 234, 0.4) 66%, rgba(34, 211, 238, 0.4) 100%)",...d?.container}:e==="seeker"?{background:"linear-gradient(to top,#21645E 0%, #0D2734 50%, #001214 100%)",...d?.container}:e==="seeker-2"?{background:"#0D1615",...d?.container}:e==="seeker-light"?{background:"linear-gradient(240.08deg, #B8CCD3 -0.56%, #FFFFFF 119.23%)",...d?.container}:e==="terminal"?{backgroundColor:"#0D1615",position:"relative",...d?.container}:e==="terminal-light"?{backgroundColor:"#F4F4F4",position:"relative",...d?.container}:d?.container,children:[(e==="terminal"||e==="terminal-light")&&r.jsx("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",style:{backgroundImage:e==="terminal"?`
8
+ linear-gradient(to right, #22EBAD33 1px, transparent 1px),
9
+ linear-gradient(to bottom, #22EBAD33 1px, transparent 1px)
10
+ `:`
11
+ linear-gradient(to right, #E4E4E7 1px, transparent 1px),
12
+ linear-gradient(to bottom, #E4E4E7 1px, transparent 1px)
13
+ `,backgroundSize:"calc(100% / 6) calc(100% / 6)"}}),r.jsxs(ae,{className:c("w-full max-w-lg shadow-2xl border-0",O.card,k?.card),style:e==="seeker"?{backgroundColor:"#171719",...d?.card}:e==="seeker-2"?{backgroundColor:"rgba(29, 35, 35, 1)",backdropFilter:"blur(12px)",...d?.card}:e==="seeker-light"?{backgroundColor:"#FFFFFF",...d?.card}:e==="terminal"?{backgroundColor:"#0D1615",border:"1px solid rgba(34, 235, 173, 0.2)",borderRadius:0,...d?.card}:e==="terminal-light"?{backgroundColor:"#FFFFFF",border:"1px solid #E4E4E7",borderRadius:0,...d?.card}:d?.card,children:[r.jsxs(pe,{className:"pb-6",children:[r.jsxs("div",{className:c("flex items-center space-x-4 mb-6 p-4",e==="terminal"||e==="terminal-light"?"-mx-6 -mt-6 relative":e==="light"||e==="seeker-light"?"mb-3":"mb-6"),style:e==="terminal"?{backgroundColor:"#1682601A",borderBottom:"1px solid rgba(34, 235, 173, 0.12)"}:e==="terminal-light"?{backgroundColor:"#FAFAFA",borderBottom:"1px solid #E4E4E7"}:void 0,children:[r.jsx("div",{className:c("w-auto p-[2px] flex items-center justify-center",e==="terminal"||e==="terminal-light"?"pr-4 self-stretch -my-4":"h-auto rounded-full overflow-hidden"),style:e==="terminal"?{borderRight:"1px solid rgba(34, 235, 173, 0.25)"}:e==="terminal-light"?{borderRight:"1px solid #E4E4E7"}:void 0,children:r.jsx("div",{className:"w-full h-full rounded-full flex items-center justify-center",children:r.jsx("img",{src:u,alt:"Logo",className:"w-12 h-auto"})})}),r.jsxs("div",{children:[r.jsx(fe,{className:c("text-l fw-bold pb-1",O.title,k?.text),style:d?.text,children:"Premium Content XYZ"}),r.jsx(ke,{className:c("text-sm font-light",e==="terminal"?"":e==="seeker"||e==="seeker-2"?"text-white":e==="seeker-light"?"":"text-[#71717A]"),style:e==="terminal"?{color:"#FFFFFF99"}:e==="terminal-light"?{color:"#71717A"}:e==="seeker-light"?{color:"#71717A"}:void 0,children:"content.xyz"})]})]}),m!=="terminal"&&m!=="terminal-light"&&r.jsx("div",{className:c("border-b",e==="light"?"":"mb-6",e==="dark"||e==="solana-dark"?"border-slate-600":e==="seeker"||e==="seeker-2"||e==="seeker-light"?"":"border-slate-200"),style:e==="seeker"||e==="seeker-2"?{borderBottom:"1px solid #FFFFFF1F",marginBottom:"1rem"}:e==="seeker-light"?{marginBottom:"1rem"}:e==="light"||e==="solana-light"?{marginBottom:"1rem"}:e==="dark"||e==="solana-dark"?{marginBottom:"1rem"}:void 0}),!M&&r.jsxs("div",{className:"text-center",children:[r.jsx("h2",{className:c("text-2xl font-normal mb-2",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="seeker-light"?"text-black":e==="terminal"?"text-white font-vt323":"text-slate-900"),children:"Payment Required"}),r.jsxs("p",{className:c("text-sm font-light",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="seeker-light"||e==="terminal"?"":"text-slate-600"),style:e==="terminal"?{color:"#FFFFFF99"}:e==="terminal-light"?{color:"#71717A"}:e==="seeker-light"?{color:"#71717A"}:void 0,children:["Access to protected content on Solana ",G,". To access this content, please pay $",t.toFixed(2)," USDC"]})]})]}),r.jsx(ne,{className:"space-y-6",children:M?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"flex justify-center mb-4",children:r.jsx("div",{className:"w-16 h-16 rounded-full bg-red-500 flex items-center justify-center",children:r.jsx("svg",{className:"w-8 h-8 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"3",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})}),r.jsx("div",{className:"text-center mb-2",children:r.jsx("h3",{className:c("text-2xl font-semibold",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Payment Failed"})}),r.jsx("p",{className:c("text-center text-sm mb-6",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-gray-400":"text-slate-600"),children:B?.message||"It looks like your wallet doesn't have enough funds or the transaction was declined. Please review the details and try again."}),r.jsx("div",{className:c("rounded-lg p-6",e==="dark"||e==="solana-dark"?"bg-[#0000001F] border border-slate-600":e==="seeker"||e==="seeker-2"?"bg-[rgba(0,0,0,0.12)] border border-white/10":"bg-slate-50 border border-slate-200"),children:r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Amount Paid"}),r.jsx("span",{className:c("text-sm font-semibold",e==="light"||e==="solana-light"?"text-purple-600":"text-green-500"),children:"$"+t.toFixed(2)})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Wallet"}),r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:y?.publicKey?.toString()?`${y.publicKey.toString().slice(0,6)}...${y.publicKey.toString().slice(-4)}`:y?.address?`${y.address.slice(0,6)}...${y.address.slice(-4)}`:"Not connected"})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Available Balance"}),r.jsxs("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:["$",U]})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Currency"}),r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"USDC"})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Network"}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:G})]})]})]})}),r.jsxs("div",{className:c("rounded-lg p-4 flex items-start space-x-3",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"bg-orange-900/50 border border-orange-700":"bg-orange-50 border border-orange-200"),children:[r.jsx("div",{className:"flex-shrink-0",children:r.jsx("div",{className:"w-6 h-6 rounded-full bg-orange-500 flex items-center justify-center",children:r.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})})}),r.jsx("p",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-orange-800"),children:"Make sure your Solana wallet has enough USDC to cover the amount before retrying the transaction."})]}),r.jsx(oe,{amount:t,description:a,onClick:()=>{ie(),J()},loading:X,disabled:X||!y?.publicKey,className:c("w-full h-12",e==="dark"||e==="solana-dark"?e==="dark"?"bg-[#FFFFFF1F] rounded-full":"bg-solana-gradient rounded-full":e==="light"?"bg-black hover:bg-gray-800 text-white font-light rounded-full":e==="solana-light"?"bg-solana-gradient hover:opacity-90 text-white font-light rounded-full":e==="seeker"||e==="seeker-2"?"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full":e==="seeker-light"?"text-white rounded-full":e==="terminal"||e==="terminal-light"?"text-black hover:opacity-90 font-vt323 rounded-none":"bg-solana-gradient rounded-full",k?.button),style:e==="terminal"?{backgroundColor:"#32FEFF",color:"#000000",...d?.button}:e==="dark"?{backgroundColor:"#FFFFFF1F",boxShadow:"0 1px 0 0 rgba(255, 255, 255, 0.3) inset",...d?.button}:e==="light"||e==="solana-light"?d?.button:e==="seeker"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent",...d?.button}:e==="seeker-2"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent",...d?.button}:e==="seeker-light"?{background:"linear-gradient(180deg, #00BECC -9.37%, #92F9FC 160.42%)",backgroundColor:"transparent",...d?.button}:d?.button,customText:"Try Again"}),r.jsx("div",{className:"text-center",children:r.jsxs("p",{className:c("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:[r.jsxs("span",{className:c(e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-gray-400":"text-slate-600"),children:["Don't have USDC?"," "]}),r.jsxs("a",{href:"https://www.coinbase.com/how-to-buy/usdc",target:"_blank",rel:"noopener noreferrer",className:c("font-medium hover:opacity-80",e==="light"||e==="solana-light"?"text-purple-600":e==="seeker"||e==="seeker-2"?"text-[#95D2E6] hover:text-[#95D2E6]":e==="seeker-light"||e==="terminal"||e==="terminal-light"?"hover:opacity-90":"text-green-400 hover:text-green-300"),style:e==="terminal"?{color:"#32FEFF"}:e==="terminal-light"?{color:"#000000"}:e==="seeker-light"?{color:"#00BECC"}:void 0,children:["Get it here",r.jsx("svg",{className:c("inline w-3 h-3 ml-1",e==="light"||e==="solana-light"?"text-purple-600":e==="seeker"||e==="seeker-2"?"text-[#95D2E6]":e==="seeker-light"||e==="terminal"||e==="terminal-light"?"":"text-green-400"),style:e==="terminal"?{color:"#32FEFF"}:e==="terminal-light"?{color:"#000000"}:e==="seeker-light"?{color:"#00BECC"}:void 0,fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"})})]})]})})]}):r.jsxs(r.Fragment,{children:[r.jsx(De,{wallet:y,onDisconnect:ce,theme:m,className:c("mb-4",(e==="dark"||e==="solana-dark")&&"bg-[#0000001F] border-slate-600 text-white",(e==="light"||e==="solana-light")&&"bg-[#F4F4F5] rounded-xl border-none"),style:e==="terminal"?{backgroundColor:"#0B2D2D",border:"1px solid #22EBAD33"}:e==="terminal-light"?{border:"1px solid #E4E4E7"}:e==="dark"||e==="solana-dark"?{boxShadow:"0px 0px 16px 4px #000000 inset"}:e==="seeker"?{backgroundColor:"rgba(0, 0, 0, 0.12)"}:e==="seeker-2"?{backgroundColor:"#171A1A"}:e==="seeker-light"?{backgroundColor:"#F4F4F5"}:e==="light"||e==="solana-light"?{backgroundColor:"#F4F4F5",border:"none"}:void 0}),h&&(e==="seeker"||e==="seeker-2"?r.jsxs("div",{className:c("p-6",O.paymentDetails),style:e==="seeker"?{backgroundColor:"rgba(0, 0, 0, 0.12)"}:e==="seeker-2"?{backgroundColor:"#171A1A"}:void 0,children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("span",{className:"text-sm text-white",children:"Amount"}),r.jsx("div",{className:"text-xl font-bold",style:{color:"#95D2E6"},children:"$"+t.toFixed(2)})]}),r.jsx("div",{className:"border-t mb-4",style:{borderTop:"1px solid #FFFFFF1F"}}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-sm text-white",children:"Wallet"}),r.jsx("div",{className:"text-sm text-white",children:y?.publicKey?.toString()?`${y.publicKey.toString().slice(0,6)}...${y.publicKey.toString().slice(-4)}`:y?.address?`${y.address.slice(0,6)}...${y.address.slice(-4)}`:"Not connected"})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-sm text-white",children:"Available Balance"}),r.jsxs("div",{className:"text-sm text-white",children:["$",U]})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-sm text-white",children:"Currency"}),r.jsx("div",{className:"text-sm text-white",children:"USDC"})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-sm text-white",children:"Network"}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"#95D2E6"}}),r.jsx("span",{className:"text-sm text-white",children:G})]})]})]})]}):r.jsxs("div",{className:c("p-6",e==="light"||e==="solana-light"?"bg-[#F4F4F5] border-none rounded-xl":O.paymentDetails),style:e==="terminal"?{backgroundColor:"#0B2D2D",border:"1px solid #22EBAD33"}:e==="terminal-light"?{border:"1px solid #E4E4E7"}:e==="dark"||e==="solana-dark"?{boxShadow:"0px 0px 16px 4px #000000 inset"}:e==="light"||e==="solana-light"?{backgroundColor:"#F4F4F5",border:"none"}:e==="seeker-light"?{backgroundColor:"#F4F4F5"}:void 0,children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"?"text-white":e==="terminal-light"||e==="seeker-light"?"text-black":e==="terminal"?"text-white":"text-black"),children:"Amount"}),r.jsx("div",{className:c("text-xl font-bold",e==="light"||e==="solana-light"?"text-purple-600":e==="terminal"||e==="terminal-light"||e==="seeker-light"?"":"text-[#21ECAB]"),style:e==="terminal"?{color:"#32FEFF"}:e==="terminal-light"?{color:"#009192"}:e==="seeker-light"?{color:"#00BECC"}:void 0,children:"$"+t.toFixed(2)})]}),r.jsx("div",{className:c("border-t mb-4",e==="dark"||e==="solana-dark"?"border-slate-600":e==="terminal"?"":"border-slate-200"),style:e==="terminal"?{borderTop:"1px solid #22EBAD1F"}:void 0}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"?"text-white":e==="terminal-light"||e==="seeker-light"?"text-black":e==="terminal"?"text-white":"text-black"),children:"Wallet"}),r.jsx("div",{className:c("text-sm",e==="dark"||e==="solana-dark"?"text-white":e==="terminal-light"?"text-black font-vt323":e==="seeker-light"?"text-black":e==="terminal"?"text-white font-vt323":"text-slate-900"),children:y?.publicKey?.toString()?`${y.publicKey.toString().slice(0,6)}...${y.publicKey.toString().slice(-4)}`:y?.address?`${y.address.slice(0,6)}...${y.address.slice(-4)}`:"Not connected"})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"?"text-white":e==="terminal-light"||e==="seeker-light"?"text-black":e==="terminal"?"text-white":"text-black"),children:"Available Balance"}),r.jsxs("div",{className:c("text-sm",e==="dark"||e==="solana-dark"?"text-white":e==="terminal-light"?"text-black font-vt323":e==="seeker-light"?"text-black":e==="terminal"?"text-white font-vt323":"text-slate-900"),children:["$",U]})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"?"text-white":e==="terminal-light"||e==="seeker-light"?"text-black":e==="terminal"?"text-white":"text-black"),children:"Currency"}),r.jsx("div",{className:c("text-sm",e==="dark"||e==="solana-dark"?"text-white":e==="terminal-light"?"text-black font-vt323":e==="seeker-light"?"text-black":e==="terminal"?"text-white font-vt323":"text-slate-900"),children:"USDC"})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"?"text-white":e==="terminal-light"||e==="seeker-light"?"text-black":e==="terminal"?"text-white":"text-black"),children:"Network"}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("div",{className:c("w-2 h-2 rounded-full",e==="terminal"||e==="terminal-light"||e==="seeker-light"?"":"bg-green-500"),style:e==="terminal"?{backgroundColor:"#32FEFF"}:e==="terminal-light"?{backgroundColor:"#009192"}:e==="seeker-light"?{backgroundColor:"#00BECC"}:void 0}),r.jsx("span",{className:c("text-sm",e==="dark"||e==="solana-dark"?"text-white":e==="terminal-light"?"text-black font-vt323":e==="seeker-light"?"text-black":e==="terminal"?"text-white font-vt323":"text-slate-900"),children:G})]})]})]})]})),r.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[r.jsxs("svg",{className:c("w-4 h-4",e==="terminal"||e==="terminal-light"||e==="seeker-light"?"":"text-green-500"),style:e==="terminal"?{color:"#32FEFF"}:e==="terminal-light"?{color:"#009192"}:e==="seeker-light"?{color:"#00BECC"}:void 0,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",children:[r.jsx("path",{d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z"}),r.jsx("path",{d:"M9 12l2 2 4-4",strokeLinecap:"round",strokeLinejoin:"round"})]}),r.jsx("span",{className:c("text-sm",O.securityMessage),style:e==="terminal"?{color:"#FFFFFF99"}:e==="seeker"?{color:"#FFFFFF66"}:e==="seeker-2"?{color:"#FFFFFF66"}:e==="terminal-light"?{color:"#71717A"}:e==="seeker-light"?{color:"#000000"}:void 0,children:"Secure payment powered by Solana"})]}),r.jsx(oe,{amount:t,description:a,onClick:J,loading:X,disabled:X||!y?.publicKey,className:c("w-full h-12",e==="dark"||e==="solana-dark"?e==="dark"?"bg-[#FFFFFF1F] rounded-full":"bg-solana-gradient rounded-full":O.button,k?.button),style:e==="terminal"?{backgroundColor:"#32FEFF",color:"#000000",...d?.button}:e==="terminal-light"?{backgroundColor:"#000000",color:"#FFFFFF",...d?.button}:e==="dark"?{backgroundColor:"#FFFFFF1F",boxShadow:"0 1px 0 0 rgba(255, 255, 255, 0.3) inset",...d?.button}:e==="seeker"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent",...d?.button}:e==="seeker-2"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent",...d?.button}:e==="seeker-light"?{background:"linear-gradient(180deg, #00BECC -9.37%, #92F9FC 160.42%)",backgroundColor:"transparent",...d?.button}:d?.button}),B&&r.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:r.jsxs("p",{className:"text-sm text-red-800 text-center",children:[r.jsx("span",{className:"font-semibold",children:"Payment Error:"})," ",B.message]})}),r.jsx("div",{className:"text-center",children:r.jsxs("p",{className:c("text-sm",O.helperText),children:[r.jsxs("span",{style:e==="terminal"?{color:"#FFFFFF99"}:e==="terminal-light"?{color:"#71717A"}:e==="seeker"?{color:"#FFFFFF66"}:e==="seeker-2"?{color:"#FFFFFF66"}:void 0,children:["Don't have USDC?"," "]}),r.jsxs("a",{href:"#",className:c("font-medium",e==="seeker"||e==="seeker-2"?"text-[#95D2E6]":e==="seeker-light"?"hover:opacity-90":e==="light"||e==="solana-light"?"text-purple-600":e==="terminal"||e==="terminal-light"?"hover:opacity-90":O.helperLink||"text-[#4ADE80]"),style:e==="terminal"?{color:"#32FEFF"}:e==="terminal-light"?{color:"#000000"}:e==="seeker"?{color:"#95D2E6"}:e==="seeker-2"?{color:"#95D2E6"}:e==="seeker-light"?{color:"#00BECC"}:void 0,children:["Get it here",r.jsx("svg",{className:c("inline w-3 h-3 ml-1",e==="light"||e==="solana-light"?"text-purple-600":e==="seeker"||e==="seeker-2"?"text-[#95D2E6]":e==="seeker-light"||e==="terminal"||e==="terminal-light"?"":"text-[#4ADE80]"),style:e==="terminal"?{color:"#32FEFF"}:e==="terminal-light"?{color:"#000000"}:e==="seeker-light"?{color:"#00BECC"}:void 0,fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"})})]})]})})]})})]})]})},st=({autoSetupProviders:t=!0,providerNetwork:a,providerEndpoint:o,...n})=>{const l=a??(n.network==="solana"?Se.WalletAdapterNetwork.Mainnet:Se.WalletAdapterNetwork.Devnet),s=T.useMemo(()=>o||n.rpcUrl||W.clusterApiUrl(l),[o,n.rpcUrl,l]),i=T.useMemo(()=>[new Pe.PhantomWalletAdapter,new Pe.SolflareWalletAdapter],[]);return t?r.jsx(Ce.ConnectionProvider,{endpoint:s,children:r.jsx(Ce.WalletProvider,{wallets:i,autoConnect:!0,children:r.jsx(We.WalletModalProvider,{children:r.jsx(Ue,{...n})})})}):r.jsx(Ue,{...n})};st.displayName="X402Paywall";const lt=({status:t,message:a,progress:o,className:n,style:l})=>{const i=(()=>{switch(t){case"idle":return{label:"Ready",color:"bg-gray-100 text-gray-800",icon:null};case"connecting":return{label:"Connecting",color:"bg-blue-100 text-blue-800",icon:r.jsx(se,{size:"sm",variant:"default"})};case"pending":return{label:"Processing",color:"bg-yellow-100 text-yellow-800",icon:r.jsx(se,{size:"sm",variant:"solana"})};case"success":return{label:"Paid",color:"bg-green-100 text-green-800",icon:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})};case"error":return{label:"Failed",color:"bg-red-100 text-red-800",icon:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})};default:return{label:"Unknown",color:"bg-gray-100 text-gray-800",icon:null}}})();return r.jsxs("div",{className:c("flex flex-col gap-2",n),style:l,children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs(Te,{className:c("flex items-center gap-1.5",i.color),children:[i.icon,r.jsx("span",{children:i.label})]}),a&&r.jsx("span",{className:"text-sm text-muted-foreground",children:a})]}),o!==void 0&&o>0&&r.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 overflow-hidden",children:r.jsx("div",{className:"bg-solana-gradient h-full transition-all duration-300",style:{width:`${o}%`}})})]})};lt.displayName="PaymentStatus";exports.Badge=Te;exports.Button=Ae;exports.Card=ae;exports.CardContent=ne;exports.CardDescription=ke;exports.CardHeader=pe;exports.CardTitle=fe;exports.PaymentButton=oe;exports.PaymentStatus=lt;exports.Spinner=se;exports.WalletSection=De;exports.X402Paywall=st;exports.cn=c;exports.useX402Payment=nt;
2
14
  //# sourceMappingURL=index.js.map