@miden-npm/vue 0.0.7 → 0.0.8

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.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),$0=Symbol("MidenPGConfig");function fr(o){if(!(o!=null&&o.publishableKey))throw new Error("[@miden-npm/vue] publishableKey is required");return{install(e){e.provide($0,o)}}}function pr(){const o=a.inject($0);if(!o)throw new Error("[@miden-npm/vue] Missing provider. Did you forget to app.use(createMidenPG(...))?");return o}const ze=o=>o==null||typeof o!="object"?!1:Object.values(o).every(Boolean),Ht=o=>{const e={};return new URL(o).searchParams.forEach((r,n)=>{e[n]=r}),e},Ce=o=>o==="sandbox"?"https://sandbox-api.midencards.io/payment-gateway-core-api":"",vr=o=>o==="USD"?"$":o==="NGN"?"₦":o==="EUR"?"€":o==="GBP"?"£":o==="JPY"||o==="CNY"?"¥":o==="USDC"||o==="usdc"?"$⧫":o==="USDT"||o==="usdt"?"₮":"$",we=(o,e)=>{const t=typeof o=="string"?parseFloat(o):o;return isNaN(t)?"0":`${e?vr(e):""} ${t==null?void 0:t.toLocaleString("en-US")}`},mr=(o,e)=>o.length<=e?o:o.slice(0,e)+"...",Cr=o=>{const e=["Backspace","Tab","ArrowLeft","ArrowRight","Delete","Home","End","."];(o.ctrlKey||o.metaKey)&&["a","c","v","x"].includes(o.key.toLowerCase())||(!e.includes(o.key)&&!/^\d$/.test(o.key)&&o.preventDefault(),o.key==="."&&o.target.value.includes(".")&&o.preventDefault())},xe=(o,e)=>e.test(o);function gr(o){return o?o.split("|").map(e=>{const[t,r]=e.split(":");return{rule:t,value:r}}):[]}function Br(o,e,t){const r=[],n=gr(o),i=(t||"This field").toLowerCase(),u=e??"",l=Number(u),f=!Number.isNaN(l);for(const s of n)switch(s.rule){case"required":u||r.push(`The ${i} field is required`);break;case"alpha":xe(u,/^[a-zA-Z]+$/)||r.push(`The ${i} field must only contain alphabetic characters`);break;case"at_least_one_uppercase":xe(u,/.*[A-Z].*/)||r.push(`The ${i} field must contain at least one uppercase character`);break;case"at_least_one_lowercase":xe(u,/.*[a-z].*/)||r.push(`The ${i} field must contain at least one lowercase character`);break;case"at_least_one_number":xe(u,/.*\d.*/)||r.push(`The ${i} field must contain at least one number`);break;case"alpha_num":xe(u,/^[a-z0-9]+$/i)||r.push(`The ${i} field must only contain alphabetic characters and numbers`);break;case"num_spaces":xe(u,/^[0-9\s]+$/i)||r.push(`The ${i} field must only contain space and numbers`);break;case"alpha_spaces":xe(u,/^[A-Za-z\s]*$/)||r.push(`The ${i} field must only contain alphabetic characters and spaces`);break;case"numeric":xe(u,/^\d+$/)||r.push(`The ${i} field must only contain numbers`);break;case"no_special":xe(u,/[^a-zA-Z0-9\s]/)&&r.push(`The ${i} field must not contain special characters`);break;case"at_least_one_special":xe(u,/[^a-zA-Z0-9\s]/)||r.push(`The ${i} field must contain at least one special character`);break;case"email":xe(u,/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/)||r.push("Please enter a valid email address");break;case"is":s.value!==u&&r.push(`Value entered must be ${s.value}`);break;case"is_not":s.value===u&&r.push(`Value entered must not be ${s.value}`);break;case"char_length":u.length!==Number(s.value)&&r.push(`The ${i} field must be ${s.value} characters long`);break;case"min_char_length":u.length<Number(s.value)&&r.push(`The ${i} field must not be less than ${s.value} characters long`);break;case"max_char_length":u.length>Number(s.value)&&r.push(`The ${i} field must not be greater than ${s.value} characters long`);break;case"age":(!f||l!==Number(s.value))&&r.push(`Age entered must be ${s.value}`);break;case"min_age":(!f||l<Number(s.value))&&r.push(`Age entered must not be less than ${s.value}`);break;case"max_age":(!f||l>Number(s.value))&&r.push(`Age entered must not be greater than ${s.value}`);break;case"num_is":(!f||l!==Number(s.value))&&r.push(`Number entered must be ${s.value}`);break;case"num_is_not":f&&l===Number(s.value)&&r.push(`Number entered must not be ${s.value}`);break;case"min_number":(!f||l<Number(s.value))&&r.push(`Number entered must not be less than ${s.value}`);break;case"max_number":(!f||l>Number(s.value))&&r.push(`Number entered must not be greater than ${s.value}`);break}return r.length>0?r[0]:null}const je=(o,e,t)=>{const r={};for(const[n,i]of Object.entries(e)){if(!i)continue;const u=(t==null?void 0:t[n])??n,l=Br(i,o[n]??"",u);l&&(r[n]=l)}return r};var L0=(o=>(o[o.Visa=1]="Visa",o[o.MasterCard=2]="MasterCard",o[o.Verve=3]="Verve",o[o.MastercardAndVisa=4]="MastercardAndVisa",o[o.AmericanExpress=5]="AmericanExpress",o[o.Discover=6]="Discover",o[o.JCB=7]="JCB",o[o.DinersClub=8]="DinersClub",o[o.Maestro=9]="Maestro",o[o.UnionPay=10]="UnionPay",o[o.UnionPay3DS=11]="UnionPay3DS",o[o.UnionPayNon3DS=12]="UnionPayNon3DS",o[o.UATP=13]="UATP",o[o.PayPak=14]="PayPak",o[o.Jaywan=15]="Jaywan",o[o.Mada=16]="Mada",o[o.MadaVisa=17]="MadaVisa",o[o.MadaMastercard=18]="MadaMastercard",o[o.Unknown=19]="Unknown",o))(L0||{});const e0=/^4\d{12}(\d{3}){0,2}$/,t0=/^(?:5[1-5]\d{14}|2(?:2(?:2[1-9]|[3-9]\d)|[3-6]\d{2}|7(?:[01]\d|20))\d{12})(?:\d{0,3})?$/,_r=/^(34|37)\d{13}$/,Er=/^(?:6011|65|64[4-9]|622(?:12[6-9]|1[3-9]\d|[2-8]\d{2}|9(?:0\d|1\d|2[0-5])))\d{12,15}$/,yr=/^(?:35(?:2[8-9]|[3-8]\d))\d{12,15}$/,kr=/^(?:3(?:0[0-5]\d|095|6\d|[89]\d))\d{11,13}$/,Ar=/^(?:50|5[6-9]|6[0-9])\d{10,17}$/,et=/^62\d{14,17}$/,br=/^1\d{14}$/,Fr=[[506099,506198],[650002,650027]],Dr=new Set([507865,507866]),wr=new Set([220545,220543]),Sr=new Set([6690109]),Vr=new Set([968209,873646]),Nr=new Set([422818,486094]),Rr=new Set([529741,543357]),Ir=new Set([620108]),Tr=new Set([621423]);function Mr(o){const e=Pr(o);return L0[e]}function Pr(o){if(!o||!o.trim())return 19;const e=o.replace(/\D/g,"");if(e.length<12||e.length>19)return 19;if(e.length>=6){const t=parseInt(e.slice(0,6),10);if(Vr.has(t)&&e.length>=16&&e.length<=19)return 16;if(Nr.has(t)&&e0.test(e))return 17;if(Rr.has(t)&&t0.test(e))return 18;if(wr.has(t)&&e.length===16)return 14;if(Ir.has(t)&&et.test(e))return 11;if(Tr.has(t)&&et.test(e))return 12;if(Or(t,e.length))return 3}if(e.length>=7){const t=parseInt(e.slice(0,7),10);if(Sr.has(t)&&e.length===16)return 15}return br.test(e)?13:_r.test(e)?5:Er.test(e)?6:yr.test(e)?7:kr.test(e)?8:t0.test(e)?2:e0.test(e)?1:et.test(e)?10:Ar.test(e)?9:19}function Or(o,e){return e<16||e>19?!1:Fr.some(([r,n])=>o>=r&&o<=n)||Dr.has(o)}const Hr=["width","height"],$r=["stroke"],Lr=["fill"],z0=a.defineComponent({__name:"icon-loader",props:{size:{default:24},color:{default:"currentColor"},className:{default:""}},setup(o){const e=o,t=a.useAttrs(),{size:r,color:n,className:i}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({class:["animate-spin",a.unref(i)],xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:a.unref(r),height:a.unref(r),role:"img","aria-label":"loading"},a.unref(t)),[a.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:a.unref(n),"stroke-width":"4"},null,8,$r),a.createElementVNode("path",{class:"opacity-75",fill:a.unref(n),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,8,Lr)],16,Hr))}}),zr=["disabled"],qr={key:1},Se=a.defineComponent({__name:"button",props:{label:{default:""},type:{default:"neutral"},size:{default:"de"},paddingClassX:{default:"px-8"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},customClass:{default:""}},emits:["click"],setup(o,{emit:e}){const t=o,r=e,n=a.computed(()=>t.disabled||t.loading);function i(){n.value||r("click")}function u(s,d){if(d)return"bg-gray-200 text-gray-400 cursor-not-allowed border-gray-200";switch(s){case"primary":return"bg-primary text-white hover:bg-primary-black hover:border-primary-black border-primary";case"secondary":return"bg-gray-200 border-gray-200 hover:bg-gray-300 text-heading-text";case"danger":return"bg-red-500 border-red-500 text-white hover:bg-red-600";case"neutral":default:return"bg-off-white border-grey-border hover:bg-gray-100"}}function l(s){switch(s){case"de":return"h-68px rounded-xl";case"md":return"h-42px rounded-lg";case"sm":return"h-32px rounded-md";default:return"h-68px rounded-xl"}}function f(s){switch(s){case"de":case"md":case"sm":return"text-body-2xs font-normal";default:return"text-body-xs font-normal"}}return(s,d)=>(a.openBlock(),a.createElementBlock("button",{class:a.normalizeClass(["flex items-center justify-center gap-2 py-3 border font-normal text-input-grey transition-colors duration-300 ease-in-out",u(s.type,n.value),l(s.size),s.paddingClassX,s.customClass]),type:"button",disabled:n.value,onClick:i},[a.renderSlot(s.$slots,"prefix"),s.loading?(a.openBlock(),a.createBlock(z0,{key:0})):(a.openBlock(),a.createElementBlock("div",qr,[s.label?(a.openBlock(),a.createElementBlock("p",{key:0,class:a.normalizeClass(["mb-0",f(s.size)])},a.toDisplayString(s.label),3)):a.renderSlot(s.$slots,"default",{key:1})])),a.renderSlot(s.$slots,"suffix")],10,zr))}}),Ur={class:"mb-0 text-body-3xs font-normal text-red-500"},q0=a.defineComponent({__name:"input-error",props:{errorMessage:{}},setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("p",Ur,a.toDisplayString(e.errorMessage),1))}});async function qe(o,e,t){try{const r=Ce(e);return await(await fetch(`${r}/api/v1/checkout/generate-payment-link2`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:t},body:JSON.stringify({...o,LinkName:`${Date.now()}-Link`})})).json()}catch{}}async function jr(o,{merchantId:e,...t}){try{const r=Ce(o);return await(await fetch(`${r}/api/v1/checkout/authorize-card-3ds-payment`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e},body:JSON.stringify(t)})).json()}catch{}}async function Kr(o,{merchantId:e,...t}){try{const r=Ce(o);return await(await fetch(`${r}/api/v1/checkout/generate-payment-account`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e},body:JSON.stringify(t)})).json()}catch{}}async function U0(o,e){try{const t=Ce(o);return await(await fetch(`${t}/api/v1/checkout/details/${e}`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}})).json()}catch{}}async function Wr(o,{merchantId:e,...t}){try{const r=Ce(o);return await(await fetch(`${r}/api/v1/checkout/generate-payment-walletaddress`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e},body:JSON.stringify(t)})).json()}catch{}}const Gr={key:0,class:"absolute inset-0 grid place-items-center bg-white/60"},j0=a.defineComponent({__name:"checkout-iframe",props:{style:{default:()=>({width:"100%",height:"100vh",border:"0",borderRadius:"6px",overflow:"hidden"})},url:{default:void 0},secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:""})}},setup(o){const e=o,t=a.computed(()=>({...e.style})),r=a.ref(null),n=a.ref(null),i=a.ref(""),u=a.ref(!1);function l(){n.value&&n.value.parentNode&&n.value.parentNode.removeChild(n.value),n.value=null}function f(d){var v;l();const g=document.createElement("iframe");g.src=d;const c=e.style;c.width&&(g.style.width=c.width),c.height&&(g.style.height=c.height),c.border&&(g.style.border=c.border),c.borderRadius&&(g.style.borderRadius=c.borderRadius),c.overflow&&(g.style.overflow=c.overflow),(v=r.value)==null||v.appendChild(g),n.value=g}async function s(){if(e.url){f(e.url);return}if(!e.secretKey){i.value="Secret key is required.";return}if(!ze(e.paymentObject)){i.value="Kindly ensure you are passing all the required data.";return}u.value=!0,i.value="";try{const d=await qe(e.paymentObject,e.environment,e.secretKey);d!=null&&d.isSuccessful&&d.launchUrl?(i.value="Payment link created successfully",f(d.launchUrl)):i.value="Failed to create payment link"}catch(d){i.value=(d==null?void 0:d.message)||"Failed to create payment link"}finally{u.value=!1}}return a.onMounted(()=>{r.value&&s()}),a.watch(()=>e.url,d=>{d&&f(d)}),a.onBeforeUnmount(()=>{l()}),(d,g)=>(a.openBlock(),a.createElementBlock("div",{class:"relative",style:a.normalizeStyle(t.value)},[a.createElementVNode("div",{ref_key:"containerRef",ref:r,class:"w-full h-full"},null,512),u.value?(a.openBlock(),a.createElementBlock("div",Gr,[a.createVNode(z0)])):a.createCommentVNode("",!0)],4))}}),Zr={key:1},Xr=a.defineComponent({__name:"checkout-button",props:{secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:""})},mode:{default:"redirect"}},setup(o){const e=o,t=a.ref(""),r=a.ref(""),n=a.ref(!1);async function i(){if(!e.secretKey){t.value="Secret key is required.";return}if(!ze(e.paymentObject)){t.value="Kindly ensure you are passing all the required data.";return}n.value=!0,t.value="";try{const s=await qe(e.paymentObject,e.environment,e.secretKey);s!=null&&s.isSuccessful&&s.launchUrl?(r.value=s.launchUrl,t.value="Payment link created successfully",e.mode==="redirect"&&window.open(s.launchUrl,"_blank","noopener,noreferrer")):t.value="Failed to create payment link"}catch(s){t.value=(s==null?void 0:s.message)||"Failed to create payment link"}finally{n.value=!1}}const{secretKey:u,environment:l,mode:f}=e;return(s,d)=>r.value&&a.unref(f)==="iframe"?(a.openBlock(),a.createBlock(j0,{key:0,url:r.value,secretKey:a.unref(u),environment:a.unref(l)},null,8,["url","secretKey","environment"])):(a.openBlock(),a.createElementBlock("div",Zr,[a.createVNode(Se,{label:"Pay",type:"primary",customClass:"w-full",loading:n.value,onClick:i},null,8,["loading"]),a.createVNode(q0,{errorMessage:t.value},null,8,["errorMessage"])]))}}),Yr=["width","height"],Qr=["fill"],Jr=a.defineComponent({__name:"icon-chevron-left",props:{width:{default:17},height:{default:17},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:i}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M10.5 14.28C10.3734 14.28 10.2467 14.2333 10.1467 14.1333L5.80002 9.78668C5.09335 9.08001 5.09335 7.92001 5.80002 7.21335L10.1467 2.86668C10.34 2.67335 10.66 2.67335 10.8534 2.86668C11.0467 3.06001 11.0467 3.38001 10.8534 3.57335L6.50669 7.92001C6.18669 8.24001 6.18669 8.76001 6.50669 9.08001L10.8534 13.4267C11.0467 13.62 11.0467 13.94 10.8534 14.1333C10.7534 14.2267 10.6267 14.28 10.5 14.28Z",fill:a.unref(i)},null,8,Qr)],16,Yr))}}),ea=a.defineComponent({__name:"back",emits:["back"],setup(o,{emit:e}){return(t,r)=>(a.openBlock(),a.createElementBlock("div",{class:"flex items-center gap-2 cursor-pointer",onClick:r[0]||(r[0]=n=>t.$emit("back"))},[a.createVNode(Jr),r[1]||(r[1]=a.createElementVNode("p",{class:"mb-0 text-body-xs font-normal"},"Back",-1))]))}}),ta=["width","height"],ra=["fill"],aa=a.defineComponent({__name:"icon-buzapay-icon",props:{width:{default:15},height:{default:13},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:i}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 15 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M9.97919 0.5C10.8854 0.5 11.6276 0.585938 12.2057 0.757812C12.7891 0.924479 13.2188 1.22396 13.4948 1.65625C13.7761 2.08333 13.9167 2.6901 13.9167 3.47656C13.9167 4.1849 13.7526 4.77083 13.4245 5.23438C13.0964 5.69792 12.5938 5.95312 11.9167 6C12.8021 6.08854 13.4401 6.40625 13.8307 6.95312C14.2214 7.49479 14.4167 8.17708 14.4167 9C14.4167 9.71354 14.3334 10.2995 14.1667 10.7578C14.0052 11.2161 13.7318 11.5729 13.3464 11.8281C12.961 12.0781 12.4375 12.2526 11.7761 12.3516C11.1198 12.4505 10.2995 12.5 9.31512 12.5H0.416687V0.5H9.97919ZM2.91669 7.77344H5.97235V11.167L10.2497 5.22754H7.19501V1.83398L2.91669 7.77344ZM5.97235 6.07617H8.2702L7.19501 7.57324V6.9248H4.89716L5.97235 5.42676V6.07617Z",fill:a.unref(i)},null,8,ra)],16,ta))}}),na={class:"checkout-card w-full h-screen flex flex-col items-center justify-center text-white"},sa={class:"flex w-1/2"},ia={class:"flex gap-2 w-full"},oa={class:"flex flex-col gap-8 w-full"},la={class:"bg-off-white rounded-xl"},ua={class:"flex items-center gap-2 justify-center"},ca=a.defineComponent({__name:"card",props:{showBackButton:{type:Boolean,default:!1}},emits:["back","close"],setup(o,{emit:e}){const t=e;return(r,n)=>(a.openBlock(),a.createElementBlock("div",na,[a.createElementVNode("div",sa,[r.showBackButton?(a.openBlock(),a.createBlock(ea,{key:0,onBack:n[0]||(n[0]=i=>t("back"))})):a.createCommentVNode("",!0),a.createElementVNode("div",ia,[a.createElementVNode("div",oa,[a.createElementVNode("div",la,[a.renderSlot(r.$slots,"default")]),a.createElementVNode("div",ua,[n[2]||(n[2]=a.createElementVNode("p",{class:"text-light-white-100 text-body-2xs font-regular"}," Powered by Buzapay ",-1)),a.createVNode(aa,{color:"#E8F4FF"})])]),a.createElementVNode("div",{class:"close-icon flex flex-col items-center justify-center self-start cursor-pointer hover:bg-gray-500",onClick:n[1]||(n[1]=i=>t("close")),role:"button","aria-label":"Close"},[...n[3]||(n[3]=[a.createElementVNode("p",{class:"text-white"},"x",-1)])])])])]))}}),da=["aria-orientation"],xa=["aria-checked","onClick"],ha={key:0,class:"bg-white w-2 h-2 rounded-full"},fa={class:"mb-0 text-body-2xs font-medium text-heading-text"},pa=a.defineComponent({__name:"radio-group",props:{options:{default:()=>[]},type:{default:"vertical"},modelValue:{default:void 0},defaultValue:{default:void 0},className:{default:""}},emits:["update:modelValue","selectedChange"],setup(o,{emit:e}){const t=o,r=e,n=a.computed(()=>t.modelValue!==void 0),i=a.ref("");a.onMounted(()=>{if(n.value)return;const c=t.defaultValue??(t.options.length?t.options[0].value:"");i.value=c,c&&(r("update:modelValue",c),r("selectedChange",c))}),a.watch(()=>t.modelValue,c=>{n.value&&(i.value=c??"")},{immediate:!0});const u=a.computed(()=>n.value?t.modelValue??"":i.value);function l(c){n.value||(i.value=c),r("update:modelValue",c),r("selectedChange",c)}const f=a.computed(()=>t.type==="horizontal"?"flex-row gap-5":"flex-col gap-6"),{options:s,type:d,className:g}=t;return(c,v)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["flex",f.value,a.unref(g)]),role:"radiogroup","aria-orientation":a.unref(d)==="horizontal"?"horizontal":"vertical",tabindex:"0"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(s),x=>(a.openBlock(),a.createElementBlock("div",{key:x.value,role:"radio","aria-checked":u.value===x.value,tabindex:"-1",onClick:C=>l(x.value),class:"flex items-center gap-2 cursor-pointer transition-colors duration-200"},[a.createElementVNode("div",{class:a.normalizeClass(["w-4 h-4 rounded-full border flex items-center justify-center",u.value===x.value?"bg-orange-500 border-orange-500":"bg-white border-grey-200"])},[u.value===x.value?(a.openBlock(),a.createElementBlock("div",ha)):a.createCommentVNode("",!0)],2),a.createElementVNode("p",fa,a.toDisplayString(x.label),1)],8,xa))),128))],10,da))}}),va=["src","height","alt"],ke=a.defineComponent({__name:"image",props:{src:{},height:{default:50},width:{default:50},alt:{default:"Image"},customClass:{default:""},isFullWidth:{type:Boolean,default:!1}},emits:["click"],setup(o,{emit:e}){const t=o,r=e,{src:n,height:i,width:u,alt:l,customClass:f,isFullWidth:s}=t;return(d,g)=>(a.openBlock(),a.createElementBlock("img",{src:a.unref(n),height:a.unref(i),alt:a.unref(l),class:a.normalizeClass([a.unref(f),a.unref(s)?"w-full":""]),style:a.normalizeStyle({width:a.unref(s)?"100%":a.unref(u)+"px"}),onClick:g[0]||(g[0]=c=>r("click"))},null,14,va))}});var W=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ma(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function Ca(o){if(o.__esModule)return o;var e=o.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(o).forEach(function(r){var n=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return o[r]}})}),t}var K0={exports:{}};function ga(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var tt={exports:{}};const Ba={},_a=Object.freeze(Object.defineProperty({__proto__:null,default:Ba},Symbol.toStringTag,{value:"Module"})),Ea=Ca(_a);var r0;function G(){return r0||(r0=1,function(o,e){(function(t,r){o.exports=r()})(W,function(){var t=t||function(r,n){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof W<"u"&&W.crypto&&(i=W.crypto),!i&&typeof ga=="function")try{i=Ea}catch{}var u=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function h(){}return function(m){var B;return h.prototype=m,B=new h,h.prototype=null,B}}(),f={},s=f.lib={},d=s.Base=function(){return{extend:function(h){var m=l(this);return h&&m.mixIn(h),(!m.hasOwnProperty("init")||this.init===m.init)&&(m.init=function(){m.$super.init.apply(this,arguments)}),m.init.prototype=m,m.$super=this,m},create:function(){var h=this.extend();return h.init.apply(h,arguments),h},init:function(){},mixIn:function(h){for(var m in h)h.hasOwnProperty(m)&&(this[m]=h[m]);h.hasOwnProperty("toString")&&(this.toString=h.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=s.WordArray=d.extend({init:function(h,m){h=this.words=h||[],m!=n?this.sigBytes=m:this.sigBytes=h.length*4},toString:function(h){return(h||v).stringify(this)},concat:function(h){var m=this.words,B=h.words,b=this.sigBytes,A=h.sigBytes;if(this.clamp(),b%4)for(var w=0;w<A;w++){var V=B[w>>>2]>>>24-w%4*8&255;m[b+w>>>2]|=V<<24-(b+w)%4*8}else for(var T=0;T<A;T+=4)m[b+T>>>2]=B[T>>>2];return this.sigBytes+=A,this},clamp:function(){var h=this.words,m=this.sigBytes;h[m>>>2]&=4294967295<<32-m%4*8,h.length=r.ceil(m/4)},clone:function(){var h=d.clone.call(this);return h.words=this.words.slice(0),h},random:function(h){for(var m=[],B=0;B<h;B+=4)m.push(u());return new g.init(m,h)}}),c=f.enc={},v=c.Hex={stringify:function(h){for(var m=h.words,B=h.sigBytes,b=[],A=0;A<B;A++){var w=m[A>>>2]>>>24-A%4*8&255;b.push((w>>>4).toString(16)),b.push((w&15).toString(16))}return b.join("")},parse:function(h){for(var m=h.length,B=[],b=0;b<m;b+=2)B[b>>>3]|=parseInt(h.substr(b,2),16)<<24-b%8*4;return new g.init(B,m/2)}},x=c.Latin1={stringify:function(h){for(var m=h.words,B=h.sigBytes,b=[],A=0;A<B;A++){var w=m[A>>>2]>>>24-A%4*8&255;b.push(String.fromCharCode(w))}return b.join("")},parse:function(h){for(var m=h.length,B=[],b=0;b<m;b++)B[b>>>2]|=(h.charCodeAt(b)&255)<<24-b%4*8;return new g.init(B,m)}},C=c.Utf8={stringify:function(h){try{return decodeURIComponent(escape(x.stringify(h)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(h){return x.parse(unescape(encodeURIComponent(h)))}},p=s.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(h){typeof h=="string"&&(h=C.parse(h)),this._data.concat(h),this._nDataBytes+=h.sigBytes},_process:function(h){var m,B=this._data,b=B.words,A=B.sigBytes,w=this.blockSize,V=w*4,T=A/V;h?T=r.ceil(T):T=r.max((T|0)-this._minBufferSize,0);var k=T*w,S=r.min(k*4,A);if(k){for(var F=0;F<k;F+=w)this._doProcessBlock(b,F);m=b.splice(0,k),B.sigBytes-=S}return new g.init(m,S)},clone:function(){var h=d.clone.call(this);return h._data=this._data.clone(),h},_minBufferSize:0});s.Hasher=p.extend({cfg:d.extend(),init:function(h){this.cfg=this.cfg.extend(h),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(h){return this._append(h),this._process(),this},finalize:function(h){h&&this._append(h);var m=this._doFinalize();return m},blockSize:16,_createHelper:function(h){return function(m,B){return new h.init(B).finalize(m)}},_createHmacHelper:function(h){return function(m,B){return new E.HMAC.init(h,B).finalize(m)}}});var E=f.algo={};return f}(Math);return t})}(tt)),tt.exports}var rt={exports:{}},a0;function Ze(){return a0||(a0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(r){var n=t,i=n.lib,u=i.Base,l=i.WordArray,f=n.x64={};f.Word=u.extend({init:function(s,d){this.high=s,this.low=d}}),f.WordArray=u.extend({init:function(s,d){s=this.words=s||[],d!=r?this.sigBytes=d:this.sigBytes=s.length*8},toX32:function(){for(var s=this.words,d=s.length,g=[],c=0;c<d;c++){var v=s[c];g.push(v.high),g.push(v.low)}return l.create(g,this.sigBytes)},clone:function(){for(var s=u.clone.call(this),d=s.words=this.words.slice(0),g=d.length,c=0;c<g;c++)d[c]=d[c].clone();return s}})}(),t})}(rt)),rt.exports}var at={exports:{}},n0;function ya(){return n0||(n0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,n=r.lib,i=n.WordArray,u=i.init,l=i.init=function(f){if(f instanceof ArrayBuffer&&(f=new Uint8Array(f)),(f instanceof Int8Array||typeof Uint8ClampedArray<"u"&&f instanceof Uint8ClampedArray||f instanceof Int16Array||f instanceof Uint16Array||f instanceof Int32Array||f instanceof Uint32Array||f instanceof Float32Array||f instanceof Float64Array)&&(f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength)),f instanceof Uint8Array){for(var s=f.byteLength,d=[],g=0;g<s;g++)d[g>>>2]|=f[g]<<24-g%4*8;u.call(this,d,s)}else u.apply(this,arguments)};l.prototype=i}}(),t.lib.WordArray})}(at)),at.exports}var nt={exports:{}},s0;function ka(){return s0||(s0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,i=n.WordArray,u=r.enc;u.Utf16=u.Utf16BE={stringify:function(f){for(var s=f.words,d=f.sigBytes,g=[],c=0;c<d;c+=2){var v=s[c>>>2]>>>16-c%4*8&65535;g.push(String.fromCharCode(v))}return g.join("")},parse:function(f){for(var s=f.length,d=[],g=0;g<s;g++)d[g>>>1]|=f.charCodeAt(g)<<16-g%2*16;return i.create(d,s*2)}},u.Utf16LE={stringify:function(f){for(var s=f.words,d=f.sigBytes,g=[],c=0;c<d;c+=2){var v=l(s[c>>>2]>>>16-c%4*8&65535);g.push(String.fromCharCode(v))}return g.join("")},parse:function(f){for(var s=f.length,d=[],g=0;g<s;g++)d[g>>>1]|=l(f.charCodeAt(g)<<16-g%2*16);return i.create(d,s*2)}};function l(f){return f<<8&4278255360|f>>>8&16711935}}(),t.enc.Utf16})}(nt)),nt.exports}var st={exports:{}},i0;function Ve(){return i0||(i0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,i=n.WordArray,u=r.enc;u.Base64={stringify:function(f){var s=f.words,d=f.sigBytes,g=this._map;f.clamp();for(var c=[],v=0;v<d;v+=3)for(var x=s[v>>>2]>>>24-v%4*8&255,C=s[v+1>>>2]>>>24-(v+1)%4*8&255,p=s[v+2>>>2]>>>24-(v+2)%4*8&255,E=x<<16|C<<8|p,h=0;h<4&&v+h*.75<d;h++)c.push(g.charAt(E>>>6*(3-h)&63));var m=g.charAt(64);if(m)for(;c.length%4;)c.push(m);return c.join("")},parse:function(f){var s=f.length,d=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var c=0;c<d.length;c++)g[d.charCodeAt(c)]=c}var v=d.charAt(64);if(v){var x=f.indexOf(v);x!==-1&&(s=x)}return l(f,s,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(f,s,d){for(var g=[],c=0,v=0;v<s;v++)if(v%4){var x=d[f.charCodeAt(v-1)]<<v%4*2,C=d[f.charCodeAt(v)]>>>6-v%4*2,p=x|C;g[c>>>2]|=p<<24-c%4*8,c++}return i.create(g,c)}}(),t.enc.Base64})}(st)),st.exports}var it={exports:{}},o0;function Aa(){return o0||(o0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,i=n.WordArray,u=r.enc;u.Base64url={stringify:function(f,s){s===void 0&&(s=!0);var d=f.words,g=f.sigBytes,c=s?this._safe_map:this._map;f.clamp();for(var v=[],x=0;x<g;x+=3)for(var C=d[x>>>2]>>>24-x%4*8&255,p=d[x+1>>>2]>>>24-(x+1)%4*8&255,E=d[x+2>>>2]>>>24-(x+2)%4*8&255,h=C<<16|p<<8|E,m=0;m<4&&x+m*.75<g;m++)v.push(c.charAt(h>>>6*(3-m)&63));var B=c.charAt(64);if(B)for(;v.length%4;)v.push(B);return v.join("")},parse:function(f,s){s===void 0&&(s=!0);var d=f.length,g=s?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var v=0;v<g.length;v++)c[g.charCodeAt(v)]=v}var x=g.charAt(64);if(x){var C=f.indexOf(x);C!==-1&&(d=C)}return l(f,d,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function l(f,s,d){for(var g=[],c=0,v=0;v<s;v++)if(v%4){var x=d[f.charCodeAt(v-1)]<<v%4*2,C=d[f.charCodeAt(v)]>>>6-v%4*2,p=x|C;g[c>>>2]|=p<<24-c%4*8,c++}return i.create(g,c)}}(),t.enc.Base64url})}(it)),it.exports}var ot={exports:{}},l0;function Ne(){return l0||(l0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(r){var n=t,i=n.lib,u=i.WordArray,l=i.Hasher,f=n.algo,s=[];(function(){for(var C=0;C<64;C++)s[C]=r.abs(r.sin(C+1))*4294967296|0})();var d=f.MD5=l.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(C,p){for(var E=0;E<16;E++){var h=p+E,m=C[h];C[h]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var B=this._hash.words,b=C[p+0],A=C[p+1],w=C[p+2],V=C[p+3],T=C[p+4],k=C[p+5],S=C[p+6],F=C[p+7],_=C[p+8],y=C[p+9],M=C[p+10],$=C[p+11],L=C[p+12],H=C[p+13],P=C[p+14],O=C[p+15],D=B[0],R=B[1],I=B[2],N=B[3];D=g(D,R,I,N,b,7,s[0]),N=g(N,D,R,I,A,12,s[1]),I=g(I,N,D,R,w,17,s[2]),R=g(R,I,N,D,V,22,s[3]),D=g(D,R,I,N,T,7,s[4]),N=g(N,D,R,I,k,12,s[5]),I=g(I,N,D,R,S,17,s[6]),R=g(R,I,N,D,F,22,s[7]),D=g(D,R,I,N,_,7,s[8]),N=g(N,D,R,I,y,12,s[9]),I=g(I,N,D,R,M,17,s[10]),R=g(R,I,N,D,$,22,s[11]),D=g(D,R,I,N,L,7,s[12]),N=g(N,D,R,I,H,12,s[13]),I=g(I,N,D,R,P,17,s[14]),R=g(R,I,N,D,O,22,s[15]),D=c(D,R,I,N,A,5,s[16]),N=c(N,D,R,I,S,9,s[17]),I=c(I,N,D,R,$,14,s[18]),R=c(R,I,N,D,b,20,s[19]),D=c(D,R,I,N,k,5,s[20]),N=c(N,D,R,I,M,9,s[21]),I=c(I,N,D,R,O,14,s[22]),R=c(R,I,N,D,T,20,s[23]),D=c(D,R,I,N,y,5,s[24]),N=c(N,D,R,I,P,9,s[25]),I=c(I,N,D,R,V,14,s[26]),R=c(R,I,N,D,_,20,s[27]),D=c(D,R,I,N,H,5,s[28]),N=c(N,D,R,I,w,9,s[29]),I=c(I,N,D,R,F,14,s[30]),R=c(R,I,N,D,L,20,s[31]),D=v(D,R,I,N,k,4,s[32]),N=v(N,D,R,I,_,11,s[33]),I=v(I,N,D,R,$,16,s[34]),R=v(R,I,N,D,P,23,s[35]),D=v(D,R,I,N,A,4,s[36]),N=v(N,D,R,I,T,11,s[37]),I=v(I,N,D,R,F,16,s[38]),R=v(R,I,N,D,M,23,s[39]),D=v(D,R,I,N,H,4,s[40]),N=v(N,D,R,I,b,11,s[41]),I=v(I,N,D,R,V,16,s[42]),R=v(R,I,N,D,S,23,s[43]),D=v(D,R,I,N,y,4,s[44]),N=v(N,D,R,I,L,11,s[45]),I=v(I,N,D,R,O,16,s[46]),R=v(R,I,N,D,w,23,s[47]),D=x(D,R,I,N,b,6,s[48]),N=x(N,D,R,I,F,10,s[49]),I=x(I,N,D,R,P,15,s[50]),R=x(R,I,N,D,k,21,s[51]),D=x(D,R,I,N,L,6,s[52]),N=x(N,D,R,I,V,10,s[53]),I=x(I,N,D,R,M,15,s[54]),R=x(R,I,N,D,A,21,s[55]),D=x(D,R,I,N,_,6,s[56]),N=x(N,D,R,I,O,10,s[57]),I=x(I,N,D,R,S,15,s[58]),R=x(R,I,N,D,H,21,s[59]),D=x(D,R,I,N,T,6,s[60]),N=x(N,D,R,I,$,10,s[61]),I=x(I,N,D,R,w,15,s[62]),R=x(R,I,N,D,y,21,s[63]),B[0]=B[0]+D|0,B[1]=B[1]+R|0,B[2]=B[2]+I|0,B[3]=B[3]+N|0},_doFinalize:function(){var C=this._data,p=C.words,E=this._nDataBytes*8,h=C.sigBytes*8;p[h>>>5]|=128<<24-h%32;var m=r.floor(E/4294967296),B=E;p[(h+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,p[(h+64>>>9<<4)+14]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,C.sigBytes=(p.length+1)*4,this._process();for(var b=this._hash,A=b.words,w=0;w<4;w++){var V=A[w];A[w]=(V<<8|V>>>24)&16711935|(V<<24|V>>>8)&4278255360}return b},clone:function(){var C=l.clone.call(this);return C._hash=this._hash.clone(),C}});function g(C,p,E,h,m,B,b){var A=C+(p&E|~p&h)+m+b;return(A<<B|A>>>32-B)+p}function c(C,p,E,h,m,B,b){var A=C+(p&h|E&~h)+m+b;return(A<<B|A>>>32-B)+p}function v(C,p,E,h,m,B,b){var A=C+(p^E^h)+m+b;return(A<<B|A>>>32-B)+p}function x(C,p,E,h,m,B,b){var A=C+(E^(p|~h))+m+b;return(A<<B|A>>>32-B)+p}n.MD5=l._createHelper(d),n.HmacMD5=l._createHmacHelper(d)}(Math),t.MD5})}(ot)),ot.exports}var lt={exports:{}},u0;function W0(){return u0||(u0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,i=n.WordArray,u=n.Hasher,l=r.algo,f=[],s=l.SHA1=u.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,g){for(var c=this._hash.words,v=c[0],x=c[1],C=c[2],p=c[3],E=c[4],h=0;h<80;h++){if(h<16)f[h]=d[g+h]|0;else{var m=f[h-3]^f[h-8]^f[h-14]^f[h-16];f[h]=m<<1|m>>>31}var B=(v<<5|v>>>27)+E+f[h];h<20?B+=(x&C|~x&p)+1518500249:h<40?B+=(x^C^p)+1859775393:h<60?B+=(x&C|x&p|C&p)-1894007588:B+=(x^C^p)-899497514,E=p,p=C,C=x<<30|x>>>2,x=v,v=B}c[0]=c[0]+v|0,c[1]=c[1]+x|0,c[2]=c[2]+C|0,c[3]=c[3]+p|0,c[4]=c[4]+E|0},_doFinalize:function(){var d=this._data,g=d.words,c=this._nDataBytes*8,v=d.sigBytes*8;return g[v>>>5]|=128<<24-v%32,g[(v+64>>>9<<4)+14]=Math.floor(c/4294967296),g[(v+64>>>9<<4)+15]=c,d.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var d=u.clone.call(this);return d._hash=this._hash.clone(),d}});r.SHA1=u._createHelper(s),r.HmacSHA1=u._createHmacHelper(s)}(),t.SHA1})}(lt)),lt.exports}var ut={exports:{}},c0;function $t(){return c0||(c0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(r){var n=t,i=n.lib,u=i.WordArray,l=i.Hasher,f=n.algo,s=[],d=[];(function(){function v(E){for(var h=r.sqrt(E),m=2;m<=h;m++)if(!(E%m))return!1;return!0}function x(E){return(E-(E|0))*4294967296|0}for(var C=2,p=0;p<64;)v(C)&&(p<8&&(s[p]=x(r.pow(C,1/2))),d[p]=x(r.pow(C,1/3)),p++),C++})();var g=[],c=f.SHA256=l.extend({_doReset:function(){this._hash=new u.init(s.slice(0))},_doProcessBlock:function(v,x){for(var C=this._hash.words,p=C[0],E=C[1],h=C[2],m=C[3],B=C[4],b=C[5],A=C[6],w=C[7],V=0;V<64;V++){if(V<16)g[V]=v[x+V]|0;else{var T=g[V-15],k=(T<<25|T>>>7)^(T<<14|T>>>18)^T>>>3,S=g[V-2],F=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;g[V]=k+g[V-7]+F+g[V-16]}var _=B&b^~B&A,y=p&E^p&h^E&h,M=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),$=(B<<26|B>>>6)^(B<<21|B>>>11)^(B<<7|B>>>25),L=w+$+_+d[V]+g[V],H=M+y;w=A,A=b,b=B,B=m+L|0,m=h,h=E,E=p,p=L+H|0}C[0]=C[0]+p|0,C[1]=C[1]+E|0,C[2]=C[2]+h|0,C[3]=C[3]+m|0,C[4]=C[4]+B|0,C[5]=C[5]+b|0,C[6]=C[6]+A|0,C[7]=C[7]+w|0},_doFinalize:function(){var v=this._data,x=v.words,C=this._nDataBytes*8,p=v.sigBytes*8;return x[p>>>5]|=128<<24-p%32,x[(p+64>>>9<<4)+14]=r.floor(C/4294967296),x[(p+64>>>9<<4)+15]=C,v.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var v=l.clone.call(this);return v._hash=this._hash.clone(),v}});n.SHA256=l._createHelper(c),n.HmacSHA256=l._createHmacHelper(c)}(Math),t.SHA256})}(ut)),ut.exports}var ct={exports:{}},d0;function ba(){return d0||(d0=1,function(o,e){(function(t,r,n){o.exports=r(G(),$t())})(W,function(t){return function(){var r=t,n=r.lib,i=n.WordArray,u=r.algo,l=u.SHA256,f=u.SHA224=l.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var s=l._doFinalize.call(this);return s.sigBytes-=4,s}});r.SHA224=l._createHelper(f),r.HmacSHA224=l._createHmacHelper(f)}(),t.SHA224})}(ct)),ct.exports}var dt={exports:{}},x0;function G0(){return x0||(x0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ze())})(W,function(t){return function(){var r=t,n=r.lib,i=n.Hasher,u=r.x64,l=u.Word,f=u.WordArray,s=r.algo;function d(){return l.create.apply(l,arguments)}var g=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],c=[];(function(){for(var x=0;x<80;x++)c[x]=d()})();var v=s.SHA512=i.extend({_doReset:function(){this._hash=new f.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(x,C){for(var p=this._hash.words,E=p[0],h=p[1],m=p[2],B=p[3],b=p[4],A=p[5],w=p[6],V=p[7],T=E.high,k=E.low,S=h.high,F=h.low,_=m.high,y=m.low,M=B.high,$=B.low,L=b.high,H=b.low,P=A.high,O=A.low,D=w.high,R=w.low,I=V.high,N=V.low,X=T,Z=k,Q=S,j=F,ge=_,pe=y,Re=M,Be=$,ae=L,ee=H,Fe=P,_e=O,he=D,Y=R,oe=I,de=N,le=0;le<80;le++){var ne,q,Ee=c[le];if(le<16)q=Ee.high=x[C+le*2]|0,ne=Ee.low=x[C+le*2+1]|0;else{var Ie=c[le-15],Te=Ie.high,Pe=Ie.low,tr=(Te>>>1|Pe<<31)^(Te>>>8|Pe<<24)^Te>>>7,qt=(Pe>>>1|Te<<31)^(Pe>>>8|Te<<24)^(Pe>>>7|Te<<25),Ut=c[le-2],Me=Ut.high,Oe=Ut.low,rr=(Me>>>19|Oe<<13)^(Me<<3|Oe>>>29)^Me>>>6,jt=(Oe>>>19|Me<<13)^(Oe<<3|Me>>>29)^(Oe>>>6|Me<<26),Kt=c[le-7],ar=Kt.high,nr=Kt.low,Wt=c[le-16],sr=Wt.high,Gt=Wt.low;ne=qt+nr,q=tr+ar+(ne>>>0<qt>>>0?1:0),ne=ne+jt,q=q+rr+(ne>>>0<jt>>>0?1:0),ne=ne+Gt,q=q+sr+(ne>>>0<Gt>>>0?1:0),Ee.high=q,Ee.low=ne}var ir=ae&Fe^~ae&he,Zt=ee&_e^~ee&Y,or=X&Q^X&ge^Q&ge,lr=Z&j^Z&pe^j&pe,ur=(X>>>28|Z<<4)^(X<<30|Z>>>2)^(X<<25|Z>>>7),Xt=(Z>>>28|X<<4)^(Z<<30|X>>>2)^(Z<<25|X>>>7),cr=(ae>>>14|ee<<18)^(ae>>>18|ee<<14)^(ae<<23|ee>>>9),dr=(ee>>>14|ae<<18)^(ee>>>18|ae<<14)^(ee<<23|ae>>>9),Yt=g[le],xr=Yt.high,Qt=Yt.low,se=de+dr,ye=oe+cr+(se>>>0<de>>>0?1:0),se=se+Zt,ye=ye+ir+(se>>>0<Zt>>>0?1:0),se=se+Qt,ye=ye+xr+(se>>>0<Qt>>>0?1:0),se=se+ne,ye=ye+q+(se>>>0<ne>>>0?1:0),Jt=Xt+lr,hr=ur+or+(Jt>>>0<Xt>>>0?1:0);oe=he,de=Y,he=Fe,Y=_e,Fe=ae,_e=ee,ee=Be+se|0,ae=Re+ye+(ee>>>0<Be>>>0?1:0)|0,Re=ge,Be=pe,ge=Q,pe=j,Q=X,j=Z,Z=se+Jt|0,X=ye+hr+(Z>>>0<se>>>0?1:0)|0}k=E.low=k+Z,E.high=T+X+(k>>>0<Z>>>0?1:0),F=h.low=F+j,h.high=S+Q+(F>>>0<j>>>0?1:0),y=m.low=y+pe,m.high=_+ge+(y>>>0<pe>>>0?1:0),$=B.low=$+Be,B.high=M+Re+($>>>0<Be>>>0?1:0),H=b.low=H+ee,b.high=L+ae+(H>>>0<ee>>>0?1:0),O=A.low=O+_e,A.high=P+Fe+(O>>>0<_e>>>0?1:0),R=w.low=R+Y,w.high=D+he+(R>>>0<Y>>>0?1:0),N=V.low=N+de,V.high=I+oe+(N>>>0<de>>>0?1:0)},_doFinalize:function(){var x=this._data,C=x.words,p=this._nDataBytes*8,E=x.sigBytes*8;C[E>>>5]|=128<<24-E%32,C[(E+128>>>10<<5)+30]=Math.floor(p/4294967296),C[(E+128>>>10<<5)+31]=p,x.sigBytes=C.length*4,this._process();var h=this._hash.toX32();return h},clone:function(){var x=i.clone.call(this);return x._hash=this._hash.clone(),x},blockSize:1024/32});r.SHA512=i._createHelper(v),r.HmacSHA512=i._createHmacHelper(v)}(),t.SHA512})}(dt)),dt.exports}var xt={exports:{}},h0;function Fa(){return h0||(h0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ze(),G0())})(W,function(t){return function(){var r=t,n=r.x64,i=n.Word,u=n.WordArray,l=r.algo,f=l.SHA512,s=l.SHA384=f.extend({_doReset:function(){this._hash=new u.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var d=f._doFinalize.call(this);return d.sigBytes-=16,d}});r.SHA384=f._createHelper(s),r.HmacSHA384=f._createHmacHelper(s)}(),t.SHA384})}(xt)),xt.exports}var ht={exports:{}},f0;function Da(){return f0||(f0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ze())})(W,function(t){return function(r){var n=t,i=n.lib,u=i.WordArray,l=i.Hasher,f=n.x64,s=f.Word,d=n.algo,g=[],c=[],v=[];(function(){for(var p=1,E=0,h=0;h<24;h++){g[p+5*E]=(h+1)*(h+2)/2%64;var m=E%5,B=(2*p+3*E)%5;p=m,E=B}for(var p=0;p<5;p++)for(var E=0;E<5;E++)c[p+5*E]=E+(2*p+3*E)%5*5;for(var b=1,A=0;A<24;A++){for(var w=0,V=0,T=0;T<7;T++){if(b&1){var k=(1<<T)-1;k<32?V^=1<<k:w^=1<<k-32}b&128?b=b<<1^113:b<<=1}v[A]=s.create(w,V)}})();var x=[];(function(){for(var p=0;p<25;p++)x[p]=s.create()})();var C=d.SHA3=l.extend({cfg:l.cfg.extend({outputLength:512}),_doReset:function(){for(var p=this._state=[],E=0;E<25;E++)p[E]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(p,E){for(var h=this._state,m=this.blockSize/2,B=0;B<m;B++){var b=p[E+2*B],A=p[E+2*B+1];b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360;var w=h[B];w.high^=A,w.low^=b}for(var V=0;V<24;V++){for(var T=0;T<5;T++){for(var k=0,S=0,F=0;F<5;F++){var w=h[T+5*F];k^=w.high,S^=w.low}var _=x[T];_.high=k,_.low=S}for(var T=0;T<5;T++)for(var y=x[(T+4)%5],M=x[(T+1)%5],$=M.high,L=M.low,k=y.high^($<<1|L>>>31),S=y.low^(L<<1|$>>>31),F=0;F<5;F++){var w=h[T+5*F];w.high^=k,w.low^=S}for(var H=1;H<25;H++){var k,S,w=h[H],P=w.high,O=w.low,D=g[H];D<32?(k=P<<D|O>>>32-D,S=O<<D|P>>>32-D):(k=O<<D-32|P>>>64-D,S=P<<D-32|O>>>64-D);var R=x[c[H]];R.high=k,R.low=S}var I=x[0],N=h[0];I.high=N.high,I.low=N.low;for(var T=0;T<5;T++)for(var F=0;F<5;F++){var H=T+5*F,w=h[H],X=x[H],Z=x[(T+1)%5+5*F],Q=x[(T+2)%5+5*F];w.high=X.high^~Z.high&Q.high,w.low=X.low^~Z.low&Q.low}var w=h[0],j=v[V];w.high^=j.high,w.low^=j.low}},_doFinalize:function(){var p=this._data,E=p.words;this._nDataBytes*8;var h=p.sigBytes*8,m=this.blockSize*32;E[h>>>5]|=1<<24-h%32,E[(r.ceil((h+1)/m)*m>>>5)-1]|=128,p.sigBytes=E.length*4,this._process();for(var B=this._state,b=this.cfg.outputLength/8,A=b/8,w=[],V=0;V<A;V++){var T=B[V],k=T.high,S=T.low;k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,w.push(S),w.push(k)}return new u.init(w,b)},clone:function(){for(var p=l.clone.call(this),E=p._state=this._state.slice(0),h=0;h<25;h++)E[h]=E[h].clone();return p}});n.SHA3=l._createHelper(C),n.HmacSHA3=l._createHmacHelper(C)}(Math),t.SHA3})}(ht)),ht.exports}var ft={exports:{}},p0;function wa(){return p0||(p0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){/** @preserve
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),$0=Symbol("MidenPGConfig");function fr(o){if(!(o!=null&&o.publishableKey))throw new Error("[@miden-npm/vue] publishableKey is required");return{install(e){e.provide($0,o)}}}function pr(){const o=a.inject($0);if(!o)throw new Error("[@miden-npm/vue] Missing provider. Did you forget to app.use(createMidenPG(...))?");return o}const ze=o=>o==null||typeof o!="object"?!1:Object.values(o).every(Boolean),Ht=o=>{const e={};return new URL(o).searchParams.forEach((r,n)=>{e[n]=r}),e},Ce=o=>o==="sandbox"?"https://sandbox-api.midencards.io/payment-gateway-api":"",vr=o=>o==="USD"?"$":o==="NGN"?"₦":o==="EUR"?"€":o==="GBP"?"£":o==="JPY"||o==="CNY"?"¥":o==="USDC"||o==="usdc"?"$⧫":o==="USDT"||o==="usdt"?"₮":"$",we=(o,e)=>{const t=typeof o=="string"?parseFloat(o):o;return isNaN(t)?"0":`${e?vr(e):""} ${t==null?void 0:t.toLocaleString("en-US")}`},mr=(o,e)=>o.length<=e?o:o.slice(0,e)+"...",Cr=o=>{const e=["Backspace","Tab","ArrowLeft","ArrowRight","Delete","Home","End","."];(o.ctrlKey||o.metaKey)&&["a","c","v","x"].includes(o.key.toLowerCase())||(!e.includes(o.key)&&!/^\d$/.test(o.key)&&o.preventDefault(),o.key==="."&&o.target.value.includes(".")&&o.preventDefault())},xe=(o,e)=>e.test(o);function gr(o){return o?o.split("|").map(e=>{const[t,r]=e.split(":");return{rule:t,value:r}}):[]}function Br(o,e,t){const r=[],n=gr(o),i=(t||"This field").toLowerCase(),u=e??"",l=Number(u),f=!Number.isNaN(l);for(const s of n)switch(s.rule){case"required":u||r.push(`The ${i} field is required`);break;case"alpha":xe(u,/^[a-zA-Z]+$/)||r.push(`The ${i} field must only contain alphabetic characters`);break;case"at_least_one_uppercase":xe(u,/.*[A-Z].*/)||r.push(`The ${i} field must contain at least one uppercase character`);break;case"at_least_one_lowercase":xe(u,/.*[a-z].*/)||r.push(`The ${i} field must contain at least one lowercase character`);break;case"at_least_one_number":xe(u,/.*\d.*/)||r.push(`The ${i} field must contain at least one number`);break;case"alpha_num":xe(u,/^[a-z0-9]+$/i)||r.push(`The ${i} field must only contain alphabetic characters and numbers`);break;case"num_spaces":xe(u,/^[0-9\s]+$/i)||r.push(`The ${i} field must only contain space and numbers`);break;case"alpha_spaces":xe(u,/^[A-Za-z\s]*$/)||r.push(`The ${i} field must only contain alphabetic characters and spaces`);break;case"numeric":xe(u,/^\d+$/)||r.push(`The ${i} field must only contain numbers`);break;case"no_special":xe(u,/[^a-zA-Z0-9\s]/)&&r.push(`The ${i} field must not contain special characters`);break;case"at_least_one_special":xe(u,/[^a-zA-Z0-9\s]/)||r.push(`The ${i} field must contain at least one special character`);break;case"email":xe(u,/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/)||r.push("Please enter a valid email address");break;case"is":s.value!==u&&r.push(`Value entered must be ${s.value}`);break;case"is_not":s.value===u&&r.push(`Value entered must not be ${s.value}`);break;case"char_length":u.length!==Number(s.value)&&r.push(`The ${i} field must be ${s.value} characters long`);break;case"min_char_length":u.length<Number(s.value)&&r.push(`The ${i} field must not be less than ${s.value} characters long`);break;case"max_char_length":u.length>Number(s.value)&&r.push(`The ${i} field must not be greater than ${s.value} characters long`);break;case"age":(!f||l!==Number(s.value))&&r.push(`Age entered must be ${s.value}`);break;case"min_age":(!f||l<Number(s.value))&&r.push(`Age entered must not be less than ${s.value}`);break;case"max_age":(!f||l>Number(s.value))&&r.push(`Age entered must not be greater than ${s.value}`);break;case"num_is":(!f||l!==Number(s.value))&&r.push(`Number entered must be ${s.value}`);break;case"num_is_not":f&&l===Number(s.value)&&r.push(`Number entered must not be ${s.value}`);break;case"min_number":(!f||l<Number(s.value))&&r.push(`Number entered must not be less than ${s.value}`);break;case"max_number":(!f||l>Number(s.value))&&r.push(`Number entered must not be greater than ${s.value}`);break}return r.length>0?r[0]:null}const je=(o,e,t)=>{const r={};for(const[n,i]of Object.entries(e)){if(!i)continue;const u=(t==null?void 0:t[n])??n,l=Br(i,o[n]??"",u);l&&(r[n]=l)}return r};var L0=(o=>(o[o.Visa=1]="Visa",o[o.MasterCard=2]="MasterCard",o[o.Verve=3]="Verve",o[o.MastercardAndVisa=4]="MastercardAndVisa",o[o.AmericanExpress=5]="AmericanExpress",o[o.Discover=6]="Discover",o[o.JCB=7]="JCB",o[o.DinersClub=8]="DinersClub",o[o.Maestro=9]="Maestro",o[o.UnionPay=10]="UnionPay",o[o.UnionPay3DS=11]="UnionPay3DS",o[o.UnionPayNon3DS=12]="UnionPayNon3DS",o[o.UATP=13]="UATP",o[o.PayPak=14]="PayPak",o[o.Jaywan=15]="Jaywan",o[o.Mada=16]="Mada",o[o.MadaVisa=17]="MadaVisa",o[o.MadaMastercard=18]="MadaMastercard",o[o.Unknown=19]="Unknown",o))(L0||{});const e0=/^4\d{12}(\d{3}){0,2}$/,t0=/^(?:5[1-5]\d{14}|2(?:2(?:2[1-9]|[3-9]\d)|[3-6]\d{2}|7(?:[01]\d|20))\d{12})(?:\d{0,3})?$/,_r=/^(34|37)\d{13}$/,Er=/^(?:6011|65|64[4-9]|622(?:12[6-9]|1[3-9]\d|[2-8]\d{2}|9(?:0\d|1\d|2[0-5])))\d{12,15}$/,yr=/^(?:35(?:2[8-9]|[3-8]\d))\d{12,15}$/,kr=/^(?:3(?:0[0-5]\d|095|6\d|[89]\d))\d{11,13}$/,Ar=/^(?:50|5[6-9]|6[0-9])\d{10,17}$/,et=/^62\d{14,17}$/,br=/^1\d{14}$/,Fr=[[506099,506198],[650002,650027]],Dr=new Set([507865,507866]),wr=new Set([220545,220543]),Sr=new Set([6690109]),Vr=new Set([968209,873646]),Nr=new Set([422818,486094]),Rr=new Set([529741,543357]),Ir=new Set([620108]),Tr=new Set([621423]);function Mr(o){const e=Pr(o);return L0[e]}function Pr(o){if(!o||!o.trim())return 19;const e=o.replace(/\D/g,"");if(e.length<12||e.length>19)return 19;if(e.length>=6){const t=parseInt(e.slice(0,6),10);if(Vr.has(t)&&e.length>=16&&e.length<=19)return 16;if(Nr.has(t)&&e0.test(e))return 17;if(Rr.has(t)&&t0.test(e))return 18;if(wr.has(t)&&e.length===16)return 14;if(Ir.has(t)&&et.test(e))return 11;if(Tr.has(t)&&et.test(e))return 12;if(Or(t,e.length))return 3}if(e.length>=7){const t=parseInt(e.slice(0,7),10);if(Sr.has(t)&&e.length===16)return 15}return br.test(e)?13:_r.test(e)?5:Er.test(e)?6:yr.test(e)?7:kr.test(e)?8:t0.test(e)?2:e0.test(e)?1:et.test(e)?10:Ar.test(e)?9:19}function Or(o,e){return e<16||e>19?!1:Fr.some(([r,n])=>o>=r&&o<=n)||Dr.has(o)}const Hr=["width","height"],$r=["stroke"],Lr=["fill"],z0=a.defineComponent({__name:"icon-loader",props:{size:{default:24},color:{default:"currentColor"},className:{default:""}},setup(o){const e=o,t=a.useAttrs(),{size:r,color:n,className:i}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({class:["animate-spin",a.unref(i)],xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:a.unref(r),height:a.unref(r),role:"img","aria-label":"loading"},a.unref(t)),[a.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:a.unref(n),"stroke-width":"4"},null,8,$r),a.createElementVNode("path",{class:"opacity-75",fill:a.unref(n),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,8,Lr)],16,Hr))}}),zr=["disabled"],qr={key:1},Se=a.defineComponent({__name:"button",props:{label:{default:""},type:{default:"neutral"},size:{default:"de"},paddingClassX:{default:"px-8"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},customClass:{default:""}},emits:["click"],setup(o,{emit:e}){const t=o,r=e,n=a.computed(()=>t.disabled||t.loading);function i(){n.value||r("click")}function u(s,d){if(d)return"bg-gray-200 text-gray-400 cursor-not-allowed border-gray-200";switch(s){case"primary":return"bg-primary text-white hover:bg-primary-black hover:border-primary-black border-primary";case"secondary":return"bg-gray-200 border-gray-200 hover:bg-gray-300 text-heading-text";case"danger":return"bg-red-500 border-red-500 text-white hover:bg-red-600";case"neutral":default:return"bg-off-white border-grey-border hover:bg-gray-100"}}function l(s){switch(s){case"de":return"h-68px rounded-xl";case"md":return"h-42px rounded-lg";case"sm":return"h-32px rounded-md";default:return"h-68px rounded-xl"}}function f(s){switch(s){case"de":case"md":case"sm":return"text-body-2xs font-normal";default:return"text-body-xs font-normal"}}return(s,d)=>(a.openBlock(),a.createElementBlock("button",{class:a.normalizeClass(["flex items-center justify-center gap-2 py-3 border font-normal text-input-grey transition-colors duration-300 ease-in-out",u(s.type,n.value),l(s.size),s.paddingClassX,s.customClass]),type:"button",disabled:n.value,onClick:i},[a.renderSlot(s.$slots,"prefix"),s.loading?(a.openBlock(),a.createBlock(z0,{key:0})):(a.openBlock(),a.createElementBlock("div",qr,[s.label?(a.openBlock(),a.createElementBlock("p",{key:0,class:a.normalizeClass(["mb-0",f(s.size)])},a.toDisplayString(s.label),3)):a.renderSlot(s.$slots,"default",{key:1})])),a.renderSlot(s.$slots,"suffix")],10,zr))}}),Ur={class:"mb-0 text-body-3xs font-normal text-red-500"},q0=a.defineComponent({__name:"input-error",props:{errorMessage:{}},setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("p",Ur,a.toDisplayString(e.errorMessage),1))}});async function qe(o,e,t){try{const r=Ce(e);return await(await fetch(`${r}/api/v1/checkout/generate-payment-link2`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:t},body:JSON.stringify({...o,LinkName:`${Date.now()}-Link`})})).json()}catch{}}async function jr(o,{merchantId:e,...t}){try{const r=Ce(o);return await(await fetch(`${r}/api/v1/checkout/authorize-card-3ds-payment-sdk`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e},body:JSON.stringify(t)})).json()}catch{}}async function Kr(o,{merchantId:e,...t}){try{const r=Ce(o);return await(await fetch(`${r}/api/v1/checkout/generate-payment-account`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e},body:JSON.stringify(t)})).json()}catch{}}async function U0(o,e){try{const t=Ce(o);return await(await fetch(`${t}/api/v1/checkout/details/${e}`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}})).json()}catch{}}async function Wr(o,{merchantId:e,...t}){try{const r=Ce(o);return await(await fetch(`${r}/api/v1/checkout/generate-payment-walletaddress`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:e},body:JSON.stringify(t)})).json()}catch{}}const Gr={key:0,class:"absolute inset-0 grid place-items-center bg-white/60"},j0=a.defineComponent({__name:"checkout-iframe",props:{style:{default:()=>({width:"100%",height:"100vh",border:"0",borderRadius:"6px",overflow:"hidden"})},url:{default:void 0},secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:""})}},setup(o){const e=o,t=a.computed(()=>({...e.style})),r=a.ref(null),n=a.ref(null),i=a.ref(""),u=a.ref(!1);function l(){n.value&&n.value.parentNode&&n.value.parentNode.removeChild(n.value),n.value=null}function f(d){var v;l();const g=document.createElement("iframe");g.src=d;const c=e.style;c.width&&(g.style.width=c.width),c.height&&(g.style.height=c.height),c.border&&(g.style.border=c.border),c.borderRadius&&(g.style.borderRadius=c.borderRadius),c.overflow&&(g.style.overflow=c.overflow),(v=r.value)==null||v.appendChild(g),n.value=g}async function s(){if(e.url){f(e.url);return}if(!e.secretKey){i.value="Secret key is required.";return}if(!ze(e.paymentObject)){i.value="Kindly ensure you are passing all the required data.";return}u.value=!0,i.value="";try{const d=await qe(e.paymentObject,e.environment,e.secretKey);d!=null&&d.isSuccessful&&d.launchUrl?(i.value="Payment link created successfully",f(d.launchUrl)):i.value="Failed to create payment link"}catch(d){i.value=(d==null?void 0:d.message)||"Failed to create payment link"}finally{u.value=!1}}return a.onMounted(()=>{r.value&&s()}),a.watch(()=>e.url,d=>{d&&f(d)}),a.onBeforeUnmount(()=>{l()}),(d,g)=>(a.openBlock(),a.createElementBlock("div",{class:"relative",style:a.normalizeStyle(t.value)},[a.createElementVNode("div",{ref_key:"containerRef",ref:r,class:"w-full h-full"},null,512),u.value?(a.openBlock(),a.createElementBlock("div",Gr,[a.createVNode(z0)])):a.createCommentVNode("",!0)],4))}}),Zr={key:1},Xr=a.defineComponent({__name:"checkout-button",props:{secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:""})},mode:{default:"redirect"}},setup(o){const e=o,t=a.ref(""),r=a.ref(""),n=a.ref(!1);async function i(){if(!e.secretKey){t.value="Secret key is required.";return}if(!ze(e.paymentObject)){t.value="Kindly ensure you are passing all the required data.";return}n.value=!0,t.value="";try{const s=await qe(e.paymentObject,e.environment,e.secretKey);s!=null&&s.isSuccessful&&s.launchUrl?(r.value=s.launchUrl,t.value="Payment link created successfully",e.mode==="redirect"&&window.open(s.launchUrl,"_blank","noopener,noreferrer")):t.value="Failed to create payment link"}catch(s){t.value=(s==null?void 0:s.message)||"Failed to create payment link"}finally{n.value=!1}}const{secretKey:u,environment:l,mode:f}=e;return(s,d)=>r.value&&a.unref(f)==="iframe"?(a.openBlock(),a.createBlock(j0,{key:0,url:r.value,secretKey:a.unref(u),environment:a.unref(l)},null,8,["url","secretKey","environment"])):(a.openBlock(),a.createElementBlock("div",Zr,[a.createVNode(Se,{label:"Pay",type:"primary",customClass:"w-full",loading:n.value,onClick:i},null,8,["loading"]),a.createVNode(q0,{errorMessage:t.value},null,8,["errorMessage"])]))}}),Yr=["width","height"],Qr=["fill"],Jr=a.defineComponent({__name:"icon-chevron-left",props:{width:{default:17},height:{default:17},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:i}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M10.5 14.28C10.3734 14.28 10.2467 14.2333 10.1467 14.1333L5.80002 9.78668C5.09335 9.08001 5.09335 7.92001 5.80002 7.21335L10.1467 2.86668C10.34 2.67335 10.66 2.67335 10.8534 2.86668C11.0467 3.06001 11.0467 3.38001 10.8534 3.57335L6.50669 7.92001C6.18669 8.24001 6.18669 8.76001 6.50669 9.08001L10.8534 13.4267C11.0467 13.62 11.0467 13.94 10.8534 14.1333C10.7534 14.2267 10.6267 14.28 10.5 14.28Z",fill:a.unref(i)},null,8,Qr)],16,Yr))}}),ea=a.defineComponent({__name:"back",emits:["back"],setup(o,{emit:e}){return(t,r)=>(a.openBlock(),a.createElementBlock("div",{class:"flex items-center gap-2 cursor-pointer",onClick:r[0]||(r[0]=n=>t.$emit("back"))},[a.createVNode(Jr),r[1]||(r[1]=a.createElementVNode("p",{class:"mb-0 text-body-xs font-normal"},"Back",-1))]))}}),ta=["width","height"],ra=["fill"],aa=a.defineComponent({__name:"icon-buzapay-icon",props:{width:{default:15},height:{default:13},color:{default:"currentColor"}},setup(o){const e=o,t=a.useAttrs(),{width:r,height:n,color:i}=e;return(u,l)=>(a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:a.unref(r),height:a.unref(n),viewBox:"0 0 15 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.unref(t)),[a.createElementVNode("path",{d:"M9.97919 0.5C10.8854 0.5 11.6276 0.585938 12.2057 0.757812C12.7891 0.924479 13.2188 1.22396 13.4948 1.65625C13.7761 2.08333 13.9167 2.6901 13.9167 3.47656C13.9167 4.1849 13.7526 4.77083 13.4245 5.23438C13.0964 5.69792 12.5938 5.95312 11.9167 6C12.8021 6.08854 13.4401 6.40625 13.8307 6.95312C14.2214 7.49479 14.4167 8.17708 14.4167 9C14.4167 9.71354 14.3334 10.2995 14.1667 10.7578C14.0052 11.2161 13.7318 11.5729 13.3464 11.8281C12.961 12.0781 12.4375 12.2526 11.7761 12.3516C11.1198 12.4505 10.2995 12.5 9.31512 12.5H0.416687V0.5H9.97919ZM2.91669 7.77344H5.97235V11.167L10.2497 5.22754H7.19501V1.83398L2.91669 7.77344ZM5.97235 6.07617H8.2702L7.19501 7.57324V6.9248H4.89716L5.97235 5.42676V6.07617Z",fill:a.unref(i)},null,8,ra)],16,ta))}}),na={class:"checkout-card w-full h-screen flex flex-col items-center justify-center text-white"},sa={class:"flex w-1/2"},ia={class:"flex gap-2 w-full"},oa={class:"flex flex-col gap-8 w-full"},la={class:"bg-off-white rounded-xl"},ua={class:"flex items-center gap-2 justify-center"},ca=a.defineComponent({__name:"card",props:{showBackButton:{type:Boolean,default:!1}},emits:["back","close"],setup(o,{emit:e}){const t=e;return(r,n)=>(a.openBlock(),a.createElementBlock("div",na,[a.createElementVNode("div",sa,[r.showBackButton?(a.openBlock(),a.createBlock(ea,{key:0,onBack:n[0]||(n[0]=i=>t("back"))})):a.createCommentVNode("",!0),a.createElementVNode("div",ia,[a.createElementVNode("div",oa,[a.createElementVNode("div",la,[a.renderSlot(r.$slots,"default")]),a.createElementVNode("div",ua,[n[2]||(n[2]=a.createElementVNode("p",{class:"text-light-white-100 text-body-2xs font-regular"}," Powered by Buzapay ",-1)),a.createVNode(aa,{color:"#E8F4FF"})])]),a.createElementVNode("div",{class:"close-icon flex flex-col items-center justify-center self-start cursor-pointer hover:bg-gray-500",onClick:n[1]||(n[1]=i=>t("close")),role:"button","aria-label":"Close"},[...n[3]||(n[3]=[a.createElementVNode("p",{class:"text-white"},"x",-1)])])])])]))}}),da=["aria-orientation"],xa=["aria-checked","onClick"],ha={key:0,class:"bg-white w-2 h-2 rounded-full"},fa={class:"mb-0 text-body-2xs font-medium text-heading-text"},pa=a.defineComponent({__name:"radio-group",props:{options:{default:()=>[]},type:{default:"vertical"},modelValue:{default:void 0},defaultValue:{default:void 0},className:{default:""}},emits:["update:modelValue","selectedChange"],setup(o,{emit:e}){const t=o,r=e,n=a.computed(()=>t.modelValue!==void 0),i=a.ref("");a.onMounted(()=>{if(n.value)return;const c=t.defaultValue??(t.options.length?t.options[0].value:"");i.value=c,c&&(r("update:modelValue",c),r("selectedChange",c))}),a.watch(()=>t.modelValue,c=>{n.value&&(i.value=c??"")},{immediate:!0});const u=a.computed(()=>n.value?t.modelValue??"":i.value);function l(c){n.value||(i.value=c),r("update:modelValue",c),r("selectedChange",c)}const f=a.computed(()=>t.type==="horizontal"?"flex-row gap-5":"flex-col gap-6"),{options:s,type:d,className:g}=t;return(c,v)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["flex",f.value,a.unref(g)]),role:"radiogroup","aria-orientation":a.unref(d)==="horizontal"?"horizontal":"vertical",tabindex:"0"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(s),x=>(a.openBlock(),a.createElementBlock("div",{key:x.value,role:"radio","aria-checked":u.value===x.value,tabindex:"-1",onClick:C=>l(x.value),class:"flex items-center gap-2 cursor-pointer transition-colors duration-200"},[a.createElementVNode("div",{class:a.normalizeClass(["w-4 h-4 rounded-full border flex items-center justify-center",u.value===x.value?"bg-orange-500 border-orange-500":"bg-white border-grey-200"])},[u.value===x.value?(a.openBlock(),a.createElementBlock("div",ha)):a.createCommentVNode("",!0)],2),a.createElementVNode("p",fa,a.toDisplayString(x.label),1)],8,xa))),128))],10,da))}}),va=["src","height","alt"],ke=a.defineComponent({__name:"image",props:{src:{},height:{default:50},width:{default:50},alt:{default:"Image"},customClass:{default:""},isFullWidth:{type:Boolean,default:!1}},emits:["click"],setup(o,{emit:e}){const t=o,r=e,{src:n,height:i,width:u,alt:l,customClass:f,isFullWidth:s}=t;return(d,g)=>(a.openBlock(),a.createElementBlock("img",{src:a.unref(n),height:a.unref(i),alt:a.unref(l),class:a.normalizeClass([a.unref(f),a.unref(s)?"w-full":""]),style:a.normalizeStyle({width:a.unref(s)?"100%":a.unref(u)+"px"}),onClick:g[0]||(g[0]=c=>r("click"))},null,14,va))}});var W=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ma(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function Ca(o){if(o.__esModule)return o;var e=o.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(o).forEach(function(r){var n=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return o[r]}})}),t}var K0={exports:{}};function ga(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var tt={exports:{}};const Ba={},_a=Object.freeze(Object.defineProperty({__proto__:null,default:Ba},Symbol.toStringTag,{value:"Module"})),Ea=Ca(_a);var r0;function G(){return r0||(r0=1,function(o,e){(function(t,r){o.exports=r()})(W,function(){var t=t||function(r,n){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof W<"u"&&W.crypto&&(i=W.crypto),!i&&typeof ga=="function")try{i=Ea}catch{}var u=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function h(){}return function(m){var B;return h.prototype=m,B=new h,h.prototype=null,B}}(),f={},s=f.lib={},d=s.Base=function(){return{extend:function(h){var m=l(this);return h&&m.mixIn(h),(!m.hasOwnProperty("init")||this.init===m.init)&&(m.init=function(){m.$super.init.apply(this,arguments)}),m.init.prototype=m,m.$super=this,m},create:function(){var h=this.extend();return h.init.apply(h,arguments),h},init:function(){},mixIn:function(h){for(var m in h)h.hasOwnProperty(m)&&(this[m]=h[m]);h.hasOwnProperty("toString")&&(this.toString=h.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=s.WordArray=d.extend({init:function(h,m){h=this.words=h||[],m!=n?this.sigBytes=m:this.sigBytes=h.length*4},toString:function(h){return(h||v).stringify(this)},concat:function(h){var m=this.words,B=h.words,b=this.sigBytes,A=h.sigBytes;if(this.clamp(),b%4)for(var w=0;w<A;w++){var V=B[w>>>2]>>>24-w%4*8&255;m[b+w>>>2]|=V<<24-(b+w)%4*8}else for(var T=0;T<A;T+=4)m[b+T>>>2]=B[T>>>2];return this.sigBytes+=A,this},clamp:function(){var h=this.words,m=this.sigBytes;h[m>>>2]&=4294967295<<32-m%4*8,h.length=r.ceil(m/4)},clone:function(){var h=d.clone.call(this);return h.words=this.words.slice(0),h},random:function(h){for(var m=[],B=0;B<h;B+=4)m.push(u());return new g.init(m,h)}}),c=f.enc={},v=c.Hex={stringify:function(h){for(var m=h.words,B=h.sigBytes,b=[],A=0;A<B;A++){var w=m[A>>>2]>>>24-A%4*8&255;b.push((w>>>4).toString(16)),b.push((w&15).toString(16))}return b.join("")},parse:function(h){for(var m=h.length,B=[],b=0;b<m;b+=2)B[b>>>3]|=parseInt(h.substr(b,2),16)<<24-b%8*4;return new g.init(B,m/2)}},x=c.Latin1={stringify:function(h){for(var m=h.words,B=h.sigBytes,b=[],A=0;A<B;A++){var w=m[A>>>2]>>>24-A%4*8&255;b.push(String.fromCharCode(w))}return b.join("")},parse:function(h){for(var m=h.length,B=[],b=0;b<m;b++)B[b>>>2]|=(h.charCodeAt(b)&255)<<24-b%4*8;return new g.init(B,m)}},C=c.Utf8={stringify:function(h){try{return decodeURIComponent(escape(x.stringify(h)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(h){return x.parse(unescape(encodeURIComponent(h)))}},p=s.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(h){typeof h=="string"&&(h=C.parse(h)),this._data.concat(h),this._nDataBytes+=h.sigBytes},_process:function(h){var m,B=this._data,b=B.words,A=B.sigBytes,w=this.blockSize,V=w*4,T=A/V;h?T=r.ceil(T):T=r.max((T|0)-this._minBufferSize,0);var k=T*w,S=r.min(k*4,A);if(k){for(var F=0;F<k;F+=w)this._doProcessBlock(b,F);m=b.splice(0,k),B.sigBytes-=S}return new g.init(m,S)},clone:function(){var h=d.clone.call(this);return h._data=this._data.clone(),h},_minBufferSize:0});s.Hasher=p.extend({cfg:d.extend(),init:function(h){this.cfg=this.cfg.extend(h),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(h){return this._append(h),this._process(),this},finalize:function(h){h&&this._append(h);var m=this._doFinalize();return m},blockSize:16,_createHelper:function(h){return function(m,B){return new h.init(B).finalize(m)}},_createHmacHelper:function(h){return function(m,B){return new E.HMAC.init(h,B).finalize(m)}}});var E=f.algo={};return f}(Math);return t})}(tt)),tt.exports}var rt={exports:{}},a0;function Ze(){return a0||(a0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(r){var n=t,i=n.lib,u=i.Base,l=i.WordArray,f=n.x64={};f.Word=u.extend({init:function(s,d){this.high=s,this.low=d}}),f.WordArray=u.extend({init:function(s,d){s=this.words=s||[],d!=r?this.sigBytes=d:this.sigBytes=s.length*8},toX32:function(){for(var s=this.words,d=s.length,g=[],c=0;c<d;c++){var v=s[c];g.push(v.high),g.push(v.low)}return l.create(g,this.sigBytes)},clone:function(){for(var s=u.clone.call(this),d=s.words=this.words.slice(0),g=d.length,c=0;c<g;c++)d[c]=d[c].clone();return s}})}(),t})}(rt)),rt.exports}var at={exports:{}},n0;function ya(){return n0||(n0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,n=r.lib,i=n.WordArray,u=i.init,l=i.init=function(f){if(f instanceof ArrayBuffer&&(f=new Uint8Array(f)),(f instanceof Int8Array||typeof Uint8ClampedArray<"u"&&f instanceof Uint8ClampedArray||f instanceof Int16Array||f instanceof Uint16Array||f instanceof Int32Array||f instanceof Uint32Array||f instanceof Float32Array||f instanceof Float64Array)&&(f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength)),f instanceof Uint8Array){for(var s=f.byteLength,d=[],g=0;g<s;g++)d[g>>>2]|=f[g]<<24-g%4*8;u.call(this,d,s)}else u.apply(this,arguments)};l.prototype=i}}(),t.lib.WordArray})}(at)),at.exports}var nt={exports:{}},s0;function ka(){return s0||(s0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,i=n.WordArray,u=r.enc;u.Utf16=u.Utf16BE={stringify:function(f){for(var s=f.words,d=f.sigBytes,g=[],c=0;c<d;c+=2){var v=s[c>>>2]>>>16-c%4*8&65535;g.push(String.fromCharCode(v))}return g.join("")},parse:function(f){for(var s=f.length,d=[],g=0;g<s;g++)d[g>>>1]|=f.charCodeAt(g)<<16-g%2*16;return i.create(d,s*2)}},u.Utf16LE={stringify:function(f){for(var s=f.words,d=f.sigBytes,g=[],c=0;c<d;c+=2){var v=l(s[c>>>2]>>>16-c%4*8&65535);g.push(String.fromCharCode(v))}return g.join("")},parse:function(f){for(var s=f.length,d=[],g=0;g<s;g++)d[g>>>1]|=l(f.charCodeAt(g)<<16-g%2*16);return i.create(d,s*2)}};function l(f){return f<<8&4278255360|f>>>8&16711935}}(),t.enc.Utf16})}(nt)),nt.exports}var st={exports:{}},i0;function Ve(){return i0||(i0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,i=n.WordArray,u=r.enc;u.Base64={stringify:function(f){var s=f.words,d=f.sigBytes,g=this._map;f.clamp();for(var c=[],v=0;v<d;v+=3)for(var x=s[v>>>2]>>>24-v%4*8&255,C=s[v+1>>>2]>>>24-(v+1)%4*8&255,p=s[v+2>>>2]>>>24-(v+2)%4*8&255,E=x<<16|C<<8|p,h=0;h<4&&v+h*.75<d;h++)c.push(g.charAt(E>>>6*(3-h)&63));var m=g.charAt(64);if(m)for(;c.length%4;)c.push(m);return c.join("")},parse:function(f){var s=f.length,d=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var c=0;c<d.length;c++)g[d.charCodeAt(c)]=c}var v=d.charAt(64);if(v){var x=f.indexOf(v);x!==-1&&(s=x)}return l(f,s,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(f,s,d){for(var g=[],c=0,v=0;v<s;v++)if(v%4){var x=d[f.charCodeAt(v-1)]<<v%4*2,C=d[f.charCodeAt(v)]>>>6-v%4*2,p=x|C;g[c>>>2]|=p<<24-c%4*8,c++}return i.create(g,c)}}(),t.enc.Base64})}(st)),st.exports}var it={exports:{}},o0;function Aa(){return o0||(o0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,i=n.WordArray,u=r.enc;u.Base64url={stringify:function(f,s){s===void 0&&(s=!0);var d=f.words,g=f.sigBytes,c=s?this._safe_map:this._map;f.clamp();for(var v=[],x=0;x<g;x+=3)for(var C=d[x>>>2]>>>24-x%4*8&255,p=d[x+1>>>2]>>>24-(x+1)%4*8&255,E=d[x+2>>>2]>>>24-(x+2)%4*8&255,h=C<<16|p<<8|E,m=0;m<4&&x+m*.75<g;m++)v.push(c.charAt(h>>>6*(3-m)&63));var B=c.charAt(64);if(B)for(;v.length%4;)v.push(B);return v.join("")},parse:function(f,s){s===void 0&&(s=!0);var d=f.length,g=s?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var v=0;v<g.length;v++)c[g.charCodeAt(v)]=v}var x=g.charAt(64);if(x){var C=f.indexOf(x);C!==-1&&(d=C)}return l(f,d,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function l(f,s,d){for(var g=[],c=0,v=0;v<s;v++)if(v%4){var x=d[f.charCodeAt(v-1)]<<v%4*2,C=d[f.charCodeAt(v)]>>>6-v%4*2,p=x|C;g[c>>>2]|=p<<24-c%4*8,c++}return i.create(g,c)}}(),t.enc.Base64url})}(it)),it.exports}var ot={exports:{}},l0;function Ne(){return l0||(l0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(r){var n=t,i=n.lib,u=i.WordArray,l=i.Hasher,f=n.algo,s=[];(function(){for(var C=0;C<64;C++)s[C]=r.abs(r.sin(C+1))*4294967296|0})();var d=f.MD5=l.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(C,p){for(var E=0;E<16;E++){var h=p+E,m=C[h];C[h]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var B=this._hash.words,b=C[p+0],A=C[p+1],w=C[p+2],V=C[p+3],T=C[p+4],k=C[p+5],S=C[p+6],F=C[p+7],_=C[p+8],y=C[p+9],M=C[p+10],$=C[p+11],L=C[p+12],H=C[p+13],P=C[p+14],O=C[p+15],D=B[0],R=B[1],I=B[2],N=B[3];D=g(D,R,I,N,b,7,s[0]),N=g(N,D,R,I,A,12,s[1]),I=g(I,N,D,R,w,17,s[2]),R=g(R,I,N,D,V,22,s[3]),D=g(D,R,I,N,T,7,s[4]),N=g(N,D,R,I,k,12,s[5]),I=g(I,N,D,R,S,17,s[6]),R=g(R,I,N,D,F,22,s[7]),D=g(D,R,I,N,_,7,s[8]),N=g(N,D,R,I,y,12,s[9]),I=g(I,N,D,R,M,17,s[10]),R=g(R,I,N,D,$,22,s[11]),D=g(D,R,I,N,L,7,s[12]),N=g(N,D,R,I,H,12,s[13]),I=g(I,N,D,R,P,17,s[14]),R=g(R,I,N,D,O,22,s[15]),D=c(D,R,I,N,A,5,s[16]),N=c(N,D,R,I,S,9,s[17]),I=c(I,N,D,R,$,14,s[18]),R=c(R,I,N,D,b,20,s[19]),D=c(D,R,I,N,k,5,s[20]),N=c(N,D,R,I,M,9,s[21]),I=c(I,N,D,R,O,14,s[22]),R=c(R,I,N,D,T,20,s[23]),D=c(D,R,I,N,y,5,s[24]),N=c(N,D,R,I,P,9,s[25]),I=c(I,N,D,R,V,14,s[26]),R=c(R,I,N,D,_,20,s[27]),D=c(D,R,I,N,H,5,s[28]),N=c(N,D,R,I,w,9,s[29]),I=c(I,N,D,R,F,14,s[30]),R=c(R,I,N,D,L,20,s[31]),D=v(D,R,I,N,k,4,s[32]),N=v(N,D,R,I,_,11,s[33]),I=v(I,N,D,R,$,16,s[34]),R=v(R,I,N,D,P,23,s[35]),D=v(D,R,I,N,A,4,s[36]),N=v(N,D,R,I,T,11,s[37]),I=v(I,N,D,R,F,16,s[38]),R=v(R,I,N,D,M,23,s[39]),D=v(D,R,I,N,H,4,s[40]),N=v(N,D,R,I,b,11,s[41]),I=v(I,N,D,R,V,16,s[42]),R=v(R,I,N,D,S,23,s[43]),D=v(D,R,I,N,y,4,s[44]),N=v(N,D,R,I,L,11,s[45]),I=v(I,N,D,R,O,16,s[46]),R=v(R,I,N,D,w,23,s[47]),D=x(D,R,I,N,b,6,s[48]),N=x(N,D,R,I,F,10,s[49]),I=x(I,N,D,R,P,15,s[50]),R=x(R,I,N,D,k,21,s[51]),D=x(D,R,I,N,L,6,s[52]),N=x(N,D,R,I,V,10,s[53]),I=x(I,N,D,R,M,15,s[54]),R=x(R,I,N,D,A,21,s[55]),D=x(D,R,I,N,_,6,s[56]),N=x(N,D,R,I,O,10,s[57]),I=x(I,N,D,R,S,15,s[58]),R=x(R,I,N,D,H,21,s[59]),D=x(D,R,I,N,T,6,s[60]),N=x(N,D,R,I,$,10,s[61]),I=x(I,N,D,R,w,15,s[62]),R=x(R,I,N,D,y,21,s[63]),B[0]=B[0]+D|0,B[1]=B[1]+R|0,B[2]=B[2]+I|0,B[3]=B[3]+N|0},_doFinalize:function(){var C=this._data,p=C.words,E=this._nDataBytes*8,h=C.sigBytes*8;p[h>>>5]|=128<<24-h%32;var m=r.floor(E/4294967296),B=E;p[(h+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,p[(h+64>>>9<<4)+14]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,C.sigBytes=(p.length+1)*4,this._process();for(var b=this._hash,A=b.words,w=0;w<4;w++){var V=A[w];A[w]=(V<<8|V>>>24)&16711935|(V<<24|V>>>8)&4278255360}return b},clone:function(){var C=l.clone.call(this);return C._hash=this._hash.clone(),C}});function g(C,p,E,h,m,B,b){var A=C+(p&E|~p&h)+m+b;return(A<<B|A>>>32-B)+p}function c(C,p,E,h,m,B,b){var A=C+(p&h|E&~h)+m+b;return(A<<B|A>>>32-B)+p}function v(C,p,E,h,m,B,b){var A=C+(p^E^h)+m+b;return(A<<B|A>>>32-B)+p}function x(C,p,E,h,m,B,b){var A=C+(E^(p|~h))+m+b;return(A<<B|A>>>32-B)+p}n.MD5=l._createHelper(d),n.HmacMD5=l._createHmacHelper(d)}(Math),t.MD5})}(ot)),ot.exports}var lt={exports:{}},u0;function W0(){return u0||(u0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(){var r=t,n=r.lib,i=n.WordArray,u=n.Hasher,l=r.algo,f=[],s=l.SHA1=u.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,g){for(var c=this._hash.words,v=c[0],x=c[1],C=c[2],p=c[3],E=c[4],h=0;h<80;h++){if(h<16)f[h]=d[g+h]|0;else{var m=f[h-3]^f[h-8]^f[h-14]^f[h-16];f[h]=m<<1|m>>>31}var B=(v<<5|v>>>27)+E+f[h];h<20?B+=(x&C|~x&p)+1518500249:h<40?B+=(x^C^p)+1859775393:h<60?B+=(x&C|x&p|C&p)-1894007588:B+=(x^C^p)-899497514,E=p,p=C,C=x<<30|x>>>2,x=v,v=B}c[0]=c[0]+v|0,c[1]=c[1]+x|0,c[2]=c[2]+C|0,c[3]=c[3]+p|0,c[4]=c[4]+E|0},_doFinalize:function(){var d=this._data,g=d.words,c=this._nDataBytes*8,v=d.sigBytes*8;return g[v>>>5]|=128<<24-v%32,g[(v+64>>>9<<4)+14]=Math.floor(c/4294967296),g[(v+64>>>9<<4)+15]=c,d.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var d=u.clone.call(this);return d._hash=this._hash.clone(),d}});r.SHA1=u._createHelper(s),r.HmacSHA1=u._createHmacHelper(s)}(),t.SHA1})}(lt)),lt.exports}var ut={exports:{}},c0;function $t(){return c0||(c0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){return function(r){var n=t,i=n.lib,u=i.WordArray,l=i.Hasher,f=n.algo,s=[],d=[];(function(){function v(E){for(var h=r.sqrt(E),m=2;m<=h;m++)if(!(E%m))return!1;return!0}function x(E){return(E-(E|0))*4294967296|0}for(var C=2,p=0;p<64;)v(C)&&(p<8&&(s[p]=x(r.pow(C,1/2))),d[p]=x(r.pow(C,1/3)),p++),C++})();var g=[],c=f.SHA256=l.extend({_doReset:function(){this._hash=new u.init(s.slice(0))},_doProcessBlock:function(v,x){for(var C=this._hash.words,p=C[0],E=C[1],h=C[2],m=C[3],B=C[4],b=C[5],A=C[6],w=C[7],V=0;V<64;V++){if(V<16)g[V]=v[x+V]|0;else{var T=g[V-15],k=(T<<25|T>>>7)^(T<<14|T>>>18)^T>>>3,S=g[V-2],F=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;g[V]=k+g[V-7]+F+g[V-16]}var _=B&b^~B&A,y=p&E^p&h^E&h,M=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),$=(B<<26|B>>>6)^(B<<21|B>>>11)^(B<<7|B>>>25),L=w+$+_+d[V]+g[V],H=M+y;w=A,A=b,b=B,B=m+L|0,m=h,h=E,E=p,p=L+H|0}C[0]=C[0]+p|0,C[1]=C[1]+E|0,C[2]=C[2]+h|0,C[3]=C[3]+m|0,C[4]=C[4]+B|0,C[5]=C[5]+b|0,C[6]=C[6]+A|0,C[7]=C[7]+w|0},_doFinalize:function(){var v=this._data,x=v.words,C=this._nDataBytes*8,p=v.sigBytes*8;return x[p>>>5]|=128<<24-p%32,x[(p+64>>>9<<4)+14]=r.floor(C/4294967296),x[(p+64>>>9<<4)+15]=C,v.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var v=l.clone.call(this);return v._hash=this._hash.clone(),v}});n.SHA256=l._createHelper(c),n.HmacSHA256=l._createHmacHelper(c)}(Math),t.SHA256})}(ut)),ut.exports}var ct={exports:{}},d0;function ba(){return d0||(d0=1,function(o,e){(function(t,r,n){o.exports=r(G(),$t())})(W,function(t){return function(){var r=t,n=r.lib,i=n.WordArray,u=r.algo,l=u.SHA256,f=u.SHA224=l.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var s=l._doFinalize.call(this);return s.sigBytes-=4,s}});r.SHA224=l._createHelper(f),r.HmacSHA224=l._createHmacHelper(f)}(),t.SHA224})}(ct)),ct.exports}var dt={exports:{}},x0;function G0(){return x0||(x0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ze())})(W,function(t){return function(){var r=t,n=r.lib,i=n.Hasher,u=r.x64,l=u.Word,f=u.WordArray,s=r.algo;function d(){return l.create.apply(l,arguments)}var g=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],c=[];(function(){for(var x=0;x<80;x++)c[x]=d()})();var v=s.SHA512=i.extend({_doReset:function(){this._hash=new f.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(x,C){for(var p=this._hash.words,E=p[0],h=p[1],m=p[2],B=p[3],b=p[4],A=p[5],w=p[6],V=p[7],T=E.high,k=E.low,S=h.high,F=h.low,_=m.high,y=m.low,M=B.high,$=B.low,L=b.high,H=b.low,P=A.high,O=A.low,D=w.high,R=w.low,I=V.high,N=V.low,X=T,Z=k,Q=S,j=F,ge=_,pe=y,Re=M,Be=$,ae=L,ee=H,Fe=P,_e=O,he=D,Y=R,oe=I,de=N,le=0;le<80;le++){var ne,q,Ee=c[le];if(le<16)q=Ee.high=x[C+le*2]|0,ne=Ee.low=x[C+le*2+1]|0;else{var Ie=c[le-15],Te=Ie.high,Pe=Ie.low,tr=(Te>>>1|Pe<<31)^(Te>>>8|Pe<<24)^Te>>>7,qt=(Pe>>>1|Te<<31)^(Pe>>>8|Te<<24)^(Pe>>>7|Te<<25),Ut=c[le-2],Me=Ut.high,Oe=Ut.low,rr=(Me>>>19|Oe<<13)^(Me<<3|Oe>>>29)^Me>>>6,jt=(Oe>>>19|Me<<13)^(Oe<<3|Me>>>29)^(Oe>>>6|Me<<26),Kt=c[le-7],ar=Kt.high,nr=Kt.low,Wt=c[le-16],sr=Wt.high,Gt=Wt.low;ne=qt+nr,q=tr+ar+(ne>>>0<qt>>>0?1:0),ne=ne+jt,q=q+rr+(ne>>>0<jt>>>0?1:0),ne=ne+Gt,q=q+sr+(ne>>>0<Gt>>>0?1:0),Ee.high=q,Ee.low=ne}var ir=ae&Fe^~ae&he,Zt=ee&_e^~ee&Y,or=X&Q^X&ge^Q&ge,lr=Z&j^Z&pe^j&pe,ur=(X>>>28|Z<<4)^(X<<30|Z>>>2)^(X<<25|Z>>>7),Xt=(Z>>>28|X<<4)^(Z<<30|X>>>2)^(Z<<25|X>>>7),cr=(ae>>>14|ee<<18)^(ae>>>18|ee<<14)^(ae<<23|ee>>>9),dr=(ee>>>14|ae<<18)^(ee>>>18|ae<<14)^(ee<<23|ae>>>9),Yt=g[le],xr=Yt.high,Qt=Yt.low,se=de+dr,ye=oe+cr+(se>>>0<de>>>0?1:0),se=se+Zt,ye=ye+ir+(se>>>0<Zt>>>0?1:0),se=se+Qt,ye=ye+xr+(se>>>0<Qt>>>0?1:0),se=se+ne,ye=ye+q+(se>>>0<ne>>>0?1:0),Jt=Xt+lr,hr=ur+or+(Jt>>>0<Xt>>>0?1:0);oe=he,de=Y,he=Fe,Y=_e,Fe=ae,_e=ee,ee=Be+se|0,ae=Re+ye+(ee>>>0<Be>>>0?1:0)|0,Re=ge,Be=pe,ge=Q,pe=j,Q=X,j=Z,Z=se+Jt|0,X=ye+hr+(Z>>>0<se>>>0?1:0)|0}k=E.low=k+Z,E.high=T+X+(k>>>0<Z>>>0?1:0),F=h.low=F+j,h.high=S+Q+(F>>>0<j>>>0?1:0),y=m.low=y+pe,m.high=_+ge+(y>>>0<pe>>>0?1:0),$=B.low=$+Be,B.high=M+Re+($>>>0<Be>>>0?1:0),H=b.low=H+ee,b.high=L+ae+(H>>>0<ee>>>0?1:0),O=A.low=O+_e,A.high=P+Fe+(O>>>0<_e>>>0?1:0),R=w.low=R+Y,w.high=D+he+(R>>>0<Y>>>0?1:0),N=V.low=N+de,V.high=I+oe+(N>>>0<de>>>0?1:0)},_doFinalize:function(){var x=this._data,C=x.words,p=this._nDataBytes*8,E=x.sigBytes*8;C[E>>>5]|=128<<24-E%32,C[(E+128>>>10<<5)+30]=Math.floor(p/4294967296),C[(E+128>>>10<<5)+31]=p,x.sigBytes=C.length*4,this._process();var h=this._hash.toX32();return h},clone:function(){var x=i.clone.call(this);return x._hash=this._hash.clone(),x},blockSize:1024/32});r.SHA512=i._createHelper(v),r.HmacSHA512=i._createHmacHelper(v)}(),t.SHA512})}(dt)),dt.exports}var xt={exports:{}},h0;function Fa(){return h0||(h0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ze(),G0())})(W,function(t){return function(){var r=t,n=r.x64,i=n.Word,u=n.WordArray,l=r.algo,f=l.SHA512,s=l.SHA384=f.extend({_doReset:function(){this._hash=new u.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var d=f._doFinalize.call(this);return d.sigBytes-=16,d}});r.SHA384=f._createHelper(s),r.HmacSHA384=f._createHmacHelper(s)}(),t.SHA384})}(xt)),xt.exports}var ht={exports:{}},f0;function Da(){return f0||(f0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ze())})(W,function(t){return function(r){var n=t,i=n.lib,u=i.WordArray,l=i.Hasher,f=n.x64,s=f.Word,d=n.algo,g=[],c=[],v=[];(function(){for(var p=1,E=0,h=0;h<24;h++){g[p+5*E]=(h+1)*(h+2)/2%64;var m=E%5,B=(2*p+3*E)%5;p=m,E=B}for(var p=0;p<5;p++)for(var E=0;E<5;E++)c[p+5*E]=E+(2*p+3*E)%5*5;for(var b=1,A=0;A<24;A++){for(var w=0,V=0,T=0;T<7;T++){if(b&1){var k=(1<<T)-1;k<32?V^=1<<k:w^=1<<k-32}b&128?b=b<<1^113:b<<=1}v[A]=s.create(w,V)}})();var x=[];(function(){for(var p=0;p<25;p++)x[p]=s.create()})();var C=d.SHA3=l.extend({cfg:l.cfg.extend({outputLength:512}),_doReset:function(){for(var p=this._state=[],E=0;E<25;E++)p[E]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(p,E){for(var h=this._state,m=this.blockSize/2,B=0;B<m;B++){var b=p[E+2*B],A=p[E+2*B+1];b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360;var w=h[B];w.high^=A,w.low^=b}for(var V=0;V<24;V++){for(var T=0;T<5;T++){for(var k=0,S=0,F=0;F<5;F++){var w=h[T+5*F];k^=w.high,S^=w.low}var _=x[T];_.high=k,_.low=S}for(var T=0;T<5;T++)for(var y=x[(T+4)%5],M=x[(T+1)%5],$=M.high,L=M.low,k=y.high^($<<1|L>>>31),S=y.low^(L<<1|$>>>31),F=0;F<5;F++){var w=h[T+5*F];w.high^=k,w.low^=S}for(var H=1;H<25;H++){var k,S,w=h[H],P=w.high,O=w.low,D=g[H];D<32?(k=P<<D|O>>>32-D,S=O<<D|P>>>32-D):(k=O<<D-32|P>>>64-D,S=P<<D-32|O>>>64-D);var R=x[c[H]];R.high=k,R.low=S}var I=x[0],N=h[0];I.high=N.high,I.low=N.low;for(var T=0;T<5;T++)for(var F=0;F<5;F++){var H=T+5*F,w=h[H],X=x[H],Z=x[(T+1)%5+5*F],Q=x[(T+2)%5+5*F];w.high=X.high^~Z.high&Q.high,w.low=X.low^~Z.low&Q.low}var w=h[0],j=v[V];w.high^=j.high,w.low^=j.low}},_doFinalize:function(){var p=this._data,E=p.words;this._nDataBytes*8;var h=p.sigBytes*8,m=this.blockSize*32;E[h>>>5]|=1<<24-h%32,E[(r.ceil((h+1)/m)*m>>>5)-1]|=128,p.sigBytes=E.length*4,this._process();for(var B=this._state,b=this.cfg.outputLength/8,A=b/8,w=[],V=0;V<A;V++){var T=B[V],k=T.high,S=T.low;k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,w.push(S),w.push(k)}return new u.init(w,b)},clone:function(){for(var p=l.clone.call(this),E=p._state=this._state.slice(0),h=0;h<25;h++)E[h]=E[h].clone();return p}});n.SHA3=l._createHelper(C),n.HmacSHA3=l._createHmacHelper(C)}(Math),t.SHA3})}(ht)),ht.exports}var ft={exports:{}},p0;function wa(){return p0||(p0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){/** @preserve
2
2
  (c) 2012 by Cédric Mesnil. All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: