@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 +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(de,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(de=typeof globalThis<"u"?globalThis:de||self,a(de.MidenPGVue={},de.Vue))})(this,function(de,a){"use strict";const Ut=Symbol("MidenPGConfig");function rr(o){if(!(o!=null&&o.publishableKey))throw new Error("[@miden-npm/vue] publishableKey is required");return{install(e){e.provide(Ut,o)}}}function ar(){const o=a.inject(Ut);if(!o)throw new Error("[@miden-npm/vue] Missing provider. Did you forget to app.use(createMidenPG(...))?");return o}const Oe=o=>o==null||typeof o!="object"?!1:Object.values(o).every(Boolean),tt=o=>{const e={};return new URL(o).searchParams.forEach((r,n)=>{e[n]=r}),e},me=o=>o==="sandbox"?"https://sandbox-api.midencards.io/payment-gateway-core-api":"",nr=o=>o==="USD"?"$":o==="NGN"?"₦":o==="EUR"?"€":o==="GBP"?"£":o==="JPY"||o==="CNY"?"¥":o==="USDC"||o==="usdc"?"$⧫":o==="USDT"||o==="usdt"?"₮":"$",De=(o,e)=>{const t=typeof o=="string"?parseFloat(o):o;return isNaN(t)?"0":`${e?nr(e):""} ${t==null?void 0:t.toLocaleString("en-US")}`},sr=(o,e)=>o.length<=e?o:o.slice(0,e)+"...",ir=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 or(o){return o?o.split("|").map(e=>{const[t,r]=e.split(":");return{rule:t,value:r}}):[]}function lr(o,e,t){const r=[],n=or(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=lr(i,o[n]??"",u);l&&(r[n]=l)}return r};var jt=(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))(jt||{});const Kt=/^4\d{12}(\d{3}){0,2}$/,Wt=/^(?: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})?$/,ur=/^(34|37)\d{13}$/,cr=/^(?: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}$/,dr=/^(?:35(?:2[8-9]|[3-8]\d))\d{12,15}$/,xr=/^(?:3(?:0[0-5]\d|095|6\d|[89]\d))\d{11,13}$/,hr=/^(?:50|5[6-9]|6[0-9])\d{10,17}$/,rt=/^62\d{14,17}$/,fr=/^1\d{14}$/,pr=[[506099,506198],[650002,650027]],mr=new Set([507865,507866]),Cr=new Set([220545,220543]),vr=new Set([6690109]),gr=new Set([968209,873646]),Br=new Set([422818,486094]),_r=new Set([529741,543357]),Er=new Set([620108]),yr=new Set([621423]);function kr(o){const e=Ar(o);return jt[e]}function Ar(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(gr.has(t)&&e.length>=16&&e.length<=19)return 16;if(Br.has(t)&&Kt.test(e))return 17;if(_r.has(t)&&Wt.test(e))return 18;if(Cr.has(t)&&e.length===16)return 14;if(Er.has(t)&&rt.test(e))return 11;if(yr.has(t)&&rt.test(e))return 12;if(br(t,e.length))return 3}if(e.length>=7){const t=parseInt(e.slice(0,7),10);if(vr.has(t)&&e.length===16)return 15}return fr.test(e)?13:ur.test(e)?5:cr.test(e)?6:dr.test(e)?7:xr.test(e)?8:Wt.test(e)?2:Kt.test(e)?1:rt.test(e)?10:hr.test(e)?9:19}function br(o,e){return e<16||e>19?!1:pr.some(([r,n])=>o>=r&&o<=n)||mr.has(o)}const Fr=["width","height"],Dr=["stroke"],wr=["fill"],Gt=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,Dr),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,wr)],16,Fr))}}),Sr=["disabled"],Vr={key:1},we=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(Gt,{key:0})):(a.openBlock(),a.createElementBlock("div",Vr,[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,Sr))}}),Nr={class:"mb-0 text-body-3xs font-normal text-red-500"},Zt=a.defineComponent({__name:"input-error",props:{errorMessage:{}},setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("p",Nr,a.toDisplayString(e.errorMessage),1))}});async function He(o,e,t){try{const r=me(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 Rr(o,{merchantId:e,...t}){try{const r=me(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 Ir(o,{merchantId:e,...t}){try{const r=me(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 Xt(o,e){try{const t=me(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 Tr(o,{merchantId:e,...t}){try{const r=me(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 Mr={key:0,class:"absolute inset-0 grid place-items-center bg-white/60"},Yt=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 m;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),(m=r.value)==null||m.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(!Oe(e.paymentObject)){i.value="Kindly ensure you are passing all the required data.";return}u.value=!0,i.value="";try{const d=await He(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",Mr,[a.createVNode(Gt)])):a.createCommentVNode("",!0)],4))}}),Pr={key:1},Or=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(!Oe(e.paymentObject)){t.value="Kindly ensure you are passing all the required data.";return}n.value=!0,t.value="";try{const s=await He(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(Yt,{key:0,url:r.value,secretKey:a.unref(u),environment:a.unref(l)},null,8,["url","secretKey","environment"])):(a.openBlock(),a.createElementBlock("div",Pr,[a.createVNode(we,{label:"Pay",type:"primary",customClass:"w-full",loading:n.value,onClick:i},null,8,["loading"]),a.createVNode(Zt,{errorMessage:t.value},null,8,["errorMessage"])]))}}),Hr=["width","height"],$r=["fill"],Lr=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,$r)],16,Hr))}}),zr=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(Lr),r[1]||(r[1]=a.createElementVNode("p",{class:"mb-0 text-body-xs font-normal"},"Back",-1))]))}}),qr=["width","height"],Ur=["fill"],jr=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,Ur)],16,qr))}}),Kr={class:"checkout-card w-full h-screen flex flex-col items-center justify-center text-white"},Wr={class:"flex w-1/2"},Gr={class:"flex gap-2 w-full"},Zr={class:"flex flex-col gap-8 w-full"},Xr={class:"bg-off-white rounded-xl"},Yr={class:"flex items-center gap-2 justify-center"},Qr=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",Kr,[a.createElementVNode("div",Wr,[r.showBackButton?(a.openBlock(),a.createBlock(zr,{key:0,onBack:n[0]||(n[0]=i=>t("back"))})):a.createCommentVNode("",!0),a.createElementVNode("div",Gr,[a.createElementVNode("div",Zr,[a.createElementVNode("div",Xr,[a.renderSlot(r.$slots,"default")]),a.createElementVNode("div",Yr,[n[2]||(n[2]=a.createElementVNode("p",{class:"text-light-white-100 text-body-2xs font-regular"}," Powered by Buzapay ",-1)),a.createVNode(jr,{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)])])])])]))}}),Jr=["aria-orientation"],ea=["aria-checked","onClick"],ta={key:0,class:"bg-white w-2 h-2 rounded-full"},ra={class:"mb-0 text-body-2xs font-medium text-heading-text"},aa=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,m)=>(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:v=>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",ta)):a.createCommentVNode("",!0)],2),a.createElementVNode("p",ra,a.toDisplayString(x.label),1)],8,ea))),128))],10,Jr))}}),na=["src","height","alt"],Be=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,na))}});var W=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sa(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function ia(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 Qt={exports:{}};function oa(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 at={exports:{}};const la=ia(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Jt;function G(){return Jt||(Jt=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 oa=="function")try{i=la}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(C){var B;return h.prototype=C,B=new h,h.prototype=null,B}}(),f={},s=f.lib={},d=s.Base=function(){return{extend:function(h){var C=l(this);return h&&C.mixIn(h),(!C.hasOwnProperty("init")||this.init===C.init)&&(C.init=function(){C.$super.init.apply(this,arguments)}),C.init.prototype=C,C.$super=this,C},create:function(){var h=this.extend();return h.init.apply(h,arguments),h},init:function(){},mixIn:function(h){for(var C in h)h.hasOwnProperty(C)&&(this[C]=h[C]);h.hasOwnProperty("toString")&&(this.toString=h.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=s.WordArray=d.extend({init:function(h,C){h=this.words=h||[],C!=n?this.sigBytes=C:this.sigBytes=h.length*4},toString:function(h){return(h||m).stringify(this)},concat:function(h){var C=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;C[b+w>>>2]|=V<<24-(b+w)%4*8}else for(var T=0;T<A;T+=4)C[b+T>>>2]=B[T>>>2];return this.sigBytes+=A,this},clamp:function(){var h=this.words,C=this.sigBytes;h[C>>>2]&=4294967295<<32-C%4*8,h.length=r.ceil(C/4)},clone:function(){var h=d.clone.call(this);return h.words=this.words.slice(0),h},random:function(h){for(var C=[],B=0;B<h;B+=4)C.push(u());return new g.init(C,h)}}),c=f.enc={},m=c.Hex={stringify:function(h){for(var C=h.words,B=h.sigBytes,b=[],A=0;A<B;A++){var w=C[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 C=h.length,B=[],b=0;b<C;b+=2)B[b>>>3]|=parseInt(h.substr(b,2),16)<<24-b%8*4;return new g.init(B,C/2)}},x=c.Latin1={stringify:function(h){for(var C=h.words,B=h.sigBytes,b=[],A=0;A<B;A++){var w=C[A>>>2]>>>24-A%4*8&255;b.push(String.fromCharCode(w))}return b.join("")},parse:function(h){for(var C=h.length,B=[],b=0;b<C;b++)B[b>>>2]|=(h.charCodeAt(b)&255)<<24-b%4*8;return new g.init(B,C)}},v=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=v.parse(h)),this._data.concat(h),this._nDataBytes+=h.sigBytes},_process:function(h){var C,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);C=b.splice(0,k),B.sigBytes-=S}return new g.init(C,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 C=this._doFinalize();return C},blockSize:16,_createHelper:function(h){return function(C,B){return new h.init(B).finalize(C)}},_createHmacHelper:function(h){return function(C,B){return new E.HMAC.init(h,B).finalize(C)}}});var E=f.algo={};return f}(Math);return t})}(at)),at.exports}var nt={exports:{}},e0;function Ke(){return e0||(e0=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 m=s[c];g.push(m.high),g.push(m.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})}(nt)),nt.exports}var st={exports:{}},t0;function ua(){return t0||(t0=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})}(st)),st.exports}var it={exports:{}},r0;function ca(){return r0||(r0=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 m=s[c>>>2]>>>16-c%4*8&65535;g.push(String.fromCharCode(m))}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 m=l(s[c>>>2]>>>16-c%4*8&65535);g.push(String.fromCharCode(m))}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})}(it)),it.exports}var ot={exports:{}},a0;function Se(){return a0||(a0=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=[],m=0;m<d;m+=3)for(var x=s[m>>>2]>>>24-m%4*8&255,v=s[m+1>>>2]>>>24-(m+1)%4*8&255,p=s[m+2>>>2]>>>24-(m+2)%4*8&255,E=x<<16|v<<8|p,h=0;h<4&&m+h*.75<d;h++)c.push(g.charAt(E>>>6*(3-h)&63));var C=g.charAt(64);if(C)for(;c.length%4;)c.push(C);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 m=d.charAt(64);if(m){var x=f.indexOf(m);x!==-1&&(s=x)}return l(f,s,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(f,s,d){for(var g=[],c=0,m=0;m<s;m++)if(m%4){var x=d[f.charCodeAt(m-1)]<<m%4*2,v=d[f.charCodeAt(m)]>>>6-m%4*2,p=x|v;g[c>>>2]|=p<<24-c%4*8,c++}return i.create(g,c)}}(),t.enc.Base64})}(ot)),ot.exports}var lt={exports:{}},n0;function da(){return n0||(n0=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 m=[],x=0;x<g;x+=3)for(var v=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=v<<16|p<<8|E,C=0;C<4&&x+C*.75<g;C++)m.push(c.charAt(h>>>6*(3-C)&63));var B=c.charAt(64);if(B)for(;m.length%4;)m.push(B);return m.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 m=0;m<g.length;m++)c[g.charCodeAt(m)]=m}var x=g.charAt(64);if(x){var v=f.indexOf(x);v!==-1&&(d=v)}return l(f,d,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function l(f,s,d){for(var g=[],c=0,m=0;m<s;m++)if(m%4){var x=d[f.charCodeAt(m-1)]<<m%4*2,v=d[f.charCodeAt(m)]>>>6-m%4*2,p=x|v;g[c>>>2]|=p<<24-c%4*8,c++}return i.create(g,c)}}(),t.enc.Base64url})}(lt)),lt.exports}var ut={exports:{}},s0;function Ve(){return s0||(s0=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 v=0;v<64;v++)s[v]=r.abs(r.sin(v+1))*4294967296|0})();var d=f.MD5=l.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,p){for(var E=0;E<16;E++){var h=p+E,C=v[h];v[h]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var B=this._hash.words,b=v[p+0],A=v[p+1],w=v[p+2],V=v[p+3],T=v[p+4],k=v[p+5],S=v[p+6],F=v[p+7],_=v[p+8],y=v[p+9],M=v[p+10],$=v[p+11],L=v[p+12],H=v[p+13],P=v[p+14],O=v[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=m(D,R,I,N,k,4,s[32]),N=m(N,D,R,I,_,11,s[33]),I=m(I,N,D,R,$,16,s[34]),R=m(R,I,N,D,P,23,s[35]),D=m(D,R,I,N,A,4,s[36]),N=m(N,D,R,I,T,11,s[37]),I=m(I,N,D,R,F,16,s[38]),R=m(R,I,N,D,M,23,s[39]),D=m(D,R,I,N,H,4,s[40]),N=m(N,D,R,I,b,11,s[41]),I=m(I,N,D,R,V,16,s[42]),R=m(R,I,N,D,S,23,s[43]),D=m(D,R,I,N,y,4,s[44]),N=m(N,D,R,I,L,11,s[45]),I=m(I,N,D,R,O,16,s[46]),R=m(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 v=this._data,p=v.words,E=this._nDataBytes*8,h=v.sigBytes*8;p[h>>>5]|=128<<24-h%32;var C=r.floor(E/4294967296),B=E;p[(h+64>>>9<<4)+15]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,p[(h+64>>>9<<4)+14]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,v.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 v=l.clone.call(this);return v._hash=this._hash.clone(),v}});function g(v,p,E,h,C,B,b){var A=v+(p&E|~p&h)+C+b;return(A<<B|A>>>32-B)+p}function c(v,p,E,h,C,B,b){var A=v+(p&h|E&~h)+C+b;return(A<<B|A>>>32-B)+p}function m(v,p,E,h,C,B,b){var A=v+(p^E^h)+C+b;return(A<<B|A>>>32-B)+p}function x(v,p,E,h,C,B,b){var A=v+(E^(p|~h))+C+b;return(A<<B|A>>>32-B)+p}n.MD5=l._createHelper(d),n.HmacMD5=l._createHmacHelper(d)}(Math),t.MD5})}(ut)),ut.exports}var ct={exports:{}},i0;function o0(){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=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,m=c[0],x=c[1],v=c[2],p=c[3],E=c[4],h=0;h<80;h++){if(h<16)f[h]=d[g+h]|0;else{var C=f[h-3]^f[h-8]^f[h-14]^f[h-16];f[h]=C<<1|C>>>31}var B=(m<<5|m>>>27)+E+f[h];h<20?B+=(x&v|~x&p)+1518500249:h<40?B+=(x^v^p)+1859775393:h<60?B+=(x&v|x&p|v&p)-1894007588:B+=(x^v^p)-899497514,E=p,p=v,v=x<<30|x>>>2,x=m,m=B}c[0]=c[0]+m|0,c[1]=c[1]+x|0,c[2]=c[2]+v|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,m=d.sigBytes*8;return g[m>>>5]|=128<<24-m%32,g[(m+64>>>9<<4)+14]=Math.floor(c/4294967296),g[(m+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})}(ct)),ct.exports}var dt={exports:{}},l0;function xt(){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=[],d=[];(function(){function m(E){for(var h=r.sqrt(E),C=2;C<=h;C++)if(!(E%C))return!1;return!0}function x(E){return(E-(E|0))*4294967296|0}for(var v=2,p=0;p<64;)m(v)&&(p<8&&(s[p]=x(r.pow(v,1/2))),d[p]=x(r.pow(v,1/3)),p++),v++})();var g=[],c=f.SHA256=l.extend({_doReset:function(){this._hash=new u.init(s.slice(0))},_doProcessBlock:function(m,x){for(var v=this._hash.words,p=v[0],E=v[1],h=v[2],C=v[3],B=v[4],b=v[5],A=v[6],w=v[7],V=0;V<64;V++){if(V<16)g[V]=m[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=C+L|0,C=h,h=E,E=p,p=L+H|0}v[0]=v[0]+p|0,v[1]=v[1]+E|0,v[2]=v[2]+h|0,v[3]=v[3]+C|0,v[4]=v[4]+B|0,v[5]=v[5]+b|0,v[6]=v[6]+A|0,v[7]=v[7]+w|0},_doFinalize:function(){var m=this._data,x=m.words,v=this._nDataBytes*8,p=m.sigBytes*8;return x[p>>>5]|=128<<24-p%32,x[(p+64>>>9<<4)+14]=r.floor(v/4294967296),x[(p+64>>>9<<4)+15]=v,m.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var m=l.clone.call(this);return m._hash=this._hash.clone(),m}});n.SHA256=l._createHelper(c),n.HmacSHA256=l._createHmacHelper(c)}(Math),t.SHA256})}(dt)),dt.exports}var ht={exports:{}},u0;function xa(){return u0||(u0=1,function(o,e){(function(t,r,n){o.exports=r(G(),xt())})(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})}(ht)),ht.exports}var ft={exports:{}},c0;function d0(){return c0||(c0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ke())})(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 m=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,v){for(var p=this._hash.words,E=p[0],h=p[1],C=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,_=C.high,y=C.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,J=S,j=F,ye=_,ge=y,Ie=M,ke=$,ae=L,re=H,Re=P,Ae=O,pe=D,Y=R,ue=I,he=N,ce=0;ce<80;ce++){var ne,q,be=c[ce];if(ce<16)q=be.high=x[v+ce*2]|0,ne=be.low=x[v+ce*2+1]|0;else{var Te=c[ce-15],Me=Te.high,qe=Te.low,ri=(Me>>>1|qe<<31)^(Me>>>8|qe<<24)^Me>>>7,j0=(qe>>>1|Me<<31)^(qe>>>8|Me<<24)^(qe>>>7|Me<<25),K0=c[ce-2],Pe=K0.high,Ue=K0.low,ai=(Pe>>>19|Ue<<13)^(Pe<<3|Ue>>>29)^Pe>>>6,W0=(Ue>>>19|Pe<<13)^(Ue<<3|Pe>>>29)^(Ue>>>6|Pe<<26),G0=c[ce-7],ni=G0.high,si=G0.low,Z0=c[ce-16],ii=Z0.high,X0=Z0.low;ne=j0+si,q=ri+ni+(ne>>>0<j0>>>0?1:0),ne=ne+W0,q=q+ai+(ne>>>0<W0>>>0?1:0),ne=ne+X0,q=q+ii+(ne>>>0<X0>>>0?1:0),be.high=q,be.low=ne}var oi=ae&Re^~ae&pe,Y0=re&Ae^~re&Y,li=X&J^X&ye^J&ye,ui=Z&j^Z&ge^j&ge,ci=(X>>>28|Z<<4)^(X<<30|Z>>>2)^(X<<25|Z>>>7),Q0=(Z>>>28|X<<4)^(Z<<30|X>>>2)^(Z<<25|X>>>7),di=(ae>>>14|re<<18)^(ae>>>18|re<<14)^(ae<<23|re>>>9),xi=(re>>>14|ae<<18)^(re>>>18|ae<<14)^(re<<23|ae>>>9),J0=g[ce],hi=J0.high,er=J0.low,ie=he+xi,Fe=ue+di+(ie>>>0<he>>>0?1:0),ie=ie+Y0,Fe=Fe+oi+(ie>>>0<Y0>>>0?1:0),ie=ie+er,Fe=Fe+hi+(ie>>>0<er>>>0?1:0),ie=ie+ne,Fe=Fe+q+(ie>>>0<ne>>>0?1:0),tr=Q0+ui,fi=ci+li+(tr>>>0<Q0>>>0?1:0);ue=pe,he=Y,pe=Re,Y=Ae,Re=ae,Ae=re,re=ke+ie|0,ae=Ie+Fe+(re>>>0<ke>>>0?1:0)|0,Ie=ye,ke=ge,ye=J,ge=j,J=X,j=Z,Z=ie+tr|0,X=Fe+fi+(Z>>>0<ie>>>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+J+(F>>>0<j>>>0?1:0),y=C.low=y+ge,C.high=_+ye+(y>>>0<ge>>>0?1:0),$=B.low=$+ke,B.high=M+Ie+($>>>0<ke>>>0?1:0),H=b.low=H+re,b.high=L+ae+(H>>>0<re>>>0?1:0),O=A.low=O+Ae,A.high=P+Re+(O>>>0<Ae>>>0?1:0),R=w.low=R+Y,w.high=D+pe+(R>>>0<Y>>>0?1:0),N=V.low=N+he,V.high=I+ue+(N>>>0<he>>>0?1:0)},_doFinalize:function(){var x=this._data,v=x.words,p=this._nDataBytes*8,E=x.sigBytes*8;v[E>>>5]|=128<<24-E%32,v[(E+128>>>10<<5)+30]=Math.floor(p/4294967296),v[(E+128>>>10<<5)+31]=p,x.sigBytes=v.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(m),r.HmacSHA512=i._createHmacHelper(m)}(),t.SHA512})}(ft)),ft.exports}var pt={exports:{}},x0;function ha(){return x0||(x0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ke(),d0())})(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})}(pt)),pt.exports}var mt={exports:{}},h0;function fa(){return h0||(h0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ke())})(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=[],m=[];(function(){for(var p=1,E=0,h=0;h<24;h++){g[p+5*E]=(h+1)*(h+2)/2%64;var C=E%5,B=(2*p+3*E)%5;p=C,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}m[A]=s.create(w,V)}})();var x=[];(function(){for(var p=0;p<25;p++)x[p]=s.create()})();var v=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,C=this.blockSize/2,B=0;B<C;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],J=x[(T+2)%5+5*F];w.high=X.high^~Z.high&J.high,w.low=X.low^~Z.low&J.low}var w=h[0],j=m[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,C=this.blockSize*32;E[h>>>5]|=1<<24-h%32,E[(r.ceil((h+1)/C)*C>>>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(v),n.HmacSHA3=l._createHmacHelper(v)}(Math),t.SHA3})}(mt)),mt.exports}var Ct={exports:{}},f0;function pa(){return f0||(f0=1,function(o,e){(function(t,r){o.exports=r(G())})(W,function(t){/** @preserve
|
|
1
|
+
(function(de,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(de=typeof globalThis<"u"?globalThis:de||self,a(de.MidenPGVue={},de.Vue))})(this,function(de,a){"use strict";const Ut=Symbol("MidenPGConfig");function rr(o){if(!(o!=null&&o.publishableKey))throw new Error("[@miden-npm/vue] publishableKey is required");return{install(e){e.provide(Ut,o)}}}function ar(){const o=a.inject(Ut);if(!o)throw new Error("[@miden-npm/vue] Missing provider. Did you forget to app.use(createMidenPG(...))?");return o}const Oe=o=>o==null||typeof o!="object"?!1:Object.values(o).every(Boolean),tt=o=>{const e={};return new URL(o).searchParams.forEach((r,n)=>{e[n]=r}),e},me=o=>o==="sandbox"?"https://sandbox-api.midencards.io/payment-gateway-api":"",nr=o=>o==="USD"?"$":o==="NGN"?"₦":o==="EUR"?"€":o==="GBP"?"£":o==="JPY"||o==="CNY"?"¥":o==="USDC"||o==="usdc"?"$⧫":o==="USDT"||o==="usdt"?"₮":"$",De=(o,e)=>{const t=typeof o=="string"?parseFloat(o):o;return isNaN(t)?"0":`${e?nr(e):""} ${t==null?void 0:t.toLocaleString("en-US")}`},sr=(o,e)=>o.length<=e?o:o.slice(0,e)+"...",ir=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 or(o){return o?o.split("|").map(e=>{const[t,r]=e.split(":");return{rule:t,value:r}}):[]}function lr(o,e,t){const r=[],n=or(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=lr(i,o[n]??"",u);l&&(r[n]=l)}return r};var jt=(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))(jt||{});const Kt=/^4\d{12}(\d{3}){0,2}$/,Wt=/^(?: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})?$/,ur=/^(34|37)\d{13}$/,cr=/^(?: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}$/,dr=/^(?:35(?:2[8-9]|[3-8]\d))\d{12,15}$/,xr=/^(?:3(?:0[0-5]\d|095|6\d|[89]\d))\d{11,13}$/,hr=/^(?:50|5[6-9]|6[0-9])\d{10,17}$/,rt=/^62\d{14,17}$/,fr=/^1\d{14}$/,pr=[[506099,506198],[650002,650027]],mr=new Set([507865,507866]),Cr=new Set([220545,220543]),vr=new Set([6690109]),gr=new Set([968209,873646]),Br=new Set([422818,486094]),_r=new Set([529741,543357]),Er=new Set([620108]),yr=new Set([621423]);function kr(o){const e=Ar(o);return jt[e]}function Ar(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(gr.has(t)&&e.length>=16&&e.length<=19)return 16;if(Br.has(t)&&Kt.test(e))return 17;if(_r.has(t)&&Wt.test(e))return 18;if(Cr.has(t)&&e.length===16)return 14;if(Er.has(t)&&rt.test(e))return 11;if(yr.has(t)&&rt.test(e))return 12;if(br(t,e.length))return 3}if(e.length>=7){const t=parseInt(e.slice(0,7),10);if(vr.has(t)&&e.length===16)return 15}return fr.test(e)?13:ur.test(e)?5:cr.test(e)?6:dr.test(e)?7:xr.test(e)?8:Wt.test(e)?2:Kt.test(e)?1:rt.test(e)?10:hr.test(e)?9:19}function br(o,e){return e<16||e>19?!1:pr.some(([r,n])=>o>=r&&o<=n)||mr.has(o)}const Fr=["width","height"],Dr=["stroke"],wr=["fill"],Gt=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,Dr),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,wr)],16,Fr))}}),Sr=["disabled"],Vr={key:1},we=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(Gt,{key:0})):(a.openBlock(),a.createElementBlock("div",Vr,[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,Sr))}}),Nr={class:"mb-0 text-body-3xs font-normal text-red-500"},Zt=a.defineComponent({__name:"input-error",props:{errorMessage:{}},setup(o){return(e,t)=>(a.openBlock(),a.createElementBlock("p",Nr,a.toDisplayString(e.errorMessage),1))}});async function He(o,e,t){try{const r=me(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 Rr(o,{merchantId:e,...t}){try{const r=me(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 Ir(o,{merchantId:e,...t}){try{const r=me(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 Xt(o,e){try{const t=me(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 Tr(o,{merchantId:e,...t}){try{const r=me(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 Mr={key:0,class:"absolute inset-0 grid place-items-center bg-white/60"},Yt=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 m;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),(m=r.value)==null||m.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(!Oe(e.paymentObject)){i.value="Kindly ensure you are passing all the required data.";return}u.value=!0,i.value="";try{const d=await He(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",Mr,[a.createVNode(Gt)])):a.createCommentVNode("",!0)],4))}}),Pr={key:1},Or=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(!Oe(e.paymentObject)){t.value="Kindly ensure you are passing all the required data.";return}n.value=!0,t.value="";try{const s=await He(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(Yt,{key:0,url:r.value,secretKey:a.unref(u),environment:a.unref(l)},null,8,["url","secretKey","environment"])):(a.openBlock(),a.createElementBlock("div",Pr,[a.createVNode(we,{label:"Pay",type:"primary",customClass:"w-full",loading:n.value,onClick:i},null,8,["loading"]),a.createVNode(Zt,{errorMessage:t.value},null,8,["errorMessage"])]))}}),Hr=["width","height"],$r=["fill"],Lr=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,$r)],16,Hr))}}),zr=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(Lr),r[1]||(r[1]=a.createElementVNode("p",{class:"mb-0 text-body-xs font-normal"},"Back",-1))]))}}),qr=["width","height"],Ur=["fill"],jr=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,Ur)],16,qr))}}),Kr={class:"checkout-card w-full h-screen flex flex-col items-center justify-center text-white"},Wr={class:"flex w-1/2"},Gr={class:"flex gap-2 w-full"},Zr={class:"flex flex-col gap-8 w-full"},Xr={class:"bg-off-white rounded-xl"},Yr={class:"flex items-center gap-2 justify-center"},Qr=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",Kr,[a.createElementVNode("div",Wr,[r.showBackButton?(a.openBlock(),a.createBlock(zr,{key:0,onBack:n[0]||(n[0]=i=>t("back"))})):a.createCommentVNode("",!0),a.createElementVNode("div",Gr,[a.createElementVNode("div",Zr,[a.createElementVNode("div",Xr,[a.renderSlot(r.$slots,"default")]),a.createElementVNode("div",Yr,[n[2]||(n[2]=a.createElementVNode("p",{class:"text-light-white-100 text-body-2xs font-regular"}," Powered by Buzapay ",-1)),a.createVNode(jr,{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)])])])])]))}}),Jr=["aria-orientation"],ea=["aria-checked","onClick"],ta={key:0,class:"bg-white w-2 h-2 rounded-full"},ra={class:"mb-0 text-body-2xs font-medium text-heading-text"},aa=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,m)=>(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:v=>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",ta)):a.createCommentVNode("",!0)],2),a.createElementVNode("p",ra,a.toDisplayString(x.label),1)],8,ea))),128))],10,Jr))}}),na=["src","height","alt"],Be=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,na))}});var W=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sa(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function ia(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 Qt={exports:{}};function oa(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 at={exports:{}};const la=ia(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Jt;function G(){return Jt||(Jt=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 oa=="function")try{i=la}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(C){var B;return h.prototype=C,B=new h,h.prototype=null,B}}(),f={},s=f.lib={},d=s.Base=function(){return{extend:function(h){var C=l(this);return h&&C.mixIn(h),(!C.hasOwnProperty("init")||this.init===C.init)&&(C.init=function(){C.$super.init.apply(this,arguments)}),C.init.prototype=C,C.$super=this,C},create:function(){var h=this.extend();return h.init.apply(h,arguments),h},init:function(){},mixIn:function(h){for(var C in h)h.hasOwnProperty(C)&&(this[C]=h[C]);h.hasOwnProperty("toString")&&(this.toString=h.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=s.WordArray=d.extend({init:function(h,C){h=this.words=h||[],C!=n?this.sigBytes=C:this.sigBytes=h.length*4},toString:function(h){return(h||m).stringify(this)},concat:function(h){var C=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;C[b+w>>>2]|=V<<24-(b+w)%4*8}else for(var T=0;T<A;T+=4)C[b+T>>>2]=B[T>>>2];return this.sigBytes+=A,this},clamp:function(){var h=this.words,C=this.sigBytes;h[C>>>2]&=4294967295<<32-C%4*8,h.length=r.ceil(C/4)},clone:function(){var h=d.clone.call(this);return h.words=this.words.slice(0),h},random:function(h){for(var C=[],B=0;B<h;B+=4)C.push(u());return new g.init(C,h)}}),c=f.enc={},m=c.Hex={stringify:function(h){for(var C=h.words,B=h.sigBytes,b=[],A=0;A<B;A++){var w=C[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 C=h.length,B=[],b=0;b<C;b+=2)B[b>>>3]|=parseInt(h.substr(b,2),16)<<24-b%8*4;return new g.init(B,C/2)}},x=c.Latin1={stringify:function(h){for(var C=h.words,B=h.sigBytes,b=[],A=0;A<B;A++){var w=C[A>>>2]>>>24-A%4*8&255;b.push(String.fromCharCode(w))}return b.join("")},parse:function(h){for(var C=h.length,B=[],b=0;b<C;b++)B[b>>>2]|=(h.charCodeAt(b)&255)<<24-b%4*8;return new g.init(B,C)}},v=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=v.parse(h)),this._data.concat(h),this._nDataBytes+=h.sigBytes},_process:function(h){var C,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);C=b.splice(0,k),B.sigBytes-=S}return new g.init(C,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 C=this._doFinalize();return C},blockSize:16,_createHelper:function(h){return function(C,B){return new h.init(B).finalize(C)}},_createHmacHelper:function(h){return function(C,B){return new E.HMAC.init(h,B).finalize(C)}}});var E=f.algo={};return f}(Math);return t})}(at)),at.exports}var nt={exports:{}},e0;function Ke(){return e0||(e0=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 m=s[c];g.push(m.high),g.push(m.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})}(nt)),nt.exports}var st={exports:{}},t0;function ua(){return t0||(t0=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})}(st)),st.exports}var it={exports:{}},r0;function ca(){return r0||(r0=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 m=s[c>>>2]>>>16-c%4*8&65535;g.push(String.fromCharCode(m))}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 m=l(s[c>>>2]>>>16-c%4*8&65535);g.push(String.fromCharCode(m))}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})}(it)),it.exports}var ot={exports:{}},a0;function Se(){return a0||(a0=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=[],m=0;m<d;m+=3)for(var x=s[m>>>2]>>>24-m%4*8&255,v=s[m+1>>>2]>>>24-(m+1)%4*8&255,p=s[m+2>>>2]>>>24-(m+2)%4*8&255,E=x<<16|v<<8|p,h=0;h<4&&m+h*.75<d;h++)c.push(g.charAt(E>>>6*(3-h)&63));var C=g.charAt(64);if(C)for(;c.length%4;)c.push(C);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 m=d.charAt(64);if(m){var x=f.indexOf(m);x!==-1&&(s=x)}return l(f,s,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(f,s,d){for(var g=[],c=0,m=0;m<s;m++)if(m%4){var x=d[f.charCodeAt(m-1)]<<m%4*2,v=d[f.charCodeAt(m)]>>>6-m%4*2,p=x|v;g[c>>>2]|=p<<24-c%4*8,c++}return i.create(g,c)}}(),t.enc.Base64})}(ot)),ot.exports}var lt={exports:{}},n0;function da(){return n0||(n0=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 m=[],x=0;x<g;x+=3)for(var v=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=v<<16|p<<8|E,C=0;C<4&&x+C*.75<g;C++)m.push(c.charAt(h>>>6*(3-C)&63));var B=c.charAt(64);if(B)for(;m.length%4;)m.push(B);return m.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 m=0;m<g.length;m++)c[g.charCodeAt(m)]=m}var x=g.charAt(64);if(x){var v=f.indexOf(x);v!==-1&&(d=v)}return l(f,d,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function l(f,s,d){for(var g=[],c=0,m=0;m<s;m++)if(m%4){var x=d[f.charCodeAt(m-1)]<<m%4*2,v=d[f.charCodeAt(m)]>>>6-m%4*2,p=x|v;g[c>>>2]|=p<<24-c%4*8,c++}return i.create(g,c)}}(),t.enc.Base64url})}(lt)),lt.exports}var ut={exports:{}},s0;function Ve(){return s0||(s0=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 v=0;v<64;v++)s[v]=r.abs(r.sin(v+1))*4294967296|0})();var d=f.MD5=l.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,p){for(var E=0;E<16;E++){var h=p+E,C=v[h];v[h]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var B=this._hash.words,b=v[p+0],A=v[p+1],w=v[p+2],V=v[p+3],T=v[p+4],k=v[p+5],S=v[p+6],F=v[p+7],_=v[p+8],y=v[p+9],M=v[p+10],$=v[p+11],L=v[p+12],H=v[p+13],P=v[p+14],O=v[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=m(D,R,I,N,k,4,s[32]),N=m(N,D,R,I,_,11,s[33]),I=m(I,N,D,R,$,16,s[34]),R=m(R,I,N,D,P,23,s[35]),D=m(D,R,I,N,A,4,s[36]),N=m(N,D,R,I,T,11,s[37]),I=m(I,N,D,R,F,16,s[38]),R=m(R,I,N,D,M,23,s[39]),D=m(D,R,I,N,H,4,s[40]),N=m(N,D,R,I,b,11,s[41]),I=m(I,N,D,R,V,16,s[42]),R=m(R,I,N,D,S,23,s[43]),D=m(D,R,I,N,y,4,s[44]),N=m(N,D,R,I,L,11,s[45]),I=m(I,N,D,R,O,16,s[46]),R=m(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 v=this._data,p=v.words,E=this._nDataBytes*8,h=v.sigBytes*8;p[h>>>5]|=128<<24-h%32;var C=r.floor(E/4294967296),B=E;p[(h+64>>>9<<4)+15]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,p[(h+64>>>9<<4)+14]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,v.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 v=l.clone.call(this);return v._hash=this._hash.clone(),v}});function g(v,p,E,h,C,B,b){var A=v+(p&E|~p&h)+C+b;return(A<<B|A>>>32-B)+p}function c(v,p,E,h,C,B,b){var A=v+(p&h|E&~h)+C+b;return(A<<B|A>>>32-B)+p}function m(v,p,E,h,C,B,b){var A=v+(p^E^h)+C+b;return(A<<B|A>>>32-B)+p}function x(v,p,E,h,C,B,b){var A=v+(E^(p|~h))+C+b;return(A<<B|A>>>32-B)+p}n.MD5=l._createHelper(d),n.HmacMD5=l._createHmacHelper(d)}(Math),t.MD5})}(ut)),ut.exports}var ct={exports:{}},i0;function o0(){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=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,m=c[0],x=c[1],v=c[2],p=c[3],E=c[4],h=0;h<80;h++){if(h<16)f[h]=d[g+h]|0;else{var C=f[h-3]^f[h-8]^f[h-14]^f[h-16];f[h]=C<<1|C>>>31}var B=(m<<5|m>>>27)+E+f[h];h<20?B+=(x&v|~x&p)+1518500249:h<40?B+=(x^v^p)+1859775393:h<60?B+=(x&v|x&p|v&p)-1894007588:B+=(x^v^p)-899497514,E=p,p=v,v=x<<30|x>>>2,x=m,m=B}c[0]=c[0]+m|0,c[1]=c[1]+x|0,c[2]=c[2]+v|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,m=d.sigBytes*8;return g[m>>>5]|=128<<24-m%32,g[(m+64>>>9<<4)+14]=Math.floor(c/4294967296),g[(m+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})}(ct)),ct.exports}var dt={exports:{}},l0;function xt(){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=[],d=[];(function(){function m(E){for(var h=r.sqrt(E),C=2;C<=h;C++)if(!(E%C))return!1;return!0}function x(E){return(E-(E|0))*4294967296|0}for(var v=2,p=0;p<64;)m(v)&&(p<8&&(s[p]=x(r.pow(v,1/2))),d[p]=x(r.pow(v,1/3)),p++),v++})();var g=[],c=f.SHA256=l.extend({_doReset:function(){this._hash=new u.init(s.slice(0))},_doProcessBlock:function(m,x){for(var v=this._hash.words,p=v[0],E=v[1],h=v[2],C=v[3],B=v[4],b=v[5],A=v[6],w=v[7],V=0;V<64;V++){if(V<16)g[V]=m[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=C+L|0,C=h,h=E,E=p,p=L+H|0}v[0]=v[0]+p|0,v[1]=v[1]+E|0,v[2]=v[2]+h|0,v[3]=v[3]+C|0,v[4]=v[4]+B|0,v[5]=v[5]+b|0,v[6]=v[6]+A|0,v[7]=v[7]+w|0},_doFinalize:function(){var m=this._data,x=m.words,v=this._nDataBytes*8,p=m.sigBytes*8;return x[p>>>5]|=128<<24-p%32,x[(p+64>>>9<<4)+14]=r.floor(v/4294967296),x[(p+64>>>9<<4)+15]=v,m.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var m=l.clone.call(this);return m._hash=this._hash.clone(),m}});n.SHA256=l._createHelper(c),n.HmacSHA256=l._createHmacHelper(c)}(Math),t.SHA256})}(dt)),dt.exports}var ht={exports:{}},u0;function xa(){return u0||(u0=1,function(o,e){(function(t,r,n){o.exports=r(G(),xt())})(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})}(ht)),ht.exports}var ft={exports:{}},c0;function d0(){return c0||(c0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ke())})(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 m=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,v){for(var p=this._hash.words,E=p[0],h=p[1],C=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,_=C.high,y=C.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,J=S,j=F,ye=_,ge=y,Ie=M,ke=$,ae=L,re=H,Re=P,Ae=O,pe=D,Y=R,ue=I,he=N,ce=0;ce<80;ce++){var ne,q,be=c[ce];if(ce<16)q=be.high=x[v+ce*2]|0,ne=be.low=x[v+ce*2+1]|0;else{var Te=c[ce-15],Me=Te.high,qe=Te.low,ri=(Me>>>1|qe<<31)^(Me>>>8|qe<<24)^Me>>>7,j0=(qe>>>1|Me<<31)^(qe>>>8|Me<<24)^(qe>>>7|Me<<25),K0=c[ce-2],Pe=K0.high,Ue=K0.low,ai=(Pe>>>19|Ue<<13)^(Pe<<3|Ue>>>29)^Pe>>>6,W0=(Ue>>>19|Pe<<13)^(Ue<<3|Pe>>>29)^(Ue>>>6|Pe<<26),G0=c[ce-7],ni=G0.high,si=G0.low,Z0=c[ce-16],ii=Z0.high,X0=Z0.low;ne=j0+si,q=ri+ni+(ne>>>0<j0>>>0?1:0),ne=ne+W0,q=q+ai+(ne>>>0<W0>>>0?1:0),ne=ne+X0,q=q+ii+(ne>>>0<X0>>>0?1:0),be.high=q,be.low=ne}var oi=ae&Re^~ae&pe,Y0=re&Ae^~re&Y,li=X&J^X&ye^J&ye,ui=Z&j^Z&ge^j&ge,ci=(X>>>28|Z<<4)^(X<<30|Z>>>2)^(X<<25|Z>>>7),Q0=(Z>>>28|X<<4)^(Z<<30|X>>>2)^(Z<<25|X>>>7),di=(ae>>>14|re<<18)^(ae>>>18|re<<14)^(ae<<23|re>>>9),xi=(re>>>14|ae<<18)^(re>>>18|ae<<14)^(re<<23|ae>>>9),J0=g[ce],hi=J0.high,er=J0.low,ie=he+xi,Fe=ue+di+(ie>>>0<he>>>0?1:0),ie=ie+Y0,Fe=Fe+oi+(ie>>>0<Y0>>>0?1:0),ie=ie+er,Fe=Fe+hi+(ie>>>0<er>>>0?1:0),ie=ie+ne,Fe=Fe+q+(ie>>>0<ne>>>0?1:0),tr=Q0+ui,fi=ci+li+(tr>>>0<Q0>>>0?1:0);ue=pe,he=Y,pe=Re,Y=Ae,Re=ae,Ae=re,re=ke+ie|0,ae=Ie+Fe+(re>>>0<ke>>>0?1:0)|0,Ie=ye,ke=ge,ye=J,ge=j,J=X,j=Z,Z=ie+tr|0,X=Fe+fi+(Z>>>0<ie>>>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+J+(F>>>0<j>>>0?1:0),y=C.low=y+ge,C.high=_+ye+(y>>>0<ge>>>0?1:0),$=B.low=$+ke,B.high=M+Ie+($>>>0<ke>>>0?1:0),H=b.low=H+re,b.high=L+ae+(H>>>0<re>>>0?1:0),O=A.low=O+Ae,A.high=P+Re+(O>>>0<Ae>>>0?1:0),R=w.low=R+Y,w.high=D+pe+(R>>>0<Y>>>0?1:0),N=V.low=N+he,V.high=I+ue+(N>>>0<he>>>0?1:0)},_doFinalize:function(){var x=this._data,v=x.words,p=this._nDataBytes*8,E=x.sigBytes*8;v[E>>>5]|=128<<24-E%32,v[(E+128>>>10<<5)+30]=Math.floor(p/4294967296),v[(E+128>>>10<<5)+31]=p,x.sigBytes=v.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(m),r.HmacSHA512=i._createHmacHelper(m)}(),t.SHA512})}(ft)),ft.exports}var pt={exports:{}},x0;function ha(){return x0||(x0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ke(),d0())})(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})}(pt)),pt.exports}var mt={exports:{}},h0;function fa(){return h0||(h0=1,function(o,e){(function(t,r,n){o.exports=r(G(),Ke())})(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=[],m=[];(function(){for(var p=1,E=0,h=0;h<24;h++){g[p+5*E]=(h+1)*(h+2)/2%64;var C=E%5,B=(2*p+3*E)%5;p=C,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}m[A]=s.create(w,V)}})();var x=[];(function(){for(var p=0;p<25;p++)x[p]=s.create()})();var v=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,C=this.blockSize/2,B=0;B<C;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],J=x[(T+2)%5+5*F];w.high=X.high^~Z.high&J.high,w.low=X.low^~Z.low&J.low}var w=h[0],j=m[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,C=this.blockSize*32;E[h>>>5]|=1<<24-h%32,E[(r.ceil((h+1)/C)*C>>>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(v),n.HmacSHA3=l._createHmacHelper(v)}(Math),t.SHA3})}(mt)),mt.exports}var Ct={exports:{}},f0;function pa(){return f0||(f0=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:
|