@payfurl/client 4.5.9 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/sdk/DefaultThreeDsProvider-701637b0.mjs +215 -0
- package/dist/sdk/GPaymentsThreeDsProvider-740b4c21.mjs +103 -0
- package/dist/sdk/NmiThreeDsProvider-51bf6fff.mjs +135 -0
- package/dist/sdk/{ThreeDsInitResponse.type-06482849.mjs → ThreeDsProvider.interface-da0ab2aa.mjs} +3 -0
- package/dist/sdk/default-6f6c8e7c.mjs +8 -0
- package/dist/sdk/{ecentric-cd8695ea.mjs → ecentric-45331775.mjs} +23 -23
- package/dist/sdk/gpayments-455eb705.mjs +9 -0
- package/dist/sdk/main-f2996bc2.mjs +18729 -0
- package/dist/sdk/nmi-dbb88036.mjs +9 -0
- package/dist/sdk/payfurl.es.js +1 -1
- package/dist/sdk/payfurl.umd.js +55 -11
- package/dist/sdk/style.css +1 -1
- package/package.json +2 -1
- package/dist/sdk/default-ecf62258.mjs +0 -179
- package/dist/sdk/gpayments-e536251a.mjs +0 -165
- package/dist/sdk/main-041a6652.mjs +0 -8717
package/dist/sdk/payfurl.umd.js
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
|
-
(function(tt,xe){typeof exports=="object"&&typeof module<"u"?module.exports=xe():typeof define=="function"&&define.amd?define(xe):(tt=typeof globalThis<"u"?globalThis:tt||self,tt.payfurl=xe())})(this,function(){"use strict";var jp=Object.defineProperty;var $p=(tt,xe,Te)=>xe in tt?jp(tt,xe,{enumerable:!0,configurable:!0,writable:!0,value:Te}):tt[xe]=Te;var g=(tt,xe,Te)=>($p(tt,typeof xe!="symbol"?xe+"":xe,Te),Te);const tt=(e,t)=>{const s=e[t];return s?typeof s=="function"?s():Promise.resolve(s):new Promise((r,n)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+t)))})};function xe(e,t){const s=Object.create(null),r=e.split(",");for(let n=0;n<r.length;n++)s[r[n]]=!0;return t?n=>!!s[n.toLowerCase()]:n=>!!s[n]}function Te(e){if(G(e)){const t={};for(let s=0;s<e.length;s++){const r=e[s],n=Ie(r)?Xa(r):Te(r);if(n)for(const i in n)t[i]=n[i]}return t}else{if(Ie(e))return e;if(ae(e))return e}}const Ya=/;(?![^(]*\))/g,Ga=/:([^]+)/,za=/\/\*.*?\*\//gs;function Xa(e){const t={};return e.replace(za,"").split(Ya).forEach(s=>{if(s){const r=s.split(Ga);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Rs(e){let t="";if(Ie(e))t=e;else if(G(e))for(let s=0;s<e.length;s++){const r=Rs(e[s]);r&&(t+=r+" ")}else if(ae(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Ba=xe("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Ni(e){return!!e||e===""}function Ja(e,t){if(e.length!==t.length)return!1;let s=!0;for(let r=0;s&&r<e.length;r++)s=fr(e[r],t[r]);return s}function fr(e,t){if(e===t)return!0;let s=Di(e),r=Di(t);if(s||r)return s&&r?e.getTime()===t.getTime():!1;if(s=Us(e),r=Us(t),s||r)return e===t;if(s=G(e),r=G(t),s||r)return s&&r?Ja(e,t):!1;if(s=ae(e),r=ae(t),s||r){if(!s||!r)return!1;const n=Object.keys(e).length,i=Object.keys(t).length;if(n!==i)return!1;for(const o in e){const a=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(a&&!l||!a&&l||!fr(e[o],t[o]))return!1}}return String(e)===String(t)}function Qa(e,t){return e.findIndex(s=>fr(s,t))}const Re=e=>Ie(e)?e:e==null?"":G(e)||ae(e)&&(e.toString===Ti||!J(e.toString))?JSON.stringify(e,Si,2):String(e),Si=(e,t)=>t&&t.__v_isRef?Si(e,t.value):zt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[r,n])=>(s[`${r} =>`]=n,s),{})}:mr(t)?{[`Set(${t.size})`]:[...t.values()]}:ae(t)&&!G(t)&&!Mi(t)?String(t):t,he={}.NODE_ENV!=="production"?Object.freeze({}):{},gs={}.NODE_ENV!=="production"?Object.freeze([]):[],Le=()=>{},wi=()=>!1,qa=/^on[^a-z]/,Ls=e=>qa.test(e),pr=e=>e.startsWith("onUpdate:"),Ne=Object.assign,dn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},el=Object.prototype.hasOwnProperty,ne=(e,t)=>el.call(e,t),G=Array.isArray,zt=e=>Vs(e)==="[object Map]",mr=e=>Vs(e)==="[object Set]",Di=e=>Vs(e)==="[object Date]",J=e=>typeof e=="function",Ie=e=>typeof e=="string",Us=e=>typeof e=="symbol",ae=e=>e!==null&&typeof e=="object",hn=e=>ae(e)&&J(e.then)&&J(e.catch),Ti=Object.prototype.toString,Vs=e=>Ti.call(e),fn=e=>Vs(e).slice(8,-1),Mi=e=>Vs(e)==="[object Object]",pn=e=>Ie(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,gr=xe(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),tl=xe("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),yr=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},sl=/-(\w)/g,pt=yr(e=>e.replace(sl,(t,s)=>s?s.toUpperCase():"")),rl=/\B([A-Z])/g,Rt=yr(e=>e.replace(rl,"-$1").toLowerCase()),Xt=yr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Bt=yr(e=>e?`on${Xt(e)}`:""),Fs=(e,t)=>!Object.is(e,t),ys=(e,t)=>{for(let s=0;s<e.length;s++)e[s](t)},_r=(e,t,s)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:s})},br=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let ki;const Oi=()=>ki||(ki=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function mn(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let it;class nl{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=it,!t&&it&&(this.index=(it.scopes||(it.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const s=it;try{return it=this,t()}finally{it=s}}else({}).NODE_ENV!=="production"&&mn("cannot run an inactive effect scope.")}on(){it=this}off(){it=this.parent}stop(t){if(this._active){let s,r;for(s=0,r=this.effects.length;s<r;s++)this.effects[s].stop();for(s=0,r=this.cleanups.length;s<r;s++)this.cleanups[s]();if(this.scopes)for(s=0,r=this.scopes.length;s<r;s++)this.scopes[s].stop(!0);if(!this.detached&&this.parent&&!t){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0,this._active=!1}}}function il(e,t=it){t&&t.active&&t.effects.push(e)}function ol(){return it}const js=e=>{const t=new Set(e);return t.w=0,t.n=0,t},xi=e=>(e.w&Lt)>0,Ri=e=>(e.n&Lt)>0,al=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=Lt},ll=e=>{const{deps:t}=e;if(t.length){let s=0;for(let r=0;r<t.length;r++){const n=t[r];xi(n)&&!Ri(n)?n.delete(e):t[s++]=n,n.w&=~Lt,n.n&=~Lt}t.length=s}},gn=new WeakMap;let $s=0,Lt=1;const yn=30;let je;const Jt=Symbol({}.NODE_ENV!=="production"?"iterate":""),_n=Symbol({}.NODE_ENV!=="production"?"Map key iterate":"");class bn{constructor(t,s=null,r){this.fn=t,this.scheduler=s,this.active=!0,this.deps=[],this.parent=void 0,il(this,r)}run(){if(!this.active)return this.fn();let t=je,s=Ut;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=je,je=this,Ut=!0,Lt=1<<++$s,$s<=yn?al(this):Li(this),this.fn()}finally{$s<=yn&&ll(this),Lt=1<<--$s,je=this.parent,Ut=s,this.parent=void 0,this.deferStop&&this.stop()}}stop(){je===this?this.deferStop=!0:this.active&&(Li(this),this.onStop&&this.onStop(),this.active=!1)}}function Li(e){const{deps:t}=e;if(t.length){for(let s=0;s<t.length;s++)t[s].delete(e);t.length=0}}let Ut=!0;const Ui=[];function Qt(){Ui.push(Ut),Ut=!1}function qt(){const e=Ui.pop();Ut=e===void 0?!0:e}function $e(e,t,s){if(Ut&&je){let r=gn.get(e);r||gn.set(e,r=new Map);let n=r.get(s);n||r.set(s,n=js());const i={}.NODE_ENV!=="production"?{effect:je,target:e,type:t,key:s}:void 0;In(n,i)}}function In(e,t){let s=!1;$s<=yn?Ri(e)||(e.n|=Lt,s=!xi(e)):s=!e.has(je),s&&(e.add(je),je.deps.push(e),{}.NODE_ENV!=="production"&&je.onTrack&&je.onTrack(Object.assign({effect:je},t)))}function Pt(e,t,s,r,n,i){const o=gn.get(e);if(!o)return;let a=[];if(t==="clear")a=[...o.values()];else if(s==="length"&&G(e)){const c=Number(r);o.forEach((d,u)=>{(u==="length"||u>=c)&&a.push(d)})}else switch(s!==void 0&&a.push(o.get(s)),t){case"add":G(e)?pn(s)&&a.push(o.get("length")):(a.push(o.get(Jt)),zt(e)&&a.push(o.get(_n)));break;case"delete":G(e)||(a.push(o.get(Jt)),zt(e)&&a.push(o.get(_n)));break;case"set":zt(e)&&a.push(o.get(Jt));break}const l={}.NODE_ENV!=="production"?{target:e,type:t,key:s,newValue:r,oldValue:n,oldTarget:i}:void 0;if(a.length===1)a[0]&&({}.NODE_ENV!=="production"?_s(a[0],l):_s(a[0]));else{const c=[];for(const d of a)d&&c.push(...d);({}).NODE_ENV!=="production"?_s(js(c),l):_s(js(c))}}function _s(e,t){const s=G(e)?e:[...e];for(const r of s)r.computed&&Vi(r,t);for(const r of s)r.computed||Vi(r,t)}function Vi(e,t){(e!==je||e.allowRecurse)&&({}.NODE_ENV!=="production"&&e.onTrigger&&e.onTrigger(Ne({effect:e},t)),e.scheduler?e.scheduler():e.run())}const cl=xe("__proto__,__v_isRef,__isVue"),Fi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Us)),ul=Ir(),dl=Ir(!1,!0),hl=Ir(!0),fl=Ir(!0,!0),ji=pl();function pl(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...s){const r=se(this);for(let i=0,o=this.length;i<o;i++)$e(r,"get",i+"");const n=r[t](...s);return n===-1||n===!1?r[t](...s.map(se)):n}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...s){Qt();const r=se(this)[t].apply(this,s);return qt(),r}}),e}function ml(e){const t=se(this);return $e(t,"has",e),t.hasOwnProperty(e)}function Ir(e=!1,t=!1){return function(r,n,i){if(n==="__v_isReactive")return!e;if(n==="__v_isReadonly")return e;if(n==="__v_isShallow")return t;if(n==="__v_raw"&&i===(e?t?Qi:Ji:t?Bi:Xi).get(r))return r;const o=G(r);if(!e){if(o&&ne(ji,n))return Reflect.get(ji,n,i);if(n==="hasOwnProperty")return ml}const a=Reflect.get(r,n,i);return(Us(n)?Fi.has(n):cl(n))||(e||$e(r,"get",n),t)?a:Me(a)?o&&pn(n)?a:a.value:ae(a)?e?qi(a):En(a):a}}const gl=$i(),yl=$i(!0);function $i(e=!1){return function(s,r,n,i){let o=s[r];if(Ft(o)&&Me(o)&&!Me(n))return!1;if(!e&&(!Dr(n)&&!Ft(n)&&(o=se(o),n=se(n)),!G(s)&&Me(o)&&!Me(n)))return o.value=n,!0;const a=G(s)&&pn(r)?Number(r)<s.length:ne(s,r),l=Reflect.set(s,r,n,i);return s===se(i)&&(a?Fs(n,o)&&Pt(s,"set",r,n,o):Pt(s,"add",r,n)),l}}function _l(e,t){const s=ne(e,t),r=e[t],n=Reflect.deleteProperty(e,t);return n&&s&&Pt(e,"delete",t,void 0,r),n}function bl(e,t){const s=Reflect.has(e,t);return(!Us(t)||!Fi.has(t))&&$e(e,"has",t),s}function Il(e){return $e(e,"iterate",G(e)?"length":Jt),Reflect.ownKeys(e)}const Hi={get:ul,set:gl,deleteProperty:_l,has:bl,ownKeys:Il},Ki={get:hl,set(e,t){return{}.NODE_ENV!=="production"&&mn(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return{}.NODE_ENV!=="production"&&mn(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},vl=Ne({},Hi,{get:dl,set:yl}),El=Ne({},Ki,{get:fl}),vn=e=>e,vr=e=>Reflect.getPrototypeOf(e);function Er(e,t,s=!1,r=!1){e=e.__v_raw;const n=se(e),i=se(t);s||(t!==i&&$e(n,"get",t),$e(n,"get",i));const{has:o}=vr(n),a=r?vn:s?Cn:Hs;if(o.call(n,t))return a(e.get(t));if(o.call(n,i))return a(e.get(i));e!==n&&e.get(t)}function Pr(e,t=!1){const s=this.__v_raw,r=se(s),n=se(e);return t||(e!==n&&$e(r,"has",e),$e(r,"has",n)),e===n?s.has(e):s.has(e)||s.has(n)}function Cr(e,t=!1){return e=e.__v_raw,!t&&$e(se(e),"iterate",Jt),Reflect.get(e,"size",e)}function Zi(e){e=se(e);const t=se(this);return vr(t).has.call(t,e)||(t.add(e),Pt(t,"add",e,e)),this}function Wi(e,t){t=se(t);const s=se(this),{has:r,get:n}=vr(s);let i=r.call(s,e);i?{}.NODE_ENV!=="production"&&zi(s,r,e):(e=se(e),i=r.call(s,e));const o=n.call(s,e);return s.set(e,t),i?Fs(t,o)&&Pt(s,"set",e,t,o):Pt(s,"add",e,t),this}function Yi(e){const t=se(this),{has:s,get:r}=vr(t);let n=s.call(t,e);n?{}.NODE_ENV!=="production"&&zi(t,s,e):(e=se(e),n=s.call(t,e));const i=r?r.call(t,e):void 0,o=t.delete(e);return n&&Pt(t,"delete",e,void 0,i),o}function Gi(){const e=se(this),t=e.size!==0,s={}.NODE_ENV!=="production"?zt(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&Pt(e,"clear",void 0,void 0,s),r}function Ar(e,t){return function(r,n){const i=this,o=i.__v_raw,a=se(o),l=t?vn:e?Cn:Hs;return!e&&$e(a,"iterate",Jt),o.forEach((c,d)=>r.call(n,l(c),l(d),i))}}function Nr(e,t,s){return function(...r){const n=this.__v_raw,i=se(n),o=zt(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=n[e](...r),d=s?vn:t?Cn:Hs;return!t&&$e(i,"iterate",l?_n:Jt),{next(){const{value:u,done:p}=c.next();return p?{value:u,done:p}:{value:a?[d(u[0]),d(u[1])]:d(u),done:p}},[Symbol.iterator](){return this}}}}function Vt(e){return function(...t){if({}.NODE_ENV!=="production"){const s=t[0]?`on key "${t[0]}" `:"";console.warn(`${Xt(e)} operation ${s}failed: target is readonly.`,se(this))}return e==="delete"?!1:this}}function Pl(){const e={get(i){return Er(this,i)},get size(){return Cr(this)},has:Pr,add:Zi,set:Wi,delete:Yi,clear:Gi,forEach:Ar(!1,!1)},t={get(i){return Er(this,i,!1,!0)},get size(){return Cr(this)},has:Pr,add:Zi,set:Wi,delete:Yi,clear:Gi,forEach:Ar(!1,!0)},s={get(i){return Er(this,i,!0)},get size(){return Cr(this,!0)},has(i){return Pr.call(this,i,!0)},add:Vt("add"),set:Vt("set"),delete:Vt("delete"),clear:Vt("clear"),forEach:Ar(!0,!1)},r={get(i){return Er(this,i,!0,!0)},get size(){return Cr(this,!0)},has(i){return Pr.call(this,i,!0)},add:Vt("add"),set:Vt("set"),delete:Vt("delete"),clear:Vt("clear"),forEach:Ar(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=Nr(i,!1,!1),s[i]=Nr(i,!0,!1),t[i]=Nr(i,!1,!0),r[i]=Nr(i,!0,!0)}),[e,s,t,r]}const[Cl,Al,Nl,Sl]=Pl();function Sr(e,t){const s=t?e?Sl:Nl:e?Al:Cl;return(r,n,i)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?r:Reflect.get(ne(s,n)&&n in r?s:r,n,i)}const wl={get:Sr(!1,!1)},Dl={get:Sr(!1,!0)},Tl={get:Sr(!0,!1)},Ml={get:Sr(!0,!0)};function zi(e,t,s){const r=se(s);if(r!==s&&t.call(e,r)){const n=fn(e);console.warn(`Reactive ${n} contains both the raw and reactive versions of the same object${n==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Xi=new WeakMap,Bi=new WeakMap,Ji=new WeakMap,Qi=new WeakMap;function kl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ol(e){return e.__v_skip||!Object.isExtensible(e)?0:kl(fn(e))}function En(e){return Ft(e)?e:wr(e,!1,Hi,wl,Xi)}function xl(e){return wr(e,!1,vl,Dl,Bi)}function qi(e){return wr(e,!0,Ki,Tl,Ji)}function bs(e){return wr(e,!0,El,Ml,Qi)}function wr(e,t,s,r,n){if(!ae(e))return{}.NODE_ENV!=="production"&&console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=n.get(e);if(i)return i;const o=Ol(e);if(o===0)return e;const a=new Proxy(e,o===2?r:s);return n.set(e,a),a}function es(e){return Ft(e)?es(e.__v_raw):!!(e&&e.__v_isReactive)}function Ft(e){return!!(e&&e.__v_isReadonly)}function Dr(e){return!!(e&&e.__v_isShallow)}function Pn(e){return es(e)||Ft(e)}function se(e){const t=e&&e.__v_raw;return t?se(t):e}function eo(e){return _r(e,"__v_skip",!0),e}const Hs=e=>ae(e)?En(e):e,Cn=e=>ae(e)?qi(e):e;function to(e){Ut&&je&&(e=se(e),{}.NODE_ENV!=="production"?In(e.dep||(e.dep=js()),{target:e,type:"get",key:"value"}):In(e.dep||(e.dep=js())))}function so(e,t){e=se(e);const s=e.dep;s&&({}.NODE_ENV!=="production"?_s(s,{target:e,type:"set",key:"value",newValue:t}):_s(s))}function Me(e){return!!(e&&e.__v_isRef===!0)}function B(e){return Rl(e,!1)}function Rl(e,t){return Me(e)?e:new Ll(e,t)}class Ll{constructor(t,s){this.__v_isShallow=s,this.dep=void 0,this.__v_isRef=!0,this._rawValue=s?t:se(t),this._value=s?t:Hs(t)}get value(){return to(this),this._value}set value(t){const s=this.__v_isShallow||Dr(t)||Ft(t);t=s?t:se(t),Fs(t,this._rawValue)&&(this._rawValue=t,this._value=s?t:Hs(t),so(this,t))}}function ce(e){return Me(e)?e.value:e}const Ul={get:(e,t,s)=>ce(Reflect.get(e,t,s)),set:(e,t,s,r)=>{const n=e[t];return Me(n)&&!Me(s)?(n.value=s,!0):Reflect.set(e,t,s,r)}};function ro(e){return es(e)?e:new Proxy(e,Ul)}var no;class Vl{constructor(t,s,r,n){this._setter=s,this.dep=void 0,this.__v_isRef=!0,this[no]=!1,this._dirty=!0,this.effect=new bn(t,()=>{this._dirty||(this._dirty=!0,so(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=r}get value(){const t=se(this);return to(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}no="__v_isReadonly";function Fl(e,t,s=!1){let r,n;const i=J(e);i?(r=e,n={}.NODE_ENV!=="production"?()=>{console.warn("Write operation failed: computed value is readonly")}:Le):(r=e.get,n=e.set);const o=new Vl(r,n,i||!n,s);return{}.NODE_ENV!=="production"&&t&&!s&&(o.effect.onTrack=t.onTrack,o.effect.onTrigger=t.onTrigger),o}const ts=[];function Tr(e){ts.push(e)}function Mr(){ts.pop()}function M(e,...t){if({}.NODE_ENV==="production")return;Qt();const s=ts.length?ts[ts.length-1].component:null,r=s&&s.appContext.config.warnHandler,n=jl();if(r)Ct(r,s,11,[e+t.join(""),s&&s.proxy,n.map(({vnode:i})=>`at <${Xr(s,i.type)}>`).join(`
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
`],...Hl(s))}),t}function Hl({vnode:e,recurseCount:t}){const s=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,n=` at <${Xr(e.component,e.type,r)}`,i=">"+s;return e.props?[n,...Kl(e.props),i]:[n+i]}function Kl(e){const t=[],s=Object.keys(e);return s.slice(0,3).forEach(r=>{t.push(...io(r,e[r]))}),s.length>3&&t.push(" ..."),t}function io(e,t,s){return Ie(t)?(t=JSON.stringify(t),s?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?s?t:[`${e}=${t}`]:Me(t)?(t=io(e,se(t.value),!0),s?t:[`${e}=Ref<`,t,">"]):J(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=se(t),s?t:[`${e}=`,t])}const An={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function Ct(e,t,s,r){let n;try{n=r?e(...r):e()}catch(i){kr(i,t,s)}return n}function ot(e,t,s,r){if(J(e)){const i=Ct(e,t,s,r);return i&&hn(i)&&i.catch(o=>{kr(o,t,s)}),i}const n=[];for(let i=0;i<e.length;i++)n.push(ot(e[i],t,s,r));return n}function kr(e,t,s,r=!0){const n=t?t.vnode:null;if(t){let i=t.parent;const o=t.proxy,a={}.NODE_ENV!=="production"?An[s]:s;for(;i;){const c=i.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,o,a)===!1)return}i=i.parent}const l=t.appContext.config.errorHandler;if(l){Ct(l,null,10,[e,o,a]);return}}Zl(e,s,n,r)}function Zl(e,t,s,r=!0){if({}.NODE_ENV!=="production"){const n=An[t];if(s&&Tr(s),M(`Unhandled error${n?` during execution of ${n}`:""}`),s&&Mr(),r)throw e;console.error(e)}else console.error(e)}let Ks=!1,Nn=!1;const Ve=[];let mt=0;const Is=[];let gt=null,jt=0;const oo=Promise.resolve();let Sn=null;const Wl=100;function Yl(e){const t=Sn||oo;return e?t.then(this?e.bind(this):e):t}function Gl(e){let t=mt+1,s=Ve.length;for(;t<s;){const r=t+s>>>1;Zs(Ve[r])<e?t=r+1:s=r}return t}function Or(e){(!Ve.length||!Ve.includes(e,Ks&&e.allowRecurse?mt+1:mt))&&(e.id==null?Ve.push(e):Ve.splice(Gl(e.id),0,e),ao())}function ao(){!Ks&&!Nn&&(Nn=!0,Sn=oo.then(ho))}function zl(e){const t=Ve.indexOf(e);t>mt&&Ve.splice(t,1)}function lo(e){G(e)?Is.push(...e):(!gt||!gt.includes(e,e.allowRecurse?jt+1:jt))&&Is.push(e),ao()}function co(e,t=Ks?mt+1:0){for({}.NODE_ENV!=="production"&&(e=e||new Map);t<Ve.length;t++){const s=Ve[t];if(s&&s.pre){if({}.NODE_ENV!=="production"&&wn(e,s))continue;Ve.splice(t,1),t--,s()}}}function uo(e){if(Is.length){const t=[...new Set(Is)];if(Is.length=0,gt){gt.push(...t);return}for(gt=t,{}.NODE_ENV!=="production"&&(e=e||new Map),gt.sort((s,r)=>Zs(s)-Zs(r)),jt=0;jt<gt.length;jt++)({}).NODE_ENV!=="production"&&wn(e,gt[jt])||gt[jt]();gt=null,jt=0}}const Zs=e=>e.id==null?1/0:e.id,Xl=(e,t)=>{const s=Zs(e)-Zs(t);if(s===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return s};function ho(e){Nn=!1,Ks=!0,{}.NODE_ENV!=="production"&&(e=e||new Map),Ve.sort(Xl);const t={}.NODE_ENV!=="production"?s=>wn(e,s):Le;try{for(mt=0;mt<Ve.length;mt++){const s=Ve[mt];if(s&&s.active!==!1){if({}.NODE_ENV!=="production"&&t(s))continue;Ct(s,null,14)}}}finally{mt=0,Ve.length=0,uo(e),Ks=!1,Sn=null,(Ve.length||Is.length)&&ho(e)}}function wn(e,t){if(!e.has(t))e.set(t,1);else{const s=e.get(t);if(s>Wl){const r=t.ownerInstance,n=r&&Bn(r.type);return M(`Maximum recursive updates exceeded${n?` in component <${n}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}else e.set(t,s+1)}}let ss=!1;const vs=new Set;({}).NODE_ENV!=="production"&&(Oi().__VUE_HMR_RUNTIME__={createRecord:Dn(fo),rerender:Dn(Ql),reload:Dn(ql)});const rs=new Map;function Bl(e){const t=e.type.__hmrId;let s=rs.get(t);s||(fo(t,e.type),s=rs.get(t)),s.instances.add(e)}function Jl(e){rs.get(e.type.__hmrId).instances.delete(e)}function fo(e,t){return rs.has(e)?!1:(rs.set(e,{initialDef:Ws(t),instances:new Set}),!0)}function Ws(e){return ta(e)?e.__vccOpts:e}function Ql(e,t){const s=rs.get(e);s&&(s.initialDef.render=t,[...s.instances].forEach(r=>{t&&(r.render=t,Ws(r.type).render=t),r.renderCache=[],ss=!0,r.update(),ss=!1}))}function ql(e,t){const s=rs.get(e);if(!s)return;t=Ws(t),po(s.initialDef,t);const r=[...s.instances];for(const n of r){const i=Ws(n.type);vs.has(i)||(i!==s.initialDef&&po(i,t),vs.add(i)),n.appContext.optionsCache.delete(n.type),n.ceReload?(vs.add(i),n.ceReload(t.styles),vs.delete(i)):n.parent?Or(n.parent.update):n.appContext.reload?n.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}lo(()=>{for(const n of r)vs.delete(Ws(n.type))})}function po(e,t){Ne(e,t);for(const s in e)s!=="__file"&&!(s in t)&&delete e[s]}function Dn(e){return(t,s)=>{try{return e(t,s)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let yt,Ys=[],Tn=!1;function Gs(e,...t){yt?yt.emit(e,...t):Tn||Ys.push({event:e,args:t})}function mo(e,t){var s,r;yt=e,yt?(yt.enabled=!0,Ys.forEach(({event:n,args:i})=>yt.emit(n,...i)),Ys=[]):typeof window<"u"&&window.HTMLElement&&!(!((r=(s=window.navigator)===null||s===void 0?void 0:s.userAgent)===null||r===void 0)&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{mo(i,t)}),setTimeout(()=>{yt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Tn=!0,Ys=[])},3e3)):(Tn=!0,Ys=[])}function ec(e,t){Gs("app:init",e,t,{Fragment:Se,Text:Js,Comment:Je,Static:Qs})}function tc(e){Gs("app:unmount",e)}const sc=Mn("component:added"),go=Mn("component:updated"),rc=Mn("component:removed"),nc=e=>{yt&&typeof yt.cleanupBuffer=="function"&&!yt.cleanupBuffer(e)&&rc(e)};function Mn(e){return t=>{Gs(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const ic=yo("perf:start"),oc=yo("perf:end");function yo(e){return(t,s,r)=>{Gs(e,t.appContext.app,t.uid,t,s,r)}}function ac(e,t,s){Gs("component:emit",e.appContext.app,e,t,s)}function lc(e,t,...s){if(e.isUnmounted)return;const r=e.vnode.props||he;if({}.NODE_ENV!=="production"){const{emitsOptions:d,propsOptions:[u]}=e;if(d)if(!(t in d))(!u||!(Bt(t)in u))&&M(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Bt(t)}" prop.`);else{const p=d[t];J(p)&&(p(...s)||M(`Invalid event arguments: event validation failed for event "${t}".`))}}let n=s;const i=t.startsWith("update:"),o=i&&t.slice(7);if(o&&o in r){const d=`${o==="modelValue"?"model":o}Modifiers`,{number:u,trim:p}=r[d]||he;p&&(n=s.map(y=>Ie(y)?y.trim():y)),u&&(n=s.map(br))}if({}.NODE_ENV!=="production"&&ac(e,t,n),{}.NODE_ENV!=="production"){const d=t.toLowerCase();d!==t&&r[Bt(d)]&&M(`Event "${d}" is emitted in component ${Xr(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${Rt(t)}" instead of "${t}".`)}let a,l=r[a=Bt(t)]||r[a=Bt(pt(t))];!l&&i&&(l=r[a=Bt(Rt(t))]),l&&ot(l,e,6,n);const c=r[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ot(c,e,6,n)}}function _o(e,t,s=!1){const r=t.emitsCache,n=r.get(e);if(n!==void 0)return n;const i=e.emits;let o={},a=!1;if(!J(e)){const l=c=>{const d=_o(c,t,!0);d&&(a=!0,Ne(o,d))};!s&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(ae(e)&&r.set(e,null),null):(G(i)?i.forEach(l=>o[l]=null):Ne(o,i),ae(e)&&r.set(e,o),o)}function xr(e,t){return!e||!Ls(t)?!1:(t=t.slice(2).replace(/Once$/,""),ne(e,t[0].toLowerCase()+t.slice(1))||ne(e,Rt(t))||ne(e,t))}let ke=null,Rr=null;function Lr(e){const t=ke;return ke=e,Rr=e&&e.type.__scopeId||null,t}function At(e){Rr=e}function Nt(){Rr=null}function Es(e,t=ke,s){if(!t||e._n)return e;const r=(...n)=>{r._d&&Wo(-1);const i=Lr(t);let o;try{o=e(...n)}finally{Lr(i),r._d&&Wo(1)}return{}.NODE_ENV!=="production"&&go(t),o};return r._n=!0,r._c=!0,r._d=!0,r}let kn=!1;function Ur(){kn=!0}function On(e){const{type:t,vnode:s,proxy:r,withProxy:n,props:i,propsOptions:[o],slots:a,attrs:l,emit:c,render:d,renderCache:u,data:p,setupState:y,ctx:m,inheritAttrs:I}=e;let N,$;const b=Lr(e);({}).NODE_ENV!=="production"&&(kn=!1);try{if(s.shapeFlag&4){const D=n||r;N=ut(d.call(D,D,u,i,y,p,m)),$=l}else{const D=t;({}).NODE_ENV!=="production"&&l===i&&Ur(),N=ut(D.length>1?D(i,{}.NODE_ENV!=="production"?{get attrs(){return Ur(),l},slots:a,emit:c}:{attrs:l,slots:a,emit:c}):D(i,null)),$=t.props?l:uc(l)}}catch(D){qs.length=0,kr(D,e,1),N=Ce(Je)}let R=N,V;if({}.NODE_ENV!=="production"&&N.patchFlag>0&&N.patchFlag&2048&&([R,V]=cc(N)),$&&I!==!1){const D=Object.keys($),{shapeFlag:q}=R;if(D.length){if(q&7)o&&D.some(pr)&&($=dc($,o)),R=Kt(R,$);else if({}.NODE_ENV!=="production"&&!kn&&R.type!==Je){const ie=Object.keys(l),ue=[],te=[];for(let W=0,le=ie.length;W<le;W++){const _e=ie[W];Ls(_e)?pr(_e)||ue.push(_e[2].toLowerCase()+_e.slice(3)):te.push(_e)}te.length&&M(`Extraneous non-props attributes (${te.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),ue.length&&M(`Extraneous non-emits event listeners (${ue.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return s.dirs&&({}.NODE_ENV!=="production"&&!Io(R)&&M("Runtime directive used on component with non-element root node. The directives will not function as intended."),R=Kt(R),R.dirs=R.dirs?R.dirs.concat(s.dirs):s.dirs),s.transition&&({}.NODE_ENV!=="production"&&!Io(R)&&M("Component inside <Transition> renders non-element root node that cannot be animated."),R.transition=s.transition),{}.NODE_ENV!=="production"&&V?V(R):N=R,Lr(b),N}const cc=e=>{const t=e.children,s=e.dynamicChildren,r=bo(t);if(!r)return[e,void 0];const n=t.indexOf(r),i=s?s.indexOf(r):-1,o=a=>{t[n]=a,s&&(i>-1?s[i]=a:a.patchFlag>0&&(e.dynamicChildren=[...s,a]))};return[ut(r),o]};function bo(e){let t;for(let s=0;s<e.length;s++){const r=e[s];if(Wr(r)){if(r.type!==Je||r.children==="v-if"){if(t)return;t=r}}else return}return t}const uc=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ls(s))&&((t||(t={}))[s]=e[s]);return t},dc=(e,t)=>{const s={};for(const r in e)(!pr(r)||!(r.slice(9)in t))&&(s[r]=e[r]);return s},Io=e=>e.shapeFlag&7||e.type===Je;function hc(e,t,s){const{props:r,children:n,component:i}=e,{props:o,children:a,patchFlag:l}=t,c=i.emitsOptions;if({}.NODE_ENV!=="production"&&(n||a)&&ss||t.dirs||t.transition)return!0;if(s&&l>=0){if(l&1024)return!0;if(l&16)return r?vo(r,o,c):!!o;if(l&8){const d=t.dynamicProps;for(let u=0;u<d.length;u++){const p=d[u];if(o[p]!==r[p]&&!xr(c,p))return!0}}}else return(n||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?vo(r,o,c):!0:!!o;return!1}function vo(e,t,s){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let n=0;n<r.length;n++){const i=r[n];if(t[i]!==e[i]&&!xr(s,i))return!0}return!1}function fc({vnode:e,parent:t},s){for(;t&&t.subTree===e;)(e=t.vnode).el=s,t=t.parent}const pc=e=>e.__isSuspense;function mc(e,t){t&&t.pendingBranch?G(e)?t.effects.push(...e):t.effects.push(e):lo(e)}function gc(e,t){if(!Ee)({}).NODE_ENV!=="production"&&M("provide() can only be used inside setup().");else{let s=Ee.provides;const r=Ee.parent&&Ee.parent.provides;r===s&&(s=Ee.provides=Object.create(r)),s[e]=t}}function Vr(e,t,s=!1){const r=Ee||ke;if(r){const n=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(n&&e in n)return n[e];if(arguments.length>1)return s&&J(t)?t.call(r.proxy):t;({}).NODE_ENV!=="production"&&M(`injection "${String(e)}" not found.`)}else({}).NODE_ENV!=="production"&&M("inject() can only be used inside setup() or functional components.")}const Fr={};function zs(e,t,s){return{}.NODE_ENV!=="production"&&!J(t)&&M("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Eo(e,t,s)}function Eo(e,t,{immediate:s,deep:r,flush:n,onTrack:i,onTrigger:o}=he){({}).NODE_ENV!=="production"&&!t&&(s!==void 0&&M('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&M('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'));const a=V=>{M("Invalid watch source: ",V,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},l=ol()===(Ee==null?void 0:Ee.scope)?Ee:null;let c,d=!1,u=!1;if(Me(e)?(c=()=>e.value,d=Dr(e)):es(e)?(c=()=>e,r=!0):G(e)?(u=!0,d=e.some(V=>es(V)||Dr(V)),c=()=>e.map(V=>{if(Me(V))return V.value;if(es(V))return ns(V);if(J(V))return Ct(V,l,2);({}).NODE_ENV!=="production"&&a(V)})):J(e)?t?c=()=>Ct(e,l,2):c=()=>{if(!(l&&l.isUnmounted))return p&&p(),ot(e,l,3,[y])}:(c=Le,{}.NODE_ENV!=="production"&&a(e)),t&&r){const V=c;c=()=>ns(V())}let p,y=V=>{p=b.onStop=()=>{Ct(V,l,4)}},m;if(sr)if(y=Le,t?s&&ot(t,l,3,[c(),u?[]:void 0,y]):c(),n==="sync"){const V=Pu();m=V.__watcherHandles||(V.__watcherHandles=[])}else return Le;let I=u?new Array(e.length).fill(Fr):Fr;const N=()=>{if(b.active)if(t){const V=b.run();(r||d||(u?V.some((D,q)=>Fs(D,I[q])):Fs(V,I)))&&(p&&p(),ot(t,l,3,[V,I===Fr?void 0:u&&I[0]===Fr?[]:I,y]),I=V)}else b.run()};N.allowRecurse=!!t;let $;n==="sync"?$=N:n==="post"?$=()=>Be(N,l&&l.suspense):(N.pre=!0,l&&(N.id=l.uid),$=()=>Or(N));const b=new bn(c,$);({}).NODE_ENV!=="production"&&(b.onTrack=i,b.onTrigger=o),t?s?N():I=b.run():n==="post"?Be(b.run.bind(b),l&&l.suspense):b.run();const R=()=>{b.stop(),l&&l.scope&&dn(l.scope.effects,b)};return m&&m.push(R),R}function yc(e,t,s){const r=this.proxy,n=Ie(e)?e.includes(".")?Po(r,e):()=>r[e]:e.bind(r,r);let i;J(t)?i=t:(i=t.handler,s=t);const o=Ee;Ps(this);const a=Eo(n,i.bind(r),s);return o?Ps(o):us(),a}function Po(e,t){const s=t.split(".");return()=>{let r=e;for(let n=0;n<s.length&&r;n++)r=r[s[n]];return r}}function ns(e,t){if(!ae(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),Me(e))ns(e.value,t);else if(G(e))for(let s=0;s<e.length;s++)ns(e[s],t);else if(mr(e)||zt(e))e.forEach(s=>{ns(s,t)});else if(Mi(e))for(const s in e)ns(e[s],t);return e}function ve(e){return J(e)?{setup:e,name:e.name}:e}const Xs=e=>!!e.type.__asyncLoader,xn=e=>e.type.__isKeepAlive;function _c(e,t){Co(e,"a",t)}function bc(e,t){Co(e,"da",t)}function Co(e,t,s=Ee){const r=e.__wdc||(e.__wdc=()=>{let n=s;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(jr(t,r,s),s){let n=s.parent;for(;n&&n.parent;)xn(n.parent.vnode)&&Ic(r,t,s,n),n=n.parent}}function Ic(e,t,s,r){const n=jr(t,e,r,!0);$t(()=>{dn(r[t],n)},s)}function jr(e,t,s=Ee,r=!1){if(s){const n=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...o)=>{if(s.isUnmounted)return;Qt(),Ps(s);const a=ot(t,s,e,o);return us(),qt(),a});return r?n.unshift(i):n.push(i),i}else if({}.NODE_ENV!=="production"){const n=Bt(An[e].replace(/ hook$/,""));M(`${n} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const St=e=>(t,s=Ee)=>(!sr||e==="sp")&&jr(e,(...r)=>t(...r),s),vc=St("bm"),at=St("m"),Ec=St("bu"),Pc=St("u"),Cc=St("bum"),$t=St("um"),Ac=St("sp"),Nc=St("rtg"),Sc=St("rtc");function wc(e,t=Ee){jr("ec",e,t)}function Ao(e){tl(e)&&M("Do not use built-in directive ids as custom directive id: "+e)}function lt(e,t){const s=ke;if(s===null)return{}.NODE_ENV!=="production"&&M("withDirectives can only be used inside render functions."),e;const r=zr(s)||s.proxy,n=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,a,l,c=he]=t[i];o&&(J(o)&&(o={mounted:o,updated:o}),o.deep&&ns(a),n.push({dir:o,instance:r,value:a,oldValue:void 0,arg:l,modifiers:c}))}return e}function is(e,t,s,r){const n=e.dirs,i=t&&t.dirs;for(let o=0;o<n.length;o++){const a=n[o];i&&(a.oldValue=i[o].value);let l=a.dir[r];l&&(Qt(),ot(l,s,8,[e.el,a,e,t]),qt())}}const Rn="components",No=Symbol();function Dc(e){return Ie(e)?Tc(Rn,e,!1)||e:e||No}function Tc(e,t,s=!0,r=!1){const n=ke||Ee;if(n){const i=n.type;if(e===Rn){const a=Bn(i,!1);if(a&&(a===t||a===pt(t)||a===Xt(pt(t))))return i}const o=So(n[e]||i[e],t)||So(n.appContext[e],t);if(!o&&r)return i;if({}.NODE_ENV!=="production"&&s&&!o){const a=e===Rn?`
|
|
5
|
-
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`:"";M(`Failed to resolve ${e.slice(0,-1)}: ${t}${a}`)}return o}else({}).NODE_ENV!=="production"&&M(`resolve${Xt(e.slice(0,-1))} can only be used in render() or setup().`)}function So(e,t){return e&&(e[t]||e[pt(t)]||e[Xt(pt(t))])}function Mc(e,t,s,r){let n;const i=s&&s[r];if(G(e)||Ie(e)){n=new Array(e.length);for(let o=0,a=e.length;o<a;o++)n[o]=t(e[o],o,void 0,i&&i[o])}else if(typeof e=="number"){({}).NODE_ENV!=="production"&&!Number.isInteger(e)&&M(`The v-for range expect an integer value but got ${e}.`),n=new Array(e);for(let o=0;o<e;o++)n[o]=t(o+1,o,void 0,i&&i[o])}else if(ae(e))if(e[Symbol.iterator])n=Array.from(e,(o,a)=>t(o,a,void 0,i&&i[a]));else{const o=Object.keys(e);n=new Array(o.length);for(let a=0,l=o.length;a<l;a++){const c=o[a];n[a]=t(e[c],c,a,i&&i[a])}}else n=[];return s&&(s[r]=n),n}function $r(e,t,s={},r,n){if(ke.isCE||ke.parent&&Xs(ke.parent)&&ke.parent.isCE)return t!=="default"&&(s.name=t),Ce("slot",s,r&&r());let i=e[t];({}).NODE_ENV!=="production"&&i&&i.length>1&&(M("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),i=()=>[]),i&&i._c&&(i._d=!1),z();const o=i&&wo(i(s)),a=cs(Se,{key:s.key||o&&o.key||`_${t}`},o||(r?r():[]),o&&e._===1?64:-2);return!n&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function wo(e){return e.some(t=>Wr(t)?!(t.type===Je||t.type===Se&&!wo(t.children)):!0)?e:null}const Ln=e=>e?Bo(e)?zr(e)||e.proxy:Ln(e.parent):null,os=Ne(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>({}).NODE_ENV!=="production"?bs(e.props):e.props,$attrs:e=>({}).NODE_ENV!=="production"?bs(e.attrs):e.attrs,$slots:e=>({}).NODE_ENV!=="production"?bs(e.slots):e.slots,$refs:e=>({}).NODE_ENV!=="production"?bs(e.refs):e.refs,$parent:e=>Ln(e.parent),$root:e=>Ln(e.root),$emit:e=>e.emit,$options:e=>jn(e),$forceUpdate:e=>e.f||(e.f=()=>Or(e.update)),$nextTick:e=>e.n||(e.n=Yl.bind(e.proxy)),$watch:e=>yc.bind(e)}),Un=e=>e==="_"||e==="$",Vn=(e,t)=>e!==he&&!e.__isScriptSetup&&ne(e,t),Do={get({_:e},t){const{ctx:s,setupState:r,data:n,props:i,accessCache:o,type:a,appContext:l}=e;if({}.NODE_ENV!=="production"&&t==="__isVue")return!0;let c;if(t[0]!=="$"){const y=o[t];if(y!==void 0)switch(y){case 1:return r[t];case 2:return n[t];case 4:return s[t];case 3:return i[t]}else{if(Vn(r,t))return o[t]=1,r[t];if(n!==he&&ne(n,t))return o[t]=2,n[t];if((c=e.propsOptions[0])&&ne(c,t))return o[t]=3,i[t];if(s!==he&&ne(s,t))return o[t]=4,s[t];Fn&&(o[t]=0)}}const d=os[t];let u,p;if(d)return t==="$attrs"&&($e(e,"get",t),{}.NODE_ENV!=="production"&&Ur()),d(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(s!==he&&ne(s,t))return o[t]=4,s[t];if(p=l.config.globalProperties,ne(p,t))return p[t];({}).NODE_ENV!=="production"&&ke&&(!Ie(t)||t.indexOf("__v")!==0)&&(n!==he&&Un(t[0])&&ne(n,t)?M(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===ke&&M(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,s){const{data:r,setupState:n,ctx:i}=e;return Vn(n,t)?(n[t]=s,!0):{}.NODE_ENV!=="production"&&n.__isScriptSetup&&ne(n,t)?(M(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==he&&ne(r,t)?(r[t]=s,!0):ne(e.props,t)?({}.NODE_ENV!=="production"&&M(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?({}.NODE_ENV!=="production"&&M(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):({}.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(i,t,{enumerable:!0,configurable:!0,value:s}):i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:r,appContext:n,propsOptions:i}},o){let a;return!!s[o]||e!==he&&ne(e,o)||Vn(t,o)||(a=i[0])&&ne(a,o)||ne(r,o)||ne(os,o)||ne(n.config.globalProperties,o)},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ne(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};({}).NODE_ENV!=="production"&&(Do.ownKeys=e=>(M("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function kc(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(os).forEach(s=>{Object.defineProperty(t,s,{configurable:!0,enumerable:!1,get:()=>os[s](e),set:Le})}),t}function Oc(e){const{ctx:t,propsOptions:[s]}=e;s&&Object.keys(s).forEach(r=>{Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>e.props[r],set:Le})})}function xc(e){const{ctx:t,setupState:s}=e;Object.keys(se(s)).forEach(r=>{if(!s.__isScriptSetup){if(Un(r[0])){M(`setup() return property ${JSON.stringify(r)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s[r],set:Le})}})}function Rc(){const e=Object.create(null);return(t,s)=>{e[s]?M(`${t} property "${s}" is already defined in ${e[s]}.`):e[s]=t}}let Fn=!0;function Lc(e){const t=jn(e),s=e.proxy,r=e.ctx;Fn=!1,t.beforeCreate&&To(t.beforeCreate,e,"bc");const{data:n,computed:i,methods:o,watch:a,provide:l,inject:c,created:d,beforeMount:u,mounted:p,beforeUpdate:y,updated:m,activated:I,deactivated:N,beforeDestroy:$,beforeUnmount:b,destroyed:R,unmounted:V,render:D,renderTracked:q,renderTriggered:ie,errorCaptured:ue,serverPrefetch:te,expose:W,inheritAttrs:le,components:_e,directives:O,filters:L}=t,k={}.NODE_ENV!=="production"?Rc():null;if({}.NODE_ENV!=="production"){const[v]=e.propsOptions;if(v)for(const w in v)k("Props",w)}if(c&&Uc(c,r,k,e.appContext.config.unwrapInjectedRef),o)for(const v in o){const w=o[v];J(w)?({}.NODE_ENV!=="production"?Object.defineProperty(r,v,{value:w.bind(s),configurable:!0,enumerable:!0,writable:!0}):r[v]=w.bind(s),{}.NODE_ENV!=="production"&&k("Methods",v)):{}.NODE_ENV!=="production"&&M(`Method "${v}" has type "${typeof w}" in the component definition. Did you reference the function correctly?`)}if(n){({}).NODE_ENV!=="production"&&!J(n)&&M("The data option must be a function. Plain object usage is no longer supported.");const v=n.call(s,s);if({}.NODE_ENV!=="production"&&hn(v)&&M("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!ae(v))({}).NODE_ENV!=="production"&&M("data() should return an object.");else if(e.data=En(v),{}.NODE_ENV!=="production")for(const w in v)k("Data",w),Un(w[0])||Object.defineProperty(r,w,{configurable:!0,enumerable:!0,get:()=>v[w],set:Le})}if(Fn=!0,i)for(const v in i){const w=i[v],F=J(w)?w.bind(s,s):J(w.get)?w.get.bind(s,s):Le;({}).NODE_ENV!=="production"&&F===Le&&M(`Computed property "${v}" has no getter.`);const re=!J(w)&&J(w.set)?w.set.bind(s):{}.NODE_ENV!=="production"?()=>{M(`Write operation failed: computed property "${v}" is readonly.`)}:Le,ge=bt({get:F,set:re});Object.defineProperty(r,v,{enumerable:!0,configurable:!0,get:()=>ge.value,set:de=>ge.value=de}),{}.NODE_ENV!=="production"&&k("Computed",v)}if(a)for(const v in a)Mo(a[v],r,s,v);if(l){const v=J(l)?l.call(s):l;Reflect.ownKeys(v).forEach(w=>{gc(w,v[w])})}d&&To(d,e,"c");function H(v,w){G(w)?w.forEach(F=>v(F.bind(s))):w&&v(w.bind(s))}if(H(vc,u),H(at,p),H(Ec,y),H(Pc,m),H(_c,I),H(bc,N),H(wc,ue),H(Sc,q),H(Nc,ie),H(Cc,b),H($t,V),H(Ac,te),G(W))if(W.length){const v=e.exposed||(e.exposed={});W.forEach(w=>{Object.defineProperty(v,w,{get:()=>s[w],set:F=>s[w]=F})})}else e.exposed||(e.exposed={});D&&e.render===Le&&(e.render=D),le!=null&&(e.inheritAttrs=le),_e&&(e.components=_e),O&&(e.directives=O)}function Uc(e,t,s=Le,r=!1){G(e)&&(e=$n(e));for(const n in e){const i=e[n];let o;ae(i)?"default"in i?o=Vr(i.from||n,i.default,!0):o=Vr(i.from||n):o=Vr(i),Me(o)?r?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):({}.NODE_ENV!=="production"&&M(`injected property "${n}" is a ref and will be auto-unwrapped and no longer needs \`.value\` in the next minor release. To opt-in to the new behavior now, set \`app.config.unwrapInjectedRef = true\` (this config is temporary and will not be needed in the future.)`),t[n]=o):t[n]=o,{}.NODE_ENV!=="production"&&s("Inject",n)}}function To(e,t,s){ot(G(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,s)}function Mo(e,t,s,r){const n=r.includes(".")?Po(s,r):()=>s[r];if(Ie(e)){const i=t[e];J(i)?zs(n,i):{}.NODE_ENV!=="production"&&M(`Invalid watch handler specified by key "${e}"`,i)}else if(J(e))zs(n,e.bind(s));else if(ae(e))if(G(e))e.forEach(i=>Mo(i,t,s,r));else{const i=J(e.handler)?e.handler.bind(s):t[e.handler];J(i)?zs(n,i,e):{}.NODE_ENV!=="production"&&M(`Invalid watch handler specified by key "${e.handler}"`,i)}else({}).NODE_ENV!=="production"&&M(`Invalid watch option: "${r}"`,e)}function jn(e){const t=e.type,{mixins:s,extends:r}=t,{mixins:n,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!n.length&&!s&&!r?l=t:(l={},n.length&&n.forEach(c=>Hr(l,c,o,!0)),Hr(l,t,o)),ae(t)&&i.set(t,l),l}function Hr(e,t,s,r=!1){const{mixins:n,extends:i}=t;i&&Hr(e,i,s,!0),n&&n.forEach(o=>Hr(e,o,s,!0));for(const o in t)if(r&&o==="expose")({}).NODE_ENV!=="production"&&M('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Vc[o]||s&&s[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const Vc={data:ko,props:as,emits:as,methods:as,computed:as,beforeCreate:He,created:He,beforeMount:He,mounted:He,beforeUpdate:He,updated:He,beforeDestroy:He,beforeUnmount:He,destroyed:He,unmounted:He,activated:He,deactivated:He,errorCaptured:He,serverPrefetch:He,components:as,directives:as,watch:jc,provide:ko,inject:Fc};function ko(e,t){return t?e?function(){return Ne(J(e)?e.call(this,this):e,J(t)?t.call(this,this):t)}:t:e}function Fc(e,t){return as($n(e),$n(t))}function $n(e){if(G(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function He(e,t){return e?[...new Set([].concat(e,t))]:t}function as(e,t){return e?Ne(Ne(Object.create(null),e),t):t}function jc(e,t){if(!e)return t;if(!t)return e;const s=Ne(Object.create(null),e);for(const r in t)s[r]=He(e[r],t[r]);return s}function $c(e,t,s,r=!1){const n={},i={};_r(i,Yr,1),e.propsDefaults=Object.create(null),Oo(e,t,n,i);for(const o in e.propsOptions[0])o in n||(n[o]=void 0);({}).NODE_ENV!=="production"&&Vo(t||{},n,e),s?e.props=r?n:xl(n):e.type.props?e.props=n:e.props=i,e.attrs=i}function Hc(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function Kc(e,t,s,r){const{props:n,attrs:i,vnode:{patchFlag:o}}=e,a=se(n),[l]=e.propsOptions;let c=!1;if(!({}.NODE_ENV!=="production"&&Hc(e))&&(r||o>0)&&!(o&16)){if(o&8){const d=e.vnode.dynamicProps;for(let u=0;u<d.length;u++){let p=d[u];if(xr(e.emitsOptions,p))continue;const y=t[p];if(l)if(ne(i,p))y!==i[p]&&(i[p]=y,c=!0);else{const m=pt(p);n[m]=Hn(l,a,m,y,e,!1)}else y!==i[p]&&(i[p]=y,c=!0)}}}else{Oo(e,t,n,i)&&(c=!0);let d;for(const u in a)(!t||!ne(t,u)&&((d=Rt(u))===u||!ne(t,d)))&&(l?s&&(s[u]!==void 0||s[d]!==void 0)&&(n[u]=Hn(l,a,u,void 0,e,!0)):delete n[u]);if(i!==a)for(const u in i)(!t||!ne(t,u))&&(delete i[u],c=!0)}c&&Pt(e,"set","$attrs"),{}.NODE_ENV!=="production"&&Vo(t||{},n,e)}function Oo(e,t,s,r){const[n,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(gr(l))continue;const c=t[l];let d;n&&ne(n,d=pt(l))?!i||!i.includes(d)?s[d]=c:(a||(a={}))[d]=c:xr(e.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,o=!0)}if(i){const l=se(s),c=a||he;for(let d=0;d<i.length;d++){const u=i[d];s[u]=Hn(n,l,u,c[u],e,!ne(c,u))}}return o}function Hn(e,t,s,r,n,i){const o=e[s];if(o!=null){const a=ne(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&J(l)){const{propsDefaults:c}=n;s in c?r=c[s]:(Ps(n),r=c[s]=l.call(null,t),us())}else r=l}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===Rt(s))&&(r=!0))}return r}function xo(e,t,s=!1){const r=t.propsCache,n=r.get(e);if(n)return n;const i=e.props,o={},a=[];let l=!1;if(!J(e)){const d=u=>{l=!0;const[p,y]=xo(u,t,!0);Ne(o,p),y&&a.push(...y)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!l)return ae(e)&&r.set(e,gs),gs;if(G(i))for(let d=0;d<i.length;d++){({}).NODE_ENV!=="production"&&!Ie(i[d])&&M("props must be strings when using array syntax.",i[d]);const u=pt(i[d]);Ro(u)&&(o[u]=he)}else if(i){({}).NODE_ENV!=="production"&&!ae(i)&&M("invalid props options",i);for(const d in i){const u=pt(d);if(Ro(u)){const p=i[d],y=o[u]=G(p)||J(p)?{type:p}:Object.assign({},p);if(y){const m=Uo(Boolean,y.type),I=Uo(String,y.type);y[0]=m>-1,y[1]=I<0||m<I,(m>-1||ne(y,"default"))&&a.push(u)}}}}const c=[o,a];return ae(e)&&r.set(e,c),c}function Ro(e){return e[0]!=="$"?!0:({}.NODE_ENV!=="production"&&M(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Kn(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Lo(e,t){return Kn(e)===Kn(t)}function Uo(e,t){return G(t)?t.findIndex(s=>Lo(s,e)):J(t)&&Lo(t,e)?0:-1}function Vo(e,t,s){const r=se(t),n=s.propsOptions[0];for(const i in n){let o=n[i];o!=null&&Zc(i,r[i],o,!ne(e,i)&&!ne(e,Rt(i)))}}function Zc(e,t,s,r){const{type:n,required:i,validator:o}=s;if(i&&r){M('Missing required prop: "'+e+'"');return}if(!(t==null&&!s.required)){if(n!=null&&n!==!0){let a=!1;const l=G(n)?n:[n],c=[];for(let d=0;d<l.length&&!a;d++){const{valid:u,expectedType:p}=Yc(t,l[d]);c.push(p||""),a=u}if(!a){M(Gc(e,t,c));return}}o&&!o(t)&&M('Invalid prop: custom validator check failed for prop "'+e+'".')}}const Wc=xe("String,Number,Boolean,Function,Symbol,BigInt");function Yc(e,t){let s;const r=Kn(t);if(Wc(r)){const n=typeof e;s=n===r.toLowerCase(),!s&&n==="object"&&(s=e instanceof t)}else r==="Object"?s=ae(e):r==="Array"?s=G(e):r==="null"?s=e===null:s=e instanceof t;return{valid:s,expectedType:r}}function Gc(e,t,s){let r=`Invalid prop: type check failed for prop "${e}". Expected ${s.map(Xt).join(" | ")}`;const n=s[0],i=fn(t),o=Fo(t,n),a=Fo(t,i);return s.length===1&&jo(n)&&!zc(n,i)&&(r+=` with value ${o}`),r+=`, got ${i} `,jo(i)&&(r+=`with value ${a}.`),r}function Fo(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function jo(e){return["string","number","boolean"].some(s=>e.toLowerCase()===s)}function zc(...e){return e.some(t=>t.toLowerCase()==="boolean")}const $o=e=>e[0]==="_"||e==="$stable",Zn=e=>G(e)?e.map(ut):[ut(e)],Xc=(e,t,s)=>{if(t._n)return t;const r=Es((...n)=>({}.NODE_ENV!=="production"&&Ee&&M(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),Zn(t(...n))),s);return r._c=!1,r},Ho=(e,t,s)=>{const r=e._ctx;for(const n in e){if($o(n))continue;const i=e[n];if(J(i))t[n]=Xc(n,i,r);else if(i!=null){({}).NODE_ENV!=="production"&&M(`Non-function value encountered for slot "${n}". Prefer function slots for better performance.`);const o=Zn(i);t[n]=()=>o}}},Ko=(e,t)=>{({}).NODE_ENV!=="production"&&!xn(e.vnode)&&M("Non-function value encountered for default slot. Prefer function slots for better performance.");const s=Zn(t);e.slots.default=()=>s},Bc=(e,t)=>{if(e.vnode.shapeFlag&32){const s=t._;s?(e.slots=se(t),_r(t,"_",s)):Ho(t,e.slots={})}else e.slots={},t&&Ko(e,t);_r(e.slots,Yr,1)},Jc=(e,t,s)=>{const{vnode:r,slots:n}=e;let i=!0,o=he;if(r.shapeFlag&32){const a=t._;a?{}.NODE_ENV!=="production"&&ss?Ne(n,t):s&&a===1?i=!1:(Ne(n,t),!s&&a===1&&delete n._):(i=!t.$stable,Ho(t,n)),o=t}else t&&(Ko(e,t),o={default:1});if(i)for(const a in n)!$o(a)&&!(a in o)&&delete n[a]};function Zo(){return{app:null,config:{isNativeTag:wi,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Qc=0;function qc(e,t){return function(r,n=null){J(r)||(r=Object.assign({},r)),n!=null&&!ae(n)&&({}.NODE_ENV!=="production"&&M("root props passed to app.mount() must be an object."),n=null);const i=Zo(),o=new Set;let a=!1;const l=i.app={_uid:Qc++,_component:r,_props:n,_container:null,_context:i,_instance:null,version:sa,get config(){return i.config},set config(c){({}).NODE_ENV!=="production"&&M("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return o.has(c)?{}.NODE_ENV!=="production"&&M("Plugin has already been applied to target app."):c&&J(c.install)?(o.add(c),c.install(l,...d)):J(c)?(o.add(c),c(l,...d)):{}.NODE_ENV!=="production"&&M('A plugin must either be a function or an object with an "install" function.'),l},mixin(c){return i.mixins.includes(c)?{}.NODE_ENV!=="production"&&M("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):i.mixins.push(c),l},component(c,d){return{}.NODE_ENV!=="production"&&zn(c,i.config),d?({}.NODE_ENV!=="production"&&i.components[c]&&M(`Component "${c}" has already been registered in target app.`),i.components[c]=d,l):i.components[c]},directive(c,d){return{}.NODE_ENV!=="production"&&Ao(c),d?({}.NODE_ENV!=="production"&&i.directives[c]&&M(`Directive "${c}" has already been registered in target app.`),i.directives[c]=d,l):i.directives[c]},mount(c,d,u){if(a)({}).NODE_ENV!=="production"&&M("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{({}).NODE_ENV!=="production"&&c.__vue_app__&&M("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const p=Ce(r,n);return p.appContext=i,{}.NODE_ENV!=="production"&&(i.reload=()=>{e(Kt(p),c,u)}),d&&t?t(p,c):e(p,c,u),a=!0,l._container=c,c.__vue_app__=l,{}.NODE_ENV!=="production"&&(l._instance=p.component,ec(l,sa)),zr(p.component)||p.component.proxy}},unmount(){a?(e(null,l._container),{}.NODE_ENV!=="production"&&(l._instance=null,tc(l)),delete l._container.__vue_app__):{}.NODE_ENV!=="production"&&M("Cannot unmount an app that is not mounted.")},provide(c,d){return{}.NODE_ENV!=="production"&&c in i.provides&&M(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),i.provides[c]=d,l}};return l}}function Wn(e,t,s,r,n=!1){if(G(e)){e.forEach((p,y)=>Wn(p,t&&(G(t)?t[y]:t),s,r,n));return}if(Xs(r)&&!n)return;const i=r.shapeFlag&4?zr(r.component)||r.component.proxy:r.el,o=n?null:i,{i:a,r:l}=e;if({}.NODE_ENV!=="production"&&!a){M("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const c=t&&t.r,d=a.refs===he?a.refs={}:a.refs,u=a.setupState;if(c!=null&&c!==l&&(Ie(c)?(d[c]=null,ne(u,c)&&(u[c]=null)):Me(c)&&(c.value=null)),J(l))Ct(l,a,12,[o,d]);else{const p=Ie(l),y=Me(l);if(p||y){const m=()=>{if(e.f){const I=p?ne(u,l)?u[l]:d[l]:l.value;n?G(I)&&dn(I,i):G(I)?I.includes(i)||I.push(i):p?(d[l]=[i],ne(u,l)&&(u[l]=d[l])):(l.value=[i],e.k&&(d[e.k]=l.value))}else p?(d[l]=o,ne(u,l)&&(u[l]=o)):y?(l.value=o,e.k&&(d[e.k]=o)):{}.NODE_ENV!=="production"&&M("Invalid template ref type:",l,`(${typeof l})`)};o?(m.id=-1,Be(m,s)):m()}else({}).NODE_ENV!=="production"&&M("Invalid template ref type:",l,`(${typeof l})`)}}let Bs,Ht;function wt(e,t){e.appContext.config.performance&&Kr()&&Ht.mark(`vue-${t}-${e.uid}`),{}.NODE_ENV!=="production"&&ic(e,t,Kr()?Ht.now():Date.now())}function Dt(e,t){if(e.appContext.config.performance&&Kr()){const s=`vue-${t}-${e.uid}`,r=s+":end";Ht.mark(r),Ht.measure(`<${Xr(e,e.type)}> ${t}`,s,r),Ht.clearMarks(s),Ht.clearMarks(r)}({}).NODE_ENV!=="production"&&oc(e,t,Kr()?Ht.now():Date.now())}function Kr(){return Bs!==void 0||(typeof window<"u"&&window.performance?(Bs=!0,Ht=window.performance):Bs=!1),Bs}function eu(){const e=[];if({}.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
6
|
-
|
|
7
|
-
For more details, see https://link.vuejs.org/feature-flags.`)}}const Be=mc;function tu(e){return su(e)}function su(e,t){eu();const s=Oi();s.__VUE__=!0,{}.NODE_ENV!=="production"&&mo(s.__VUE_DEVTOOLS_GLOBAL_HOOK__,s);const{insert:r,remove:n,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:d,parentNode:u,nextSibling:p,setScopeId:y=Le,insertStaticContent:m}=e,I=(h,f,_,P=null,E=null,T=null,U=!1,S=null,x={}.NODE_ENV!=="production"&&ss?!1:!!f.dynamicChildren)=>{if(h===f)return;h&&!tr(h,f)&&(P=ht(h),be(h,E,T,!0),h=null),f.patchFlag===-2&&(x=!1,f.dynamicChildren=null);const{type:A,ref:Z,shapeFlag:K}=f;switch(A){case Js:N(h,f,_,P);break;case Je:$(h,f,_,P);break;case Qs:h==null?b(f,_,P,U):{}.NODE_ENV!=="production"&&R(h,f,_,U);break;case Se:O(h,f,_,P,E,T,U,S,x);break;default:K&1?q(h,f,_,P,E,T,U,S,x):K&6?L(h,f,_,P,E,T,U,S,x):K&64||K&128?A.process(h,f,_,P,E,T,U,S,x,ze):{}.NODE_ENV!=="production"&&M("Invalid VNode type:",A,`(${typeof A})`)}Z!=null&&E&&Wn(Z,h&&h.ref,T,f||h,!f)},N=(h,f,_,P)=>{if(h==null)r(f.el=a(f.children),_,P);else{const E=f.el=h.el;f.children!==h.children&&c(E,f.children)}},$=(h,f,_,P)=>{h==null?r(f.el=l(f.children||""),_,P):f.el=h.el},b=(h,f,_,P)=>{[h.el,h.anchor]=m(h.children,f,_,P,h.el,h.anchor)},R=(h,f,_,P)=>{if(f.children!==h.children){const E=p(h.anchor);D(h),[f.el,f.anchor]=m(f.children,_,E,P)}else f.el=h.el,f.anchor=h.anchor},V=({el:h,anchor:f},_,P)=>{let E;for(;h&&h!==f;)E=p(h),r(h,_,P),h=E;r(f,_,P)},D=({el:h,anchor:f})=>{let _;for(;h&&h!==f;)_=p(h),n(h),h=_;n(f)},q=(h,f,_,P,E,T,U,S,x)=>{U=U||f.type==="svg",h==null?ie(f,_,P,E,T,U,S,x):W(h,f,E,T,U,S,x)},ie=(h,f,_,P,E,T,U,S)=>{let x,A;const{type:Z,props:K,shapeFlag:Y,transition:Q,dirs:oe}=h;if(x=h.el=o(h.type,T,K&&K.is,K),Y&8?d(x,h.children):Y&16&&te(h.children,x,null,P,E,T&&Z!=="foreignObject",U,S),oe&&is(h,null,P,"created"),ue(x,h,h.scopeId,U,P),K){for(const pe in K)pe!=="value"&&!gr(pe)&&i(x,pe,null,K[pe],T,h.children,P,E,Ge);"value"in K&&i(x,"value",null,K.value),(A=K.onVnodeBeforeMount)&&_t(A,P,h)}({}).NODE_ENV!=="production"&&(Object.defineProperty(x,"__vnode",{value:h,enumerable:!1}),Object.defineProperty(x,"__vueParentComponent",{value:P,enumerable:!1})),oe&&is(h,null,P,"beforeMount");const me=(!E||E&&!E.pendingBranch)&&Q&&!Q.persisted;me&&Q.beforeEnter(x),r(x,f,_),((A=K&&K.onVnodeMounted)||me||oe)&&Be(()=>{A&&_t(A,P,h),me&&Q.enter(x),oe&&is(h,null,P,"mounted")},E)},ue=(h,f,_,P,E)=>{if(_&&y(h,_),P)for(let T=0;T<P.length;T++)y(h,P[T]);if(E){let T=E.subTree;if({}.NODE_ENV!=="production"&&T.patchFlag>0&&T.patchFlag&2048&&(T=bo(T.children)||T),f===T){const U=E.vnode;ue(h,U,U.scopeId,U.slotScopeIds,E.parent)}}},te=(h,f,_,P,E,T,U,S,x=0)=>{for(let A=x;A<h.length;A++){const Z=h[A]=S?Zt(h[A]):ut(h[A]);I(null,Z,f,_,P,E,T,U,S)}},W=(h,f,_,P,E,T,U)=>{const S=f.el=h.el;let{patchFlag:x,dynamicChildren:A,dirs:Z}=f;x|=h.patchFlag&16;const K=h.props||he,Y=f.props||he;let Q;_&&ls(_,!1),(Q=Y.onVnodeBeforeUpdate)&&_t(Q,_,f,h),Z&&is(f,h,_,"beforeUpdate"),_&&ls(_,!0),{}.NODE_ENV!=="production"&&ss&&(x=0,U=!1,A=null);const oe=E&&f.type!=="foreignObject";if(A?(le(h.dynamicChildren,A,S,_,P,oe,T),{}.NODE_ENV!=="production"&&_&&_.type.__hmrId&&Zr(h,f)):U||F(h,f,S,null,_,P,oe,T,!1),x>0){if(x&16)_e(S,f,K,Y,_,P,E);else if(x&2&&K.class!==Y.class&&i(S,"class",null,Y.class,E),x&4&&i(S,"style",K.style,Y.style,E),x&8){const me=f.dynamicProps;for(let pe=0;pe<me.length;pe++){const De=me[pe],ft=K[De],xs=Y[De];(xs!==ft||De==="value")&&i(S,De,ft,xs,E,h.children,_,P,Ge)}}x&1&&h.children!==f.children&&d(S,f.children)}else!U&&A==null&&_e(S,f,K,Y,_,P,E);((Q=Y.onVnodeUpdated)||Z)&&Be(()=>{Q&&_t(Q,_,f,h),Z&&is(f,h,_,"updated")},P)},le=(h,f,_,P,E,T,U)=>{for(let S=0;S<f.length;S++){const x=h[S],A=f[S],Z=x.el&&(x.type===Se||!tr(x,A)||x.shapeFlag&70)?u(x.el):_;I(x,A,Z,null,P,E,T,U,!0)}},_e=(h,f,_,P,E,T,U)=>{if(_!==P){if(_!==he)for(const S in _)!gr(S)&&!(S in P)&&i(h,S,_[S],null,U,f.children,E,T,Ge);for(const S in P){if(gr(S))continue;const x=P[S],A=_[S];x!==A&&S!=="value"&&i(h,S,A,x,U,f.children,E,T,Ge)}"value"in P&&i(h,"value",_.value,P.value)}},O=(h,f,_,P,E,T,U,S,x)=>{const A=f.el=h?h.el:a(""),Z=f.anchor=h?h.anchor:a("");let{patchFlag:K,dynamicChildren:Y,slotScopeIds:Q}=f;({}).NODE_ENV!=="production"&&(ss||K&2048)&&(K=0,x=!1,Y=null),Q&&(S=S?S.concat(Q):Q),h==null?(r(A,_,P),r(Z,_,P),te(f.children,_,Z,E,T,U,S,x)):K>0&&K&64&&Y&&h.dynamicChildren?(le(h.dynamicChildren,Y,_,E,T,U,S),{}.NODE_ENV!=="production"&&E&&E.type.__hmrId?Zr(h,f):(f.key!=null||E&&f===E.subTree)&&Zr(h,f,!0)):F(h,f,_,Z,E,T,U,S,x)},L=(h,f,_,P,E,T,U,S,x)=>{f.slotScopeIds=S,h==null?f.shapeFlag&512?E.ctx.activate(f,_,P,U,x):k(f,_,P,E,T,U,x):H(h,f,x)},k=(h,f,_,P,E,T,U)=>{const S=h.component=hu(h,P,E);if({}.NODE_ENV!=="production"&&S.type.__hmrId&&Bl(S),{}.NODE_ENV!=="production"&&(Tr(h),wt(S,"mount")),xn(h)&&(S.ctx.renderer=ze),{}.NODE_ENV!=="production"&&wt(S,"init"),mu(S),{}.NODE_ENV!=="production"&&Dt(S,"init"),S.asyncDep){if(E&&E.registerDep(S,v),!h.el){const x=S.subTree=Ce(Je);$(null,x,f,_)}return}v(S,h,f,_,E,T,U),{}.NODE_ENV!=="production"&&(Mr(),Dt(S,"mount"))},H=(h,f,_)=>{const P=f.component=h.component;if(hc(h,f,_))if(P.asyncDep&&!P.asyncResolved){({}).NODE_ENV!=="production"&&Tr(f),w(P,f,_),{}.NODE_ENV!=="production"&&Mr();return}else P.next=f,zl(P.update),P.update();else f.el=h.el,P.vnode=f},v=(h,f,_,P,E,T,U)=>{const S=()=>{if(h.isMounted){let{next:Z,bu:K,u:Y,parent:Q,vnode:oe}=h,me=Z,pe;({}).NODE_ENV!=="production"&&Tr(Z||h.vnode),ls(h,!1),Z?(Z.el=oe.el,w(h,Z,U)):Z=oe,K&&ys(K),(pe=Z.props&&Z.props.onVnodeBeforeUpdate)&&_t(pe,Q,Z,oe),ls(h,!0),{}.NODE_ENV!=="production"&&wt(h,"render");const De=On(h);({}).NODE_ENV!=="production"&&Dt(h,"render");const ft=h.subTree;h.subTree=De,{}.NODE_ENV!=="production"&&wt(h,"patch"),I(ft,De,u(ft.el),ht(ft),h,E,T),{}.NODE_ENV!=="production"&&Dt(h,"patch"),Z.el=De.el,me===null&&fc(h,De.el),Y&&Be(Y,E),(pe=Z.props&&Z.props.onVnodeUpdated)&&Be(()=>_t(pe,Q,Z,oe),E),{}.NODE_ENV!=="production"&&go(h),{}.NODE_ENV!=="production"&&Mr()}else{let Z;const{el:K,props:Y}=f,{bm:Q,m:oe,parent:me}=h,pe=Xs(f);if(ls(h,!1),Q&&ys(Q),!pe&&(Z=Y&&Y.onVnodeBeforeMount)&&_t(Z,me,f),ls(h,!0),K&&Gt){const De=()=>{({}).NODE_ENV!=="production"&&wt(h,"render"),h.subTree=On(h),{}.NODE_ENV!=="production"&&Dt(h,"render"),{}.NODE_ENV!=="production"&&wt(h,"hydrate"),Gt(K,h.subTree,h,E,null),{}.NODE_ENV!=="production"&&Dt(h,"hydrate")};pe?f.type.__asyncLoader().then(()=>!h.isUnmounted&&De()):De()}else{({}).NODE_ENV!=="production"&&wt(h,"render");const De=h.subTree=On(h);({}).NODE_ENV!=="production"&&Dt(h,"render"),{}.NODE_ENV!=="production"&&wt(h,"patch"),I(null,De,_,P,h,E,T),{}.NODE_ENV!=="production"&&Dt(h,"patch"),f.el=De.el}if(oe&&Be(oe,E),!pe&&(Z=Y&&Y.onVnodeMounted)){const De=f;Be(()=>_t(Z,me,De),E)}(f.shapeFlag&256||me&&Xs(me.vnode)&&me.vnode.shapeFlag&256)&&h.a&&Be(h.a,E),h.isMounted=!0,{}.NODE_ENV!=="production"&&sc(h),f=_=P=null}},x=h.effect=new bn(S,()=>Or(A),h.scope),A=h.update=()=>x.run();A.id=h.uid,ls(h,!0),{}.NODE_ENV!=="production"&&(x.onTrack=h.rtc?Z=>ys(h.rtc,Z):void 0,x.onTrigger=h.rtg?Z=>ys(h.rtg,Z):void 0,A.ownerInstance=h),A()},w=(h,f,_)=>{f.component=h;const P=h.vnode.props;h.vnode=f,h.next=null,Kc(h,f.props,P,_),Jc(h,f.children,_),Qt(),co(),qt()},F=(h,f,_,P,E,T,U,S,x=!1)=>{const A=h&&h.children,Z=h?h.shapeFlag:0,K=f.children,{patchFlag:Y,shapeFlag:Q}=f;if(Y>0){if(Y&128){ge(A,K,_,P,E,T,U,S,x);return}else if(Y&256){re(A,K,_,P,E,T,U,S,x);return}}Q&8?(Z&16&&Ge(A,E,T),K!==A&&d(_,K)):Z&16?Q&16?ge(A,K,_,P,E,T,U,S,x):Ge(A,E,T,!0):(Z&8&&d(_,""),Q&16&&te(K,_,P,E,T,U,S,x))},re=(h,f,_,P,E,T,U,S,x)=>{h=h||gs,f=f||gs;const A=h.length,Z=f.length,K=Math.min(A,Z);let Y;for(Y=0;Y<K;Y++){const Q=f[Y]=x?Zt(f[Y]):ut(f[Y]);I(h[Y],Q,_,null,E,T,U,S,x)}A>Z?Ge(h,E,T,!0,!1,K):te(f,_,P,E,T,U,S,x,K)},ge=(h,f,_,P,E,T,U,S,x)=>{let A=0;const Z=f.length;let K=h.length-1,Y=Z-1;for(;A<=K&&A<=Y;){const Q=h[A],oe=f[A]=x?Zt(f[A]):ut(f[A]);if(tr(Q,oe))I(Q,oe,_,null,E,T,U,S,x);else break;A++}for(;A<=K&&A<=Y;){const Q=h[K],oe=f[Y]=x?Zt(f[Y]):ut(f[Y]);if(tr(Q,oe))I(Q,oe,_,null,E,T,U,S,x);else break;K--,Y--}if(A>K){if(A<=Y){const Q=Y+1,oe=Q<Z?f[Q].el:P;for(;A<=Y;)I(null,f[A]=x?Zt(f[A]):ut(f[A]),_,oe,E,T,U,S,x),A++}}else if(A>Y)for(;A<=K;)be(h[A],E,T,!0),A++;else{const Q=A,oe=A,me=new Map;for(A=oe;A<=Y;A++){const Xe=f[A]=x?Zt(f[A]):ut(f[A]);Xe.key!=null&&({}.NODE_ENV!=="production"&&me.has(Xe.key)&&M("Duplicate keys found during update:",JSON.stringify(Xe.key),"Make sure keys are unique."),me.set(Xe.key,A))}let pe,De=0;const ft=Y-oe+1;let xs=!1,Ka=0;const hr=new Array(ft);for(A=0;A<ft;A++)hr[A]=0;for(A=Q;A<=K;A++){const Xe=h[A];if(De>=ft){be(Xe,E,T,!0);continue}let Et;if(Xe.key!=null)Et=me.get(Xe.key);else for(pe=oe;pe<=Y;pe++)if(hr[pe-oe]===0&&tr(Xe,f[pe])){Et=pe;break}Et===void 0?be(Xe,E,T,!0):(hr[Et-oe]=A+1,Et>=Ka?Ka=Et:xs=!0,I(Xe,f[Et],_,null,E,T,U,S,x),De++)}const Za=xs?ru(hr):gs;for(pe=Za.length-1,A=ft-1;A>=0;A--){const Xe=oe+A,Et=f[Xe],Wa=Xe+1<Z?f[Xe+1].el:P;hr[A]===0?I(null,Et,_,Wa,E,T,U,S,x):xs&&(pe<0||A!==Za[pe]?de(Et,_,Wa,2):pe--)}}},de=(h,f,_,P,E=null)=>{const{el:T,type:U,transition:S,children:x,shapeFlag:A}=h;if(A&6){de(h.component.subTree,f,_,P);return}if(A&128){h.suspense.move(f,_,P);return}if(A&64){U.move(h,f,_,ze);return}if(U===Se){r(T,f,_);for(let K=0;K<x.length;K++)de(x[K],f,_,P);r(h.anchor,f,_);return}if(U===Qs){V(h,f,_);return}if(P!==2&&A&1&&S)if(P===0)S.beforeEnter(T),r(T,f,_),Be(()=>S.enter(T),E);else{const{leave:K,delayLeave:Y,afterLeave:Q}=S,oe=()=>r(T,f,_),me=()=>{K(T,()=>{oe(),Q&&Q()})};Y?Y(T,oe,me):me()}else r(T,f,_)},be=(h,f,_,P=!1,E=!1)=>{const{type:T,props:U,ref:S,children:x,dynamicChildren:A,shapeFlag:Z,patchFlag:K,dirs:Y}=h;if(S!=null&&Wn(S,null,_,h,!0),Z&256){f.ctx.deactivate(h);return}const Q=Z&1&&Y,oe=!Xs(h);let me;if(oe&&(me=U&&U.onVnodeBeforeUnmount)&&_t(me,f,h),Z&6)ps(h.component,_,P);else{if(Z&128){h.suspense.unmount(_,P);return}Q&&is(h,null,f,"beforeUnmount"),Z&64?h.type.remove(h,f,_,E,ze,P):A&&(T!==Se||K>0&&K&64)?Ge(A,f,_,!1,!0):(T===Se&&K&384||!E&&Z&16)&&Ge(x,f,_),P&&nt(h)}(oe&&(me=U&&U.onVnodeUnmounted)||Q)&&Be(()=>{me&&_t(me,f,h),Q&&is(h,null,f,"unmounted")},_)},nt=h=>{const{type:f,el:_,anchor:P,transition:E}=h;if(f===Se){({}).NODE_ENV!=="production"&&h.patchFlag>0&&h.patchFlag&2048&&E&&!E.persisted?h.children.forEach(U=>{U.type===Je?n(U.el):nt(U)}):dt(_,P);return}if(f===Qs){D(h);return}const T=()=>{n(_),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(h.shapeFlag&1&&E&&!E.persisted){const{leave:U,delayLeave:S}=E,x=()=>U(_,T);S?S(h.el,T,x):x()}else T()},dt=(h,f)=>{let _;for(;h!==f;)_=p(h),n(h),h=_;n(f)},ps=(h,f,_)=>{({}).NODE_ENV!=="production"&&h.type.__hmrId&&Jl(h);const{bum:P,scope:E,update:T,subTree:U,um:S}=h;P&&ys(P),E.stop(),T&&(T.active=!1,be(U,h,f,_)),S&&Be(S,f),Be(()=>{h.isUnmounted=!0},f),f&&f.pendingBranch&&!f.isUnmounted&&h.asyncDep&&!h.asyncResolved&&h.suspenseId===f.pendingId&&(f.deps--,f.deps===0&&f.resolve()),{}.NODE_ENV!=="production"&&nc(h)},Ge=(h,f,_,P=!1,E=!1,T=0)=>{for(let U=T;U<h.length;U++)be(h[U],f,_,P,E)},ht=h=>h.shapeFlag&6?ht(h.component.subTree):h.shapeFlag&128?h.suspense.next():p(h.anchor||h.el),Ue=(h,f,_)=>{h==null?f._vnode&&be(f._vnode,null,null,!0):I(f._vnode||null,h,f,null,null,null,_),co(),uo(),f._vnode=h},ze={p:I,um:be,m:de,r:nt,mt:k,mc:te,pc:F,pbc:le,n:ht,o:e};let ms,Gt;return t&&([ms,Gt]=t(ze)),{render:Ue,hydrate:ms,createApp:qc(Ue,ms)}}function ls({effect:e,update:t},s){e.allowRecurse=t.allowRecurse=s}function Zr(e,t,s=!1){const r=e.children,n=t.children;if(G(r)&&G(n))for(let i=0;i<r.length;i++){const o=r[i];let a=n[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=n[i]=Zt(n[i]),a.el=o.el),s||Zr(o,a)),a.type===Js&&(a.el=o.el),{}.NODE_ENV!=="production"&&a.type===Je&&!a.el&&(a.el=o.el)}}function ru(e){const t=e.slice(),s=[0];let r,n,i,o,a;const l=e.length;for(r=0;r<l;r++){const c=e[r];if(c!==0){if(n=s[s.length-1],e[n]<c){t[r]=n,s.push(r);continue}for(i=0,o=s.length-1;i<o;)a=i+o>>1,e[s[a]]<c?i=a+1:o=a;c<e[s[i]]&&(i>0&&(t[r]=s[i-1]),s[i]=r)}}for(i=s.length,o=s[i-1];i-- >0;)s[i]=o,o=t[o];return s}const nu=e=>e.__isTeleport,Se=Symbol({}.NODE_ENV!=="production"?"Fragment":void 0),Js=Symbol({}.NODE_ENV!=="production"?"Text":void 0),Je=Symbol({}.NODE_ENV!=="production"?"Comment":void 0),Qs=Symbol({}.NODE_ENV!=="production"?"Static":void 0),qs=[];let ct=null;function z(e=!1){qs.push(ct=e?null:[])}function iu(){qs.pop(),ct=qs[qs.length-1]||null}let er=1;function Wo(e){er+=e}function Yo(e){return e.dynamicChildren=er>0?ct||gs:null,iu(),er>0&&ct&&ct.push(e),e}function ee(e,t,s,r,n,i){return Yo(C(e,t,s,r,n,i,!0))}function cs(e,t,s,r,n){return Yo(Ce(e,t,s,r,n,!0))}function Wr(e){return e?e.__v_isVNode===!0:!1}function tr(e,t){return{}.NODE_ENV!=="production"&&t.shapeFlag&6&&vs.has(t.type)?(e.shapeFlag&=-257,t.shapeFlag&=-513,!1):e.type===t.type&&e.key===t.key}const ou=(...e)=>zo(...e),Yr="__vInternal",Go=({key:e})=>e??null,Gr=({ref:e,ref_key:t,ref_for:s})=>e!=null?Ie(e)||Me(e)||J(e)?{i:ke,r:e,k:t,f:!!s}:e:null;function C(e,t=null,s=null,r=0,n=null,i=e===Se?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Go(t),ref:t&&Gr(t),scopeId:Rr,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:ke};return a?(Gn(l,s),i&128&&e.normalize(l)):s&&(l.shapeFlag|=Ie(s)?8:16),{}.NODE_ENV!=="production"&&l.key!==l.key&&M("VNode created with invalid key (NaN). VNode type:",l.type),er>0&&!o&&ct&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&ct.push(l),l}const Ce={}.NODE_ENV!=="production"?ou:zo;function zo(e,t=null,s=null,r=0,n=null,i=!1){if((!e||e===No)&&({}.NODE_ENV!=="production"&&!e&&M(`Invalid vnode type when creating vnode: ${e}.`),e=Je),Wr(e)){const a=Kt(e,t,!0);return s&&Gn(a,s),er>0&&!i&&ct&&(a.shapeFlag&6?ct[ct.indexOf(e)]=a:ct.push(a)),a.patchFlag|=-2,a}if(ta(e)&&(e=e.__vccOpts),t){t=au(t);let{class:a,style:l}=t;a&&!Ie(a)&&(t.class=Rs(a)),ae(l)&&(Pn(l)&&!G(l)&&(l=Ne({},l)),t.style=Te(l))}const o=Ie(e)?1:pc(e)?128:nu(e)?64:ae(e)?4:J(e)?2:0;return{}.NODE_ENV!=="production"&&o&4&&Pn(e)&&(e=se(e),M("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
8
|
-
Component that was made reactive: `,e)),C(e,t,s,r,n,o,i,!0)}function au(e){return e?Pn(e)||Yr in e?Ne({},e):e:null}function Kt(e,t,s=!1){const{props:r,ref:n,patchFlag:i,children:o}=e,a=t?cu(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Go(a),ref:t&&t.ref?s&&n?G(n)?n.concat(Gr(t)):[n,Gr(t)]:Gr(t):n,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:{}.NODE_ENV!=="production"&&i===-1&&G(o)?o.map(Xo):o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Se?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Kt(e.ssContent),ssFallback:e.ssFallback&&Kt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Xo(e){const t=Kt(e);return G(e.children)&&(t.children=e.children.map(Xo)),t}function Yn(e=" ",t=0){return Ce(Js,null,e,t)}function lu(e,t){const s=Ce(Qs,null,e);return s.staticCount=t,s}function Ae(e="",t=!1){return t?(z(),cs(Je,null,e)):Ce(Je,null,e)}function ut(e){return e==null||typeof e=="boolean"?Ce(Je):G(e)?Ce(Se,null,e.slice()):typeof e=="object"?Zt(e):Ce(Js,null,String(e))}function Zt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Kt(e)}function Gn(e,t){let s=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(G(t))s=16;else if(typeof t=="object")if(r&65){const n=t.default;n&&(n._c&&(n._d=!1),Gn(e,n()),n._c&&(n._d=!0));return}else{s=32;const n=t._;!n&&!(Yr in t)?t._ctx=ke:n===3&&ke&&(ke.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else J(t)?(t={default:t,_ctx:ke},s=32):(t=String(t),r&64?(s=16,t=[Yn(t)]):s=8);e.children=t,e.shapeFlag|=s}function cu(...e){const t={};for(let s=0;s<e.length;s++){const r=e[s];for(const n in r)if(n==="class")t.class!==r.class&&(t.class=Rs([t.class,r.class]));else if(n==="style")t.style=Te([t.style,r.style]);else if(Ls(n)){const i=t[n],o=r[n];o&&i!==o&&!(G(i)&&i.includes(o))&&(t[n]=i?[].concat(i,o):o)}else n!==""&&(t[n]=r[n])}return t}function _t(e,t,s,r=null){ot(e,t,7,[s,r])}const uu=Zo();let du=0;function hu(e,t,s){const r=e.type,n=(t?t.appContext:e.appContext)||uu,i={uid:du++,vnode:e,type:r,parent:t,appContext:n,root:null,next:null,subTree:null,effect:null,update:null,scope:new nl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(n.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:xo(r,n),emitsOptions:_o(r,n),emit:null,emitted:null,propsDefaults:he,inheritAttrs:r.inheritAttrs,ctx:he,data:he,props:he,attrs:he,slots:he,refs:he,setupState:he,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return{}.NODE_ENV!=="production"?i.ctx=kc(i):i.ctx={_:i},i.root=t?t.root:i,i.emit=lc.bind(null,i),e.ce&&e.ce(i),i}let Ee=null;const fu=()=>Ee||ke,Ps=e=>{Ee=e,e.scope.on()},us=()=>{Ee&&Ee.scope.off(),Ee=null},pu=xe("slot,component");function zn(e,t){const s=t.isNativeTag||wi;(pu(e)||s(e))&&M("Do not use built-in or reserved HTML elements as component id: "+e)}function Bo(e){return e.vnode.shapeFlag&4}let sr=!1;function mu(e,t=!1){sr=t;const{props:s,children:r}=e.vnode,n=Bo(e);$c(e,s,n,t),Bc(e,r);const i=n?gu(e,t):void 0;return sr=!1,i}function gu(e,t){var s;const r=e.type;if({}.NODE_ENV!=="production"){if(r.name&&zn(r.name,e.appContext.config),r.components){const i=Object.keys(r.components);for(let o=0;o<i.length;o++)zn(i[o],e.appContext.config)}if(r.directives){const i=Object.keys(r.directives);for(let o=0;o<i.length;o++)Ao(i[o])}r.compilerOptions&&yu()&&M('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=eo(new Proxy(e.ctx,Do)),{}.NODE_ENV!=="production"&&Oc(e);const{setup:n}=r;if(n){const i=e.setupContext=n.length>1?ea(e):null;Ps(e),Qt();const o=Ct(n,e,0,[{}.NODE_ENV!=="production"?bs(e.props):e.props,i]);if(qt(),us(),hn(o)){if(o.then(us,us),t)return o.then(a=>{Jo(e,a,t)}).catch(a=>{kr(a,e,0)});if(e.asyncDep=o,{}.NODE_ENV!=="production"&&!e.suspense){const a=(s=r.name)!==null&&s!==void 0?s:"Anonymous";M(`Component <${a}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else Jo(e,o,t)}else Qo(e,t)}function Jo(e,t,s){J(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ae(t)?({}.NODE_ENV!=="production"&&Wr(t)&&M("setup() should not return VNodes directly - return a render function instead."),{}.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=ro(t),{}.NODE_ENV!=="production"&&xc(e)):{}.NODE_ENV!=="production"&&t!==void 0&&M(`setup() should return an object. Received: ${t===null?"null":typeof t}`),Qo(e,s)}let Xn;const yu=()=>!Xn;function Qo(e,t,s){const r=e.type;if(!e.render){if(!t&&Xn&&!r.render){const n=r.template||jn(e).template;if(n){({}).NODE_ENV!=="production"&&wt(e,"compile");const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,c=Ne(Ne({isCustomElement:i,delimiters:a},o),l);r.render=Xn(n,c),{}.NODE_ENV!=="production"&&Dt(e,"compile")}}e.render=r.render||Le}Ps(e),Qt(),Lc(e),qt(),us(),{}.NODE_ENV!=="production"&&!r.render&&e.render===Le&&!t&&(r.template?M('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):M("Component is missing template or render function."))}function qo(e){return new Proxy(e.attrs,{}.NODE_ENV!=="production"?{get(t,s){return Ur(),$e(e,"get","$attrs"),t[s]},set(){return M("setupContext.attrs is readonly."),!1},deleteProperty(){return M("setupContext.attrs is readonly."),!1}}:{get(t,s){return $e(e,"get","$attrs"),t[s]}})}function ea(e){const t=r=>{if({}.NODE_ENV!=="production"&&(e.exposed&&M("expose() should be called only once per setup()."),r!=null)){let n=typeof r;n==="object"&&(G(r)?n="array":Me(r)&&(n="ref")),n!=="object"&&M(`expose() should be passed a plain object, received ${n}.`)}e.exposed=r||{}};let s;return{}.NODE_ENV!=="production"?Object.freeze({get attrs(){return s||(s=qo(e))},get slots(){return bs(e.slots)},get emit(){return(r,...n)=>e.emit(r,...n)},expose:t}):{get attrs(){return s||(s=qo(e))},slots:e.slots,emit:e.emit,expose:t}}function zr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(ro(eo(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in os)return os[s](e)},has(t,s){return s in t||s in os}}))}const _u=/(?:^|[-_])(\w)/g,bu=e=>e.replace(_u,t=>t.toUpperCase()).replace(/[-_]/g,"");function Bn(e,t=!0){return J(e)?e.displayName||e.name:e.name||t&&e.__name}function Xr(e,t,s=!1){let r=Bn(t);if(!r&&t.__file){const n=t.__file.match(/([^/\\]+)\.\w+$/);n&&(r=n[1])}if(!r&&e&&e.parent){const n=i=>{for(const o in i)if(i[o]===t)return o};r=n(e.components||e.parent.type.components)||n(e.appContext.components)}return r?bu(r):s?"App":"Anonymous"}function ta(e){return J(e)&&"__vccOpts"in e}const bt=(e,t)=>Fl(e,t,sr);function Iu(){return vu().slots}function vu(){const e=fu();return{}.NODE_ENV!=="production"&&!e&&M("useContext() called without active instance."),e.setupContext||(e.setupContext=ea(e))}const Eu=Symbol({}.NODE_ENV!=="production"?"ssrContext":""),Pu=()=>{{const e=Vr(Eu);return e||{}.NODE_ENV!=="production"&&M("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Jn(e){return!!(e&&e.__v_isShallow)}function Cu(){if({}.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#0b1bc9"},s={style:"color:#b62e24"},r={style:"color:#9d288c"},n={header(u){return ae(u)?u.__isVue?["div",e,"VueInstance"]:Me(u)?["div",{},["span",e,d(u)],"<",a(u.value),">"]:es(u)?["div",{},["span",e,Jn(u)?"ShallowReactive":"Reactive"],"<",a(u),`>${Ft(u)?" (readonly)":""}`]:Ft(u)?["div",{},["span",e,Jn(u)?"ShallowReadonly":"Readonly"],"<",a(u),">"]:null:null},hasBody(u){return u&&u.__isVue},body(u){if(u&&u.__isVue)return["div",{},...i(u.$)]}};function i(u){const p=[];u.type.props&&u.props&&p.push(o("props",se(u.props))),u.setupState!==he&&p.push(o("setup",u.setupState)),u.data!==he&&p.push(o("data",se(u.data)));const y=l(u,"computed");y&&p.push(o("computed",y));const m=l(u,"inject");return m&&p.push(o("injected",m)),p.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:u}]]),p}function o(u,p){return p=Ne({},p),Object.keys(p).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},u],["div",{style:"padding-left:1.25em"},...Object.keys(p).map(y=>["div",{},["span",r,y+": "],a(p[y],!1)])]]:["span",{}]}function a(u,p=!0){return typeof u=="number"?["span",t,u]:typeof u=="string"?["span",s,JSON.stringify(u)]:typeof u=="boolean"?["span",r,u]:ae(u)?["object",{object:p?se(u):u}]:["span",s,String(u)]}function l(u,p){const y=u.type;if(J(y))return;const m={};for(const I in u.ctx)c(y,I,p)&&(m[I]=u.ctx[I]);return m}function c(u,p,y){const m=u[y];if(G(m)&&m.includes(p)||ae(m)&&p in m||u.extends&&c(u.extends,p,y)||u.mixins&&u.mixins.some(I=>c(I,p,y)))return!0}function d(u){return Jn(u)?"ShallowRef":u.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(n):window.devtoolsFormatters=[n]}const sa="3.2.47",Au="http://www.w3.org/2000/svg",ds=typeof document<"u"?document:null,ra=ds&&ds.createElement("template"),Nu={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,r)=>{const n=t?ds.createElementNS(Au,e):ds.createElement(e,s?{is:s}:void 0);return e==="select"&&r&&r.multiple!=null&&n.setAttribute("multiple",r.multiple),n},createText:e=>ds.createTextNode(e),createComment:e=>ds.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ds.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,r,n,i){const o=s?s.previousSibling:t.lastChild;if(n&&(n===i||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),s),!(n===i||!(n=n.nextSibling)););else{ra.innerHTML=r?`<svg>${e}</svg>`:e;const a=ra.content;if(r){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}};function Su(e,t,s){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}function wu(e,t,s){const r=e.style,n=Ie(s);if(s&&!n){if(t&&!Ie(t))for(const i in t)s[i]==null&&Qn(r,i,"");for(const i in s)Qn(r,i,s[i])}else{const i=r.display;n?t!==s&&(r.cssText=s):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=i)}}const Du=/[^\\];\s*$/,na=/\s*!important$/;function Qn(e,t,s){if(G(s))s.forEach(r=>Qn(e,t,r));else if(s==null&&(s=""),{}.NODE_ENV!=="production"&&Du.test(s)&&M(`Unexpected semicolon at the end of '${t}' style value: '${s}'`),t.startsWith("--"))e.setProperty(t,s);else{const r=Tu(e,t);na.test(s)?e.setProperty(Rt(r),s.replace(na,""),"important"):e[r]=s}}const ia=["Webkit","Moz","ms"],qn={};function Tu(e,t){const s=qn[t];if(s)return s;let r=pt(t);if(r!=="filter"&&r in e)return qn[t]=r;r=Xt(r);for(let n=0;n<ia.length;n++){const i=ia[n]+r;if(i in e)return qn[t]=i}return t}const oa="http://www.w3.org/1999/xlink";function Mu(e,t,s,r,n){if(r&&t.startsWith("xlink:"))s==null?e.removeAttributeNS(oa,t.slice(6,t.length)):e.setAttributeNS(oa,t,s);else{const i=Ba(t);s==null||i&&!Ni(s)?e.removeAttribute(t):e.setAttribute(t,i?"":s)}}function ku(e,t,s,r,n,i,o){if(t==="innerHTML"||t==="textContent"){r&&o(r,n,i),e[t]=s??"";return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=s;const l=s??"";(e.value!==l||e.tagName==="OPTION")&&(e.value=l),s==null&&e.removeAttribute(t);return}let a=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=Ni(s):s==null&&l==="string"?(s="",a=!0):l==="number"&&(s=0,a=!0)}try{e[t]=s}catch(l){({}).NODE_ENV!=="production"&&!a&&M(`Failed setting prop "${t}" on <${e.tagName.toLowerCase()}>: value ${s} is invalid.`,l)}a&&e.removeAttribute(t)}function hs(e,t,s,r){e.addEventListener(t,s,r)}function Ou(e,t,s,r){e.removeEventListener(t,s,r)}function xu(e,t,s,r,n=null){const i=e._vei||(e._vei={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=Ru(t);if(r){const c=i[t]=Vu(r,n);hs(e,a,c,l)}else o&&(Ou(e,a,o,l),i[t]=void 0)}}const aa=/(?:Once|Passive|Capture)$/;function Ru(e){let t;if(aa.test(e)){t={};let r;for(;r=e.match(aa);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Rt(e.slice(2)),t]}let ei=0;const Lu=Promise.resolve(),Uu=()=>ei||(Lu.then(()=>ei=0),ei=Date.now());function Vu(e,t){const s=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=s.attached)return;ot(Fu(r,s.value),t,5,[r])};return s.value=e,s.attached=Uu(),s}function Fu(e,t){if(G(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(r=>n=>!n._stopped&&r&&r(n))}else return t}const la=/^on[a-z]/,ju=(e,t,s,r,n=!1,i,o,a,l)=>{t==="class"?Su(e,r,n):t==="style"?wu(e,s,r):Ls(t)?pr(t)||xu(e,t,s,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$u(e,t,r,n))?ku(e,t,r,i,o,a,l):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Mu(e,t,r,n))};function $u(e,t,s,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&la.test(t)&&J(s)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||la.test(t)&&Ie(s)?!1:t in e}const Br=e=>{const t=e.props["onUpdate:modelValue"]||!1;return G(t)?s=>ys(t,s):t};function Hu(e){e.target.composing=!0}function ca(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Jr={created(e,{modifiers:{lazy:t,trim:s,number:r}},n){e._assign=Br(n);const i=r||n.props&&n.props.type==="number";hs(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;s&&(a=a.trim()),i&&(a=br(a)),e._assign(a)}),s&&hs(e,"change",()=>{e.value=e.value.trim()}),t||(hs(e,"compositionstart",Hu),hs(e,"compositionend",ca),hs(e,"change",ca))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:s,trim:r,number:n}},i){if(e._assign=Br(i),e.composing||document.activeElement===e&&e.type!=="range"&&(s||r&&e.value.trim()===t||(n||e.type==="number")&&br(e.value)===t))return;const o=t??"";e.value!==o&&(e.value=o)}},Ku={deep:!0,created(e,{value:t,modifiers:{number:s}},r){const n=mr(t);hs(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>s?br(Qr(o)):Qr(o));e._assign(e.multiple?n?new Set(i):i:i[0])}),e._assign=Br(r)},mounted(e,{value:t}){ua(e,t)},beforeUpdate(e,t,s){e._assign=Br(s)},updated(e,{value:t}){ua(e,t)}};function ua(e,t){const s=e.multiple;if(s&&!G(t)&&!mr(t)){({}).NODE_ENV!=="production"&&M(`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(t).slice(8,-1)}.`);return}for(let r=0,n=e.options.length;r<n;r++){const i=e.options[r],o=Qr(i);if(s)G(t)?i.selected=Qa(t,o)>-1:i.selected=t.has(o);else if(fr(Qr(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}function Qr(e){return"_value"in e?e._value:e.value}const Zu=["ctrl","shift","alt","meta"],Wu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Zu.some(s=>e[`${s}Key`]&&!t.includes(s))},ti=(e,t)=>(s,...r)=>{for(let n=0;n<t.length;n++){const i=Wu[t[n]];if(i&&i(s,t))return}return e(s,...r)},Cs={beforeMount(e,{value:t},{transition:s}){e._vod=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):rr(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:r}){!t!=!s&&(r?t?(r.beforeEnter(e),rr(e,!0),r.enter(e)):r.leave(e,()=>{rr(e,!1)}):rr(e,t))},beforeUnmount(e,{value:t}){rr(e,t)}};function rr(e,t){e.style.display=t?e._vod:"none"}const Yu=Ne({patchProp:ju},Nu);let da;function Gu(){return da||(da=tu(Yu))}const ha=(...e)=>{Gu().render(...e)};function zu(){Cu()}({}).NODE_ENV!=="production"&&zu();function Ke(e){let t;const s=()=>{ha(null,e.el),t=void 0},r={},n=Object.keys(e.on||{}).reduce((o,a)=>{const l=a.charAt(0).toUpperCase()+a.slice(1);return o[`on${l}`]=e.on[a],o},r)||{};n.onClose||(n.onClose=()=>s());const i={...e.props,...n,onVnodeUnmounted:()=>{},onVnodeMounted:()=>{}};return t=Ce(e.component,i),ha(t,e.el),{vnode:t,destroy:s}}const Xu={baseUrl:"",cssUrl:"",redirectUrl:"",url:"",apiUrl:""},Bu={baseUrl:"https://assets.payfurl.com",cssUrl:"https://assets.payfurl.com/v4.5.9/js/",url:"https://assets.payfurl.com/v4.5.9/iframe/index.html",redirectUrl:"https://assets.payfurl.com/v4.5.9/checkout/redirect.html",apiUrl:"https://develop-api.payfurl.com"},Ju={baseUrl:"https://assets.payfurl.com",cssUrl:"https://assets.payfurl.com/v4.5.9/js/",url:"https://assets.payfurl.com/v4.5.9/iframe/index.html",redirectUrl:"https://assets.payfurl.com/v4.5.9/checkout/redirect.html",apiUrl:"https://sandbox-api.payfurl.com"},Qu={baseUrl:"https://assets.payfurl.com",cssUrl:"https://assets.payfurl.com/v4.5.9/js/",url:"https://assets.payfurl.com/v4.5.9/iframe/index.html",redirectUrl:"https://assets.payfurl.com/v4.5.9/checkout/redirect.html",apiUrl:"https://api.payfurl.com"};var Qe;(function(e){e.LOCAL="local",e.DEVELOPMENT="development",e.SANDBOX="sandbox",e.PRODUCTION="production"})(Qe||(Qe={}));const qu={[Qe.LOCAL]:Xu,[Qe.DEVELOPMENT]:Bu,[Qe.SANDBOX]:Ju,[Qe.PRODUCTION]:Qu};function fa(e){return qu[e]}var ed=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function td(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pa={exports:{}};(function(e,t){(function(s,r){e.exports=r()})(ed,function(){var s=1e3,r=6e4,n=36e5,i="millisecond",o="second",a="minute",l="hour",c="day",d="week",u="month",p="quarter",y="year",m="date",I="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(O){var L=["th","st","nd","rd"],k=O%100;return"["+O+(L[(k-20)%10]||L[k]||L[0])+"]"}},R=function(O,L,k){var H=String(O);return!H||H.length>=L?O:""+Array(L+1-H.length).join(k)+O},V={s:R,z:function(O){var L=-O.utcOffset(),k=Math.abs(L),H=Math.floor(k/60),v=k%60;return(L<=0?"+":"-")+R(H,2,"0")+":"+R(v,2,"0")},m:function O(L,k){if(L.date()<k.date())return-O(k,L);var H=12*(k.year()-L.year())+(k.month()-L.month()),v=L.clone().add(H,u),w=k-v<0,F=L.clone().add(H+(w?-1:1),u);return+(-(H+(k-v)/(w?v-F:F-v))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:u,y,w:d,d:c,D:m,h:l,m:a,s:o,ms:i,Q:p}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},D="en",q={};q[D]=b;var ie=function(O){return O instanceof le},ue=function O(L,k,H){var v;if(!L)return D;if(typeof L=="string"){var w=L.toLowerCase();q[w]&&(v=w),k&&(q[w]=k,v=w);var F=L.split("-");if(!v&&F.length>1)return O(F[0])}else{var re=L.name;q[re]=L,v=re}return!H&&v&&(D=v),v||!H&&D},te=function(O,L){if(ie(O))return O.clone();var k=typeof L=="object"?L:{};return k.date=O,k.args=arguments,new le(k)},W=V;W.l=ue,W.i=ie,W.w=function(O,L){return te(O,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var le=function(){function O(k){this.$L=ue(k.locale,null,!0),this.parse(k)}var L=O.prototype;return L.parse=function(k){this.$d=function(H){var v=H.date,w=H.utc;if(v===null)return new Date(NaN);if(W.u(v))return new Date;if(v instanceof Date)return new Date(v);if(typeof v=="string"&&!/Z$/i.test(v)){var F=v.match(N);if(F){var re=F[2]-1||0,ge=(F[7]||"0").substring(0,3);return w?new Date(Date.UTC(F[1],re,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ge)):new Date(F[1],re,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ge)}}return new Date(v)}(k),this.$x=k.x||{},this.init()},L.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},L.$utils=function(){return W},L.isValid=function(){return this.$d.toString()!==I},L.isSame=function(k,H){var v=te(k);return this.startOf(H)<=v&&v<=this.endOf(H)},L.isAfter=function(k,H){return te(k)<this.startOf(H)},L.isBefore=function(k,H){return this.endOf(H)<te(k)},L.$g=function(k,H,v){return W.u(k)?this[H]:this.set(v,k)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(k,H){var v=this,w=!!W.u(H)||H,F=W.p(k),re=function(ht,Ue){var ze=W.w(v.$u?Date.UTC(v.$y,Ue,ht):new Date(v.$y,Ue,ht),v);return w?ze:ze.endOf(c)},ge=function(ht,Ue){return W.w(v.toDate()[ht].apply(v.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(Ue)),v)},de=this.$W,be=this.$M,nt=this.$D,dt="set"+(this.$u?"UTC":"");switch(F){case y:return w?re(1,0):re(31,11);case u:return w?re(1,be):re(0,be+1);case d:var ps=this.$locale().weekStart||0,Ge=(de<ps?de+7:de)-ps;return re(w?nt-Ge:nt+(6-Ge),be);case c:case m:return ge(dt+"Hours",0);case l:return ge(dt+"Minutes",1);case a:return ge(dt+"Seconds",2);case o:return ge(dt+"Milliseconds",3);default:return this.clone()}},L.endOf=function(k){return this.startOf(k,!1)},L.$set=function(k,H){var v,w=W.p(k),F="set"+(this.$u?"UTC":""),re=(v={},v[c]=F+"Date",v[m]=F+"Date",v[u]=F+"Month",v[y]=F+"FullYear",v[l]=F+"Hours",v[a]=F+"Minutes",v[o]=F+"Seconds",v[i]=F+"Milliseconds",v)[w],ge=w===c?this.$D+(H-this.$W):H;if(w===u||w===y){var de=this.clone().set(m,1);de.$d[re](ge),de.init(),this.$d=de.set(m,Math.min(this.$D,de.daysInMonth())).$d}else re&&this.$d[re](ge);return this.init(),this},L.set=function(k,H){return this.clone().$set(k,H)},L.get=function(k){return this[W.p(k)]()},L.add=function(k,H){var v,w=this;k=Number(k);var F=W.p(H),re=function(be){var nt=te(w);return W.w(nt.date(nt.date()+Math.round(be*k)),w)};if(F===u)return this.set(u,this.$M+k);if(F===y)return this.set(y,this.$y+k);if(F===c)return re(1);if(F===d)return re(7);var ge=(v={},v[a]=r,v[l]=n,v[o]=s,v)[F]||1,de=this.$d.getTime()+k*ge;return W.w(de,this)},L.subtract=function(k,H){return this.add(-1*k,H)},L.format=function(k){var H=this,v=this.$locale();if(!this.isValid())return v.invalidDate||I;var w=k||"YYYY-MM-DDTHH:mm:ssZ",F=W.z(this),re=this.$H,ge=this.$m,de=this.$M,be=v.weekdays,nt=v.months,dt=function(Ue,ze,ms,Gt){return Ue&&(Ue[ze]||Ue(H,w))||ms[ze].slice(0,Gt)},ps=function(Ue){return W.s(re%12||12,Ue,"0")},Ge=v.meridiem||function(Ue,ze,ms){var Gt=Ue<12?"AM":"PM";return ms?Gt.toLowerCase():Gt},ht={YY:String(this.$y).slice(-2),YYYY:this.$y,M:de+1,MM:W.s(de+1,2,"0"),MMM:dt(v.monthsShort,de,nt,3),MMMM:dt(nt,de),D:this.$D,DD:W.s(this.$D,2,"0"),d:String(this.$W),dd:dt(v.weekdaysMin,this.$W,be,2),ddd:dt(v.weekdaysShort,this.$W,be,3),dddd:be[this.$W],H:String(re),HH:W.s(re,2,"0"),h:ps(1),hh:ps(2),a:Ge(re,ge,!0),A:Ge(re,ge,!1),m:String(ge),mm:W.s(ge,2,"0"),s:String(this.$s),ss:W.s(this.$s,2,"0"),SSS:W.s(this.$ms,3,"0"),Z:F};return w.replace($,function(Ue,ze){return ze||ht[Ue]||F.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(k,H,v){var w,F=W.p(H),re=te(k),ge=(re.utcOffset()-this.utcOffset())*r,de=this-re,be=W.m(this,re);return be=(w={},w[y]=be/12,w[u]=be,w[p]=be/3,w[d]=(de-ge)/6048e5,w[c]=(de-ge)/864e5,w[l]=de/n,w[a]=de/r,w[o]=de/s,w)[F]||de,v?be:W.a(be)},L.daysInMonth=function(){return this.endOf(u).$D},L.$locale=function(){return q[this.$L]},L.locale=function(k,H){if(!k)return this.$L;var v=this.clone(),w=ue(k,H,!0);return w&&(v.$L=w),v},L.clone=function(){return W.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},O}(),_e=le.prototype;return te.prototype=_e,[["$ms",i],["$s",o],["$m",a],["$H",l],["$W",c],["$M",u],["$y",y],["$D",m]].forEach(function(O){_e[O[1]]=function(L){return this.$g(L,O[0],O[1])}}),te.extend=function(O,L){return O.$i||(O(L,le,te),O.$i=!0),te},te.locale=ue,te.isDayjs=ie,te.unix=function(O){return te(1e3*O)},te.en=q[D],te.Ls=q,te.p={},te})})(pa);var sd=pa.exports;const ma=td(sd);function rd(e){return e=e.replace(/ /g,"").trim(),e.search(/^\d{14,16}$/i)===-1?!1:nd(e)}function nd(e){let t=0,s=!1;for(let r=e.length-1;r>=0;r--){let n=e.charAt(r),i=parseInt(n,10);s&&(i*=2)>9&&(i-=9),t+=i,s=!s}return t%10===0}function id(e){if(e.search(/^\d{2}\/\d{2}$/i)===-1)return!1;const t=e.split("/"),s=parseInt(t[0],10),r=parseInt(t[1],10);if(s<0||s>12)return!1;const n="20"+r.toString()+"-"+s.toString()+"-01",i=ma(n,"YYYY-MM-DD");return!(ma().startOf("month").diff(i,"days")>0)}function ga(e){return e.slice().replaceAll(/[^0-9]/g,"")}function od(e){let t=ga(e);return t.length>9&&(t=t.slice(t.length-9)),"0"+t}function qr(e){const t=ga(e);return t.search(/^0[0-9]{9}$/)>-1||t.search(/^61[0-9]{9}$/)>-1||e.startsWith("+")&&t.search(/^[0-9]{11}$/)>-1}function nr(e){return e.search(/^\w+([+.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/)>-1}function ad(e){return e.search(/^\d{3,4}$/i)>-1}function Fe(e){return e?Array.isArray(e)?e.length>0:typeof e=="object"?Object.keys(e).length>0:!!e:!1}function st(e){return!isNaN(parseFloat(e))&&parseFloat(e)>0}function ya(e,t,s,r){t(e)||r&&r({error:s})}function ld(e){const t=[10,1,3,5,7,9,11,13,15,17,19];if(e.length!==11||e.search(/\D/)>-1)return!1;let s=0,r=0;for(let n=0;n<=t.length-1;n++){r=t[n];const i=parseInt(e[n],10)-(n?0:1);s+=r*i}return s%89===0}function cd(e){let t=new RegExp("^4");return e.match(t)?"visa":/^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$/.test(e)?"mastercard":(t=new RegExp("^3[47]"),e.match(t)?"amex":(t=new RegExp("^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)"),e.match(t)?"discover":(t=new RegExp("^36"),e.match(t)?"diners":(t=new RegExp("^30[0-5]"),e.match(t)?"diners - carte blanche":(t=new RegExp("^35(2[89]|[3-8][0-9])"),e.match(t)?"jcb":(t=new RegExp("^(4026|417500|4508|4844|491(3|7))"),e.match(t)?"visa electron":""))))))}const ud=ve({__name:"PaypalIcon",props:{size:null,grayscale:{type:Boolean}},setup(e){const t=e,s=t.grayscale?"#2A2A2B":"#253b80",r=t.grayscale?"#555557":"#179bd7",n=t.grayscale?"#000000":"#222d65",i=`--size: ${t.size}px`;return(o,a)=>(z(),ee("svg",{id:"paypal",style:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25.576353 30.177"},[C("path",{d:"m 7.2659888,29.154 0.523,-3.322 -1.165,-0.027 -5.563,0 3.866,-24.513 c 0.012,-0.074 0.051,-0.143 0.108,-0.192 0.057,-0.049 0.13,-0.076 0.206,-0.076 l 9.3800002,0 c 3.114,0 5.263,0.648 6.385,1.927 0.526,0.6 0.861,1.227 1.023,1.917 0.17,0.724 0.173,1.589 0.007,2.644 l -0.012,0.077 0,0.676 0.526,0.298 c 0.443,0.235 0.795,0.504 1.065,0.812 0.45,0.513 0.741,1.165 0.864,1.938 0.127,0.795 0.085,1.741 -0.123,2.812 -0.24,1.232 -0.628,2.305 -1.152,3.183 -0.482,0.809 -1.096,1.48 -1.825,2 -0.696,0.494 -1.523,0.869 -2.458,1.109 -0.906,0.236 -1.939,0.355 -3.072,0.355 l -0.73,0 c -0.522,0 -1.029,0.188 -1.427,0.525 -0.399,0.344 -0.663,0.814 -0.744,1.328 l -0.055,0.299 -0.924,5.855 -0.042,0.215 c -0.011,0.068 -0.03,0.102 -0.058,0.125 -0.025,0.021 -0.061,0.035 -0.096,0.035 l -4.5070002,0 z",style:Te(`fill: ${ce(s)}`)},null,4),C("path",{d:"m 23.047989,7.667 0,0 0,0 c -0.028,0.179 -0.06,0.362 -0.096,0.55 -1.237,6.351 -5.469,8.545 -10.874,8.545 l -2.7520002,0 c -0.661,0 -1.218,0.48 -1.321,1.132 l 0,0 0,0 -1.409,8.936 -0.399,2.533 c -0.067,0.428 0.263,0.814 0.695,0.814 l 4.8810002,0 c 0.578,0 1.069,-0.42 1.16,-0.99 l 0.048,-0.248 0.919,-5.832 0.059,-0.32 c 0.09,-0.572 0.582,-0.992 1.16,-0.992 l 0.73,0 c 4.729,0 8.431,-1.92 9.513,-7.476 0.452,-2.321 0.218,-4.259 -0.978,-5.622 -0.362,-0.411 -0.811,-0.752 -1.336,-1.03 z",style:Te(`fill: ${ce(r)}`)},null,4),C("path",{d:"m 21.753989,7.151 c -0.189,-0.055 -0.384,-0.105 -0.584,-0.15 -0.201,-0.044 -0.407,-0.083 -0.619,-0.117 -0.742,-0.12 -1.555,-0.177 -2.426,-0.177 l -7.352,0 c -0.181,0 -0.353,0.041 -0.507,0.115 C 9.9269888,6.985 9.6749888,7.306 9.6139888,7.699 l -1.564,9.906 -0.045,0.289 c 0.103,-0.652 0.66,-1.132 1.321,-1.132 l 2.7520002,0 c 5.405,0 9.637,-2.195 10.874,-8.545 0.037,-0.188 0.068,-0.371 0.096,-0.55 -0.313,-0.166 -0.652,-0.308 -1.017,-0.429 -0.09,-0.03 -0.183,-0.059 -0.277,-0.087 z",style:Te(`fill: ${ce(n)}`)},null,4),C("path",{d:"m 9.6139888,7.699 c 0.061,-0.393 0.313,-0.714 0.6520002,-0.876 0.155,-0.074 0.326,-0.115 0.507,-0.115 l 7.352,0 c 0.871,0 1.684,0.057 2.426,0.177 0.212,0.034 0.418,0.073 0.619,0.117 0.2,0.045 0.395,0.095 0.584,0.15 0.094,0.028 0.187,0.057 0.278,0.086 0.365,0.121 0.704,0.264 1.017,0.429 0.368,-2.347 -0.003,-3.945 -1.272,-5.392 C 20.377989,0.682 17.852989,0 14.621989,0 L 5.2419888,0 c -0.66,0 -1.223,0.48 -1.325,1.133 L 0.00998882,25.898 c -0.077,0.49 0.301,0.932 0.795,0.932 l 5.79099998,0 1.454,-9.225 1.564,-9.906 z",style:Te(`fill: ${ce(s)}`)},null,4)]))}}),Kp="",we=(e,t)=>{const s=e.__vccOpts||e;for(const[r,n]of t)s[r]=n;return s},dd=we(ud,[["__scopeId","data-v-2b840669"]]),_a=e=>(At("data-v-6a1e8b23"),e=e(),Nt(),e),hd=[_a(()=>C("path",{d:"M1188.420307 68.911452c16.92562 0 32.642267 14.507674 32.642267 32.642267v822.101535c0 16.92562-14.507674 32.642267-32.642267 32.642267h-1088.075561c-16.92562 0-32.642267-14.507674-32.642267-32.642267v-822.101535c0-16.92562 14.507674-32.642267 32.642267-32.642267h1088.075561m0-68.911452h-1088.075561C44.731995 0 0 45.940968 0 100.344746v822.101535c0 55.612751 44.731995 100.344746 100.344746 100.344746h1088.075561c55.612751 0 100.344746-44.731995 100.344746-100.344746v-822.101535c1.208973-54.403778-44.731995-100.344746-100.344746-100.344746z"},null,-1)),_a(()=>C("path",{d:"M41.105077 252.675325h1221.062574v258.720189H41.105077zM177.719008 778.578512h174.09209v71.329398H177.719008zM432.812279 778.578512h259.929161v71.329398H432.812279z"},null,-1))],fd=ve({__name:"CreditCardIcon",props:{size:null,grayscale:{type:Boolean},color:null},setup(e){const t=e,s=B(t.color);zs(()=>t.color,n=>{s.value=n});const r=bt(()=>`--size: ${t.size}px;fill:${s.value}`);return(n,i)=>(z(),ee("svg",{xmlns:"http://www.w3.org/2000/svg",style:Te([{width:"1.2587890625em",height:"1em","vertical-align":"middle",overflow:"hidden"},ce(r)]),viewBox:"0 0 1289 1024"},hd,4))}}),Yp="",pd=we(fd,[["__scopeId","data-v-6a1e8b23"]]),md=[lu(`<path style="fill:#5F6368;" d="M37.8,19.7V29h-3V6h7.8c1.9,0,3.7,0.7,5.1,2c1.4,1.2,2.1,3,2.1,4.9c0,1.9-0.7,3.6-2.1,4.9c-1.4,1.3-3.1,2-5.1,2
|
|
1
|
+
(function(vt,_e){typeof exports=="object"&&typeof module<"u"?module.exports=_e():typeof define=="function"&&define.amd?define(_e):(vt=typeof globalThis<"u"?globalThis:vt||self,vt.payfurl=_e())})(this,function(){"use strict";var eT=Object.defineProperty;var tT=(vt,_e,wt)=>_e in vt?eT(vt,_e,{enumerable:!0,configurable:!0,writable:!0,value:wt}):vt[_e]=wt;var y=(vt,_e,wt)=>(tT(vt,typeof _e!="symbol"?_e+"":_e,wt),wt);const vt=(e,t)=>{const n=e[t];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((r,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+t)))})};/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */function _e(e,t,n,r){var s=arguments.length,i=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,n,i):o(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i}function wt(e,t){const n=Object.create(null),r=e.split(",");for(let s=0;s<r.length;s++)n[r[s]]=!0;return t?s=>!!n[s.toLowerCase()]:s=>!!n[s]}function _t(e){if(Q(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=Re(r)?ip(r):_t(r);if(s)for(const i in s)t[i]=s[i]}return t}else{if(Re(e))return e;if(Se(e))return e}}const np=/;(?![^(]*\))/g,rp=/:([^]+)/,sp=/\/\*.*?\*\//gs;function ip(e){const t={};return e.replace(sp,"").split(np).forEach(n=>{if(n){const r=n.split(rp);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Yr(e){let t="";if(Re(e))t=e;else if(Q(e))for(let n=0;n<e.length;n++){const r=Yr(e[n]);r&&(t+=r+" ")}else if(Se(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const op=wt("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Uc(e){return!!e||e===""}function ap(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Bs(e[r],t[r]);return n}function Bs(e,t){if(e===t)return!0;let n=jc(e),r=jc(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Xr(e),r=Xr(t),n||r)return e===t;if(n=Q(e),r=Q(t),n||r)return n&&r?ap(e,t):!1;if(n=Se(e),r=Se(t),n||r){if(!n||!r)return!1;const s=Object.keys(e).length,i=Object.keys(t).length;if(s!==i)return!1;for(const o in e){const a=e.hasOwnProperty(o),c=t.hasOwnProperty(o);if(a&&!c||!a&&c||!Bs(e[o],t[o]))return!1}}return String(e)===String(t)}function cp(e,t){return e.findIndex(n=>Bs(n,t))}const Qe=e=>Re(e)?e:e==null?"":Q(e)||Se(e)&&(e.toString===Hc||!ie(e.toString))?JSON.stringify(e,Fc,2):String(e),Fc=(e,t)=>t&&t.__v_isRef?Fc(e,t.value):jn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s])=>(n[`${r} =>`]=s,n),{})}:zs(t)?{[`Set(${t.size})`]:[...t.values()]}:Se(t)&&!Q(t)&&!Vc(t)?String(t):t,Ie={}.NODE_ENV!=="production"?Object.freeze({}):{},gr={}.NODE_ENV!=="production"?Object.freeze([]):[],et=()=>{},$c=()=>!1,lp=/^on[^a-z]/,Zr=e=>lp.test(e),Ws=e=>e.startsWith("onUpdate:"),He=Object.assign,wo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},up=Object.prototype.hasOwnProperty,de=(e,t)=>up.call(e,t),Q=Array.isArray,jn=e=>Jr(e)==="[object Map]",zs=e=>Jr(e)==="[object Set]",jc=e=>Jr(e)==="[object Date]",ie=e=>typeof e=="function",Re=e=>typeof e=="string",Xr=e=>typeof e=="symbol",Se=e=>e!==null&&typeof e=="object",Co=e=>Se(e)&&ie(e.then)&&ie(e.catch),Hc=Object.prototype.toString,Jr=e=>Hc.call(e),To=e=>Jr(e).slice(8,-1),Vc=e=>Jr(e)==="[object Object]",Do=e=>Re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ks=wt(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),dp=wt("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Gs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},hp=/-(\w)/g,Ut=Gs(e=>e.replace(hp,(t,n)=>n?n.toUpperCase():"")),fp=/\B([A-Z])/g,En=Gs(e=>e.replace(fp,"-$1").toLowerCase()),Hn=Gs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Vn=Gs(e=>e?`on${Hn(e)}`:""),qr=(e,t)=>!Object.is(e,t),yr=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Ys=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Zs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Bc;const Wc=()=>Bc||(Bc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Po(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let Dt;class pp{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Dt,!t&&Dt&&(this.index=(Dt.scopes||(Dt.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Dt;try{return Dt=this,t()}finally{Dt=n}}else({}).NODE_ENV!=="production"&&Po("cannot run an inactive effect scope.")}on(){Dt=this}off(){Dt=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0,this._active=!1}}}function mp(e,t=Dt){t&&t.active&&t.effects.push(e)}function gp(){return Dt}const Qr=e=>{const t=new Set(e);return t.w=0,t.n=0,t},zc=e=>(e.w&Sn)>0,Kc=e=>(e.n&Sn)>0,yp=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=Sn},_p=e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const s=t[r];zc(s)&&!Kc(s)?s.delete(e):t[n++]=s,s.w&=~Sn,s.n&=~Sn}t.length=n}},Ao=new WeakMap;let es=0,Sn=1;const ko=30;let it;const Bn=Symbol({}.NODE_ENV!=="production"?"iterate":""),No=Symbol({}.NODE_ENV!=="production"?"Map key iterate":"");class Mo{constructor(t,n=null,r){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,mp(this,r)}run(){if(!this.active)return this.fn();let t=it,n=bn;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=it,it=this,bn=!0,Sn=1<<++es,es<=ko?yp(this):Gc(this),this.fn()}finally{es<=ko&&_p(this),Sn=1<<--es,it=this.parent,bn=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){it===this?this.deferStop=!0:this.active&&(Gc(this),this.onStop&&this.onStop(),this.active=!1)}}function Gc(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let bn=!0;const Yc=[];function Wn(){Yc.push(bn),bn=!1}function zn(){const e=Yc.pop();bn=e===void 0?!0:e}function ot(e,t,n){if(bn&&it){let r=Ao.get(e);r||Ao.set(e,r=new Map);let s=r.get(n);s||r.set(n,s=Qr());const i={}.NODE_ENV!=="production"?{effect:it,target:e,type:t,key:n}:void 0;Oo(s,i)}}function Oo(e,t){let n=!1;es<=ko?Kc(e)||(e.n|=Sn,n=!zc(e)):n=!e.has(it),n&&(e.add(it),it.deps.push(e),{}.NODE_ENV!=="production"&&it.onTrack&&it.onTrack(Object.assign({effect:it},t)))}function en(e,t,n,r,s,i){const o=Ao.get(e);if(!o)return;let a=[];if(t==="clear")a=[...o.values()];else if(n==="length"&&Q(e)){const l=Number(r);o.forEach((d,u)=>{(u==="length"||u>=l)&&a.push(d)})}else switch(n!==void 0&&a.push(o.get(n)),t){case"add":Q(e)?Do(n)&&a.push(o.get("length")):(a.push(o.get(Bn)),jn(e)&&a.push(o.get(No)));break;case"delete":Q(e)||(a.push(o.get(Bn)),jn(e)&&a.push(o.get(No)));break;case"set":jn(e)&&a.push(o.get(Bn));break}const c={}.NODE_ENV!=="production"?{target:e,type:t,key:n,newValue:r,oldValue:s,oldTarget:i}:void 0;if(a.length===1)a[0]&&({}.NODE_ENV!=="production"?_r(a[0],c):_r(a[0]));else{const l=[];for(const d of a)d&&l.push(...d);({}).NODE_ENV!=="production"?_r(Qr(l),c):_r(Qr(l))}}function _r(e,t){const n=Q(e)?e:[...e];for(const r of n)r.computed&&Zc(r,t);for(const r of n)r.computed||Zc(r,t)}function Zc(e,t){(e!==it||e.allowRecurse)&&({}.NODE_ENV!=="production"&&e.onTrigger&&e.onTrigger(He({effect:e},t)),e.scheduler?e.scheduler():e.run())}const Ep=wt("__proto__,__v_isRef,__isVue"),Xc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Xr)),Sp=Xs(),bp=Xs(!1,!0),Ip=Xs(!0),vp=Xs(!0,!0),Jc=wp();function wp(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=ce(this);for(let i=0,o=this.length;i<o;i++)ot(r,"get",i+"");const s=r[t](...n);return s===-1||s===!1?r[t](...n.map(ce)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Wn();const r=ce(this)[t].apply(this,n);return zn(),r}}),e}function Cp(e){const t=ce(this);return ot(t,"has",e),t.hasOwnProperty(e)}function Xs(e=!1,t=!1){return function(r,s,i){if(s==="__v_isReactive")return!e;if(s==="__v_isReadonly")return e;if(s==="__v_isShallow")return t;if(s==="__v_raw"&&i===(e?t?ll:cl:t?al:ol).get(r))return r;const o=Q(r);if(!e){if(o&&de(Jc,s))return Reflect.get(Jc,s,i);if(s==="hasOwnProperty")return Cp}const a=Reflect.get(r,s,i);return(Xr(s)?Xc.has(s):Ep(s))||(e||ot(r,"get",s),t)?a:Ke(a)?o&&Do(s)?a:a.value:Se(a)?e?ul(a):xo(a):a}}const Tp=qc(),Dp=qc(!0);function qc(e=!1){return function(n,r,s,i){let o=n[r];if(vn(o)&&Ke(o)&&!Ke(s))return!1;if(!e&&(!ii(s)&&!vn(s)&&(o=ce(o),s=ce(s)),!Q(n)&&Ke(o)&&!Ke(s)))return o.value=s,!0;const a=Q(n)&&Do(r)?Number(r)<n.length:de(n,r),c=Reflect.set(n,r,s,i);return n===ce(i)&&(a?qr(s,o)&&en(n,"set",r,s,o):en(n,"add",r,s)),c}}function Pp(e,t){const n=de(e,t),r=e[t],s=Reflect.deleteProperty(e,t);return s&&n&&en(e,"delete",t,void 0,r),s}function Ap(e,t){const n=Reflect.has(e,t);return(!Xr(t)||!Xc.has(t))&&ot(e,"has",t),n}function kp(e){return ot(e,"iterate",Q(e)?"length":Bn),Reflect.ownKeys(e)}const Qc={get:Sp,set:Tp,deleteProperty:Pp,has:Ap,ownKeys:kp},el={get:Ip,set(e,t){return{}.NODE_ENV!=="production"&&Po(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return{}.NODE_ENV!=="production"&&Po(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},Np=He({},Qc,{get:bp,set:Dp}),Mp=He({},el,{get:vp}),Ro=e=>e,Js=e=>Reflect.getPrototypeOf(e);function qs(e,t,n=!1,r=!1){e=e.__v_raw;const s=ce(e),i=ce(t);n||(t!==i&&ot(s,"get",t),ot(s,"get",i));const{has:o}=Js(s),a=r?Ro:n?Uo:ts;if(o.call(s,t))return a(e.get(t));if(o.call(s,i))return a(e.get(i));e!==s&&e.get(t)}function Qs(e,t=!1){const n=this.__v_raw,r=ce(n),s=ce(e);return t||(e!==s&&ot(r,"has",e),ot(r,"has",s)),e===s?n.has(e):n.has(e)||n.has(s)}function ei(e,t=!1){return e=e.__v_raw,!t&&ot(ce(e),"iterate",Bn),Reflect.get(e,"size",e)}function tl(e){e=ce(e);const t=ce(this);return Js(t).has.call(t,e)||(t.add(e),en(t,"add",e,e)),this}function nl(e,t){t=ce(t);const n=ce(this),{has:r,get:s}=Js(n);let i=r.call(n,e);i?{}.NODE_ENV!=="production"&&il(n,r,e):(e=ce(e),i=r.call(n,e));const o=s.call(n,e);return n.set(e,t),i?qr(t,o)&&en(n,"set",e,t,o):en(n,"add",e,t),this}function rl(e){const t=ce(this),{has:n,get:r}=Js(t);let s=n.call(t,e);s?{}.NODE_ENV!=="production"&&il(t,n,e):(e=ce(e),s=n.call(t,e));const i=r?r.call(t,e):void 0,o=t.delete(e);return s&&en(t,"delete",e,void 0,i),o}function sl(){const e=ce(this),t=e.size!==0,n={}.NODE_ENV!=="production"?jn(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&en(e,"clear",void 0,void 0,n),r}function ti(e,t){return function(r,s){const i=this,o=i.__v_raw,a=ce(o),c=t?Ro:e?Uo:ts;return!e&&ot(a,"iterate",Bn),o.forEach((l,d)=>r.call(s,c(l),c(d),i))}}function ni(e,t,n){return function(...r){const s=this.__v_raw,i=ce(s),o=jn(i),a=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,l=s[e](...r),d=n?Ro:t?Uo:ts;return!t&&ot(i,"iterate",c?No:Bn),{next(){const{value:u,done:h}=l.next();return h?{value:u,done:h}:{value:a?[d(u[0]),d(u[1])]:d(u),done:h}},[Symbol.iterator](){return this}}}}function In(e){return function(...t){if({}.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";console.warn(`${Hn(e)} operation ${n}failed: target is readonly.`,ce(this))}return e==="delete"?!1:this}}function Op(){const e={get(i){return qs(this,i)},get size(){return ei(this)},has:Qs,add:tl,set:nl,delete:rl,clear:sl,forEach:ti(!1,!1)},t={get(i){return qs(this,i,!1,!0)},get size(){return ei(this)},has:Qs,add:tl,set:nl,delete:rl,clear:sl,forEach:ti(!1,!0)},n={get(i){return qs(this,i,!0)},get size(){return ei(this,!0)},has(i){return Qs.call(this,i,!0)},add:In("add"),set:In("set"),delete:In("delete"),clear:In("clear"),forEach:ti(!0,!1)},r={get(i){return qs(this,i,!0,!0)},get size(){return ei(this,!0)},has(i){return Qs.call(this,i,!0)},add:In("add"),set:In("set"),delete:In("delete"),clear:In("clear"),forEach:ti(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=ni(i,!1,!1),n[i]=ni(i,!0,!1),t[i]=ni(i,!1,!0),r[i]=ni(i,!0,!0)}),[e,n,t,r]}const[Rp,xp,Lp,Up]=Op();function ri(e,t){const n=t?e?Up:Lp:e?xp:Rp;return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(de(n,s)&&s in r?n:r,s,i)}const Fp={get:ri(!1,!1)},$p={get:ri(!1,!0)},jp={get:ri(!0,!1)},Hp={get:ri(!0,!0)};function il(e,t,n){const r=ce(n);if(r!==n&&t.call(e,r)){const s=To(e);console.warn(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const ol=new WeakMap,al=new WeakMap,cl=new WeakMap,ll=new WeakMap;function Vp(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Bp(e){return e.__v_skip||!Object.isExtensible(e)?0:Vp(To(e))}function xo(e){return vn(e)?e:si(e,!1,Qc,Fp,ol)}function Wp(e){return si(e,!1,Np,$p,al)}function ul(e){return si(e,!0,el,jp,cl)}function Er(e){return si(e,!0,Mp,Hp,ll)}function si(e,t,n,r,s){if(!Se(e))return{}.NODE_ENV!=="production"&&console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=s.get(e);if(i)return i;const o=Bp(e);if(o===0)return e;const a=new Proxy(e,o===2?r:n);return s.set(e,a),a}function Kn(e){return vn(e)?Kn(e.__v_raw):!!(e&&e.__v_isReactive)}function vn(e){return!!(e&&e.__v_isReadonly)}function ii(e){return!!(e&&e.__v_isShallow)}function Lo(e){return Kn(e)||vn(e)}function ce(e){const t=e&&e.__v_raw;return t?ce(t):e}function dl(e){return Ys(e,"__v_skip",!0),e}const ts=e=>Se(e)?xo(e):e,Uo=e=>Se(e)?ul(e):e;function hl(e){bn&&it&&(e=ce(e),{}.NODE_ENV!=="production"?Oo(e.dep||(e.dep=Qr()),{target:e,type:"get",key:"value"}):Oo(e.dep||(e.dep=Qr())))}function fl(e,t){e=ce(e);const n=e.dep;n&&({}.NODE_ENV!=="production"?_r(n,{target:e,type:"set",key:"value",newValue:t}):_r(n))}function Ke(e){return!!(e&&e.__v_isRef===!0)}function se(e){return zp(e,!1)}function zp(e,t){return Ke(e)?e:new Kp(e,t)}class Kp{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:ce(t),this._value=n?t:ts(t)}get value(){return hl(this),this._value}set value(t){const n=this.__v_isShallow||ii(t)||vn(t);t=n?t:ce(t),qr(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:ts(t),fl(this,t))}}function be(e){return Ke(e)?e.value:e}const Gp={get:(e,t,n)=>be(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Ke(s)&&!Ke(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function pl(e){return Kn(e)?e:new Proxy(e,Gp)}var ml;class Yp{constructor(t,n,r,s){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[ml]=!1,this._dirty=!0,this.effect=new Mo(t,()=>{this._dirty||(this._dirty=!0,fl(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=r}get value(){const t=ce(this);return hl(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}ml="__v_isReadonly";function Zp(e,t,n=!1){let r,s;const i=ie(e);i?(r=e,s={}.NODE_ENV!=="production"?()=>{console.warn("Write operation failed: computed value is readonly")}:et):(r=e.get,s=e.set);const o=new Yp(r,s,i||!s,n);return{}.NODE_ENV!=="production"&&t&&!n&&(o.effect.onTrack=t.onTrack,o.effect.onTrigger=t.onTrigger),o}const Gn=[];function oi(e){Gn.push(e)}function ai(){Gn.pop()}function z(e,...t){if({}.NODE_ENV==="production")return;Wn();const n=Gn.length?Gn[Gn.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=Xp();if(r)tn(r,n,11,[e+t.join(""),n&&n.proxy,s.map(({vnode:i})=>`at <${Ci(n,i.type)}>`).join(`
|
|
15
|
+
`),s]);else{const i=[`[Vue warn]: ${e}`,...t];s.length&&i.push(`
|
|
16
|
+
`,...Jp(s)),console.warn(...i)}zn()}function Xp(){let e=Gn[Gn.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function Jp(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
|
|
17
|
+
`],...qp(n))}),t}function qp({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,s=` at <${Ci(e.component,e.type,r)}`,i=">"+n;return e.props?[s,...Qp(e.props),i]:[s+i]}function Qp(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...gl(r,e[r]))}),n.length>3&&t.push(" ..."),t}function gl(e,t,n){return Re(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Ke(t)?(t=gl(e,ce(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):ie(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ce(t),n?t:[`${e}=`,t])}const Fo={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function tn(e,t,n,r){let s;try{s=r?e(...r):e()}catch(i){ci(i,t,n)}return s}function Pt(e,t,n,r){if(ie(e)){const i=tn(e,t,n,r);return i&&Co(i)&&i.catch(o=>{ci(o,t,n)}),i}const s=[];for(let i=0;i<e.length;i++)s.push(Pt(e[i],t,n,r));return s}function ci(e,t,n,r=!0){const s=t?t.vnode:null;if(t){let i=t.parent;const o=t.proxy,a={}.NODE_ENV!=="production"?Fo[n]:n;for(;i;){const l=i.ec;if(l){for(let d=0;d<l.length;d++)if(l[d](e,o,a)===!1)return}i=i.parent}const c=t.appContext.config.errorHandler;if(c){tn(c,null,10,[e,o,a]);return}}em(e,n,s,r)}function em(e,t,n,r=!0){if({}.NODE_ENV!=="production"){const s=Fo[t];if(n&&oi(n),z(`Unhandled error${s?` during execution of ${s}`:""}`),n&&ai(),r)throw e;console.error(e)}else console.error(e)}let ns=!1,$o=!1;const tt=[];let Ft=0;const Sr=[];let $t=null,wn=0;const yl=Promise.resolve();let jo=null;const tm=100;function nm(e){const t=jo||yl;return e?t.then(this?e.bind(this):e):t}function rm(e){let t=Ft+1,n=tt.length;for(;t<n;){const r=t+n>>>1;rs(tt[r])<e?t=r+1:n=r}return t}function li(e){(!tt.length||!tt.includes(e,ns&&e.allowRecurse?Ft+1:Ft))&&(e.id==null?tt.push(e):tt.splice(rm(e.id),0,e),_l())}function _l(){!ns&&!$o&&($o=!0,jo=yl.then(Il))}function sm(e){const t=tt.indexOf(e);t>Ft&&tt.splice(t,1)}function El(e){Q(e)?Sr.push(...e):(!$t||!$t.includes(e,e.allowRecurse?wn+1:wn))&&Sr.push(e),_l()}function Sl(e,t=ns?Ft+1:0){for({}.NODE_ENV!=="production"&&(e=e||new Map);t<tt.length;t++){const n=tt[t];if(n&&n.pre){if({}.NODE_ENV!=="production"&&Ho(e,n))continue;tt.splice(t,1),t--,n()}}}function bl(e){if(Sr.length){const t=[...new Set(Sr)];if(Sr.length=0,$t){$t.push(...t);return}for($t=t,{}.NODE_ENV!=="production"&&(e=e||new Map),$t.sort((n,r)=>rs(n)-rs(r)),wn=0;wn<$t.length;wn++)({}).NODE_ENV!=="production"&&Ho(e,$t[wn])||$t[wn]();$t=null,wn=0}}const rs=e=>e.id==null?1/0:e.id,im=(e,t)=>{const n=rs(e)-rs(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Il(e){$o=!1,ns=!0,{}.NODE_ENV!=="production"&&(e=e||new Map),tt.sort(im);const t={}.NODE_ENV!=="production"?n=>Ho(e,n):et;try{for(Ft=0;Ft<tt.length;Ft++){const n=tt[Ft];if(n&&n.active!==!1){if({}.NODE_ENV!=="production"&&t(n))continue;tn(n,null,14)}}}finally{Ft=0,tt.length=0,bl(e),ns=!1,jo=null,(tt.length||Sr.length)&&Il(e)}}function Ho(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>tm){const r=t.ownerInstance,s=r&&la(r.type);return z(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}else e.set(t,n+1)}}let Yn=!1;const br=new Set;({}).NODE_ENV!=="production"&&(Wc().__VUE_HMR_RUNTIME__={createRecord:Vo(vl),rerender:Vo(cm),reload:Vo(lm)});const Zn=new Map;function om(e){const t=e.type.__hmrId;let n=Zn.get(t);n||(vl(t,e.type),n=Zn.get(t)),n.instances.add(e)}function am(e){Zn.get(e.type.__hmrId).instances.delete(e)}function vl(e,t){return Zn.has(e)?!1:(Zn.set(e,{initialDef:ss(t),instances:new Set}),!0)}function ss(e){return du(e)?e.__vccOpts:e}function cm(e,t){const n=Zn.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,ss(r.type).render=t),r.renderCache=[],Yn=!0,r.update(),Yn=!1}))}function lm(e,t){const n=Zn.get(e);if(!n)return;t=ss(t),wl(n.initialDef,t);const r=[...n.instances];for(const s of r){const i=ss(s.type);br.has(i)||(i!==n.initialDef&&wl(i,t),br.add(i)),s.appContext.optionsCache.delete(s.type),s.ceReload?(br.add(i),s.ceReload(t.styles),br.delete(i)):s.parent?li(s.parent.update):s.appContext.reload?s.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}El(()=>{for(const s of r)br.delete(ss(s.type))})}function wl(e,t){He(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Vo(e){return(t,n)=>{try{return e(t,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let jt,is=[],Bo=!1;function os(e,...t){jt?jt.emit(e,...t):Bo||is.push({event:e,args:t})}function Cl(e,t){var n,r;jt=e,jt?(jt.enabled=!0,is.forEach(({event:s,args:i})=>jt.emit(s,...i)),is=[]):typeof window<"u"&&window.HTMLElement&&!(!((r=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||r===void 0)&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{Cl(i,t)}),setTimeout(()=>{jt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Bo=!0,is=[])},3e3)):(Bo=!0,is=[])}function um(e,t){os("app:init",e,t,{Fragment:Ve,Text:us,Comment:gt,Static:ds})}function dm(e){os("app:unmount",e)}const hm=Wo("component:added"),Tl=Wo("component:updated"),fm=Wo("component:removed"),pm=e=>{jt&&typeof jt.cleanupBuffer=="function"&&!jt.cleanupBuffer(e)&&fm(e)};function Wo(e){return t=>{os(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const mm=Dl("perf:start"),gm=Dl("perf:end");function Dl(e){return(t,n,r)=>{os(e,t.appContext.app,t.uid,t,n,r)}}function ym(e,t,n){os("component:emit",e.appContext.app,e,t,n)}function _m(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Ie;if({}.NODE_ENV!=="production"){const{emitsOptions:d,propsOptions:[u]}=e;if(d)if(!(t in d))(!u||!(Vn(t)in u))&&z(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Vn(t)}" prop.`);else{const h=d[t];ie(h)&&(h(...n)||z(`Invalid event arguments: event validation failed for event "${t}".`))}}let s=n;const i=t.startsWith("update:"),o=i&&t.slice(7);if(o&&o in r){const d=`${o==="modelValue"?"model":o}Modifiers`,{number:u,trim:h}=r[d]||Ie;h&&(s=n.map(f=>Re(f)?f.trim():f)),u&&(s=n.map(Zs))}if({}.NODE_ENV!=="production"&&ym(e,t,s),{}.NODE_ENV!=="production"){const d=t.toLowerCase();d!==t&&r[Vn(d)]&&z(`Event "${d}" is emitted in component ${Ci(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${En(t)}" instead of "${t}".`)}let a,c=r[a=Vn(t)]||r[a=Vn(Ut(t))];!c&&i&&(c=r[a=Vn(En(t))]),c&&Pt(c,e,6,s);const l=r[a+"Once"];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Pt(l,e,6,s)}}function Pl(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!ie(e)){const c=l=>{const d=Pl(l,t,!0);d&&(a=!0,He(o,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!a?(Se(e)&&r.set(e,null),null):(Q(i)?i.forEach(c=>o[c]=null):He(o,i),Se(e)&&r.set(e,o),o)}function ui(e,t){return!e||!Zr(t)?!1:(t=t.slice(2).replace(/Once$/,""),de(e,t[0].toLowerCase()+t.slice(1))||de(e,En(t))||de(e,t))}let Ge=null,di=null;function hi(e){const t=Ge;return Ge=e,di=e&&e.type.__scopeId||null,t}function Ht(e){di=e}function Vt(){di=null}function Ir(e,t=Ge,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&tu(-1);const i=hi(t);let o;try{o=e(...s)}finally{hi(i),r._d&&tu(1)}return{}.NODE_ENV!=="production"&&Tl(t),o};return r._n=!0,r._c=!0,r._d=!0,r}let zo=!1;function fi(){zo=!0}function Ko(e){const{type:t,vnode:n,proxy:r,withProxy:s,props:i,propsOptions:[o],slots:a,attrs:c,emit:l,render:d,renderCache:u,data:h,setupState:f,ctx:p,inheritAttrs:_}=e;let S,I;const E=hi(e);({}).NODE_ENV!=="production"&&(zo=!1);try{if(n.shapeFlag&4){const T=s||r;S=kt(d.call(T,T,u,i,f,h,p)),I=c}else{const T=t;({}).NODE_ENV!=="production"&&c===i&&fi(),S=kt(T.length>1?T(i,{}.NODE_ENV!=="production"?{get attrs(){return fi(),c},slots:a,emit:l}:{attrs:c,slots:a,emit:l}):T(i,null)),I=t.props?c:Sm(c)}}catch(T){hs.length=0,ci(T,e,1),S=xe(gt)}let k=S,M;if({}.NODE_ENV!=="production"&&S.patchFlag>0&&S.patchFlag&2048&&([k,M]=Em(S)),I&&_!==!1){const T=Object.keys(I),{shapeFlag:V}=k;if(T.length){if(V&7)o&&T.some(Ws)&&(I=bm(I,o)),k=Tn(k,I);else if({}.NODE_ENV!=="production"&&!zo&&k.type!==gt){const $=Object.keys(c),J=[],X=[];for(let D=0,G=$.length;D<G;D++){const te=$[D];Zr(te)?Ws(te)||J.push(te[2].toLowerCase()+te.slice(3)):X.push(te)}X.length&&z(`Extraneous non-props attributes (${X.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),J.length&&z(`Extraneous non-emits event listeners (${J.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&({}.NODE_ENV!=="production"&&!kl(k)&&z("Runtime directive used on component with non-element root node. The directives will not function as intended."),k=Tn(k),k.dirs=k.dirs?k.dirs.concat(n.dirs):n.dirs),n.transition&&({}.NODE_ENV!=="production"&&!kl(k)&&z("Component inside <Transition> renders non-element root node that cannot be animated."),k.transition=n.transition),{}.NODE_ENV!=="production"&&M?M(k):S=k,hi(E),S}const Em=e=>{const t=e.children,n=e.dynamicChildren,r=Al(t);if(!r)return[e,void 0];const s=t.indexOf(r),i=n?n.indexOf(r):-1,o=a=>{t[s]=a,n&&(i>-1?n[i]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[kt(r),o]};function Al(e){let t;for(let n=0;n<e.length;n++){const r=e[n];if(bi(r)){if(r.type!==gt||r.children==="v-if"){if(t)return;t=r}}else return}return t}const Sm=e=>{let t;for(const n in e)(n==="class"||n==="style"||Zr(n))&&((t||(t={}))[n]=e[n]);return t},bm=(e,t)=>{const n={};for(const r in e)(!Ws(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},kl=e=>e.shapeFlag&7||e.type===gt;function Im(e,t,n){const{props:r,children:s,component:i}=e,{props:o,children:a,patchFlag:c}=t,l=i.emitsOptions;if({}.NODE_ENV!=="production"&&(s||a)&&Yn||t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Nl(r,o,l):!!o;if(c&8){const d=t.dynamicProps;for(let u=0;u<d.length;u++){const h=d[u];if(o[h]!==r[h]&&!ui(l,h))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?Nl(r,o,l):!0:!!o;return!1}function Nl(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const i=r[s];if(t[i]!==e[i]&&!ui(n,i))return!0}return!1}function vm({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const wm=e=>e.__isSuspense;function Cm(e,t){t&&t.pendingBranch?Q(e)?t.effects.push(...e):t.effects.push(e):El(e)}function Tm(e,t){if(!Le)({}).NODE_ENV!=="production"&&z("provide() can only be used inside setup().");else{let n=Le.provides;const r=Le.parent&&Le.parent.provides;r===n&&(n=Le.provides=Object.create(r)),n[e]=t}}function pi(e,t,n=!1){const r=Le||Ge;if(r){const s=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(s&&e in s)return s[e];if(arguments.length>1)return n&&ie(t)?t.call(r.proxy):t;({}).NODE_ENV!=="production"&&z(`injection "${String(e)}" not found.`)}else({}).NODE_ENV!=="production"&&z("inject() can only be used inside setup() or functional components.")}const mi={};function as(e,t,n){return{}.NODE_ENV!=="production"&&!ie(t)&&z("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Ml(e,t,n)}function Ml(e,t,{immediate:n,deep:r,flush:s,onTrack:i,onTrigger:o}=Ie){({}).NODE_ENV!=="production"&&!t&&(n!==void 0&&z('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&z('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'));const a=M=>{z("Invalid watch source: ",M,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=gp()===(Le==null?void 0:Le.scope)?Le:null;let l,d=!1,u=!1;if(Ke(e)?(l=()=>e.value,d=ii(e)):Kn(e)?(l=()=>e,r=!0):Q(e)?(u=!0,d=e.some(M=>Kn(M)||ii(M)),l=()=>e.map(M=>{if(Ke(M))return M.value;if(Kn(M))return Xn(M);if(ie(M))return tn(M,c,2);({}).NODE_ENV!=="production"&&a(M)})):ie(e)?t?l=()=>tn(e,c,2):l=()=>{if(!(c&&c.isUnmounted))return h&&h(),Pt(e,c,3,[f])}:(l=et,{}.NODE_ENV!=="production"&&a(e)),t&&r){const M=l;l=()=>Xn(M())}let h,f=M=>{h=E.onStop=()=>{tn(M,c,4)}},p;if(ms)if(f=et,t?n&&Pt(t,c,3,[l(),u?[]:void 0,f]):l(),s==="sync"){const M=Og();p=M.__watcherHandles||(M.__watcherHandles=[])}else return et;let _=u?new Array(e.length).fill(mi):mi;const S=()=>{if(E.active)if(t){const M=E.run();(r||d||(u?M.some((T,V)=>qr(T,_[V])):qr(M,_)))&&(h&&h(),Pt(t,c,3,[M,_===mi?void 0:u&&_[0]===mi?[]:_,f]),_=M)}else E.run()};S.allowRecurse=!!t;let I;s==="sync"?I=S:s==="post"?I=()=>mt(S,c&&c.suspense):(S.pre=!0,c&&(S.id=c.uid),I=()=>li(S));const E=new Mo(l,I);({}).NODE_ENV!=="production"&&(E.onTrack=i,E.onTrigger=o),t?n?S():_=E.run():s==="post"?mt(E.run.bind(E),c&&c.suspense):E.run();const k=()=>{E.stop(),c&&c.scope&&wo(c.scope.effects,E)};return p&&p.push(k),k}function Dm(e,t,n){const r=this.proxy,s=Re(e)?e.includes(".")?Ol(r,e):()=>r[e]:e.bind(r,r);let i;ie(t)?i=t:(i=t.handler,n=t);const o=Le;vr(this);const a=Ml(s,i.bind(r),n);return o?vr(o):nr(),a}function Ol(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}function Xn(e,t){if(!Se(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),Ke(e))Xn(e.value,t);else if(Q(e))for(let n=0;n<e.length;n++)Xn(e[n],t);else if(zs(e)||jn(e))e.forEach(n=>{Xn(n,t)});else if(Vc(e))for(const n in e)Xn(e[n],t);return e}function Oe(e){return ie(e)?{setup:e,name:e.name}:e}const cs=e=>!!e.type.__asyncLoader,Go=e=>e.type.__isKeepAlive;function Pm(e,t){Rl(e,"a",t)}function Am(e,t){Rl(e,"da",t)}function Rl(e,t,n=Le){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(gi(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Go(s.parent.vnode)&&km(r,t,n,s),s=s.parent}}function km(e,t,n,r){const s=gi(t,e,r,!0);rn(()=>{wo(r[t],s)},n)}function gi(e,t,n=Le,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Wn(),vr(n);const a=Pt(t,n,e,o);return nr(),zn(),a});return r?s.unshift(i):s.push(i),i}else if({}.NODE_ENV!=="production"){const s=Vn(Fo[e].replace(/ hook$/,""));z(`${s} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const nn=e=>(t,n=Le)=>(!ms||e==="sp")&&gi(e,(...r)=>t(...r),n),Nm=nn("bm"),Ct=nn("m"),Mm=nn("bu"),Om=nn("u"),Rm=nn("bum"),rn=nn("um"),xm=nn("sp"),Lm=nn("rtg"),Um=nn("rtc");function Fm(e,t=Le){gi("ec",e,t)}function xl(e){dp(e)&&z("Do not use built-in directive ids as custom directive id: "+e)}function Tt(e,t){const n=Ge;if(n===null)return{}.NODE_ENV!=="production"&&z("withDirectives can only be used inside render functions."),e;const r=wi(n)||n.proxy,s=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,a,c,l=Ie]=t[i];o&&(ie(o)&&(o={mounted:o,updated:o}),o.deep&&Xn(a),s.push({dir:o,instance:r,value:a,oldValue:void 0,arg:c,modifiers:l}))}return e}function Jn(e,t,n,r){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let c=a.dir[r];c&&(Wn(),Pt(c,n,8,[e.el,a,e,t]),zn())}}const Yo="components",Ll=Symbol();function $m(e){return Re(e)?jm(Yo,e,!1)||e:e||Ll}function jm(e,t,n=!0,r=!1){const s=Ge||Le;if(s){const i=s.type;if(e===Yo){const a=la(i,!1);if(a&&(a===t||a===Ut(t)||a===Hn(Ut(t))))return i}const o=Ul(s[e]||i[e],t)||Ul(s.appContext[e],t);if(!o&&r)return i;if({}.NODE_ENV!=="production"&&n&&!o){const a=e===Yo?`
|
|
18
|
+
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`:"";z(`Failed to resolve ${e.slice(0,-1)}: ${t}${a}`)}return o}else({}).NODE_ENV!=="production"&&z(`resolve${Hn(e.slice(0,-1))} can only be used in render() or setup().`)}function Ul(e,t){return e&&(e[t]||e[Ut(t)]||e[Hn(Ut(t))])}function Hm(e,t,n,r){let s;const i=n&&n[r];if(Q(e)||Re(e)){s=new Array(e.length);for(let o=0,a=e.length;o<a;o++)s[o]=t(e[o],o,void 0,i&&i[o])}else if(typeof e=="number"){({}).NODE_ENV!=="production"&&!Number.isInteger(e)&&z(`The v-for range expect an integer value but got ${e}.`),s=new Array(e);for(let o=0;o<e;o++)s[o]=t(o+1,o,void 0,i&&i[o])}else if(Se(e))if(e[Symbol.iterator])s=Array.from(e,(o,a)=>t(o,a,void 0,i&&i[a]));else{const o=Object.keys(e);s=new Array(o.length);for(let a=0,c=o.length;a<c;a++){const l=o[a];s[a]=t(e[l],l,a,i&&i[a])}}else s=[];return n&&(n[r]=s),s}function yi(e,t,n={},r,s){if(Ge.isCE||Ge.parent&&cs(Ge.parent)&&Ge.parent.isCE)return t!=="default"&&(n.name=t),xe("slot",n,r&&r());let i=e[t];({}).NODE_ENV!=="production"&&i&&i.length>1&&(z("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),i=()=>[]),i&&i._c&&(i._d=!1),ee();const o=i&&Fl(i(n)),a=tr(Ve,{key:n.key||o&&o.key||`_${t}`},o||(r?r():[]),o&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function Fl(e){return e.some(t=>bi(t)?!(t.type===gt||t.type===Ve&&!Fl(t.children)):!0)?e:null}const Zo=e=>e?ou(e)?wi(e)||e.proxy:Zo(e.parent):null,qn=He(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>({}).NODE_ENV!=="production"?Er(e.props):e.props,$attrs:e=>({}).NODE_ENV!=="production"?Er(e.attrs):e.attrs,$slots:e=>({}).NODE_ENV!=="production"?Er(e.slots):e.slots,$refs:e=>({}).NODE_ENV!=="production"?Er(e.refs):e.refs,$parent:e=>Zo(e.parent),$root:e=>Zo(e.root),$emit:e=>e.emit,$options:e=>Qo(e),$forceUpdate:e=>e.f||(e.f=()=>li(e.update)),$nextTick:e=>e.n||(e.n=nm.bind(e.proxy)),$watch:e=>Dm.bind(e)}),Xo=e=>e==="_"||e==="$",Jo=(e,t)=>e!==Ie&&!e.__isScriptSetup&&de(e,t),$l={get({_:e},t){const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:c}=e;if({}.NODE_ENV!=="production"&&t==="__isVue")return!0;let l;if(t[0]!=="$"){const f=o[t];if(f!==void 0)switch(f){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Jo(r,t))return o[t]=1,r[t];if(s!==Ie&&de(s,t))return o[t]=2,s[t];if((l=e.propsOptions[0])&&de(l,t))return o[t]=3,i[t];if(n!==Ie&&de(n,t))return o[t]=4,n[t];qo&&(o[t]=0)}}const d=qn[t];let u,h;if(d)return t==="$attrs"&&(ot(e,"get",t),{}.NODE_ENV!=="production"&&fi()),d(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==Ie&&de(n,t))return o[t]=4,n[t];if(h=c.config.globalProperties,de(h,t))return h[t];({}).NODE_ENV!=="production"&&Ge&&(!Re(t)||t.indexOf("__v")!==0)&&(s!==Ie&&Xo(t[0])&&de(s,t)?z(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===Ge&&z(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return Jo(s,t)?(s[t]=n,!0):{}.NODE_ENV!=="production"&&s.__isScriptSetup&&de(s,t)?(z(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==Ie&&de(r,t)?(r[t]=n,!0):de(e.props,t)?({}.NODE_ENV!=="production"&&z(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?({}.NODE_ENV!=="production"&&z(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):({}.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(i,t,{enumerable:!0,configurable:!0,value:n}):i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:i}},o){let a;return!!n[o]||e!==Ie&&de(e,o)||Jo(t,o)||(a=i[0])&&de(a,o)||de(r,o)||de(qn,o)||de(s.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:de(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};({}).NODE_ENV!=="production"&&($l.ownKeys=e=>(z("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function Vm(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(qn).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>qn[n](e),set:et})}),t}function Bm(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>e.props[r],set:et})})}function Wm(e){const{ctx:t,setupState:n}=e;Object.keys(ce(n)).forEach(r=>{if(!n.__isScriptSetup){if(Xo(r[0])){z(`setup() return property ${JSON.stringify(r)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>n[r],set:et})}})}function zm(){const e=Object.create(null);return(t,n)=>{e[n]?z(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let qo=!0;function Km(e){const t=Qo(e),n=e.proxy,r=e.ctx;qo=!1,t.beforeCreate&&jl(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:c,inject:l,created:d,beforeMount:u,mounted:h,beforeUpdate:f,updated:p,activated:_,deactivated:S,beforeDestroy:I,beforeUnmount:E,destroyed:k,unmounted:M,render:T,renderTracked:V,renderTriggered:$,errorCaptured:J,serverPrefetch:X,expose:D,inheritAttrs:G,components:te,directives:R,filters:F}=t,U={}.NODE_ENV!=="production"?zm():null;if({}.NODE_ENV!=="production"){const[v]=e.propsOptions;if(v)for(const P in v)U("Props",P)}if(l&&Gm(l,r,U,e.appContext.config.unwrapInjectedRef),o)for(const v in o){const P=o[v];ie(P)?({}.NODE_ENV!=="production"?Object.defineProperty(r,v,{value:P.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[v]=P.bind(n),{}.NODE_ENV!=="production"&&U("Methods",v)):{}.NODE_ENV!=="production"&&z(`Method "${v}" has type "${typeof P}" in the component definition. Did you reference the function correctly?`)}if(s){({}).NODE_ENV!=="production"&&!ie(s)&&z("The data option must be a function. Plain object usage is no longer supported.");const v=s.call(n,n);if({}.NODE_ENV!=="production"&&Co(v)&&z("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Se(v))({}).NODE_ENV!=="production"&&z("data() should return an object.");else if(e.data=xo(v),{}.NODE_ENV!=="production")for(const P in v)U("Data",P),Xo(P[0])||Object.defineProperty(r,P,{configurable:!0,enumerable:!0,get:()=>v[P],set:et})}if(qo=!0,i)for(const v in i){const P=i[v],W=ie(P)?P.bind(n,n):ie(P.get)?P.get.bind(n,n):et;({}).NODE_ENV!=="production"&&W===et&&z(`Computed property "${v}" has no getter.`);const re=!ie(P)&&ie(P.set)?P.set.bind(n):{}.NODE_ENV!=="production"?()=>{z(`Write operation failed: computed property "${v}" is readonly.`)}:et,Ee=Wt({get:W,set:re});Object.defineProperty(r,v,{enumerable:!0,configurable:!0,get:()=>Ee.value,set:he=>Ee.value=he}),{}.NODE_ENV!=="production"&&U("Computed",v)}if(a)for(const v in a)Hl(a[v],r,n,v);if(c){const v=ie(c)?c.call(n):c;Reflect.ownKeys(v).forEach(P=>{Tm(P,v[P])})}d&&jl(d,e,"c");function j(v,P){Q(P)?P.forEach(W=>v(W.bind(n))):P&&v(P.bind(n))}if(j(Nm,u),j(Ct,h),j(Mm,f),j(Om,p),j(Pm,_),j(Am,S),j(Fm,J),j(Um,V),j(Lm,$),j(Rm,E),j(rn,M),j(xm,X),Q(D))if(D.length){const v=e.exposed||(e.exposed={});D.forEach(P=>{Object.defineProperty(v,P,{get:()=>n[P],set:W=>n[P]=W})})}else e.exposed||(e.exposed={});T&&e.render===et&&(e.render=T),G!=null&&(e.inheritAttrs=G),te&&(e.components=te),R&&(e.directives=R)}function Gm(e,t,n=et,r=!1){Q(e)&&(e=ea(e));for(const s in e){const i=e[s];let o;Se(i)?"default"in i?o=pi(i.from||s,i.default,!0):o=pi(i.from||s):o=pi(i),Ke(o)?r?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):({}.NODE_ENV!=="production"&&z(`injected property "${s}" is a ref and will be auto-unwrapped and no longer needs \`.value\` in the next minor release. To opt-in to the new behavior now, set \`app.config.unwrapInjectedRef = true\` (this config is temporary and will not be needed in the future.)`),t[s]=o):t[s]=o,{}.NODE_ENV!=="production"&&n("Inject",s)}}function jl(e,t,n){Pt(Q(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Hl(e,t,n,r){const s=r.includes(".")?Ol(n,r):()=>n[r];if(Re(e)){const i=t[e];ie(i)?as(s,i):{}.NODE_ENV!=="production"&&z(`Invalid watch handler specified by key "${e}"`,i)}else if(ie(e))as(s,e.bind(n));else if(Se(e))if(Q(e))e.forEach(i=>Hl(i,t,n,r));else{const i=ie(e.handler)?e.handler.bind(n):t[e.handler];ie(i)?as(s,i,e):{}.NODE_ENV!=="production"&&z(`Invalid watch handler specified by key "${e.handler}"`,i)}else({}).NODE_ENV!=="production"&&z(`Invalid watch option: "${r}"`,e)}function Qo(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let c;return a?c=a:!s.length&&!n&&!r?c=t:(c={},s.length&&s.forEach(l=>_i(c,l,o,!0)),_i(c,t,o)),Se(t)&&i.set(t,c),c}function _i(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&_i(e,i,n,!0),s&&s.forEach(o=>_i(e,o,n,!0));for(const o in t)if(r&&o==="expose")({}).NODE_ENV!=="production"&&z('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Ym[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const Ym={data:Vl,props:Qn,emits:Qn,methods:Qn,computed:Qn,beforeCreate:at,created:at,beforeMount:at,mounted:at,beforeUpdate:at,updated:at,beforeDestroy:at,beforeUnmount:at,destroyed:at,unmounted:at,activated:at,deactivated:at,errorCaptured:at,serverPrefetch:at,components:Qn,directives:Qn,watch:Xm,provide:Vl,inject:Zm};function Vl(e,t){return t?e?function(){return He(ie(e)?e.call(this,this):e,ie(t)?t.call(this,this):t)}:t:e}function Zm(e,t){return Qn(ea(e),ea(t))}function ea(e){if(Q(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function at(e,t){return e?[...new Set([].concat(e,t))]:t}function Qn(e,t){return e?He(He(Object.create(null),e),t):t}function Xm(e,t){if(!e)return t;if(!t)return e;const n=He(Object.create(null),e);for(const r in t)n[r]=at(e[r],t[r]);return n}function Jm(e,t,n,r=!1){const s={},i={};Ys(i,Ii,1),e.propsDefaults=Object.create(null),Bl(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);({}).NODE_ENV!=="production"&&Yl(t||{},s,e),n?e.props=r?s:Wp(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function qm(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function Qm(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=ce(s),[c]=e.propsOptions;let l=!1;if(!({}.NODE_ENV!=="production"&&qm(e))&&(r||o>0)&&!(o&16)){if(o&8){const d=e.vnode.dynamicProps;for(let u=0;u<d.length;u++){let h=d[u];if(ui(e.emitsOptions,h))continue;const f=t[h];if(c)if(de(i,h))f!==i[h]&&(i[h]=f,l=!0);else{const p=Ut(h);s[p]=ta(c,a,p,f,e,!1)}else f!==i[h]&&(i[h]=f,l=!0)}}}else{Bl(e,t,s,i)&&(l=!0);let d;for(const u in a)(!t||!de(t,u)&&((d=En(u))===u||!de(t,d)))&&(c?n&&(n[u]!==void 0||n[d]!==void 0)&&(s[u]=ta(c,a,u,void 0,e,!0)):delete s[u]);if(i!==a)for(const u in i)(!t||!de(t,u))&&(delete i[u],l=!0)}l&&en(e,"set","$attrs"),{}.NODE_ENV!=="production"&&Yl(t||{},s,e)}function Bl(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let c in t){if(Ks(c))continue;const l=t[c];let d;s&&de(s,d=Ut(c))?!i||!i.includes(d)?n[d]=l:(a||(a={}))[d]=l:ui(e.emitsOptions,c)||(!(c in r)||l!==r[c])&&(r[c]=l,o=!0)}if(i){const c=ce(n),l=a||Ie;for(let d=0;d<i.length;d++){const u=i[d];n[u]=ta(s,c,u,l[u],e,!de(l,u))}}return o}function ta(e,t,n,r,s,i){const o=e[n];if(o!=null){const a=de(o,"default");if(a&&r===void 0){const c=o.default;if(o.type!==Function&&ie(c)){const{propsDefaults:l}=s;n in l?r=l[n]:(vr(s),r=l[n]=c.call(null,t),nr())}else r=c}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===En(n))&&(r=!0))}return r}function Wl(e,t,n=!1){const r=t.propsCache,s=r.get(e);if(s)return s;const i=e.props,o={},a=[];let c=!1;if(!ie(e)){const d=u=>{c=!0;const[h,f]=Wl(u,t,!0);He(o,h),f&&a.push(...f)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!c)return Se(e)&&r.set(e,gr),gr;if(Q(i))for(let d=0;d<i.length;d++){({}).NODE_ENV!=="production"&&!Re(i[d])&&z("props must be strings when using array syntax.",i[d]);const u=Ut(i[d]);zl(u)&&(o[u]=Ie)}else if(i){({}).NODE_ENV!=="production"&&!Se(i)&&z("invalid props options",i);for(const d in i){const u=Ut(d);if(zl(u)){const h=i[d],f=o[u]=Q(h)||ie(h)?{type:h}:Object.assign({},h);if(f){const p=Gl(Boolean,f.type),_=Gl(String,f.type);f[0]=p>-1,f[1]=_<0||p<_,(p>-1||de(f,"default"))&&a.push(u)}}}}const l=[o,a];return Se(e)&&r.set(e,l),l}function zl(e){return e[0]!=="$"?!0:({}.NODE_ENV!=="production"&&z(`Invalid prop name: "${e}" is a reserved property.`),!1)}function na(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Kl(e,t){return na(e)===na(t)}function Gl(e,t){return Q(t)?t.findIndex(n=>Kl(n,e)):ie(t)&&Kl(t,e)?0:-1}function Yl(e,t,n){const r=ce(t),s=n.propsOptions[0];for(const i in s){let o=s[i];o!=null&&eg(i,r[i],o,!de(e,i)&&!de(e,En(i)))}}function eg(e,t,n,r){const{type:s,required:i,validator:o}=n;if(i&&r){z('Missing required prop: "'+e+'"');return}if(!(t==null&&!n.required)){if(s!=null&&s!==!0){let a=!1;const c=Q(s)?s:[s],l=[];for(let d=0;d<c.length&&!a;d++){const{valid:u,expectedType:h}=ng(t,c[d]);l.push(h||""),a=u}if(!a){z(rg(e,t,l));return}}o&&!o(t)&&z('Invalid prop: custom validator check failed for prop "'+e+'".')}}const tg=wt("String,Number,Boolean,Function,Symbol,BigInt");function ng(e,t){let n;const r=na(t);if(tg(r)){const s=typeof e;n=s===r.toLowerCase(),!n&&s==="object"&&(n=e instanceof t)}else r==="Object"?n=Se(e):r==="Array"?n=Q(e):r==="null"?n=e===null:n=e instanceof t;return{valid:n,expectedType:r}}function rg(e,t,n){let r=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(Hn).join(" | ")}`;const s=n[0],i=To(t),o=Zl(t,s),a=Zl(t,i);return n.length===1&&Xl(s)&&!sg(s,i)&&(r+=` with value ${o}`),r+=`, got ${i} `,Xl(i)&&(r+=`with value ${a}.`),r}function Zl(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Xl(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function sg(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Jl=e=>e[0]==="_"||e==="$stable",ra=e=>Q(e)?e.map(kt):[kt(e)],ig=(e,t,n)=>{if(t._n)return t;const r=Ir((...s)=>({}.NODE_ENV!=="production"&&Le&&z(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),ra(t(...s))),n);return r._c=!1,r},ql=(e,t,n)=>{const r=e._ctx;for(const s in e){if(Jl(s))continue;const i=e[s];if(ie(i))t[s]=ig(s,i,r);else if(i!=null){({}).NODE_ENV!=="production"&&z(`Non-function value encountered for slot "${s}". Prefer function slots for better performance.`);const o=ra(i);t[s]=()=>o}}},Ql=(e,t)=>{({}).NODE_ENV!=="production"&&!Go(e.vnode)&&z("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=ra(t);e.slots.default=()=>n},og=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=ce(t),Ys(t,"_",n)):ql(t,e.slots={})}else e.slots={},t&&Ql(e,t);Ys(e.slots,Ii,1)},ag=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=Ie;if(r.shapeFlag&32){const a=t._;a?{}.NODE_ENV!=="production"&&Yn?He(s,t):n&&a===1?i=!1:(He(s,t),!n&&a===1&&delete s._):(i=!t.$stable,ql(t,s)),o=t}else t&&(Ql(e,t),o={default:1});if(i)for(const a in s)!Jl(a)&&!(a in o)&&delete s[a]};function eu(){return{app:null,config:{isNativeTag:$c,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let cg=0;function lg(e,t){return function(r,s=null){ie(r)||(r=Object.assign({},r)),s!=null&&!Se(s)&&({}.NODE_ENV!=="production"&&z("root props passed to app.mount() must be an object."),s=null);const i=eu(),o=new Set;let a=!1;const c=i.app={_uid:cg++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:hu,get config(){return i.config},set config(l){({}).NODE_ENV!=="production"&&z("app.config cannot be replaced. Modify individual options instead.")},use(l,...d){return o.has(l)?{}.NODE_ENV!=="production"&&z("Plugin has already been applied to target app."):l&&ie(l.install)?(o.add(l),l.install(c,...d)):ie(l)?(o.add(l),l(c,...d)):{}.NODE_ENV!=="production"&&z('A plugin must either be a function or an object with an "install" function.'),c},mixin(l){return i.mixins.includes(l)?{}.NODE_ENV!=="production"&&z("Mixin has already been applied to target app"+(l.name?`: ${l.name}`:"")):i.mixins.push(l),c},component(l,d){return{}.NODE_ENV!=="production"&&aa(l,i.config),d?({}.NODE_ENV!=="production"&&i.components[l]&&z(`Component "${l}" has already been registered in target app.`),i.components[l]=d,c):i.components[l]},directive(l,d){return{}.NODE_ENV!=="production"&&xl(l),d?({}.NODE_ENV!=="production"&&i.directives[l]&&z(`Directive "${l}" has already been registered in target app.`),i.directives[l]=d,c):i.directives[l]},mount(l,d,u){if(a)({}).NODE_ENV!=="production"&&z("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{({}).NODE_ENV!=="production"&&l.__vue_app__&&z("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const h=xe(r,s);return h.appContext=i,{}.NODE_ENV!=="production"&&(i.reload=()=>{e(Tn(h),l,u)}),d&&t?t(h,l):e(h,l,u),a=!0,c._container=l,l.__vue_app__=c,{}.NODE_ENV!=="production"&&(c._instance=h.component,um(c,hu)),wi(h.component)||h.component.proxy}},unmount(){a?(e(null,c._container),{}.NODE_ENV!=="production"&&(c._instance=null,dm(c)),delete c._container.__vue_app__):{}.NODE_ENV!=="production"&&z("Cannot unmount an app that is not mounted.")},provide(l,d){return{}.NODE_ENV!=="production"&&l in i.provides&&z(`App already provides property with key "${String(l)}". It will be overwritten with the new value.`),i.provides[l]=d,c}};return c}}function sa(e,t,n,r,s=!1){if(Q(e)){e.forEach((h,f)=>sa(h,t&&(Q(t)?t[f]:t),n,r,s));return}if(cs(r)&&!s)return;const i=r.shapeFlag&4?wi(r.component)||r.component.proxy:r.el,o=s?null:i,{i:a,r:c}=e;if({}.NODE_ENV!=="production"&&!a){z("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const l=t&&t.r,d=a.refs===Ie?a.refs={}:a.refs,u=a.setupState;if(l!=null&&l!==c&&(Re(l)?(d[l]=null,de(u,l)&&(u[l]=null)):Ke(l)&&(l.value=null)),ie(c))tn(c,a,12,[o,d]);else{const h=Re(c),f=Ke(c);if(h||f){const p=()=>{if(e.f){const _=h?de(u,c)?u[c]:d[c]:c.value;s?Q(_)&&wo(_,i):Q(_)?_.includes(i)||_.push(i):h?(d[c]=[i],de(u,c)&&(u[c]=d[c])):(c.value=[i],e.k&&(d[e.k]=c.value))}else h?(d[c]=o,de(u,c)&&(u[c]=o)):f?(c.value=o,e.k&&(d[e.k]=o)):{}.NODE_ENV!=="production"&&z("Invalid template ref type:",c,`(${typeof c})`)};o?(p.id=-1,mt(p,n)):p()}else({}).NODE_ENV!=="production"&&z("Invalid template ref type:",c,`(${typeof c})`)}}let ls,Cn;function sn(e,t){e.appContext.config.performance&&Ei()&&Cn.mark(`vue-${t}-${e.uid}`),{}.NODE_ENV!=="production"&&mm(e,t,Ei()?Cn.now():Date.now())}function on(e,t){if(e.appContext.config.performance&&Ei()){const n=`vue-${t}-${e.uid}`,r=n+":end";Cn.mark(r),Cn.measure(`<${Ci(e,e.type)}> ${t}`,n,r),Cn.clearMarks(n),Cn.clearMarks(r)}({}).NODE_ENV!=="production"&&gm(e,t,Ei()?Cn.now():Date.now())}function Ei(){return ls!==void 0||(typeof window<"u"&&window.performance?(ls=!0,Cn=window.performance):ls=!1),ls}function ug(){const e=[];if({}.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
19
|
+
|
|
20
|
+
For more details, see https://link.vuejs.org/feature-flags.`)}}const mt=Cm;function dg(e){return hg(e)}function hg(e,t){ug();const n=Wc();n.__VUE__=!0,{}.NODE_ENV!=="production"&&Cl(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:s,patchProp:i,createElement:o,createText:a,createComment:c,setText:l,setElementText:d,parentNode:u,nextSibling:h,setScopeId:f=et,insertStaticContent:p}=e,_=(m,g,b,O=null,A=null,H=null,w=!1,L=null,C={}.NODE_ENV!=="production"&&Yn?!1:!!g.dynamicChildren)=>{if(m===g)return;m&&!ps(m,g)&&(O=ye(m),ge(m,A,H,!0),m=null),g.patchFlag===-2&&(C=!1,g.dynamicChildren=null);const{type:N,ref:B,shapeFlag:Y}=g;switch(N){case us:S(m,g,b,O);break;case gt:I(m,g,b,O);break;case ds:m==null?E(g,b,O,w):{}.NODE_ENV!=="production"&&k(m,g,b,w);break;case Ve:R(m,g,b,O,A,H,w,L,C);break;default:Y&1?V(m,g,b,O,A,H,w,L,C):Y&6?F(m,g,b,O,A,H,w,L,C):Y&64||Y&128?N.process(m,g,b,O,A,H,w,L,C,qe):{}.NODE_ENV!=="production"&&z("Invalid VNode type:",N,`(${typeof N})`)}B!=null&&A&&sa(B,m&&m.ref,H,g||m,!g)},S=(m,g,b,O)=>{if(m==null)r(g.el=a(g.children),b,O);else{const A=g.el=m.el;g.children!==m.children&&l(A,g.children)}},I=(m,g,b,O)=>{m==null?r(g.el=c(g.children||""),b,O):g.el=m.el},E=(m,g,b,O)=>{[m.el,m.anchor]=p(m.children,g,b,O,m.el,m.anchor)},k=(m,g,b,O)=>{if(g.children!==m.children){const A=h(m.anchor);T(m),[g.el,g.anchor]=p(g.children,b,A,O)}else g.el=m.el,g.anchor=m.anchor},M=({el:m,anchor:g},b,O)=>{let A;for(;m&&m!==g;)A=h(m),r(m,b,O),m=A;r(g,b,O)},T=({el:m,anchor:g})=>{let b;for(;m&&m!==g;)b=h(m),s(m),m=b;s(g)},V=(m,g,b,O,A,H,w,L,C)=>{w=w||g.type==="svg",m==null?$(g,b,O,A,H,w,L,C):D(m,g,A,H,w,L,C)},$=(m,g,b,O,A,H,w,L)=>{let C,N;const{type:B,props:Y,shapeFlag:q,transition:oe,dirs:fe}=m;if(C=m.el=o(m.type,H,Y&&Y.is,Y),q&8?d(C,m.children):q&16&&X(m.children,C,null,O,A,H&&B!=="foreignObject",w,L),fe&&Jn(m,null,O,"created"),J(C,m,m.scopeId,w,O),Y){for(const ve in Y)ve!=="value"&&!Ks(ve)&&i(C,ve,null,Y[ve],H,m.children,O,A,Je);"value"in Y&&i(C,"value",null,Y.value),(N=Y.onVnodeBeforeMount)&&Bt(N,O,m)}({}).NODE_ENV!=="production"&&(Object.defineProperty(C,"__vnode",{value:m,enumerable:!1}),Object.defineProperty(C,"__vueParentComponent",{value:O,enumerable:!1})),fe&&Jn(m,null,O,"beforeMount");const Te=(!A||A&&!A.pendingBranch)&&oe&&!oe.persisted;Te&&oe.beforeEnter(C),r(C,g,b),((N=Y&&Y.onVnodeMounted)||Te||fe)&&mt(()=>{N&&Bt(N,O,m),Te&&oe.enter(C),fe&&Jn(m,null,O,"mounted")},A)},J=(m,g,b,O,A)=>{if(b&&f(m,b),O)for(let H=0;H<O.length;H++)f(m,O[H]);if(A){let H=A.subTree;if({}.NODE_ENV!=="production"&&H.patchFlag>0&&H.patchFlag&2048&&(H=Al(H.children)||H),g===H){const w=A.vnode;J(m,w,w.scopeId,w.slotScopeIds,A.parent)}}},X=(m,g,b,O,A,H,w,L,C=0)=>{for(let N=C;N<m.length;N++){const B=m[N]=L?Dn(m[N]):kt(m[N]);_(null,B,g,b,O,A,H,w,L)}},D=(m,g,b,O,A,H,w)=>{const L=g.el=m.el;let{patchFlag:C,dynamicChildren:N,dirs:B}=g;C|=m.patchFlag&16;const Y=m.props||Ie,q=g.props||Ie;let oe;b&&er(b,!1),(oe=q.onVnodeBeforeUpdate)&&Bt(oe,b,g,m),B&&Jn(g,m,b,"beforeUpdate"),b&&er(b,!0),{}.NODE_ENV!=="production"&&Yn&&(C=0,w=!1,N=null);const fe=A&&g.type!=="foreignObject";if(N?(G(m.dynamicChildren,N,L,b,O,fe,H),{}.NODE_ENV!=="production"&&b&&b.type.__hmrId&&Si(m,g)):w||W(m,g,L,null,b,O,fe,H,!1),C>0){if(C&16)te(L,g,Y,q,b,O,A);else if(C&2&&Y.class!==q.class&&i(L,"class",null,q.class,A),C&4&&i(L,"style",Y.style,q.style,A),C&8){const Te=g.dynamicProps;for(let ve=0;ve<Te.length;ve++){const ze=Te[ve],Lt=Y[ze],Gr=q[ze];(Gr!==Lt||ze==="value")&&i(L,ze,Lt,Gr,A,m.children,b,O,Je)}}C&1&&m.children!==g.children&&d(L,g.children)}else!w&&N==null&&te(L,g,Y,q,b,O,A);((oe=q.onVnodeUpdated)||B)&&mt(()=>{oe&&Bt(oe,b,g,m),B&&Jn(g,m,b,"updated")},O)},G=(m,g,b,O,A,H,w)=>{for(let L=0;L<g.length;L++){const C=m[L],N=g[L],B=C.el&&(C.type===Ve||!ps(C,N)||C.shapeFlag&70)?u(C.el):b;_(C,N,B,null,O,A,H,w,!0)}},te=(m,g,b,O,A,H,w)=>{if(b!==O){if(b!==Ie)for(const L in b)!Ks(L)&&!(L in O)&&i(m,L,b[L],null,w,g.children,A,H,Je);for(const L in O){if(Ks(L))continue;const C=O[L],N=b[L];C!==N&&L!=="value"&&i(m,L,N,C,w,g.children,A,H,Je)}"value"in O&&i(m,"value",b.value,O.value)}},R=(m,g,b,O,A,H,w,L,C)=>{const N=g.el=m?m.el:a(""),B=g.anchor=m?m.anchor:a("");let{patchFlag:Y,dynamicChildren:q,slotScopeIds:oe}=g;({}).NODE_ENV!=="production"&&(Yn||Y&2048)&&(Y=0,C=!1,q=null),oe&&(L=L?L.concat(oe):oe),m==null?(r(N,b,O),r(B,b,O),X(g.children,b,B,A,H,w,L,C)):Y>0&&Y&64&&q&&m.dynamicChildren?(G(m.dynamicChildren,q,b,A,H,w,L),{}.NODE_ENV!=="production"&&A&&A.type.__hmrId?Si(m,g):(g.key!=null||A&&g===A.subTree)&&Si(m,g,!0)):W(m,g,b,B,A,H,w,L,C)},F=(m,g,b,O,A,H,w,L,C)=>{g.slotScopeIds=L,m==null?g.shapeFlag&512?A.ctx.activate(g,b,O,w,C):U(g,b,O,A,H,w,C):j(m,g,C)},U=(m,g,b,O,A,H,w)=>{const L=m.component=Ig(m,O,A);if({}.NODE_ENV!=="production"&&L.type.__hmrId&&om(L),{}.NODE_ENV!=="production"&&(oi(m),sn(L,"mount")),Go(m)&&(L.ctx.renderer=qe),{}.NODE_ENV!=="production"&&sn(L,"init"),Cg(L),{}.NODE_ENV!=="production"&&on(L,"init"),L.asyncDep){if(A&&A.registerDep(L,v),!m.el){const C=L.subTree=xe(gt);I(null,C,g,b)}return}v(L,m,g,b,A,H,w),{}.NODE_ENV!=="production"&&(ai(),on(L,"mount"))},j=(m,g,b)=>{const O=g.component=m.component;if(Im(m,g,b))if(O.asyncDep&&!O.asyncResolved){({}).NODE_ENV!=="production"&&oi(g),P(O,g,b),{}.NODE_ENV!=="production"&&ai();return}else O.next=g,sm(O.update),O.update();else g.el=m.el,O.vnode=g},v=(m,g,b,O,A,H,w)=>{const L=()=>{if(m.isMounted){let{next:B,bu:Y,u:q,parent:oe,vnode:fe}=m,Te=B,ve;({}).NODE_ENV!=="production"&&oi(B||m.vnode),er(m,!1),B?(B.el=fe.el,P(m,B,w)):B=fe,Y&&yr(Y),(ve=B.props&&B.props.onVnodeBeforeUpdate)&&Bt(ve,oe,B,fe),er(m,!0),{}.NODE_ENV!=="production"&&sn(m,"render");const ze=Ko(m);({}).NODE_ENV!=="production"&&on(m,"render");const Lt=m.subTree;m.subTree=ze,{}.NODE_ENV!=="production"&&sn(m,"patch"),_(Lt,ze,u(Lt.el),ye(Lt),m,A,H),{}.NODE_ENV!=="production"&&on(m,"patch"),B.el=ze.el,Te===null&&vm(m,ze.el),q&&mt(q,A),(ve=B.props&&B.props.onVnodeUpdated)&&mt(()=>Bt(ve,oe,B,fe),A),{}.NODE_ENV!=="production"&&Tl(m),{}.NODE_ENV!=="production"&&ai()}else{let B;const{el:Y,props:q}=g,{bm:oe,m:fe,parent:Te}=m,ve=cs(g);if(er(m,!1),oe&&yr(oe),!ve&&(B=q&&q.onVnodeBeforeMount)&&Bt(B,Te,g),er(m,!0),Y&&qt){const ze=()=>{({}).NODE_ENV!=="production"&&sn(m,"render"),m.subTree=Ko(m),{}.NODE_ENV!=="production"&&on(m,"render"),{}.NODE_ENV!=="production"&&sn(m,"hydrate"),qt(Y,m.subTree,m,A,null),{}.NODE_ENV!=="production"&&on(m,"hydrate")};ve?g.type.__asyncLoader().then(()=>!m.isUnmounted&&ze()):ze()}else{({}).NODE_ENV!=="production"&&sn(m,"render");const ze=m.subTree=Ko(m);({}).NODE_ENV!=="production"&&on(m,"render"),{}.NODE_ENV!=="production"&&sn(m,"patch"),_(null,ze,b,O,m,A,H),{}.NODE_ENV!=="production"&&on(m,"patch"),g.el=ze.el}if(fe&&mt(fe,A),!ve&&(B=q&&q.onVnodeMounted)){const ze=g;mt(()=>Bt(B,Te,ze),A)}(g.shapeFlag&256||Te&&cs(Te.vnode)&&Te.vnode.shapeFlag&256)&&m.a&&mt(m.a,A),m.isMounted=!0,{}.NODE_ENV!=="production"&&hm(m),g=b=O=null}},C=m.effect=new Mo(L,()=>li(N),m.scope),N=m.update=()=>C.run();N.id=m.uid,er(m,!0),{}.NODE_ENV!=="production"&&(C.onTrack=m.rtc?B=>yr(m.rtc,B):void 0,C.onTrigger=m.rtg?B=>yr(m.rtg,B):void 0,N.ownerInstance=m),N()},P=(m,g,b)=>{g.component=m;const O=m.vnode.props;m.vnode=g,m.next=null,Qm(m,g.props,O,b),ag(m,g.children,b),Wn(),Sl(),zn()},W=(m,g,b,O,A,H,w,L,C=!1)=>{const N=m&&m.children,B=m?m.shapeFlag:0,Y=g.children,{patchFlag:q,shapeFlag:oe}=g;if(q>0){if(q&128){Ee(N,Y,b,O,A,H,w,L,C);return}else if(q&256){re(N,Y,b,O,A,H,w,L,C);return}}oe&8?(B&16&&Je(N,A,H),Y!==N&&d(b,Y)):B&16?oe&16?Ee(N,Y,b,O,A,H,w,L,C):Je(N,A,H,!0):(B&8&&d(b,""),oe&16&&X(Y,b,O,A,H,w,L,C))},re=(m,g,b,O,A,H,w,L,C)=>{m=m||gr,g=g||gr;const N=m.length,B=g.length,Y=Math.min(N,B);let q;for(q=0;q<Y;q++){const oe=g[q]=C?Dn(g[q]):kt(g[q]);_(m[q],oe,b,null,A,H,w,L,C)}N>B?Je(m,A,H,!0,!1,Y):X(g,b,O,A,H,w,L,C,Y)},Ee=(m,g,b,O,A,H,w,L,C)=>{let N=0;const B=g.length;let Y=m.length-1,q=B-1;for(;N<=Y&&N<=q;){const oe=m[N],fe=g[N]=C?Dn(g[N]):kt(g[N]);if(ps(oe,fe))_(oe,fe,b,null,A,H,w,L,C);else break;N++}for(;N<=Y&&N<=q;){const oe=m[Y],fe=g[q]=C?Dn(g[q]):kt(g[q]);if(ps(oe,fe))_(oe,fe,b,null,A,H,w,L,C);else break;Y--,q--}if(N>Y){if(N<=q){const oe=q+1,fe=oe<B?g[oe].el:O;for(;N<=q;)_(null,g[N]=C?Dn(g[N]):kt(g[N]),b,fe,A,H,w,L,C),N++}}else if(N>q)for(;N<=Y;)ge(m[N],A,H,!0),N++;else{const oe=N,fe=N,Te=new Map;for(N=fe;N<=q;N++){const pt=g[N]=C?Dn(g[N]):kt(g[N]);pt.key!=null&&({}.NODE_ENV!=="production"&&Te.has(pt.key)&&z("Duplicate keys found during update:",JSON.stringify(pt.key),"Make sure keys are unique."),Te.set(pt.key,N))}let ve,ze=0;const Lt=q-fe+1;let Gr=!1,Qf=0;const Vs=new Array(Lt);for(N=0;N<Lt;N++)Vs[N]=0;for(N=oe;N<=Y;N++){const pt=m[N];if(ze>=Lt){ge(pt,A,H,!0);continue}let Qt;if(pt.key!=null)Qt=Te.get(pt.key);else for(ve=fe;ve<=q;ve++)if(Vs[ve-fe]===0&&ps(pt,g[ve])){Qt=ve;break}Qt===void 0?ge(pt,A,H,!0):(Vs[Qt-fe]=N+1,Qt>=Qf?Qf=Qt:Gr=!0,_(pt,g[Qt],b,null,A,H,w,L,C),ze++)}const ep=Gr?fg(Vs):gr;for(ve=ep.length-1,N=Lt-1;N>=0;N--){const pt=fe+N,Qt=g[pt],tp=pt+1<B?g[pt+1].el:O;Vs[N]===0?_(null,Qt,b,tp,A,H,w,L,C):Gr&&(ve<0||N!==ep[ve]?he(Qt,b,tp,2):ve--)}}},he=(m,g,b,O,A=null)=>{const{el:H,type:w,transition:L,children:C,shapeFlag:N}=m;if(N&6){he(m.component.subTree,g,b,O);return}if(N&128){m.suspense.move(g,b,O);return}if(N&64){w.move(m,g,b,qe);return}if(w===Ve){r(H,g,b);for(let Y=0;Y<C.length;Y++)he(C[Y],g,b,O);r(m.anchor,g,b);return}if(w===ds){M(m,g,b);return}if(O!==2&&N&1&&L)if(O===0)L.beforeEnter(H),r(H,g,b),mt(()=>L.enter(H),A);else{const{leave:Y,delayLeave:q,afterLeave:oe}=L,fe=()=>r(H,g,b),Te=()=>{Y(H,()=>{fe(),oe&&oe()})};q?q(H,fe,Te):Te()}else r(H,g,b)},ge=(m,g,b,O=!1,A=!1)=>{const{type:H,props:w,ref:L,children:C,dynamicChildren:N,shapeFlag:B,patchFlag:Y,dirs:q}=m;if(L!=null&&sa(L,null,b,m,!0),B&256){g.ctx.deactivate(m);return}const oe=B&1&&q,fe=!cs(m);let Te;if(fe&&(Te=w&&w.onVnodeBeforeUnmount)&&Bt(Te,g,m),B&6)xt(m.component,b,O);else{if(B&128){m.suspense.unmount(b,O);return}oe&&Jn(m,null,g,"beforeUnmount"),B&64?m.type.remove(m,g,b,A,qe,O):N&&(H!==Ve||Y>0&&Y&64)?Je(N,g,b,!1,!0):(H===Ve&&Y&384||!A&&B&16)&&Je(C,g,b),O&&Ze(m)}(fe&&(Te=w&&w.onVnodeUnmounted)||oe)&&mt(()=>{Te&&Bt(Te,g,m),oe&&Jn(m,null,g,"unmounted")},b)},Ze=m=>{const{type:g,el:b,anchor:O,transition:A}=m;if(g===Ve){({}).NODE_ENV!=="production"&&m.patchFlag>0&&m.patchFlag&2048&&A&&!A.persisted?m.children.forEach(w=>{w.type===gt?s(w.el):Ze(w)}):st(b,O);return}if(g===ds){T(m);return}const H=()=>{s(b),A&&!A.persisted&&A.afterLeave&&A.afterLeave()};if(m.shapeFlag&1&&A&&!A.persisted){const{leave:w,delayLeave:L}=A,C=()=>w(b,H);L?L(m.el,H,C):C()}else H()},st=(m,g)=>{let b;for(;m!==g;)b=h(m),s(m),m=b;s(g)},xt=(m,g,b)=>{({}).NODE_ENV!=="production"&&m.type.__hmrId&&am(m);const{bum:O,scope:A,update:H,subTree:w,um:L}=m;O&&yr(O),A.stop(),H&&(H.active=!1,ge(w,m,g,b)),L&&mt(L,g),mt(()=>{m.isUnmounted=!0},g),g&&g.pendingBranch&&!g.isUnmounted&&m.asyncDep&&!m.asyncResolved&&m.suspenseId===g.pendingId&&(g.deps--,g.deps===0&&g.resolve()),{}.NODE_ENV!=="production"&&pm(m)},Je=(m,g,b,O=!1,A=!1,H=0)=>{for(let w=H;w<m.length;w++)ge(m[w],g,b,O,A)},ye=m=>m.shapeFlag&6?ye(m.component.subTree):m.shapeFlag&128?m.suspense.next():h(m.anchor||m.el),Ue=(m,g,b)=>{m==null?g._vnode&&ge(g._vnode,null,null,!0):_(g._vnode||null,m,g,null,null,null,b),Sl(),bl(),g._vnode=m},qe={p:_,um:ge,m:he,r:Ze,mt:U,mc:X,pc:W,pbc:G,n:ye,o:e};let _n,qt;return t&&([_n,qt]=t(qe)),{render:Ue,hydrate:_n,createApp:lg(Ue,_n)}}function er({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Si(e,t,n=!1){const r=e.children,s=t.children;if(Q(r)&&Q(s))for(let i=0;i<r.length;i++){const o=r[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=Dn(s[i]),a.el=o.el),n||Si(o,a)),a.type===us&&(a.el=o.el),{}.NODE_ENV!=="production"&&a.type===gt&&!a.el&&(a.el=o.el)}}function fg(e){const t=e.slice(),n=[0];let r,s,i,o,a;const c=e.length;for(r=0;r<c;r++){const l=e[r];if(l!==0){if(s=n[n.length-1],e[s]<l){t[r]=s,n.push(r);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<l?i=a+1:o=a;l<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}const pg=e=>e.__isTeleport,Ve=Symbol({}.NODE_ENV!=="production"?"Fragment":void 0),us=Symbol({}.NODE_ENV!=="production"?"Text":void 0),gt=Symbol({}.NODE_ENV!=="production"?"Comment":void 0),ds=Symbol({}.NODE_ENV!=="production"?"Static":void 0),hs=[];let At=null;function ee(e=!1){hs.push(At=e?null:[])}function mg(){hs.pop(),At=hs[hs.length-1]||null}let fs=1;function tu(e){fs+=e}function nu(e){return e.dynamicChildren=fs>0?At||gr:null,mg(),fs>0&&At&&At.push(e),e}function ae(e,t,n,r,s,i){return nu(x(e,t,n,r,s,i,!0))}function tr(e,t,n,r,s){return nu(xe(e,t,n,r,s,!0))}function bi(e){return e?e.__v_isVNode===!0:!1}function ps(e,t){return{}.NODE_ENV!=="production"&&t.shapeFlag&6&&br.has(t.type)?(e.shapeFlag&=-257,t.shapeFlag&=-513,!1):e.type===t.type&&e.key===t.key}const gg=(...e)=>su(...e),Ii="__vInternal",ru=({key:e})=>e??null,vi=({ref:e,ref_key:t,ref_for:n})=>e!=null?Re(e)||Ke(e)||ie(e)?{i:Ge,r:e,k:t,f:!!n}:e:null;function x(e,t=null,n=null,r=0,s=null,i=e===Ve?0:1,o=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ru(t),ref:t&&vi(t),scopeId:di,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Ge};return a?(oa(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=Re(n)?8:16),{}.NODE_ENV!=="production"&&c.key!==c.key&&z("VNode created with invalid key (NaN). VNode type:",c.type),fs>0&&!o&&At&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&At.push(c),c}const xe={}.NODE_ENV!=="production"?gg:su;function su(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===Ll)&&({}.NODE_ENV!=="production"&&!e&&z(`Invalid vnode type when creating vnode: ${e}.`),e=gt),bi(e)){const a=Tn(e,t,!0);return n&&oa(a,n),fs>0&&!i&&At&&(a.shapeFlag&6?At[At.indexOf(e)]=a:At.push(a)),a.patchFlag|=-2,a}if(du(e)&&(e=e.__vccOpts),t){t=yg(t);let{class:a,style:c}=t;a&&!Re(a)&&(t.class=Yr(a)),Se(c)&&(Lo(c)&&!Q(c)&&(c=He({},c)),t.style=_t(c))}const o=Re(e)?1:wm(e)?128:pg(e)?64:Se(e)?4:ie(e)?2:0;return{}.NODE_ENV!=="production"&&o&4&&Lo(e)&&(e=ce(e),z("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
21
|
+
Component that was made reactive: `,e)),x(e,t,n,r,s,o,i,!0)}function yg(e){return e?Lo(e)||Ii in e?He({},e):e:null}function Tn(e,t,n=!1){const{props:r,ref:s,patchFlag:i,children:o}=e,a=t?Eg(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&ru(a),ref:t&&t.ref?n&&s?Q(s)?s.concat(vi(t)):[s,vi(t)]:vi(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:{}.NODE_ENV!=="production"&&i===-1&&Q(o)?o.map(iu):o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ve?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Tn(e.ssContent),ssFallback:e.ssFallback&&Tn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function iu(e){const t=Tn(e);return Q(e.children)&&(t.children=e.children.map(iu)),t}function ia(e=" ",t=0){return xe(us,null,e,t)}function _g(e,t){const n=xe(ds,null,e);return n.staticCount=t,n}function Fe(e="",t=!1){return t?(ee(),tr(gt,null,e)):xe(gt,null,e)}function kt(e){return e==null||typeof e=="boolean"?xe(gt):Q(e)?xe(Ve,null,e.slice()):typeof e=="object"?Dn(e):xe(us,null,String(e))}function Dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Tn(e)}function oa(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Q(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),oa(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!(Ii in t)?t._ctx=Ge:s===3&&Ge&&(Ge.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ie(t)?(t={default:t,_ctx:Ge},n=32):(t=String(t),r&64?(n=16,t=[ia(t)]):n=8);e.children=t,e.shapeFlag|=n}function Eg(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const s in r)if(s==="class")t.class!==r.class&&(t.class=Yr([t.class,r.class]));else if(s==="style")t.style=_t([t.style,r.style]);else if(Zr(s)){const i=t[s],o=r[s];o&&i!==o&&!(Q(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=r[s])}return t}function Bt(e,t,n,r=null){Pt(e,t,7,[n,r])}const Sg=eu();let bg=0;function Ig(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||Sg,i={uid:bg++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new pp(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Wl(r,s),emitsOptions:Pl(r,s),emit:null,emitted:null,propsDefaults:Ie,inheritAttrs:r.inheritAttrs,ctx:Ie,data:Ie,props:Ie,attrs:Ie,slots:Ie,refs:Ie,setupState:Ie,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return{}.NODE_ENV!=="production"?i.ctx=Vm(i):i.ctx={_:i},i.root=t?t.root:i,i.emit=_m.bind(null,i),e.ce&&e.ce(i),i}let Le=null;const vg=()=>Le||Ge,vr=e=>{Le=e,e.scope.on()},nr=()=>{Le&&Le.scope.off(),Le=null},wg=wt("slot,component");function aa(e,t){const n=t.isNativeTag||$c;(wg(e)||n(e))&&z("Do not use built-in or reserved HTML elements as component id: "+e)}function ou(e){return e.vnode.shapeFlag&4}let ms=!1;function Cg(e,t=!1){ms=t;const{props:n,children:r}=e.vnode,s=ou(e);Jm(e,n,s,t),og(e,r);const i=s?Tg(e,t):void 0;return ms=!1,i}function Tg(e,t){var n;const r=e.type;if({}.NODE_ENV!=="production"){if(r.name&&aa(r.name,e.appContext.config),r.components){const i=Object.keys(r.components);for(let o=0;o<i.length;o++)aa(i[o],e.appContext.config)}if(r.directives){const i=Object.keys(r.directives);for(let o=0;o<i.length;o++)xl(i[o])}r.compilerOptions&&Dg()&&z('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=dl(new Proxy(e.ctx,$l)),{}.NODE_ENV!=="production"&&Bm(e);const{setup:s}=r;if(s){const i=e.setupContext=s.length>1?uu(e):null;vr(e),Wn();const o=tn(s,e,0,[{}.NODE_ENV!=="production"?Er(e.props):e.props,i]);if(zn(),nr(),Co(o)){if(o.then(nr,nr),t)return o.then(a=>{au(e,a,t)}).catch(a=>{ci(a,e,0)});if(e.asyncDep=o,{}.NODE_ENV!=="production"&&!e.suspense){const a=(n=r.name)!==null&&n!==void 0?n:"Anonymous";z(`Component <${a}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else au(e,o,t)}else cu(e,t)}function au(e,t,n){ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Se(t)?({}.NODE_ENV!=="production"&&bi(t)&&z("setup() should not return VNodes directly - return a render function instead."),{}.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=pl(t),{}.NODE_ENV!=="production"&&Wm(e)):{}.NODE_ENV!=="production"&&t!==void 0&&z(`setup() should return an object. Received: ${t===null?"null":typeof t}`),cu(e,n)}let ca;const Dg=()=>!ca;function cu(e,t,n){const r=e.type;if(!e.render){if(!t&&ca&&!r.render){const s=r.template||Qo(e).template;if(s){({}).NODE_ENV!=="production"&&sn(e,"compile");const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:c}=r,l=He(He({isCustomElement:i,delimiters:a},o),c);r.render=ca(s,l),{}.NODE_ENV!=="production"&&on(e,"compile")}}e.render=r.render||et}vr(e),Wn(),Km(e),zn(),nr(),{}.NODE_ENV!=="production"&&!r.render&&e.render===et&&!t&&(r.template?z('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):z("Component is missing template or render function."))}function lu(e){return new Proxy(e.attrs,{}.NODE_ENV!=="production"?{get(t,n){return fi(),ot(e,"get","$attrs"),t[n]},set(){return z("setupContext.attrs is readonly."),!1},deleteProperty(){return z("setupContext.attrs is readonly."),!1}}:{get(t,n){return ot(e,"get","$attrs"),t[n]}})}function uu(e){const t=r=>{if({}.NODE_ENV!=="production"&&(e.exposed&&z("expose() should be called only once per setup()."),r!=null)){let s=typeof r;s==="object"&&(Q(r)?s="array":Ke(r)&&(s="ref")),s!=="object"&&z(`expose() should be passed a plain object, received ${s}.`)}e.exposed=r||{}};let n;return{}.NODE_ENV!=="production"?Object.freeze({get attrs(){return n||(n=lu(e))},get slots(){return Er(e.slots)},get emit(){return(r,...s)=>e.emit(r,...s)},expose:t}):{get attrs(){return n||(n=lu(e))},slots:e.slots,emit:e.emit,expose:t}}function wi(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(pl(dl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in qn)return qn[n](e)},has(t,n){return n in t||n in qn}}))}const Pg=/(?:^|[-_])(\w)/g,Ag=e=>e.replace(Pg,t=>t.toUpperCase()).replace(/[-_]/g,"");function la(e,t=!0){return ie(e)?e.displayName||e.name:e.name||t&&e.__name}function Ci(e,t,n=!1){let r=la(t);if(!r&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&e&&e.parent){const s=i=>{for(const o in i)if(i[o]===t)return o};r=s(e.components||e.parent.type.components)||s(e.appContext.components)}return r?Ag(r):n?"App":"Anonymous"}function du(e){return ie(e)&&"__vccOpts"in e}const Wt=(e,t)=>Zp(e,t,ms);function kg(){return Ng().slots}function Ng(){const e=vg();return{}.NODE_ENV!=="production"&&!e&&z("useContext() called without active instance."),e.setupContext||(e.setupContext=uu(e))}const Mg=Symbol({}.NODE_ENV!=="production"?"ssrContext":""),Og=()=>{{const e=pi(Mg);return e||{}.NODE_ENV!=="production"&&z("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function ua(e){return!!(e&&e.__v_isShallow)}function Rg(){if({}.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#0b1bc9"},n={style:"color:#b62e24"},r={style:"color:#9d288c"},s={header(u){return Se(u)?u.__isVue?["div",e,"VueInstance"]:Ke(u)?["div",{},["span",e,d(u)],"<",a(u.value),">"]:Kn(u)?["div",{},["span",e,ua(u)?"ShallowReactive":"Reactive"],"<",a(u),`>${vn(u)?" (readonly)":""}`]:vn(u)?["div",{},["span",e,ua(u)?"ShallowReadonly":"Readonly"],"<",a(u),">"]:null:null},hasBody(u){return u&&u.__isVue},body(u){if(u&&u.__isVue)return["div",{},...i(u.$)]}};function i(u){const h=[];u.type.props&&u.props&&h.push(o("props",ce(u.props))),u.setupState!==Ie&&h.push(o("setup",u.setupState)),u.data!==Ie&&h.push(o("data",ce(u.data)));const f=c(u,"computed");f&&h.push(o("computed",f));const p=c(u,"inject");return p&&h.push(o("injected",p)),h.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:u}]]),h}function o(u,h){return h=He({},h),Object.keys(h).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},u],["div",{style:"padding-left:1.25em"},...Object.keys(h).map(f=>["div",{},["span",r,f+": "],a(h[f],!1)])]]:["span",{}]}function a(u,h=!0){return typeof u=="number"?["span",t,u]:typeof u=="string"?["span",n,JSON.stringify(u)]:typeof u=="boolean"?["span",r,u]:Se(u)?["object",{object:h?ce(u):u}]:["span",n,String(u)]}function c(u,h){const f=u.type;if(ie(f))return;const p={};for(const _ in u.ctx)l(f,_,h)&&(p[_]=u.ctx[_]);return p}function l(u,h,f){const p=u[f];if(Q(p)&&p.includes(h)||Se(p)&&h in p||u.extends&&l(u.extends,h,f)||u.mixins&&u.mixins.some(_=>l(_,h,f)))return!0}function d(u){return ua(u)?"ShallowRef":u.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}const hu="3.2.47",xg="http://www.w3.org/2000/svg",rr=typeof document<"u"?document:null,fu=rr&&rr.createElement("template"),Lg={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t?rr.createElementNS(xg,e):rr.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>rr.createTextNode(e),createComment:e=>rr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>rr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const o=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{fu.innerHTML=r?`<svg>${e}</svg>`:e;const a=fu.content;if(r){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Ug(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Fg(e,t,n){const r=e.style,s=Re(n);if(n&&!s){if(t&&!Re(t))for(const i in t)n[i]==null&&da(r,i,"");for(const i in n)da(r,i,n[i])}else{const i=r.display;s?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=i)}}const $g=/[^\\];\s*$/,pu=/\s*!important$/;function da(e,t,n){if(Q(n))n.forEach(r=>da(e,t,r));else if(n==null&&(n=""),{}.NODE_ENV!=="production"&&$g.test(n)&&z(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=jg(e,t);pu.test(n)?e.setProperty(En(r),n.replace(pu,""),"important"):e[r]=n}}const mu=["Webkit","Moz","ms"],ha={};function jg(e,t){const n=ha[t];if(n)return n;let r=Ut(t);if(r!=="filter"&&r in e)return ha[t]=r;r=Hn(r);for(let s=0;s<mu.length;s++){const i=mu[s]+r;if(i in e)return ha[t]=i}return t}const gu="http://www.w3.org/1999/xlink";function Hg(e,t,n,r,s){if(r&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(gu,t.slice(6,t.length)):e.setAttributeNS(gu,t,n);else{const i=op(t);n==null||i&&!Uc(n)?e.removeAttribute(t):e.setAttribute(t,i?"":n)}}function Vg(e,t,n,r,s,i,o){if(t==="innerHTML"||t==="textContent"){r&&o(r,s,i),e[t]=n??"";return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const c=n??"";(e.value!==c||e.tagName==="OPTION")&&(e.value=c),n==null&&e.removeAttribute(t);return}let a=!1;if(n===""||n==null){const c=typeof e[t];c==="boolean"?n=Uc(n):n==null&&c==="string"?(n="",a=!0):c==="number"&&(n=0,a=!0)}try{e[t]=n}catch(c){({}).NODE_ENV!=="production"&&!a&&z(`Failed setting prop "${t}" on <${e.tagName.toLowerCase()}>: value ${n} is invalid.`,c)}a&&e.removeAttribute(t)}function sr(e,t,n,r){e.addEventListener(t,n,r)}function Bg(e,t,n,r){e.removeEventListener(t,n,r)}function Wg(e,t,n,r,s=null){const i=e._vei||(e._vei={}),o=i[t];if(r&&o)o.value=r;else{const[a,c]=zg(t);if(r){const l=i[t]=Yg(r,s);sr(e,a,l,c)}else o&&(Bg(e,a,o,c),i[t]=void 0)}}const yu=/(?:Once|Passive|Capture)$/;function zg(e){let t;if(yu.test(e)){t={};let r;for(;r=e.match(yu);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):En(e.slice(2)),t]}let fa=0;const Kg=Promise.resolve(),Gg=()=>fa||(Kg.then(()=>fa=0),fa=Date.now());function Yg(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Pt(Zg(r,n.value),t,5,[r])};return n.value=e,n.attached=Gg(),n}function Zg(e,t){if(Q(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const _u=/^on[a-z]/,Xg=(e,t,n,r,s=!1,i,o,a,c)=>{t==="class"?Ug(e,r,s):t==="style"?Fg(e,n,r):Zr(t)?Ws(t)||Wg(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Jg(e,t,r,s))?Vg(e,t,r,i,o,a,c):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Hg(e,t,r,s))};function Jg(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&_u.test(t)&&ie(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||_u.test(t)&&Re(n)?!1:t in e}const Ti=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Q(t)?n=>yr(t,n):t};function qg(e){e.target.composing=!0}function Eu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Di={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e._assign=Ti(s);const i=r||s.props&&s.props.type==="number";sr(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;n&&(a=a.trim()),i&&(a=Zs(a)),e._assign(a)}),n&&sr(e,"change",()=>{e.value=e.value.trim()}),t||(sr(e,"compositionstart",qg),sr(e,"compositionend",Eu),sr(e,"change",Eu))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:s}},i){if(e._assign=Ti(i),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(s||e.type==="number")&&Zs(e.value)===t))return;const o=t??"";e.value!==o&&(e.value=o)}},Qg={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const s=zs(t);sr(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Zs(Pi(o)):Pi(o));e._assign(e.multiple?s?new Set(i):i:i[0])}),e._assign=Ti(r)},mounted(e,{value:t}){Su(e,t)},beforeUpdate(e,t,n){e._assign=Ti(n)},updated(e,{value:t}){Su(e,t)}};function Su(e,t){const n=e.multiple;if(n&&!Q(t)&&!zs(t)){({}).NODE_ENV!=="production"&&z(`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(t).slice(8,-1)}.`);return}for(let r=0,s=e.options.length;r<s;r++){const i=e.options[r],o=Pi(i);if(n)Q(t)?i.selected=cp(t,o)>-1:i.selected=t.has(o);else if(Bs(Pi(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}function Pi(e){return"_value"in e?e._value:e.value}const ey=["ctrl","shift","alt","meta"],ty={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>ey.some(n=>e[`${n}Key`]&&!t.includes(n))},pa=(e,t)=>(n,...r)=>{for(let s=0;s<t.length;s++){const i=ty[t[s]];if(i&&i(n,t))return}return e(n,...r)},ir={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):gs(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),gs(e,!0),r.enter(e)):r.leave(e,()=>{gs(e,!1)}):gs(e,t))},beforeUnmount(e,{value:t}){gs(e,t)}};function gs(e,t){e.style.display=t?e._vod:"none"}const ny=He({patchProp:Xg},Lg);let bu;function ry(){return bu||(bu=dg(ny))}const Iu=(...e)=>{ry().render(...e)};function sy(){Rg()}({}).NODE_ENV!=="production"&&sy();function nt(e){let t;const n=()=>{Iu(null,e.el),t=void 0},r={},s=Object.keys(e.on||{}).reduce((o,a)=>{const c=a.charAt(0).toUpperCase()+a.slice(1);return o[`on${c}`]=e.on[a],o},r)||{};s.onClose||(s.onClose=()=>n());const i={...e.props,...s,onVnodeUnmounted:()=>{},onVnodeMounted:()=>{}};return t=xe(e.component,i),Iu(t,e.el),{vnode:t,destroy:n}}const iy={baseUrl:"",cssUrl:"",redirectUrl:"",url:"",apiUrl:""},oy={baseUrl:"https://assets.payfurl.com",cssUrl:"https://assets.payfurl.com/v4.6.0/js/",url:"https://assets.payfurl.com/v4.6.0/iframe/index.html",redirectUrl:"https://assets.payfurl.com/v4.6.0/checkout/redirect.html",apiUrl:"https://develop-api.payfurl.com"},ay={baseUrl:"https://assets.payfurl.com",cssUrl:"https://assets.payfurl.com/v4.6.0/js/",url:"https://assets.payfurl.com/v4.6.0/iframe/index.html",redirectUrl:"https://assets.payfurl.com/v4.6.0/checkout/redirect.html",apiUrl:"https://sandbox-api.payfurl.com"},cy={baseUrl:"https://assets.payfurl.com",cssUrl:"https://assets.payfurl.com/v4.6.0/js/",url:"https://assets.payfurl.com/v4.6.0/iframe/index.html",redirectUrl:"https://assets.payfurl.com/v4.6.0/checkout/redirect.html",apiUrl:"https://api.payfurl.com"};var yt;(function(e){e.LOCAL="local",e.DEVELOPMENT="development",e.SANDBOX="sandbox",e.PRODUCTION="production"})(yt||(yt={}));const ly={[yt.LOCAL]:iy,[yt.DEVELOPMENT]:oy,[yt.SANDBOX]:ay,[yt.PRODUCTION]:cy};function vu(e){return ly[e]}var uy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wu={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(uy,function(){var n=1e3,r=6e4,s=36e5,i="millisecond",o="second",a="minute",c="hour",l="day",d="week",u="month",h="quarter",f="year",p="date",_="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var F=["th","st","nd","rd"],U=R%100;return"["+R+(F[(U-20)%10]||F[U]||F[0])+"]"}},k=function(R,F,U){var j=String(R);return!j||j.length>=F?R:""+Array(F+1-j.length).join(U)+R},M={s:k,z:function(R){var F=-R.utcOffset(),U=Math.abs(F),j=Math.floor(U/60),v=U%60;return(F<=0?"+":"-")+k(j,2,"0")+":"+k(v,2,"0")},m:function R(F,U){if(F.date()<U.date())return-R(U,F);var j=12*(U.year()-F.year())+(U.month()-F.month()),v=F.clone().add(j,u),P=U-v<0,W=F.clone().add(j+(P?-1:1),u);return+(-(j+(U-v)/(P?v-W:W-v))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:u,y:f,w:d,d:l,D:p,h:c,m:a,s:o,ms:i,Q:h}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},T="en",V={};V[T]=E;var $=function(R){return R instanceof G},J=function R(F,U,j){var v;if(!F)return T;if(typeof F=="string"){var P=F.toLowerCase();V[P]&&(v=P),U&&(V[P]=U,v=P);var W=F.split("-");if(!v&&W.length>1)return R(W[0])}else{var re=F.name;V[re]=F,v=re}return!j&&v&&(T=v),v||!j&&T},X=function(R,F){if($(R))return R.clone();var U=typeof F=="object"?F:{};return U.date=R,U.args=arguments,new G(U)},D=M;D.l=J,D.i=$,D.w=function(R,F){return X(R,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var G=function(){function R(U){this.$L=J(U.locale,null,!0),this.parse(U)}var F=R.prototype;return F.parse=function(U){this.$d=function(j){var v=j.date,P=j.utc;if(v===null)return new Date(NaN);if(D.u(v))return new Date;if(v instanceof Date)return new Date(v);if(typeof v=="string"&&!/Z$/i.test(v)){var W=v.match(S);if(W){var re=W[2]-1||0,Ee=(W[7]||"0").substring(0,3);return P?new Date(Date.UTC(W[1],re,W[3]||1,W[4]||0,W[5]||0,W[6]||0,Ee)):new Date(W[1],re,W[3]||1,W[4]||0,W[5]||0,W[6]||0,Ee)}}return new Date(v)}(U),this.$x=U.x||{},this.init()},F.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},F.$utils=function(){return D},F.isValid=function(){return this.$d.toString()!==_},F.isSame=function(U,j){var v=X(U);return this.startOf(j)<=v&&v<=this.endOf(j)},F.isAfter=function(U,j){return X(U)<this.startOf(j)},F.isBefore=function(U,j){return this.endOf(j)<X(U)},F.$g=function(U,j,v){return D.u(U)?this[j]:this.set(v,U)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(U,j){var v=this,P=!!D.u(j)||j,W=D.p(U),re=function(ye,Ue){var qe=D.w(v.$u?Date.UTC(v.$y,Ue,ye):new Date(v.$y,Ue,ye),v);return P?qe:qe.endOf(l)},Ee=function(ye,Ue){return D.w(v.toDate()[ye].apply(v.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Ue)),v)},he=this.$W,ge=this.$M,Ze=this.$D,st="set"+(this.$u?"UTC":"");switch(W){case f:return P?re(1,0):re(31,11);case u:return P?re(1,ge):re(0,ge+1);case d:var xt=this.$locale().weekStart||0,Je=(he<xt?he+7:he)-xt;return re(P?Ze-Je:Ze+(6-Je),ge);case l:case p:return Ee(st+"Hours",0);case c:return Ee(st+"Minutes",1);case a:return Ee(st+"Seconds",2);case o:return Ee(st+"Milliseconds",3);default:return this.clone()}},F.endOf=function(U){return this.startOf(U,!1)},F.$set=function(U,j){var v,P=D.p(U),W="set"+(this.$u?"UTC":""),re=(v={},v[l]=W+"Date",v[p]=W+"Date",v[u]=W+"Month",v[f]=W+"FullYear",v[c]=W+"Hours",v[a]=W+"Minutes",v[o]=W+"Seconds",v[i]=W+"Milliseconds",v)[P],Ee=P===l?this.$D+(j-this.$W):j;if(P===u||P===f){var he=this.clone().set(p,1);he.$d[re](Ee),he.init(),this.$d=he.set(p,Math.min(this.$D,he.daysInMonth())).$d}else re&&this.$d[re](Ee);return this.init(),this},F.set=function(U,j){return this.clone().$set(U,j)},F.get=function(U){return this[D.p(U)]()},F.add=function(U,j){var v,P=this;U=Number(U);var W=D.p(j),re=function(ge){var Ze=X(P);return D.w(Ze.date(Ze.date()+Math.round(ge*U)),P)};if(W===u)return this.set(u,this.$M+U);if(W===f)return this.set(f,this.$y+U);if(W===l)return re(1);if(W===d)return re(7);var Ee=(v={},v[a]=r,v[c]=s,v[o]=n,v)[W]||1,he=this.$d.getTime()+U*Ee;return D.w(he,this)},F.subtract=function(U,j){return this.add(-1*U,j)},F.format=function(U){var j=this,v=this.$locale();if(!this.isValid())return v.invalidDate||_;var P=U||"YYYY-MM-DDTHH:mm:ssZ",W=D.z(this),re=this.$H,Ee=this.$m,he=this.$M,ge=v.weekdays,Ze=v.months,st=function(Ue,qe,_n,qt){return Ue&&(Ue[qe]||Ue(j,P))||_n[qe].slice(0,qt)},xt=function(Ue){return D.s(re%12||12,Ue,"0")},Je=v.meridiem||function(Ue,qe,_n){var qt=Ue<12?"AM":"PM";return _n?qt.toLowerCase():qt},ye={YY:String(this.$y).slice(-2),YYYY:this.$y,M:he+1,MM:D.s(he+1,2,"0"),MMM:st(v.monthsShort,he,Ze,3),MMMM:st(Ze,he),D:this.$D,DD:D.s(this.$D,2,"0"),d:String(this.$W),dd:st(v.weekdaysMin,this.$W,ge,2),ddd:st(v.weekdaysShort,this.$W,ge,3),dddd:ge[this.$W],H:String(re),HH:D.s(re,2,"0"),h:xt(1),hh:xt(2),a:Je(re,Ee,!0),A:Je(re,Ee,!1),m:String(Ee),mm:D.s(Ee,2,"0"),s:String(this.$s),ss:D.s(this.$s,2,"0"),SSS:D.s(this.$ms,3,"0"),Z:W};return P.replace(I,function(Ue,qe){return qe||ye[Ue]||W.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(U,j,v){var P,W=D.p(j),re=X(U),Ee=(re.utcOffset()-this.utcOffset())*r,he=this-re,ge=D.m(this,re);return ge=(P={},P[f]=ge/12,P[u]=ge,P[h]=ge/3,P[d]=(he-Ee)/6048e5,P[l]=(he-Ee)/864e5,P[c]=he/s,P[a]=he/r,P[o]=he/n,P)[W]||he,v?ge:D.a(ge)},F.daysInMonth=function(){return this.endOf(u).$D},F.$locale=function(){return V[this.$L]},F.locale=function(U,j){if(!U)return this.$L;var v=this.clone(),P=J(U,j,!0);return P&&(v.$L=P),v},F.clone=function(){return D.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},R}(),te=G.prototype;return X.prototype=te,[["$ms",i],["$s",o],["$m",a],["$H",c],["$W",l],["$M",u],["$y",f],["$D",p]].forEach(function(R){te[R[1]]=function(F){return this.$g(F,R[0],R[1])}}),X.extend=function(R,F){return R.$i||(R(F,G,X),R.$i=!0),X},X.locale=J,X.isDayjs=$,X.unix=function(R){return X(1e3*R)},X.en=V[T],X.Ls=V,X.p={},X})})(wu);var hy=wu.exports;const Cu=dy(hy);function fy(e){return e=e.replace(/ /g,"").trim(),e.search(/^\d{14,16}$/i)===-1?!1:py(e)}function py(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let s=e.charAt(r),i=parseInt(s,10);n&&(i*=2)>9&&(i-=9),t+=i,n=!n}return t%10===0}function my(e){if(e.search(/^\d{2}\/\d{2}$/i)===-1)return!1;const t=e.split("/"),n=parseInt(t[0],10),r=parseInt(t[1],10);if(n<0||n>12)return!1;const s="20"+r.toString()+"-"+n.toString()+"-01",i=Cu(s,"YYYY-MM-DD");return!(Cu().startOf("month").diff(i,"days")>0)}function Tu(e){return e.slice().replaceAll(/[^0-9]/g,"")}function gy(e){let t=Tu(e);return t.length>9&&(t=t.slice(t.length-9)),"0"+t}function Ai(e){const t=Tu(e);return t.search(/^0[0-9]{9}$/)>-1||t.search(/^61[0-9]{9}$/)>-1||e.startsWith("+")&&t.search(/^[0-9]{11}$/)>-1}function ys(e){return e.search(/^\w+([+.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/)>-1}function yy(e){return e.search(/^\d{3,4}$/i)>-1}function rt(e){return e?Array.isArray(e)?e.length>0:typeof e=="object"?Object.keys(e).length>0:!!e:!1}function ct(e){return!isNaN(parseFloat(e))&&parseFloat(e)>0}function Du(e,t,n,r){t(e)||r&&r({error:n})}function _y(e){const t=[10,1,3,5,7,9,11,13,15,17,19];if(e.length!==11||e.search(/\D/)>-1)return!1;let n=0,r=0;for(let s=0;s<=t.length-1;s++){r=t[s];const i=parseInt(e[s],10)-(s?0:1);n+=r*i}return n%89===0}function Ey(e){let t=new RegExp("^4");return e.match(t)?"visa":/^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$/.test(e)?"mastercard":(t=new RegExp("^3[47]"),e.match(t)?"amex":(t=new RegExp("^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)"),e.match(t)?"discover":(t=new RegExp("^36"),e.match(t)?"diners":(t=new RegExp("^30[0-5]"),e.match(t)?"diners - carte blanche":(t=new RegExp("^35(2[89]|[3-8][0-9])"),e.match(t)?"jcb":(t=new RegExp("^(4026|417500|4508|4844|491(3|7))"),e.match(t)?"visa electron":""))))))}const Sy=Oe({__name:"PaypalIcon",props:{size:null,grayscale:{type:Boolean}},setup(e){const t=e,n=t.grayscale?"#2A2A2B":"#253b80",r=t.grayscale?"#555557":"#179bd7",s=t.grayscale?"#000000":"#222d65",i=`--size: ${t.size}px`;return(o,a)=>(ee(),ae("svg",{id:"paypal",style:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25.576353 30.177"},[x("path",{d:"m 7.2659888,29.154 0.523,-3.322 -1.165,-0.027 -5.563,0 3.866,-24.513 c 0.012,-0.074 0.051,-0.143 0.108,-0.192 0.057,-0.049 0.13,-0.076 0.206,-0.076 l 9.3800002,0 c 3.114,0 5.263,0.648 6.385,1.927 0.526,0.6 0.861,1.227 1.023,1.917 0.17,0.724 0.173,1.589 0.007,2.644 l -0.012,0.077 0,0.676 0.526,0.298 c 0.443,0.235 0.795,0.504 1.065,0.812 0.45,0.513 0.741,1.165 0.864,1.938 0.127,0.795 0.085,1.741 -0.123,2.812 -0.24,1.232 -0.628,2.305 -1.152,3.183 -0.482,0.809 -1.096,1.48 -1.825,2 -0.696,0.494 -1.523,0.869 -2.458,1.109 -0.906,0.236 -1.939,0.355 -3.072,0.355 l -0.73,0 c -0.522,0 -1.029,0.188 -1.427,0.525 -0.399,0.344 -0.663,0.814 -0.744,1.328 l -0.055,0.299 -0.924,5.855 -0.042,0.215 c -0.011,0.068 -0.03,0.102 -0.058,0.125 -0.025,0.021 -0.061,0.035 -0.096,0.035 l -4.5070002,0 z",style:_t(`fill: ${be(n)}`)},null,4),x("path",{d:"m 23.047989,7.667 0,0 0,0 c -0.028,0.179 -0.06,0.362 -0.096,0.55 -1.237,6.351 -5.469,8.545 -10.874,8.545 l -2.7520002,0 c -0.661,0 -1.218,0.48 -1.321,1.132 l 0,0 0,0 -1.409,8.936 -0.399,2.533 c -0.067,0.428 0.263,0.814 0.695,0.814 l 4.8810002,0 c 0.578,0 1.069,-0.42 1.16,-0.99 l 0.048,-0.248 0.919,-5.832 0.059,-0.32 c 0.09,-0.572 0.582,-0.992 1.16,-0.992 l 0.73,0 c 4.729,0 8.431,-1.92 9.513,-7.476 0.452,-2.321 0.218,-4.259 -0.978,-5.622 -0.362,-0.411 -0.811,-0.752 -1.336,-1.03 z",style:_t(`fill: ${be(r)}`)},null,4),x("path",{d:"m 21.753989,7.151 c -0.189,-0.055 -0.384,-0.105 -0.584,-0.15 -0.201,-0.044 -0.407,-0.083 -0.619,-0.117 -0.742,-0.12 -1.555,-0.177 -2.426,-0.177 l -7.352,0 c -0.181,0 -0.353,0.041 -0.507,0.115 C 9.9269888,6.985 9.6749888,7.306 9.6139888,7.699 l -1.564,9.906 -0.045,0.289 c 0.103,-0.652 0.66,-1.132 1.321,-1.132 l 2.7520002,0 c 5.405,0 9.637,-2.195 10.874,-8.545 0.037,-0.188 0.068,-0.371 0.096,-0.55 -0.313,-0.166 -0.652,-0.308 -1.017,-0.429 -0.09,-0.03 -0.183,-0.059 -0.277,-0.087 z",style:_t(`fill: ${be(s)}`)},null,4),x("path",{d:"m 9.6139888,7.699 c 0.061,-0.393 0.313,-0.714 0.6520002,-0.876 0.155,-0.074 0.326,-0.115 0.507,-0.115 l 7.352,0 c 0.871,0 1.684,0.057 2.426,0.177 0.212,0.034 0.418,0.073 0.619,0.117 0.2,0.045 0.395,0.095 0.584,0.15 0.094,0.028 0.187,0.057 0.278,0.086 0.365,0.121 0.704,0.264 1.017,0.429 0.368,-2.347 -0.003,-3.945 -1.272,-5.392 C 20.377989,0.682 17.852989,0 14.621989,0 L 5.2419888,0 c -0.66,0 -1.223,0.48 -1.325,1.133 L 0.00998882,25.898 c -0.077,0.49 0.301,0.932 0.795,0.932 l 5.79099998,0 1.454,-9.225 1.564,-9.906 z",style:_t(`fill: ${be(n)}`)},null,4)]))}}),rT="",$e=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},by=$e(Sy,[["__scopeId","data-v-2b840669"]]),Pu=e=>(Ht("data-v-6a1e8b23"),e=e(),Vt(),e),Iy=[Pu(()=>x("path",{d:"M1188.420307 68.911452c16.92562 0 32.642267 14.507674 32.642267 32.642267v822.101535c0 16.92562-14.507674 32.642267-32.642267 32.642267h-1088.075561c-16.92562 0-32.642267-14.507674-32.642267-32.642267v-822.101535c0-16.92562 14.507674-32.642267 32.642267-32.642267h1088.075561m0-68.911452h-1088.075561C44.731995 0 0 45.940968 0 100.344746v822.101535c0 55.612751 44.731995 100.344746 100.344746 100.344746h1088.075561c55.612751 0 100.344746-44.731995 100.344746-100.344746v-822.101535c1.208973-54.403778-44.731995-100.344746-100.344746-100.344746z"},null,-1)),Pu(()=>x("path",{d:"M41.105077 252.675325h1221.062574v258.720189H41.105077zM177.719008 778.578512h174.09209v71.329398H177.719008zM432.812279 778.578512h259.929161v71.329398H432.812279z"},null,-1))],vy=Oe({__name:"CreditCardIcon",props:{size:null,grayscale:{type:Boolean},color:null},setup(e){const t=e,n=se(t.color);as(()=>t.color,s=>{n.value=s});const r=Wt(()=>`--size: ${t.size}px;fill:${n.value}`);return(s,i)=>(ee(),ae("svg",{xmlns:"http://www.w3.org/2000/svg",style:_t([{width:"1.2587890625em",height:"1em","vertical-align":"middle",overflow:"hidden"},be(r)]),viewBox:"0 0 1289 1024"},Iy,4))}}),oT="",wy=$e(vy,[["__scopeId","data-v-6a1e8b23"]]),Cy=[_g(`<path style="fill:#5F6368;" d="M37.8,19.7V29h-3V6h7.8c1.9,0,3.7,0.7,5.1,2c1.4,1.2,2.1,3,2.1,4.9c0,1.9-0.7,3.6-2.1,4.9c-1.4,1.3-3.1,2-5.1,2
|
|
9
22
|
L37.8,19.7L37.8,19.7z M37.8,8.8v8h5c1.1,0,2.2-0.4,2.9-1.2c1.6-1.5,1.6-4,0.1-5.5c0,0-0.1-0.1-0.1-0.1c-0.8-0.8-1.8-1.3-2.9-1.2
|
|
10
23
|
L37.8,8.8L37.8,8.8z" data-v-33711fb1></path><path style="fill:#5F6368;" d="M56.7,12.8c2.2,0,3.9,0.6,5.2,1.8s1.9,2.8,1.9,4.8V29H61v-2.2h-0.1c-1.2,1.8-2.9,2.7-4.9,2.7
|
|
11
24
|
c-1.7,0-3.2-0.5-4.4-1.5c-1.1-1-1.8-2.4-1.8-3.9c0-1.6,0.6-2.9,1.8-3.9c1.2-1,2.9-1.4,4.9-1.4c1.8,0,3.2,0.3,4.3,1v-0.7
|
|
@@ -13,7 +26,7 @@ Component that was made reactive: `,e)),C(e,t,s,r,n,o,i,!0)}function au(e){retur
|
|
|
13
26
|
c0,0.8,0.4,1.5,1,1.9c0.7,0.5,1.5,0.8,2.3,0.8c1.2,0,2.4-0.5,3.3-1.4c1-0.9,1.5-2,1.5-3.2c-0.9-0.7-2.2-1.1-3.9-1.1
|
|
14
27
|
c-1.2,0-2.2,0.3-3,0.9C53.3,22.6,52.9,23.3,52.9,24.2z" data-v-33711fb1></path><path style="fill:#5F6368;" d="M80,13.3l-9.9,22.7h-3l3.7-7.9l-6.5-14.7h3.2l4.7,11.3h0.1l4.6-11.3H80z" data-v-33711fb1></path><path style="fill:#4285F4;" d="M25.9,17.7c0-0.9-0.1-1.8-0.2-2.7H13.2v5.1h7.1c-0.3,1.6-1.2,3.1-2.6,4v3.3H22C24.5,25.1,25.9,21.7,25.9,17.7z" data-v-33711fb1></path><path style="fill:#34A853;" d="M13.2,30.6c3.6,0,6.6-1.2,8.8-3.2l-4.3-3.3c-1.2,0.8-2.7,1.3-4.5,1.3c-3.4,0-6.4-2.3-7.4-5.5H1.4v3.4
|
|
15
28
|
C3.7,27.8,8.2,30.6,13.2,30.6z" data-v-33711fb1></path><path style="fill:#FBBC04;" d="M5.8,19.9c-0.6-1.6-0.6-3.4,0-5.1v-3.4H1.4c-1.9,3.7-1.9,8.1,0,11.9L5.8,19.9z" data-v-33711fb1></path><path style="fill:#EA4335;" d="M13.2,9.4c1.9,0,3.7,0.7,5.1,2l0,0l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4c-5,0-9.6,2.8-11.8,7.3l4.4,3.4
|
|
16
|
-
C6.8,11.7,9.8,9.4,13.2,9.4z" data-v-33711fb1></path>`,7)],gd=ve({__name:"GooglePayIcon",props:{size:null,grayscale:{type:Boolean}},setup(e){const s=`--size: ${e.size}px`;return(r,n)=>(z(),ee("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 80 38.1","xml:space":"preserve",style:s},md))}}),zp="",yd=we(gd,[["__scopeId","data-v-33711fb1"]]),_d=["fill"],bd=ve({__name:"PayToIcon",props:{size:null,grayscale:{type:Boolean}},setup(e){const t=e,s=(t.grayscale,"#000"),r=`--size: ${t.size}px`;return(n,i)=>(z(),ee("svg",{id:"payto-icon",viewBox:"0 0 120 57",xmlns:"http://www.w3.org/2000/svg",style:r},[C("path",{d:"m8.285 27.63c.8 0 1.562-.06 2.285-.176a6.262 6.262 0 0 0 1.937-.624 3.529 3.529 0 0 0 1.354-1.227c.335-.52.502-1.194.502-2.025s-.169-1.463-.502-1.97a3.492 3.492 0 0 0 -1.337-1.187c-.555-.287-1.186-.473-1.897-.565a17.32 17.32 0 0 0 -2.188-.136h-3.56v7.91zm-8.285-12.04h8.945c1.573 0 2.994.144 4.258.429 1.265.288 2.349.754 3.254 1.404.902.648 1.599 1.479 2.092 2.493.488 1.012.736 2.235.736 3.663 0 1.533-.283 2.818-.853 3.858a6.956 6.956 0 0 1 -2.303 2.512c-.968.637-2.098 1.097-3.388 1.383-1.29.285-2.66.43-4.103.43h-3.76v11.415h-4.878zm32.679 19.054h-1.043c-.751 0-1.538.034-2.364.098s-1.588.207-2.283.427c-.697.223-1.279.534-1.742.937-.464.403-.696.954-.696 1.655 0 .442.095.812.29 1.11.195.3.446.54.755.721.31.183.659.311 1.045.39a5.94 5.94 0 0 0 1.161.117c1.6 0 2.813-.427 3.639-1.287.826-.857 1.238-2.026 1.238-3.505zm.078 6.156h-.116c-.466.832-1.213 1.516-2.247 2.047-1.034.532-2.206.8-3.523.8-.749 0-1.53-.099-2.343-.293a6.902 6.902 0 0 1 -2.245-.972 5.624 5.624 0 0 1 -1.705-1.793c-.45-.74-.676-1.656-.676-2.745 0-1.404.394-2.52 1.18-3.351.787-.831 1.8-1.468 3.04-1.91 1.24-.44 2.614-.732 4.124-.875a47.58 47.58 0 0 1 4.433-.215v-.47c0-1.168-.42-2.031-1.259-2.589s-1.839-.839-3-.839c-.981 0-1.923.21-2.826.624-.903.417-1.652.924-2.246 1.521l-2.4-2.844a10.478 10.478 0 0 1 3.659-2.222 12.448 12.448 0 0 1 4.203-.74c1.651 0 3.013.233 4.084.7 1.072.468 1.916 1.079 2.536 1.83a6.571 6.571 0 0 1 1.298 2.534c.245.936.369 1.869.369 2.806v11.376h-4.338v-2.377l-.002-.004zm5.719-16.325h5.15l5.189 13.599h.078l4.607-13.6h4.84l-8.791 22.717a16.433 16.433 0 0 1 -1.083 2.278 6.33 6.33 0 0 1 -1.395 1.676 5.56 5.56 0 0 1 -1.916 1.032c-.736.234-1.62.351-2.654.351-.386 0-.78-.019-1.182-.058a8.113 8.113 0 0 1 -1.219-.215l.386-4.052c.31.104.614.175.91.215s.575.058.834.058c.49 0 .902-.058 1.238-.175.337-.117.62-.298.852-.545.232-.248.438-.552.618-.917.181-.364.376-.792.582-1.286l.93-2.376-7.977-18.702zm42.808 14.279c.893 0 2.072-.328 2.536-.49v3.735c-.468.183-1.478.535-2.536.535-3.691 0-6.695-3.064-6.697-6.831v-11.228h-4.225v-3.675h4.225v-4.66h3.665v4.66h10a13.83 13.83 0 0 0 -3.625 3.675h-6.375v11.228c0 1.688 1.39 3.05 3.032 3.05zm15 3.78c-6.038 0-10.801-4.79-10.801-10.866s4.845-10.868 10.8-10.868h12.183l.004-3.376 6.267 5.245-6.278 5.256.004-3.45h-12.337c-3.775 0-6.897 3.396-6.897 7.193s3.11 7.13 7.053 7.13c3.942 0 7.053-3.163 7.053-7.13 0-1.755-.62-3.377-1.386-4.553h4.139c.65 1.402.993 3.006.993 4.553 0 6.076-4.761 10.866-10.801 10.866zm10.909-42.534h-31.031c-7.074 0-12.807 5.77-12.807 12.886v31.226c0 7.117 5.735 12.886 12.807 12.886h31.031c7.074 0 12.806-5.77 12.806-12.886v-31.226c0-7.116-5.734-12.886-12.806-12.886z",fill:ce(s)},null,8,_d)]))}}),Xp="",Id=we(bd,[["__scopeId","data-v-0b2d8aa0"]]),ir="payfurl-combined-container";function en(e,t){if(!e)return null;for(;e.parentNode&&e.parentNode.nodeName.toLowerCase()!=="body";)if(e=e.parentNode,e.id===t)return e;return null}const vd=["id"],Ed=["id","onClick"],Pd=["value","id"],Cd={class:"combined-tab-title"},Ad={class:"combined-tab-name"},Nd={key:0,class:"combined-tab-description"},Sd=["src","alt"],wd=["id"],Dd=ve({__name:"Combined",props:{elements:null},setup(e){const t=e,s=B(0),r={},n=B({});function i(d){s.value=d,setTimeout(()=>{c(d),t.elements[d].activate()},200);const u=document.getElementById(`payment-type${d}`);u.checked=!0}function o(d){return d.icon&&typeof d.icon=="object"}function a(d){return d.icon&&typeof d.icon=="string"}function l(d){return s.value===d}function c(d){if(t.elements[d].render&&!r[d]){try{t.elements[d].render(document.getElementById(`container-component${d}`)),n.value[d]=!1}catch(u){console.error(u),n.value[d]=!0;return}r[d]=!0}}return at(()=>{t.elements.forEach((d,u)=>{c(u)}),i(0)}),(d,u)=>(z(),ee("div",{class:"payfurl-sdk-combined-container",id:ce(ir)},[(z(!0),ee(Se,null,Mc(t.elements,(p,y)=>(z(),ee(Se,{key:`container-component${y}`},[n.value[y]?Ae("",!0):(z(),ee("div",{key:0,class:Rs(["payfurl-sdk-combined-tab",y===s.value?"active":""]),id:p.id||`combined-tab${y}`,onClick:m=>i(y)},[C("input",{type:"radio",name:"payment-type",value:p.title,id:`payment-type${y}`},null,8,Pd),C("div",Cd,[C("div",Ad,Re(p.title),1),p.description?(z(),ee("div",Nd,Re(p.description),1)):Ae("",!0)]),o(p)?(z(),cs(Dc(p.icon),{key:0,size:30})):Ae("",!0),a(p)?(z(),ee("img",{key:1,src:p.icon,style:{width:"40px",height:"30px","object-fit":"contain"},alt:p.title},null,8,Sd)):Ae("",!0)],10,Ed)),lt(C("div",{class:"payfurl-sdk-container-component",id:`container-component${y}`},null,8,wd),[[Cs,l(y)]])],64))),128))],8,vd))}}),Bp="",Td=we(Dd,[["__scopeId","data-v-6abd8e98"]]);class It{constructor(t,s,r){g(this,"publicKey","");g(this,"version","");g(this,"regionResolver",null);this.publicKey=t,this.version=s,this.regionResolver=r}invoke(t,s,r,n,i,o){const a=new XMLHttpRequest;a||i==null||i(0,""),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){if(a.status===200||a.status===201){n==null||n(a.status,a.responseText);return}i==null||i(a.status,a.responseText)}};const l=new URL(t);if(this.regionResolver){const c=new URL(this.regionResolver.getRegionUrl());l.hostname=c.hostname}if(a.open(s,l.toString()),a.setRequestHeader("Content-Type","application/json"),this.publicKey&&a.setRequestHeader("x-publickey",this.publicKey),this.version&&a.setRequestHeader("sdk-version",this.version),o)for(const[c,d]of Object.entries(o))a.setRequestHeader(c,d);a.send(String(r))}}const Md={class:"message"},kd=ve({__name:"Error",props:{error:null},setup(e){const s=B(e.error);return(r,n)=>(z(),ee("div",Md,Re(s.value),1))}}),Jp="",Qp="",Od=we(kd,[["__scopeId","data-v-ae4be0f9"]]),xd={class:"message"},Rd={key:0},Ld=ve({__name:"Success",props:{message:null,token:null},setup(e){const t=e;return(s,r)=>(z(),ee(Se,null,[C("div",xd,Re(t.message),1),t.token?(z(),ee("div",Rd,"TokenId = "+Re(t.token),1)):Ae("",!0)],64))}}),qp="",em="",Ud=we(Ld,[["__scopeId","data-v-265528b7"]]);function X(e,t){e&&Ke({el:e,component:Od,props:{error:t}})}function tn(e,t,s){e&&Ke({el:e,component:Ud,props:{message:t,...s||{}}})}class si{constructor(){g(this,"iframeId","threeDsIframeMethod");g(this,"containerId","payfurlContainerFormInvoker");g(this,"iframe",null);g(this,"container",null)}createIFrame(){this.iframe||(this.container=document.createElement("div"),this.container.id=this.containerId,document.body.appendChild(this.container),this.iframe=document.createElement("iframe"),this.iframe.name=this.iframeId,this.iframe.style.display="none",this.container.appendChild(this.iframe))}invoke(t,s,r,n,i){var a;this.createIFrame();const o=document.createElement("form");o.action=t,o.target=this.iframeId,o.method="post",(a=this.container)==null||a.appendChild(o);for(let l in r){const c=document.createElement("input");c.type="hidden",c.name=l,c.value=r[l],o.appendChild(c)}o.submit()}}const ba={AED:"784",AFN:"971",ALL:"008",AMD:"051",ANG:"532",AOA:"973",ARS:"032",AUD:"036",AWG:"533",AZN:"944",BAM:"977",BBD:"052",BDT:"050",BGN:"975",BHD:"048",BIF:"108",BMD:"060",BND:"096",BOB:"068",BOV:"984",BRL:"986",BSD:"044",BTN:"064",BWP:"072",BYN:"933",BZD:"084",CAD:"124",CDF:"976",CHE:"947",CHF:"756",CHW:"948",CLF:"990",CLP:"152",CNY:"156",COP:"170",COU:"970",CRC:"188",CUC:"931",CUP:"192",CVE:"132",CZK:"203",DJF:"262",DKK:"208",DOP:"214",DZD:"012",EGP:"818",ERN:"232",ETB:"230",EUR:"978",FJD:"242",FKP:"238",GBP:"826",GEL:"981",GHS:"936",GIP:"292",GMD:"270",GNF:"324",GTQ:"320",GYD:"328",HKD:"344",HNL:"340",HRK:"191",HTG:"332",HUF:"348",IDR:"360",ILS:"376",INR:"356",IQD:"368",IRR:"364",ISK:"352",JMD:"388",JOD:"400",JPY:"392",KES:"404",KGS:"417",KHR:"116",KMF:"174",KPW:"408",KRW:"410",KWD:"414",KYD:"136",KZT:"398",LAK:"418",LBP:"422",LKR:"144",LRD:"430",LSL:"426",LYD:"434",MAD:"504",MDL:"498",MGA:"969",MKD:"807",MMK:"104",MNT:"496",MOP:"446",MUR:"480",MVR:"462",MWK:"454",MXN:"484",MXV:"979",MYR:"458",MZN:"943",NAD:"516",NGN:"566",NIO:"558",NOK:"578",NPR:"524",NZD:"554",OMR:"512",PAB:"590",PEN:"604",PGK:"598",PHP:"608",PKR:"586",PLN:"985",PYG:"600",QAR:"634",RON:"946",RSD:"941",RUB:"643",RWF:"646",SAR:"682",SBD:"090",SCR:"690",SDG:"938",SEK:"752",SGD:"702",SHP:"654",SLL:"694",SOS:"706",SRD:"968",SSP:"728",SVC:"222",SYP:"760",SZL:"748",THB:"764",TJS:"972",TMT:"934",TND:"788",TOP:"776",TRY:"949",TTD:"780",TWD:"901",TZS:"834",UAH:"980",UGX:"800",USD:"840",USN:"997",UYI:"940",UYU:"858",UYW:"927",UZS:"860",VED:"926",VES:"928",VND:"704",VUV:"548",WST:"882",XAF:"950",XAG:"961",XAU:"959",XBA:"955",XBB:"956",XBC:"957",XBD:"958",XCD:"951",XDR:"960",XOF:"952",XPD:"964",XPF:"953",XPT:"962",XSU:"994",XTS:"963",XUA:"965",XXX:"999",YER:"886",ZAR:"710",ZMW:"967",ZWL:"932"},Vd={BHD:3,BIF:0,CLF:4,CLP:0,DJF:0,GNF:0,IQD:3,ISK:0,JOD:3,JPY:0,KMF:3,KRW:0,KWD:3,LYD:3,OMR:3,PYG:0,RWF:0,TND:3,UGX:0,UYI:0,UYW:4,VND:0,VUV:0,XAF:0,XOF:0,XPF:0};function rt(e){return!!ba[String(e).toUpperCase()]}function Fd(e){return ba[String(e).toUpperCase()]||""}function jd(e){return Vd[String(e).toUpperCase()]||2}function $d(){const e=[1,4,8,15,16,24,32,48];let t=screen.colorDepth;if(e.indexOf(t)==-1){let s=e[0],r=Math.abs(e[0]-t);for(let n=1;n<=e.length;n++){const i=Math.abs(e[n]-t);i<r&&(s=e[n],r=i)}t=s}return t}const qe=e=>(At("data-v-16bb7d59"),e=e(),Nt(),e),Hd={key:0,class:"masked"},Kd={key:0,class:"message"},Zd=qe(()=>C("div",{class:"lds-spinner"},[C("div"),C("div"),C("div"),C("div"),C("div"),C("div"),C("div"),C("div"),C("div"),C("div"),C("div"),C("div")],-1)),Wd={key:1,class:"lds-spinner single"},Yd=[qe(()=>C("div",null,null,-1)),qe(()=>C("div",null,null,-1)),qe(()=>C("div",null,null,-1)),qe(()=>C("div",null,null,-1)),qe(()=>C("div",null,null,-1)),qe(()=>C("div",null,null,-1)),qe(()=>C("div",null,null,-1)),qe(()=>C("div",null,null,-1)),qe(()=>C("div",null,null,-1)),qe(()=>C("div",null,null,-1)),qe(()=>C("div",null,null,-1)),qe(()=>C("div",null,null,-1))],Gd=ve({__name:"Spinner",props:{color:{default:"#1a82b7"},size:{default:50},message:null,useLocal:{type:Boolean}},setup(e){const t=e;B(t.color);const s=B(t.size);return bt(()=>`--spinner-size: ${s.value}px;`),(r,n)=>t.useLocal?(z(),ee("div",Wd,Yd)):(z(),ee("div",Hd,[e.message?(z(),ee("div",Kd,Re(e.message),1)):Ae("",!0),Zd]))}}),fm="",Wt=we(Gd,[["__scopeId","data-v-16bb7d59"]]),zd="init-card-form",ri="submit-card-form",Ia="tokenise-card-form",Xd="request-card",Bd="card-details",va="hide-spinner",or="set-amount",sn="set-currency",Jd="tokenise-card-success",rn="tokenise-card-failure",Qd="click2pay-recognize-user",qd="click2pay-cards",eh="click2pay-remember-me";let Ea=0,ni=()=>{let e=document.getElementById("payfurl-spinner");if(e){e.remove();return}if(window.parent){if(Ea>1)return;Ea++,window.parent.postMessage({status:va},"*")}};function As(){ni();let e=document.getElementById("payfurl-spinner");e||(e=document.createElement("div"),e.id="payfurl-spinner",document.body.appendChild(e));const t=Ke({el:e,component:Wt});ni=()=>{t.destroy()}}function Oe(){ni()}const ii={[Qe.DEVELOPMENT]:{AU:"https://develop-api-au.payfurl.com",JP:"https://develop-api-jp.payfurl.com",DEFAULT:"https://develop-api.payfurl.com"},[Qe.SANDBOX]:{AU:"https://sandbox-api-au.payfurl.com",US:"https://sandbox-api-us.payfurl.com",DEFAULT:"https://sandbox-api.payfurl.com"},[Qe.PRODUCTION]:{AU:"https://api-au.payfurl.com",US:"https://api-us.payfurl.com",EU:"https://api-eu.payfurl.com",DEFAULT:"https://api.payfurl.com"},[Qe.LOCAL]:{DEFAULT:"https://localhost:5001"}};class Tt{constructor(t,s){g(this,"environment");g(this,"location");this.environment=t.toLowerCase(),this.location=s.toUpperCase()}getRegionUrl(){if(!ii[this.environment])throw new Error(`Invalid environment: ${this.environment}`);return ii[this.environment][this.location]||ii[this.environment].DEFAULT}}function th(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Mt(e){const t=e.match(/-([a-z]{2})$/);return(t==null?void 0:t[1])||""}function Pa(e){const t=e.match(/\+(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)(\d{1,14})$/);return t?[t[1],t[2]]:[e]}function Ca(e){return e.replace(/(\d{4})\d{8}(\d{4})/,"$1 **** **** $2")}const vt={PREAUTH:"PREAUTH",AUTH:"AUTH",POSTAUTH:"POSTAUTH",AUTH_COMPLETE:"AUTH_COMPLETE"},Ns=(e,t)=>({[vt.PREAUTH]:{url:e+(t?"/3ds/preauth/token/"+t:"/3ds/preauth"),method:"POST"},[vt.AUTH]:{url:e+(t?"/3ds/auth/token/"+t:"/3ds/auth"),method:"POST"},[vt.POSTAUTH]:{url:e+"/3ds/postauth",method:"POST"},[vt.AUTH_COMPLETE]:{url:e+"/3ds/auth_complete",method:"POST"}});class sh{constructor(t,s){g(this,"container",null);g(this,"log");g(this,"apiUrl","");g(this,"threeDsInvoker",null);g(this,"providerId");g(this,"requireChallenge",!1);g(this,"cardProviderId");g(this,"address",null);g(this,"paymentInfo",null);g(this,"tokenId","");g(this,"currency","AUD");g(this,"amount",0);g(this,"email",null);g(this,"failureCallback",null);g(this,"successCallback",null);g(this,"threeDSCompleteHandler",null);g(this,"httpInvoker",null);g(this,"formInvoker",null);this.log=t,this.apiUrl=s.apiUrl,this.providerId=s.providerId,this.cardProviderId=s.cardProviderId,this.failureCallback=s.onFailure||null,this.successCallback=s.onSuccess||null,this.threeDsInvoker=s.threeDsInvoker||null;const r=new Tt(s.environment,Mt(s.publicKey));this.httpInvoker=new It(s.publicKey,s.version,r),this.formInvoker=new si}setTokenId(t){this.tokenId=t}setEmail(t){this.email=t}setCurrency(t){this.currency=t}setAmount(t){this.amount=t}setPaymentInfo(t){const s=t.expiryDate.split("/");this.paymentInfo={cardNumber:t.cardNumber,expiryDate:(s[1]||"")+(s[0]||""),cardholder:t.cardholder,ccv:t.ccv}}setAddressInfo(t){this.address={...t}}onError(t){var s;this.log("[3ds error]",t),Oe(),X(this.container,t.error),(s=this.failureCallback)==null||s.call(this,t)}onSuccess(t){var s,r;Oe(),this.log("[3ds success]",t),this.threeDSCompleteHandler?(s=this.threeDSCompleteHandler)==null||s.call(this,t):(r=this.successCallback)==null||r.call(this,t)}onPreAuth(t,s){var n,i,o;const r={acctNumber:(n=this.paymentInfo)==null?void 0:n.cardNumber,providerId:this.providerId,ccv:(i=this.paymentInfo)==null?void 0:i.ccv,cardProviderId:this.cardProviderId};this.log("[onPreAuth]",r),(o=this.httpInvoker)==null||o.invoke(Ns(this.apiUrl,this.tokenId)[vt.PREAUTH].url,Ns(this.apiUrl,this.tokenId)[vt.PREAUTH].method,JSON.stringify(r),t,s)}onAuth(t,s,r,n,i,o,a){var p,y,m,I,N,$;this.log("[onAuth]",{threeDSServerTransID:r,isMethodPerformed:n});const l=Fd(this.currency),c=jd(this.currency),d=new Date;i&&JSON.parse(window.atob(i));const u={acctNumber:(p=this.paymentInfo)==null?void 0:p.cardNumber,notificationURL:this.apiUrl+"/3ds/auth_complete",threeDSAuthURL:t,threeDSCompInd:n?"Y":"U",threeDSRequestorTransID:s,threeDSServerTransID:r,threeDSRequestorURL:window.location.href,cardExpiryDate:(y=this.paymentInfo)==null?void 0:y.expiryDate,email:this.email,threeDSRequestorAuthenticationInd:"01",cardholderName:(m=this.paymentInfo)==null?void 0:m.cardholder,deviceChannel:"02",browserInfo:i,browserJavascriptEnabled:!0,browserJavaEnabled:!1,browserLanguage:window.navigator.language,browserColorDepth:String($d()),browserScreenHeight:screen.height+"",browserScreenWidth:screen.width+"",browserTZ:Math.round(d.getTimezoneOffset()/60)+"",browserUserAgent:navigator.userAgent,browserAcceptHeader:"",browserIP:"",messageCategory:"01",messageType:"AReq",messageVersion:"2.1.0",purchaseAmount:(this.amount*Math.pow(10,c)).toFixed(0)+"",payTokenInd:!0,purchaseCurrency:l,purchaseExponent:c+"",purchaseDate:d.toISOString().slice(0,19).replace(/[-:T]/g,""),transType:"01",ccv:((I=this.paymentInfo)==null?void 0:I.ccv)&&String((N=this.paymentInfo)==null?void 0:N.ccv)||"",threeDSRequestorChallengeInd:this.requireChallenge?"04":"01"};($=this.httpInvoker)==null||$.invoke(Ns(this.apiUrl,this.tokenId)[vt.AUTH].url,Ns(this.apiUrl,this.tokenId)[vt.AUTH].method,JSON.stringify(u),(b,R)=>{Oe(),o(b,R)},a)}onPostAuth(t,s,r){var n;this.log("[onPostAuth]",t),As(),(n=this.httpInvoker)==null||n.invoke(Ns(this.apiUrl,this.tokenId)[vt.POSTAUTH].url,Ns(this.apiUrl,this.tokenId)[vt.POSTAUTH].method,JSON.stringify(t),s,r)}threeDSInvoke(t,s,r){var n;this.container=t,this.threeDSCompleteHandler=r||null,this.requireChallenge=s,(n=this.threeDsInvoker)==null||n.onPreAuth()}}const oi=B(!1);function Ze(){return{isLoading:oi,startLoading:()=>{oi.value=!0},stopLoading:()=>{oi.value=!1}}}const rh={style:{position:"relative"}},nh={key:0,class:"error text-normal"},ih=ve({__name:"PaypalForm",props:{log:null,el:null,currency:null,enablePayIn4:{type:Boolean},buttonStyle:null},emits:["approve","submit","activate","close"],setup(e,{emit:t}){const s=e,r="payfurl-paypal-script",n=B(null),i=B(!0),o=B(""),a=B(null);let l=!1;const{isLoading:c}=Ze();function d(m){a.value=m,s.log&&s.log("[Paypal]: checkout",a.value),!l&&(l=!0,u())}function u(){var $;if(document.getElementById(r)){p();return}const m={"client-id":(($=a.value)==null?void 0:$.gatewayTransactionData.ClientId)||"",currency:s.currency.toUpperCase(),"disable-funding":"card"};s.enablePayIn4&&(m["enable-funding"]="paylater");const I=`https://www.paypal.com/sdk/js?${new URLSearchParams(m)}`;window.paypal=null;const N=document.createElement("script");N.src=I,N.id=r,N.onload=p,document.body.appendChild(N)}function p(){window.paypal.Buttons({style:{color:s.buttonStyle},createOrder:function(){var m;return(m=a.value)==null?void 0:m.gatewayTransactionId},onApprove:function(m,I){t("approve",{data:m,actions:I})}}).render(s.el)}function y(m){var I,N,$,b,R,V;(I=m==null?void 0:m.data)!=null&&I.status&&(m.data.status==="activate"&&m.data.component==="paypal"&&((N=s.log)==null||N.call(s,"[Paypal]: message received",m.data),i.value=!0,t("activate")),m.data.status==="deactivate"&&m.data.component==="paypal"&&(($=s.log)==null||$.call(s,"[Paypal]: message received",m.data),i.value=!1),m.data.status==="checkout"&&m.data.component==="paypal"&&((b=s.log)==null||b.call(s,"[Paypal]: message received",m.data),d(m.data.checkoutData)),m.data.status==="message"&&m.data.component==="paypal"&&((R=s.log)==null||R.call(s,"[Paypal]: message received",m.data),o.value=m.data.message),m.data.status==="error"&&m.data.component==="paypal"&&((V=s.log)==null||V.call(s,"[Paypal]: message received",m.data),o.value=m.data.error))}return $t(()=>{window.removeEventListener("message",y)}),at(()=>{window.addEventListener("message",y),en(n.value,ir)||(i.value=!0,t("activate"))}),(m,I)=>(z(),ee(Se,null,[C("div",rh,[lt(Ce(Wt,null,null,512),[[Cs,ce(c)]])]),C("div",{style:{position:"relative"},ref_key:"root",ref:n},[o.value?(z(),ee("div",nh,Re(o.value),1)):Ae("",!0)],512)],64))}});class oh{constructor(t,s){g(this,"log");g(this,"apiUrl","");g(this,"failureCallback",null);g(this,"successCallback",null);g(this,"fraudProcessor",null);g(this,"httpInvoker",null);g(this,"destroy",()=>{});g(this,"checkoutId","");g(this,"amount",0);g(this,"failureCheckoutHandler",(t,s)=>{var r;Ze().stopLoading(),(r=this.failureCallback)==null||r.call(this,{error:"Failed to configure paypal",body:s}),window.postMessage({status:"error",component:"paypal",error:"Failed to configure paypal"},"*")});g(this,"successCheckoutHandler",(t,s)=>{Ze().stopLoading();const r=JSON.parse(s);this.log("paypal success",r);const n=JSON.parse(s),i=JSON.parse(window.atob(n.checkoutData));this.checkoutId=i.checkoutId,window.postMessage({status:"checkout",component:"paypal",checkoutData:i},"*")});this.log=t,this.apiUrl=s.apiUrl,this.failureCallback=s.onFailure||null,this.successCallback=s.onSuccess||null;const r=new Tt(s.environment,Mt(s.publicKey));this.httpInvoker=new It(s.publicKey,s.version,r)}addFraudProcessor(t){this.fraudProcessor=t}cleanUp(){var t;(t=this.destroy)==null||t.call(this)}addPaypal(t,s,r,n,i,o){this.log("[addPaypal]",{amount:r,currency:n,providerId:i,options:o}),this.validateOptions(t,r,n,o);let a=!1;this.fraudProcessor&&(this.fraudProcessor.setAmount(r),this.fraudProcessor.setCurrency(n));const l=Ke({el:t,component:ih,props:{log:this.log,el:t,currency:n,enablePayIn4:!!(o!=null&&o.paypalEnablePayIn4),buttonStyle:o==null?void 0:o.paypalButtonStyle},on:{activate:()=>{a||(a=!0,this.log("activate paypal form"),this.checkout(this.amount||r,n,i,o,()=>{a=!1}),this.setAmount=c=>{this.checkout(c,n,i,o,()=>{a=!1})})},approve:({data:c,actions:d})=>{this.log("[Paypal]: approved",{data:c,actions:d});const u=d.order.get();this.log("[Paypal]: order",u);const p=setInterval(()=>{if(this.log("[Paypal]: setInterval resolved = "+u.resolved),!!u.resolved){if(clearInterval(p),!this.fraudProcessor){this.addCharge(t,null);return}this.fraudProcessor.setPaypalInfo({payerId:u.value.payer.payer_id,payerEmail:u.value.payer.email_address,paymentMethod:"Instant Transfer",paymentStatus:u.value.status,payerAccountCountry:u.value.payer.address.country_code,paymentId:u.value.id}),As(),this.fraudProcessor.fraudCheck(y=>{var m;if(Oe(),y.decision!="Approved"&&y.stopPaymentOnFailure){X(t,"Payment couldn't be processed"),(m=this.failureCallback)==null||m.call(this,{error:"Payment couldn't be processed"});return}this.addCharge(t,y)},y=>{var m;Oe(),X(t,y.error),(m=this.failureCallback)==null||m.call(this,y)})}},200)}}});this.destroy=l.destroy}setAmount(t){var s;this.amount=t,(s=this.fraudProcessor)==null||s.setAmount(t)}checkout(t,s,r,n,i){var l,c;const o=this.apiUrl+"/payment_method/checkout";n||(n={hideShipping:!1,paypalButtonStyle:null,paypalEnablePayIn4:!1,transfer:null});const a={providerId:r,amount:t,currency:s,options:{HideShipping:n.hideShipping?"true":"false"}};(l=n.transfer)!=null&&l.amount&&(a.Transfer={Account:n.transfer.account,Amount:n.transfer.amount}),Ze().startLoading(),(c=this.httpInvoker)==null||c.invoke(o,"POST",JSON.stringify(a),this.successCheckoutHandler.bind(this),(d,u)=>{i==null||i(d,u),this.failureCheckoutHandler.bind(this)(d,u)})}getFailureAddChargeHandler(t){return(s,r)=>{var n;X(t,"Unable to tokenise payment information"),(n=this.failureCallback)==null||n.call(this,{error:"Unable to finish AddCharge",body:r}),this.log("Unable to finish AddCharge, error: "+r)}}getSuccessAddChargeHandler(t){return(s,r)=>{var n;try{const i=JSON.parse(r);this.log("[getSuccessAddChargeHandler]",i),tn(t,"paypal login success"),(n=this.successCallback)==null||n.call(this,{transactionId:i.chargeId})}catch(i){this.log("error parsing addCharge response",i)}}}addCharge(t,s){var n;const r=this.apiUrl+"/charge/checkout";(n=this.httpInvoker)==null||n.invoke(r,"POST",JSON.stringify({checkoutId:this.checkoutId,fraudCheck:s}),this.getSuccessAddChargeHandler(t).bind(this),this.getFailureAddChargeHandler(t).bind(this))}validateOptions(t,s,r,n){if(!rt(r))throw X(t,"Invalid currency: "+r),new TypeError("invalid currency: "+r);if(!st(s))throw X(t,"Invalid amount: "+s),new TypeError("invalid amount: "+s)}}const ah=["src"],lh={key:0,id:"threeDs"},ch=ve({__name:"CardForm",props:{log:null,debug:{type:Boolean},iframeSrc:null,form:null,threeDSEnabled:{type:Boolean}},emits:["load","submit","close"],setup(e,{emit:t}){const s=e,r=B(null),n=B(s.iframeSrc+"?v="+Math.random()),i=B(s.threeDSEnabled),o=B(!1),a=B(!0);function l(u){var p,y,m,I,N,$;if((p=u==null?void 0:u.data)!=null&&p.status){if(u.data.status==="iframe-changed"&&((y=s.log)==null||y.call(s,"[CardForm]: message received",u.data),u.stopPropagation(),d(((m=u.data.message)==null?void 0:m.height)||0)),u.data.status===ri){if((I=s.log)==null||I.call(s,"[CardForm]: message received",u.data),!s.form||!a.value)return;u.stopPropagation();const b=s.form.querySelector('input[name="token"]');if(b!=null&&b.value){s.form.submit();return}t("submit")}u.data.status==="activate"&&u.data.component==="card"&&((N=s.log)==null||N.call(s,"[CardForm]: message received",u.data),a.value=!0),u.data.status==="deactivate"&&u.data.component==="card"&&(($=s.log)==null||$.call(s,"[CardForm]: message received",u.data),a.value=!1)}}$t(()=>{window.removeEventListener("message",l)}),at(()=>{window.addEventListener("message",l)});function c(){t("load",r.value)}function d(u){const p=r.value,y=u||240;p==null||p.setAttribute("style",`height: ${y+20}px`),o.value=!0}return(u,p)=>(z(),ee(Se,null,[C("iframe",{src:n.value,onLoad:c,ref_key:"iframe",ref:r,id:"payfurl-card-iframe"},null,40,ah),i.value?(z(),ee("div",lh)):Ae("",!0)],64))}}),pm="",uh=we(ch,[["__scopeId","data-v-aadf7fda"]]);var fs;(function(e){e.mastercard="mastercard",e.maestro="maestro",e.visa="visa",e.amex="amex",e.discover="discover"})(fs||(fs={}));const dh=[fs.mastercard,fs.maestro,fs.visa,fs.amex,fs.discover];var ai;(function(e){e.NONE="NONE",e.FULL="FULL",e.POSTAL_COUNTRY="POSTAL_COUNTRY"})(ai||(ai={}));const hh="data:image/svg+xml;base64,ICA8c3ZnIHZpZXdCb3g9IjAgMCA0ODAgMTI3IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHBhdGggZmlsbD0iI2VhMDAxYiIKICAgICAgICAgIGQ9IiBNIDMzNC41MiAwLjAwIEwgMzQyLjc2IDAuMDAgUSAzNjIuMjIgMS42OCAzNzcuMzMgMTMuMzUgUSAzNzcuMjMgMTQuMjcgMzc2LjkzIDE0LjE0IEMgMzQ1LjE0IDQwLjc1IDM0NS44OCA4Ny4xOCAzNzcuNjAgMTEzLjUwIFEgMzYyLjIyIDEyNS4zMiAzNDIuODQgMTI3LjAwIEwgMzM0LjIzIDEyNy4wMCBDIDI4MS40NSAxMjIuNDcgMjU2LjA4IDYwLjMxIDI5MS41OCAyMC44MiBRIDMwOC4yNiAyLjI2IDMzNC41MiAwLjAwIFoiIC8+CiAgICA8cGF0aCBmaWxsPSIjZjc5ZjFhIgogICAgICAgICAgZD0iIE0gNDEyLjU4IDAuMDAgTCA0MjEuMDAgMC4wMCBDIDQ1My4yMCAzLjA5IDQ3Ny40MCAyNy4wNyA0ODAuMDAgNTkuMzQgTCA0ODAuMDAgNjcuNzMgQyA0NzcuMDMgOTkuOTcgNDUzLjAyIDEyNC41MyA0MjAuNjEgMTI3LjAwIEwgNDEyLjY3IDEyNy4wMCBRIDM5My4yMiAxMjUuNDYgMzc3LjcxIDExMy41OSBRIDQwMi40NiA5Mi4zNSA0MDEuNjggNjEuNDcgQyA0MDEuMTkgNDEuODAgMzkyLjI2IDI2LjE3IDM3Ny42NSAxMy40OCBRIDM5My4yMCAxLjU3IDQxMi41OCAwLjAwIFoiIC8+CiAgICA8cGF0aCBmaWxsPSIjMDAwMDAwIgogICAgICAgICAgZD0iIE0gMC4wMCAxMDMuNzQgTCAwLjAwIDIzLjI2IFEgMi43MSA5LjQ3IDE0LjQ3IDUuNDkgUSAxOC4yMSA0LjIyIDI1LjYzIDQuMjkgUSAzNi4xMiA0LjM5IDQ2LjU3IDQuMjggUSA0OS45OCA0LjI1IDUxLjMyIDQuOTUgQyA1NC40NyA2LjYyIDU0LjcxIDEyLjI3IDUxLjYwIDE0LjE4IFEgNTAuMzAgMTQuOTkgNDcuMjUgMTUuMDIgUSAzNS4yNSAxNS4xNCAyMy4yNiAxNS4wNCBRIDE0LjgyIDE0Ljk3IDEyLjA0IDIxLjIyIFEgMTAuNzUgMjQuMTIgMTAuNzUgMzIuNDcgUSAxMC43NyA2NC42NSAxMC43OCA5Ni44NCBDIDEwLjc5IDEwOC4wNSAxMy42MiAxMTIuMDkgMjQuODMgMTEyLjExIFEgNDQuODAgMTEyLjE1IDY0Ljc1IDExMi4wNyBDIDY4LjcyIDExMi4wNSA3MS41NSAxMDkuNTIgNzQuMjQgMTA2LjI2IFEgOTEuMDYgODUuODUgMTA4LjkxIDY0LjQ0IEEgMC44NiAwLjg2IDAuMCAwIDAgMTA4LjkxIDYzLjM0IFEgODguNTQgMzguNTAgNjcuOTEgMTMuMzQgQyA2NS43NSAxMC43MSA2NS45OSA3LjI4IDY4LjU3IDUuNDAgUSA3MC4wNSA0LjMyIDczLjU5IDQuMzIgUSA4OC40MyA0LjMxIDEwMy4yNSA0LjMzIFEgMTA1LjkwIDQuMzMgMTA3LjE3IDUuODAgUSAxMzAuNTggMzIuNzkgMTUzLjk0IDU5LjgxIEMgMTU2LjcwIDYzLjAwIDE1NS4yNSA2NS45MCAxNTIuNzMgNjguODggUSAxMzQuNTcgOTAuMjkgMTE2LjI0IDExMS43MSBBIDAuMzUgMC4zNSAwLjAgMCAwIDExNi41MSAxMTIuMjkgTCAxMzIuNDQgMTEyLjI0IEEgMS40MyAxLjQzIDAuMCAwIDAgMTMzLjU1IDExMS43MSBMIDE3Mi45NiA2My45MyBBIDAuODMgMC44MyAwLjAgMCAwIDE3Mi45NiA2Mi44NyBRIDE1Mi45NiAzOC41MCAxMzIuOTMgMTQuMDcgUSAxMzEuMzMgMTIuMTAgMTMxLjAyIDEwLjY5IEMgMTMwLjIzIDcuMDggMTMzLjk0IDMuNDQgMTM3LjM3IDQuMzMgUSAxMzkuMjcgNC44MyAxNDEuNTEgNy40OCBRIDE2My43NCAzMy43NyAxODYuMDYgNTkuOTggUSAxODkuMTMgNjMuNTggMTg1LjY1IDY3LjY2IFEgMTYyLjQ0IDk0LjkxIDEzOS4zNCAxMjEuNzEgQSAzLjEyIDMuMTAgMjAuMiAwIDEgMTM3LjAxIDEyMi43OCBRIDEyMC44NCAxMjIuODIgMTA0LjIzIDEyMi43NiBDIDk3LjcyIDEyMi43NCA5Ny4yNCAxMTcuMTQgMTAwLjY2IDExMi45NiBRIDEyMC42OSA4OC41MSAxNDAuNzEgNjQuMzAgQSAwLjk5IDAuOTkgMC4wIDAgMCAxNDAuNzEgNjMuMDQgTCAxMDEuNDYgMTUuNTYgQSAxLjIzIDEuMjMgMC4wIDAgMCAxMDAuNTEgMTUuMTEgTCA4NC4yOCAxNS4wMSBBIDAuMzkgMC4zOSAwLjAgMCAwIDgzLjk4IDE1LjY1IFEgMTAyLjkzIDM3Ljc1IDEyMS43MCA1OS41NiBDIDEyNS40MiA2My44OSAxMjIuMjYgNjYuOTQgMTE4LjkwIDcwLjkyIFEgOTkuNjcgOTMuNjYgODAuMzAgMTE2LjMwIFEgNzcuMzQgMTE5Ljc3IDcyLjMwIDEyMS41NSBRIDY4LjkzIDEyMi43NCA2My4wNiAxMjIuNzUgUSA0Mi43MiAxMjIuNzcgMjIuMzkgMTIyLjc3IEMgMTAuNTAgMTIyLjc3IDIuMzEgMTE1LjUxIDAuMDAgMTAzLjc0IFoiIC8+CiAgICA8cmVjdCBmaWxsPSIjMDAwMDAwIiB4PSIyMjguNzgiIHk9IjQuMjMiIHdpZHRoPSI0Ljk4IiBoZWlnaHQ9IjExOC43NiIgcng9IjIuNDEiIC8+CiAgICA8cGF0aCBmaWxsPSIjZmY1ZjAxIgogICAgICAgICAgZD0iIE0gMzc3LjMzIDEzLjM1IFEgMzc4LjI2IDEzLjU2IDM3Ny42NSAxMy40OCBDIDM5Mi4yNiAyNi4xNyA0MDEuMTkgNDEuODAgNDAxLjY4IDYxLjQ3IFEgNDAyLjQ2IDkyLjM1IDM3Ny43MSAxMTMuNTkgUSAzNzguMjcgMTEzLjU0IDM3Ny42MCAxMTMuNTAgQyAzNDUuODggODcuMTggMzQ1LjE0IDQwLjc1IDM3Ni45MyAxNC4xNCBRIDM3Ny4yMyAxNC4yNyAzNzcuMzMgMTMuMzUgWiIgLz4KICA8L3N2Zz4K",mm="",fh={},ph=e=>(At("data-v-d7e8386b"),e=e(),Nt(),e),mh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},gh=[ph(()=>C("polygon",{points:"39 10.44 37.56 9 24 22.56 10.44 9 9 10.44 22.56 24 9 37.56 10.44 39 24 25.44 37.56 39 39 37.56 25.44 24 39 10.44"},null,-1))];function yh(e,t){return z(),ee("svg",mh,gh)}const li=we(fh,[["render",yh],["__scopeId","data-v-d7e8386b"]]),_h=["onMousedown"],bh={class:"modal-header"},Ih=["onClick"],vh={class:"main-title"},Eh={class:"modal-body"},Ph={key:0,class:"modal-footer"},Ch=ve({__name:"Modal",props:{width:null,height:null,mode:null,backdrop:null},emits:["close"],setup(e,{emit:t}){const s=e;function r(){t("close")}function n(){s.backdrop!=="static"&&r()}const i=Iu(),o=bt(()=>!!i.footer),a=bt(()=>{const c=[];return s.width&&c.push(`width: ${s.width}`),s.height&&c.push(`height: ${s.height}`),c.join(";")}),l=bt(()=>s.mode=="confirm"?"small":"");return(c,d)=>(z(),ee("div",{class:"modal-mask",onMousedown:ti(n,["self"])},[C("div",{class:Rs(["modal-wrapper",ce(l)]),role:"document",onClick:d[0]||(d[0]=ti(()=>{},["stop"]))},[C("div",{class:"modal-content",style:Te(ce(a))},[C("div",bh,[C("div",{class:"close-icon",onClick:ti(r,["stop"])},[Ce(li,{size:15})],8,Ih),C("div",vh,[$r(c.$slots,"title",{},void 0,!0)])]),C("div",Eh,[$r(c.$slots,"body",{},void 0,!0)]),ce(o)?(z(),ee("div",Ph,[$r(c.$slots,"footer",{},void 0,!0)])):Ae("",!0),$r(c.$slots,"default",{},void 0,!0)],4)],2)],40,_h))}}),ym="",Aa=we(Ch,[["__scopeId","data-v-2b2c8fc7"]]),ci=e=>(At("data-v-584afce5"),e=e(),Nt(),e),Ah=ci(()=>C("img",{src:hh,alt:"Click To Pay",style:{width:"70px","margin-right":"20px"}},null,-1)),Nh={class:"payfurl-form"},Sh={class:"container-form"},wh={class:"row"},Dh=ci(()=>C("label",null,"Email Address",-1)),Th={key:0,class:"error"},Mh={class:"row"},kh=ci(()=>C("label",null,"Phone",-1)),Oh={key:0,class:"error"},xh=ve({__name:"LoginForm",emits:["close","submit"],setup(e,{emit:t}){const s=B(""),r=B(""),n=B({});function i(){return n.value={},nr(s.value)||(n.value.email="Please type valid email address"),r.value&&!qr(r.value)&&(n.value.phone="Please type phone in international format"),Object.keys(n.value).length===0}function o(){i()&&t("submit",{email:s.value,phone:r.value})}function a(){t("close")}return(l,c)=>(z(),cs(Aa,{width:"350",onClose:a},{title:Es(()=>[Ah,Yn(" Click To Pay Login ")]),body:Es(()=>[C("div",Nh,[C("div",Sh,[C("div",wh,[Dh,C("div",null,[lt(C("input",{type:"text",maxlength:"100",placeholder:"Email Address",name:"email","onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d)},null,512),[[Jr,s.value]]),n.value.email?(z(),ee("p",Th,Re(n.value.email),1)):Ae("",!0)])]),C("div",Mh,[kh,C("div",null,[lt(C("input",{type:"text",maxlength:"100",placeholder:"Phone",name:"phone","onUpdate:modelValue":c[1]||(c[1]=d=>r.value=d)},null,512),[[Jr,r.value]]),n.value.phone?(z(),ee("p",Oh,Re(n.value.phone),1)):Ae("",!0)])])])])]),footer:Es(()=>[C("div",{class:"payfurl-form",style:{padding:"0"}},[C("button",{onClick:o},"Continue")])]),_:1}))}}),_m="",bm="",Rh=we(xh,[["__scopeId","data-v-584afce5"]]);class Lh{constructor(t,s){g(this,"log");g(this,"debug",!1);g(this,"amount",0);g(this,"currency","AUD");g(this,"customer",null);g(this,"options");g(this,"mcCheckoutService",null);g(this,"sdk",null);g(this,"srcOtpInput",null);g(this,"mcModal",null);g(this,"mcFrame",null);g(this,"cards",[]);g(this,"rememberMe",!0);g(this,"recognized",!1);g(this,"recognizeUserCallback",null);g(this,"supportedValidationChannels",[]);g(this,"validationChannelsNetwork","mastercard");g(this,"availableCardBrands",[]);this.log=t,this.debug=s.debug,this.options=s.options}setAmount(t){this.amount=t}getAmount(){return this.amount}setCurrency(t){this.currency=t}getCurrency(){return this.currency}setCustomerInfo(t){this.customer={...t}}getCustomerInfo(){return this.customer}getRememberMe(){return this.rememberMe}setRememberMe(t){this.rememberMe=t}getCards(){return this.cards}setCards(t){var r;this.cards=t;const s=document.getElementById("payfurl-card-iframe");if(s){try{(r=s.contentWindow)==null||r.postMessage({status:qd,cards:t},"*")}catch(n){this.log("[setCards] iframe error",n)}return}this.log("[setCards] iframe not found")}isSchemeSupported(t){return this.availableCardBrands.includes(cd(t))}init(){this.initCss(),this.mcInitOtpInput(),this.mcModalInit();const t=["https://src.mastercard.com/srci/integration/components/src-ui-kit/src-ui-kit.esm.js","https://sandbox.src.mastercard.com/sdk/srcsdk.mastercard.js","https://sandbox.src.mastercard.com/srci/integration/2/lib.js?srcDpaId={dpaId}&locale=en_AU"];let s=0;const r=()=>{s++,s===t.length&&this.mcInitClickToPay()};t.forEach(i=>{const o=document.createElement("script");o.src=i.replace("{dpaId}",this.options.dpaId),i.includes("esm.js")&&(o.type="module"),o.onload=()=>{r()},o.onerror=a=>{var l;typeof a=="object"&&((l=a.target)==null?void 0:l.type)=="module"&&r()},document.head.appendChild(o)});const n=document.createElement("link");n.href="https://src.mastercard.com/srci/integration/components/src-ui-kit/src-ui-kit.css",n.rel="stylesheet",document.head.appendChild(n)}initCss(){const t=document.createElement("style");t.textContent=`
|
|
29
|
+
C6.8,11.7,9.8,9.4,13.2,9.4z" data-v-33711fb1></path>`,7)],Ty=Oe({__name:"GooglePayIcon",props:{size:null,grayscale:{type:Boolean}},setup(e){const n=`--size: ${e.size}px`;return(r,s)=>(ee(),ae("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 80 38.1","xml:space":"preserve",style:n},Cy))}}),cT="",Dy=$e(Ty,[["__scopeId","data-v-33711fb1"]]),Py=["fill"],Ay=Oe({__name:"PayToIcon",props:{size:null,grayscale:{type:Boolean}},setup(e){const t=e,n=(t.grayscale,"#000"),r=`--size: ${t.size}px`;return(s,i)=>(ee(),ae("svg",{id:"payto-icon",viewBox:"0 0 120 57",xmlns:"http://www.w3.org/2000/svg",style:r},[x("path",{d:"m8.285 27.63c.8 0 1.562-.06 2.285-.176a6.262 6.262 0 0 0 1.937-.624 3.529 3.529 0 0 0 1.354-1.227c.335-.52.502-1.194.502-2.025s-.169-1.463-.502-1.97a3.492 3.492 0 0 0 -1.337-1.187c-.555-.287-1.186-.473-1.897-.565a17.32 17.32 0 0 0 -2.188-.136h-3.56v7.91zm-8.285-12.04h8.945c1.573 0 2.994.144 4.258.429 1.265.288 2.349.754 3.254 1.404.902.648 1.599 1.479 2.092 2.493.488 1.012.736 2.235.736 3.663 0 1.533-.283 2.818-.853 3.858a6.956 6.956 0 0 1 -2.303 2.512c-.968.637-2.098 1.097-3.388 1.383-1.29.285-2.66.43-4.103.43h-3.76v11.415h-4.878zm32.679 19.054h-1.043c-.751 0-1.538.034-2.364.098s-1.588.207-2.283.427c-.697.223-1.279.534-1.742.937-.464.403-.696.954-.696 1.655 0 .442.095.812.29 1.11.195.3.446.54.755.721.31.183.659.311 1.045.39a5.94 5.94 0 0 0 1.161.117c1.6 0 2.813-.427 3.639-1.287.826-.857 1.238-2.026 1.238-3.505zm.078 6.156h-.116c-.466.832-1.213 1.516-2.247 2.047-1.034.532-2.206.8-3.523.8-.749 0-1.53-.099-2.343-.293a6.902 6.902 0 0 1 -2.245-.972 5.624 5.624 0 0 1 -1.705-1.793c-.45-.74-.676-1.656-.676-2.745 0-1.404.394-2.52 1.18-3.351.787-.831 1.8-1.468 3.04-1.91 1.24-.44 2.614-.732 4.124-.875a47.58 47.58 0 0 1 4.433-.215v-.47c0-1.168-.42-2.031-1.259-2.589s-1.839-.839-3-.839c-.981 0-1.923.21-2.826.624-.903.417-1.652.924-2.246 1.521l-2.4-2.844a10.478 10.478 0 0 1 3.659-2.222 12.448 12.448 0 0 1 4.203-.74c1.651 0 3.013.233 4.084.7 1.072.468 1.916 1.079 2.536 1.83a6.571 6.571 0 0 1 1.298 2.534c.245.936.369 1.869.369 2.806v11.376h-4.338v-2.377l-.002-.004zm5.719-16.325h5.15l5.189 13.599h.078l4.607-13.6h4.84l-8.791 22.717a16.433 16.433 0 0 1 -1.083 2.278 6.33 6.33 0 0 1 -1.395 1.676 5.56 5.56 0 0 1 -1.916 1.032c-.736.234-1.62.351-2.654.351-.386 0-.78-.019-1.182-.058a8.113 8.113 0 0 1 -1.219-.215l.386-4.052c.31.104.614.175.91.215s.575.058.834.058c.49 0 .902-.058 1.238-.175.337-.117.62-.298.852-.545.232-.248.438-.552.618-.917.181-.364.376-.792.582-1.286l.93-2.376-7.977-18.702zm42.808 14.279c.893 0 2.072-.328 2.536-.49v3.735c-.468.183-1.478.535-2.536.535-3.691 0-6.695-3.064-6.697-6.831v-11.228h-4.225v-3.675h4.225v-4.66h3.665v4.66h10a13.83 13.83 0 0 0 -3.625 3.675h-6.375v11.228c0 1.688 1.39 3.05 3.032 3.05zm15 3.78c-6.038 0-10.801-4.79-10.801-10.866s4.845-10.868 10.8-10.868h12.183l.004-3.376 6.267 5.245-6.278 5.256.004-3.45h-12.337c-3.775 0-6.897 3.396-6.897 7.193s3.11 7.13 7.053 7.13c3.942 0 7.053-3.163 7.053-7.13 0-1.755-.62-3.377-1.386-4.553h4.139c.65 1.402.993 3.006.993 4.553 0 6.076-4.761 10.866-10.801 10.866zm10.909-42.534h-31.031c-7.074 0-12.807 5.77-12.807 12.886v31.226c0 7.117 5.735 12.886 12.807 12.886h31.031c7.074 0 12.806-5.77 12.806-12.886v-31.226c0-7.116-5.734-12.886-12.806-12.886z",fill:be(n)},null,8,Py)]))}}),lT="",ky=$e(Ay,[["__scopeId","data-v-0b2d8aa0"]]),_s="payfurl-combined-container";function ki(e,t){if(!e)return null;for(;e.parentNode&&e.parentNode.nodeName.toLowerCase()!=="body";)if(e=e.parentNode,e.id===t)return e;return null}const Ny=["id"],My=["id","onClick"],Oy=["value","id"],Ry={class:"combined-tab-title"},xy={class:"combined-tab-name"},Ly={key:0,class:"combined-tab-description"},Uy=["src","alt"],Fy=["id"],$y=Oe({__name:"Combined",props:{elements:null},setup(e){const t=e,n=se(0),r={},s=se({});function i(d){n.value=d,setTimeout(()=>{l(d),t.elements[d].activate()},200);const u=document.getElementById(`payment-type${d}`);u.checked=!0}function o(d){return d.icon&&typeof d.icon=="object"}function a(d){return d.icon&&typeof d.icon=="string"}function c(d){return n.value===d}function l(d){if(t.elements[d].render&&!r[d]){try{t.elements[d].render(document.getElementById(`container-component${d}`)),s.value[d]=!1}catch(u){console.error(u),s.value[d]=!0;return}r[d]=!0}}return Ct(()=>{t.elements.forEach((d,u)=>{l(u)}),i(0)}),(d,u)=>(ee(),ae("div",{class:"payfurl-sdk-combined-container",id:be(_s)},[(ee(!0),ae(Ve,null,Hm(t.elements,(h,f)=>(ee(),ae(Ve,{key:`container-component${f}`},[s.value[f]?Fe("",!0):(ee(),ae("div",{key:0,class:Yr(["payfurl-sdk-combined-tab",f===n.value?"active":""]),id:h.id||`combined-tab${f}`,onClick:p=>i(f)},[x("input",{type:"radio",name:"payment-type",value:h.title,id:`payment-type${f}`},null,8,Oy),x("div",Ry,[x("div",xy,Qe(h.title),1),h.description?(ee(),ae("div",Ly,Qe(h.description),1)):Fe("",!0)]),o(h)?(ee(),tr($m(h.icon),{key:0,size:30})):Fe("",!0),a(h)?(ee(),ae("img",{key:1,src:h.icon,style:{width:"40px",height:"30px","object-fit":"contain"},alt:h.title},null,8,Uy)):Fe("",!0)],10,My)),Tt(x("div",{class:"payfurl-sdk-container-component",id:`container-component${f}`},null,8,Fy),[[ir,c(f)]])],64))),128))],8,Ny))}}),uT="",jy=$e($y,[["__scopeId","data-v-6abd8e98"]]);class an{constructor(t,n,r){y(this,"publicKey","");y(this,"version","");y(this,"regionResolver",null);this.publicKey=t,this.version=n,this.regionResolver=r}invoke(t,n,r,s,i,o){const a=new XMLHttpRequest;a||i==null||i(0,""),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){if(a.status===200||a.status===201){s==null||s(a.status,a.responseText);return}i==null||i(a.status,a.responseText)}};const c=new URL(t);if(this.regionResolver){const l=new URL(this.regionResolver.getRegionUrl());c.hostname=l.hostname}if(a.open(n,c.toString()),a.setRequestHeader("Content-Type","application/json"),this.publicKey&&a.setRequestHeader("x-publickey",this.publicKey),this.version&&a.setRequestHeader("sdk-version",this.version),o)for(const[l,d]of Object.entries(o))a.setRequestHeader(l,d);a.send(String(r))}}const Hy={class:"message"},Vy=Oe({__name:"Error",props:{error:null},setup(e){const n=se(e.error);return(r,s)=>(ee(),ae("div",Hy,Qe(n.value),1))}}),dT="",hT="",By=$e(Vy,[["__scopeId","data-v-ae4be0f9"]]),Wy={class:"message"},zy={key:0},Ky=Oe({__name:"Success",props:{message:null,token:null},setup(e){const t=e;return(n,r)=>(ee(),ae(Ve,null,[x("div",Wy,Qe(t.message),1),t.token?(ee(),ae("div",zy,"TokenId = "+Qe(t.token),1)):Fe("",!0)],64))}}),fT="",pT="",Gy=$e(Ky,[["__scopeId","data-v-265528b7"]]);function ne(e,t){e&&nt({el:e,component:By,props:{error:t}})}function Ni(e,t,n){e&&nt({el:e,component:Gy,props:{message:t,...n||{}}})}class ma{constructor(){y(this,"iframeId","threeDsIframeMethod");y(this,"containerId","payfurlContainerFormInvoker");y(this,"iframe",null);y(this,"container",null)}createIFrame(){this.iframe||(this.container=document.createElement("div"),this.container.id=this.containerId,document.body.appendChild(this.container),this.iframe=document.createElement("iframe"),this.iframe.name=this.iframeId,this.iframe.style.display="none",this.container.appendChild(this.iframe))}invoke(t,n,r,s,i){var a;this.createIFrame();const o=document.createElement("form");o.action=t,o.target=this.iframeId,o.method="post",(a=this.container)==null||a.appendChild(o);for(let c in r){const l=document.createElement("input");l.type="hidden",l.name=c,l.value=r[c],o.appendChild(l)}o.submit()}}const Au={AED:"784",AFN:"971",ALL:"008",AMD:"051",ANG:"532",AOA:"973",ARS:"032",AUD:"036",AWG:"533",AZN:"944",BAM:"977",BBD:"052",BDT:"050",BGN:"975",BHD:"048",BIF:"108",BMD:"060",BND:"096",BOB:"068",BOV:"984",BRL:"986",BSD:"044",BTN:"064",BWP:"072",BYN:"933",BZD:"084",CAD:"124",CDF:"976",CHE:"947",CHF:"756",CHW:"948",CLF:"990",CLP:"152",CNY:"156",COP:"170",COU:"970",CRC:"188",CUC:"931",CUP:"192",CVE:"132",CZK:"203",DJF:"262",DKK:"208",DOP:"214",DZD:"012",EGP:"818",ERN:"232",ETB:"230",EUR:"978",FJD:"242",FKP:"238",GBP:"826",GEL:"981",GHS:"936",GIP:"292",GMD:"270",GNF:"324",GTQ:"320",GYD:"328",HKD:"344",HNL:"340",HRK:"191",HTG:"332",HUF:"348",IDR:"360",ILS:"376",INR:"356",IQD:"368",IRR:"364",ISK:"352",JMD:"388",JOD:"400",JPY:"392",KES:"404",KGS:"417",KHR:"116",KMF:"174",KPW:"408",KRW:"410",KWD:"414",KYD:"136",KZT:"398",LAK:"418",LBP:"422",LKR:"144",LRD:"430",LSL:"426",LYD:"434",MAD:"504",MDL:"498",MGA:"969",MKD:"807",MMK:"104",MNT:"496",MOP:"446",MUR:"480",MVR:"462",MWK:"454",MXN:"484",MXV:"979",MYR:"458",MZN:"943",NAD:"516",NGN:"566",NIO:"558",NOK:"578",NPR:"524",NZD:"554",OMR:"512",PAB:"590",PEN:"604",PGK:"598",PHP:"608",PKR:"586",PLN:"985",PYG:"600",QAR:"634",RON:"946",RSD:"941",RUB:"643",RWF:"646",SAR:"682",SBD:"090",SCR:"690",SDG:"938",SEK:"752",SGD:"702",SHP:"654",SLL:"694",SOS:"706",SRD:"968",SSP:"728",SVC:"222",SYP:"760",SZL:"748",THB:"764",TJS:"972",TMT:"934",TND:"788",TOP:"776",TRY:"949",TTD:"780",TWD:"901",TZS:"834",UAH:"980",UGX:"800",USD:"840",USN:"997",UYI:"940",UYU:"858",UYW:"927",UZS:"860",VED:"926",VES:"928",VND:"704",VUV:"548",WST:"882",XAF:"950",XAG:"961",XAU:"959",XBA:"955",XBB:"956",XBC:"957",XBD:"958",XCD:"951",XDR:"960",XOF:"952",XPD:"964",XPF:"953",XPT:"962",XSU:"994",XTS:"963",XUA:"965",XXX:"999",YER:"886",ZAR:"710",ZMW:"967",ZWL:"932"},Yy={BHD:3,BIF:0,CLF:4,CLP:0,DJF:0,GNF:0,IQD:3,ISK:0,JOD:3,JPY:0,KMF:3,KRW:0,KWD:3,LYD:3,OMR:3,PYG:0,RWF:0,TND:3,UGX:0,UYI:0,UYW:4,VND:0,VUV:0,XAF:0,XOF:0,XPF:0};function Et(e){return!!Au[String(e).toUpperCase()]}function Zy(e){return Au[String(e).toUpperCase()]||""}function Xy(e){return Yy[String(e).toUpperCase()]||2}function Jy(){const e=[1,4,8,15,16,24,32,48];let t=screen.colorDepth;if(e.indexOf(t)==-1){let n=e[0],r=Math.abs(e[0]-t);for(let s=1;s<=e.length;s++){const i=Math.abs(e[s]-t);i<r&&(n=e[s],r=i)}t=n}return t}const St=e=>(Ht("data-v-16bb7d59"),e=e(),Vt(),e),qy={key:0,class:"masked"},Qy={key:0,class:"message"},e_=St(()=>x("div",{class:"lds-spinner"},[x("div"),x("div"),x("div"),x("div"),x("div"),x("div"),x("div"),x("div"),x("div"),x("div"),x("div"),x("div")],-1)),t_={key:1,class:"lds-spinner single"},n_=[St(()=>x("div",null,null,-1)),St(()=>x("div",null,null,-1)),St(()=>x("div",null,null,-1)),St(()=>x("div",null,null,-1)),St(()=>x("div",null,null,-1)),St(()=>x("div",null,null,-1)),St(()=>x("div",null,null,-1)),St(()=>x("div",null,null,-1)),St(()=>x("div",null,null,-1)),St(()=>x("div",null,null,-1)),St(()=>x("div",null,null,-1)),St(()=>x("div",null,null,-1))],r_=Oe({__name:"Spinner",props:{color:{default:"#1a82b7"},size:{default:50},message:null,useLocal:{type:Boolean}},setup(e){const t=e;se(t.color);const n=se(t.size);return Wt(()=>`--spinner-size: ${n.value}px;`),(r,s)=>t.useLocal?(ee(),ae("div",t_,n_)):(ee(),ae("div",qy,[e.message?(ee(),ae("div",Qy,Qe(e.message),1)):Fe("",!0),e_]))}}),DT="",Pn=$e(r_,[["__scopeId","data-v-16bb7d59"]]),s_="init-card-form",ga="submit-card-form",ku="tokenise-card-form",i_="request-card",o_="card-details",Nu="hide-spinner",Es="set-amount",Mi="set-currency",a_="tokenise-card-success",ya="tokenise-card-failure",c_="click2pay-recognize-user",l_="click2pay-cards",u_="click2pay-remember-me";let Mu=0,_a=()=>{let e=document.getElementById("payfurl-spinner");if(e){e.remove();return}if(window.parent){if(Mu>1)return;Mu++,window.parent.postMessage({status:Nu},"*")}};function An(){_a();let e=document.getElementById("payfurl-spinner");e||(e=document.createElement("div"),e.id="payfurl-spinner",document.body.appendChild(e));const t=nt({el:e,component:Pn});_a=()=>{t.destroy()}}function Ne(){_a()}const Ea={[yt.DEVELOPMENT]:{AU:"https://develop-api-au.payfurl.com",JP:"https://develop-api-jp.payfurl.com",DEFAULT:"https://develop-api.payfurl.com"},[yt.SANDBOX]:{AU:"https://sandbox-api-au.payfurl.com",US:"https://sandbox-api-us.payfurl.com",DEFAULT:"https://sandbox-api.payfurl.com"},[yt.PRODUCTION]:{AU:"https://api-au.payfurl.com",US:"https://api-us.payfurl.com",EU:"https://api-eu.payfurl.com",DEFAULT:"https://api.payfurl.com"},[yt.LOCAL]:{DEFAULT:"https://localhost:5001"}};class cn{constructor(t,n){y(this,"environment");y(this,"location");this.environment=t.toLowerCase(),this.location=n.toUpperCase()}getRegionUrl(){if(!Ea[this.environment])throw new Error(`Invalid environment: ${this.environment}`);return Ea[this.environment][this.location]||Ea[this.environment].DEFAULT}}function d_(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ln(e){const t=e.match(/-([a-z]{2})$/);return(t==null?void 0:t[1])||""}function Ou(e){const t=e.match(/\+(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)(\d{1,14})$/);return t?[t[1],t[2]]:[e]}function Ru(e){return e.replace(/(\d{4})\d{8}(\d{4})/,"$1 **** **** $2")}const zt={PREAUTH:"PREAUTH",AUTH:"AUTH",POSTAUTH:"POSTAUTH",AUTH_COMPLETE:"AUTH_COMPLETE"},wr=(e,t)=>({[zt.PREAUTH]:{url:e+(t?"/3ds/preauth/token/"+t:"/3ds/preauth"),method:"POST"},[zt.AUTH]:{url:e+(t?"/3ds/auth/token/"+t:"/3ds/auth"),method:"POST"},[zt.POSTAUTH]:{url:e+"/3ds/postauth",method:"POST"},[zt.AUTH_COMPLETE]:{url:e+"/3ds/auth_complete",method:"POST"}});class h_{constructor(t,n){y(this,"container",null);y(this,"log");y(this,"apiUrl","");y(this,"threeDsInvoker",null);y(this,"providerId");y(this,"requireChallenge",!1);y(this,"cardProviderId");y(this,"address",null);y(this,"paymentInfo",null);y(this,"tokenId","");y(this,"currency","AUD");y(this,"amount",0);y(this,"email",null);y(this,"clientParameters",{});y(this,"failureCallback",null);y(this,"successCallback",null);y(this,"threeDSCompleteHandler",null);y(this,"httpInvoker",null);y(this,"formInvoker",null);this.log=t,this.apiUrl=n.apiUrl,this.providerId=n.providerId,this.cardProviderId=n.cardProviderId,this.failureCallback=n.onFailure||null,this.successCallback=n.onSuccess||null,this.threeDsInvoker=n.threeDsInvoker||null;const r=new cn(n.environment,ln(n.publicKey));this.httpInvoker=new an(n.publicKey,n.version,r),this.formInvoker=new ma}setTokenId(t){this.tokenId=t}setEmail(t){this.email=t}getEmail(){return this.email||""}setCurrency(t){this.currency=t}getCurrency(){return this.currency}setAmount(t){this.amount=t}getAmount(){return this.amount}setPaymentInfo(t){const n=t.expiryDate.split("/");this.paymentInfo={cardNumber:t.cardNumber,expiryDate:(n[1]||"")+(n[0]||""),cardholder:t.cardholder,ccv:t.ccv}}getPaymentInfo(){return{...this.paymentInfo}}setAddressInfo(t){this.address={...t}}getAddressInfo(){return{...this.address}}setClientParameters(t){this.clientParameters={...t}}getClientParameters(){return{...this.clientParameters}}onError(t){var n;this.log("[3ds error]",t),Ne(),ne(this.container,t.error),(n=this.failureCallback)==null||n.call(this,t)}onSuccess(t){var n,r;Ne(),this.log("[3ds success]",t),this.threeDSCompleteHandler?(n=this.threeDSCompleteHandler)==null||n.call(this,t):(r=this.successCallback)==null||r.call(this,t)}onPreAuth(t,n){var s,i,o;const r={acctNumber:(s=this.paymentInfo)==null?void 0:s.cardNumber,providerId:this.providerId,ccv:(i=this.paymentInfo)==null?void 0:i.ccv,cardProviderId:this.cardProviderId};this.log("[onPreAuth]",r),(o=this.httpInvoker)==null||o.invoke(wr(this.apiUrl,this.tokenId)[zt.PREAUTH].url,wr(this.apiUrl,this.tokenId)[zt.PREAUTH].method,JSON.stringify(r),t,n)}onAuth(t,n,r,s,i,o,a){var h,f,p,_,S,I;this.log("[onAuth]",{threeDSServerTransID:r,isMethodPerformed:s});const c=Zy(this.currency),l=Xy(this.currency),d=new Date;i&&JSON.parse(window.atob(i));const u={acctNumber:(h=this.paymentInfo)==null?void 0:h.cardNumber,notificationURL:this.apiUrl+"/3ds/auth_complete",threeDSAuthURL:t,threeDSCompInd:s?"Y":"U",threeDSRequestorTransID:n,threeDSServerTransID:r,threeDSRequestorURL:window.location.href,cardExpiryDate:(f=this.paymentInfo)==null?void 0:f.expiryDate,email:this.email,threeDSRequestorAuthenticationInd:"01",cardholderName:(p=this.paymentInfo)==null?void 0:p.cardholder,deviceChannel:"02",browserInfo:i,browserJavascriptEnabled:!0,browserJavaEnabled:!1,browserLanguage:window.navigator.language,browserColorDepth:String(Jy()),browserScreenHeight:screen.height+"",browserScreenWidth:screen.width+"",browserTZ:Math.round(d.getTimezoneOffset()/60)+"",browserUserAgent:navigator.userAgent,browserAcceptHeader:"",browserIP:"",messageCategory:"01",messageType:"AReq",messageVersion:"2.1.0",purchaseAmount:(this.amount*Math.pow(10,l)).toFixed(0)+"",payTokenInd:!0,purchaseCurrency:c,purchaseExponent:l+"",purchaseDate:d.toISOString().slice(0,19).replace(/[-:T]/g,""),transType:"01",ccv:((_=this.paymentInfo)==null?void 0:_.ccv)&&String((S=this.paymentInfo)==null?void 0:S.ccv)||"",threeDSRequestorChallengeInd:this.requireChallenge?"04":"01"};(I=this.httpInvoker)==null||I.invoke(wr(this.apiUrl,this.tokenId)[zt.AUTH].url,wr(this.apiUrl,this.tokenId)[zt.AUTH].method,JSON.stringify(u),(E,k)=>{Ne(),o(E,k)},a)}onPostAuth(t,n,r){var s;this.log("[onPostAuth]",t),An(),(s=this.httpInvoker)==null||s.invoke(wr(this.apiUrl,this.tokenId)[zt.POSTAUTH].url,wr(this.apiUrl,this.tokenId)[zt.POSTAUTH].method,JSON.stringify(t),n,r)}threeDSInvoke(t,n,r){var s;this.container=t,this.threeDSCompleteHandler=r||null,this.requireChallenge=n,(s=this.threeDsInvoker)==null||s.onPreAuth()}}const Sa=se(!1);function lt(){return{isLoading:Sa,startLoading:()=>{Sa.value=!0},stopLoading:()=>{Sa.value=!1}}}const f_={style:{position:"relative"}},p_={key:0,class:"error text-normal"},m_=Oe({__name:"PaypalForm",props:{log:null,el:null,currency:null,enablePayIn4:{type:Boolean},buttonStyle:null},emits:["approve","submit","activate","close"],setup(e,{emit:t}){const n=e,r="payfurl-paypal-script",s=se(null),i=se(!0),o=se(""),a=se(null);let c=!1;const{isLoading:l}=lt();function d(p){a.value=p,n.log&&n.log("[Paypal]: checkout",a.value),!c&&(c=!0,u())}function u(){var I;if(document.getElementById(r)){h();return}const p={"client-id":((I=a.value)==null?void 0:I.gatewayTransactionData.ClientId)||"",currency:n.currency.toUpperCase(),"disable-funding":"card"};n.enablePayIn4&&(p["enable-funding"]="paylater");const _=`https://www.paypal.com/sdk/js?${new URLSearchParams(p)}`;window.paypal=null;const S=document.createElement("script");S.src=_,S.id=r,S.onload=h,document.body.appendChild(S)}function h(){window.paypal.Buttons({style:{color:n.buttonStyle},createOrder:function(){var p;return(p=a.value)==null?void 0:p.gatewayTransactionId},onApprove:function(p,_){t("approve",{data:p,actions:_})}}).render(n.el)}function f(p){var _,S,I,E,k,M;(_=p==null?void 0:p.data)!=null&&_.status&&(p.data.status==="activate"&&p.data.component==="paypal"&&((S=n.log)==null||S.call(n,"[Paypal]: message received",p.data),i.value=!0,t("activate")),p.data.status==="deactivate"&&p.data.component==="paypal"&&((I=n.log)==null||I.call(n,"[Paypal]: message received",p.data),i.value=!1),p.data.status==="checkout"&&p.data.component==="paypal"&&((E=n.log)==null||E.call(n,"[Paypal]: message received",p.data),d(p.data.checkoutData)),p.data.status==="message"&&p.data.component==="paypal"&&((k=n.log)==null||k.call(n,"[Paypal]: message received",p.data),o.value=p.data.message),p.data.status==="error"&&p.data.component==="paypal"&&((M=n.log)==null||M.call(n,"[Paypal]: message received",p.data),o.value=p.data.error))}return rn(()=>{window.removeEventListener("message",f)}),Ct(()=>{window.addEventListener("message",f),ki(s.value,_s)||(i.value=!0,t("activate"))}),(p,_)=>(ee(),ae(Ve,null,[x("div",f_,[Tt(xe(Pn,null,null,512),[[ir,be(l)]])]),x("div",{style:{position:"relative"},ref_key:"root",ref:s},[o.value?(ee(),ae("div",p_,Qe(o.value),1)):Fe("",!0)],512)],64))}});class g_{constructor(t,n){y(this,"log");y(this,"apiUrl","");y(this,"failureCallback",null);y(this,"successCallback",null);y(this,"fraudProcessor",null);y(this,"httpInvoker",null);y(this,"destroy",()=>{});y(this,"checkoutId","");y(this,"amount",0);y(this,"failureCheckoutHandler",(t,n)=>{var r;lt().stopLoading(),(r=this.failureCallback)==null||r.call(this,{error:"Failed to configure paypal",body:n}),window.postMessage({status:"error",component:"paypal",error:"Failed to configure paypal"},"*")});y(this,"successCheckoutHandler",(t,n)=>{lt().stopLoading();const r=JSON.parse(n);this.log("paypal success",r);const s=JSON.parse(n),i=JSON.parse(window.atob(s.checkoutData));this.checkoutId=i.checkoutId,window.postMessage({status:"checkout",component:"paypal",checkoutData:i},"*")});this.log=t,this.apiUrl=n.apiUrl,this.failureCallback=n.onFailure||null,this.successCallback=n.onSuccess||null;const r=new cn(n.environment,ln(n.publicKey));this.httpInvoker=new an(n.publicKey,n.version,r)}addFraudProcessor(t){this.fraudProcessor=t}cleanUp(){var t;(t=this.destroy)==null||t.call(this)}addPaypal(t,n,r,s,i,o){this.log("[addPaypal]",{amount:r,currency:s,providerId:i,options:o}),this.validateOptions(t,r,s);let a=!1;this.fraudProcessor&&(this.fraudProcessor.setAmount(r),this.fraudProcessor.setCurrency(s));const c=nt({el:t,component:m_,props:{log:this.log,el:t,currency:s,enablePayIn4:!!(o!=null&&o.paypalEnablePayIn4),buttonStyle:o==null?void 0:o.paypalButtonStyle},on:{activate:()=>{a||(a=!0,this.log("activate paypal form"),this.checkout(this.amount||r,s,i,o||{},()=>{a=!1}),this.setAmount=l=>{this.checkout(l,s,i,o||{},()=>{a=!1})})},approve:({data:l,actions:d})=>{this.log("[Paypal]: approved",{data:l,actions:d});const u=d.order.get();this.log("[Paypal]: order",u);const h=setInterval(()=>{if(this.log("[Paypal]: setInterval resolved = "+u.resolved),!!u.resolved){if(clearInterval(h),!this.fraudProcessor){this.addCharge(t,null);return}this.fraudProcessor.setPaypalInfo({payerId:u.value.payer.payer_id,payerEmail:u.value.payer.email_address,paymentMethod:"Instant Transfer",paymentStatus:u.value.status,payerAccountCountry:u.value.payer.address.country_code,paymentId:u.value.id}),An(),this.fraudProcessor.fraudCheck(f=>{var p;if(Ne(),f.decision!="Approved"&&f.stopPaymentOnFailure){ne(t,"Payment couldn't be processed"),(p=this.failureCallback)==null||p.call(this,{error:"Payment couldn't be processed"});return}this.addCharge(t,f)},f=>{var p;Ne(),ne(t,f.error),(p=this.failureCallback)==null||p.call(this,f)})}},200)}}});this.destroy=c.destroy}setAmount(t){var n;this.amount=t,(n=this.fraudProcessor)==null||n.setAmount(t)}checkout(t,n,r,s,i){var c,l;const o=this.apiUrl+"/payment_method/checkout";s||(s={hideShipping:!1,paypalButtonStyle:null,paypalEnablePayIn4:!1,transfer:null});const a={providerId:r,amount:t,currency:n,options:{HideShipping:s.hideShipping?"true":"false"}};(c=s.transfer)!=null&&c.amount&&(a.Transfer={Account:s.transfer.account,Amount:s.transfer.amount}),lt().startLoading(),(l=this.httpInvoker)==null||l.invoke(o,"POST",JSON.stringify(a),this.successCheckoutHandler.bind(this),(d,u)=>{i==null||i(d,u),this.failureCheckoutHandler.bind(this)(d,u)})}getFailureAddChargeHandler(t){return(n,r)=>{var s;ne(t,"Unable to tokenise payment information"),(s=this.failureCallback)==null||s.call(this,{error:"Unable to finish AddCharge",body:r}),this.log("Unable to finish AddCharge, error: "+r)}}getSuccessAddChargeHandler(t){return(n,r)=>{var s;try{const i=JSON.parse(r);this.log("[getSuccessAddChargeHandler]",i),Ni(t,"paypal login success"),(s=this.successCallback)==null||s.call(this,{transactionId:i.chargeId})}catch(i){this.log("error parsing addCharge response",i)}}}addCharge(t,n){var s;const r=this.apiUrl+"/charge/checkout";(s=this.httpInvoker)==null||s.invoke(r,"POST",JSON.stringify({checkoutId:this.checkoutId,fraudCheck:n}),this.getSuccessAddChargeHandler(t).bind(this),this.getFailureAddChargeHandler(t).bind(this))}validateOptions(t,n,r){if(!Et(r))throw ne(t,"Invalid currency: "+r),new TypeError("invalid currency: "+r);if(!ct(n))throw ne(t,"Invalid amount: "+n),new TypeError("invalid amount: "+n)}}const y_=["src"],__={key:0,id:"threeDs"},E_=Oe({__name:"CardForm",props:{log:null,debug:{type:Boolean},iframeSrc:null,form:null,threeDSEnabled:{type:Boolean}},emits:["load","submit","close"],setup(e,{emit:t}){const n=e,r=se(null),s=se(n.iframeSrc+"?v="+Math.random()),i=se(n.threeDSEnabled),o=se(!1),a=se(!0);function c(u){var h,f,p,_,S,I;if((h=u==null?void 0:u.data)!=null&&h.status){if(u.data.status==="iframe-changed"&&((f=n.log)==null||f.call(n,"[CardForm]: message received",u.data),u.stopPropagation(),d(((p=u.data.message)==null?void 0:p.height)||0)),u.data.status===ga){if((_=n.log)==null||_.call(n,"[CardForm]: message received",u.data),!n.form||!a.value)return;u.stopPropagation();const E=n.form.querySelector('input[name="token"]');if(E!=null&&E.value){n.form.submit();return}t("submit")}u.data.status==="activate"&&u.data.component==="card"&&((S=n.log)==null||S.call(n,"[CardForm]: message received",u.data),a.value=!0),u.data.status==="deactivate"&&u.data.component==="card"&&((I=n.log)==null||I.call(n,"[CardForm]: message received",u.data),a.value=!1)}}rn(()=>{window.removeEventListener("message",c)}),Ct(()=>{window.addEventListener("message",c)});function l(){t("load",r.value)}function d(u){const h=r.value,f=u||240;h==null||h.setAttribute("style",`height: ${f+20}px`),o.value=!0}return(u,h)=>(ee(),ae(Ve,null,[x("iframe",{src:s.value,onLoad:l,ref_key:"iframe",ref:r,id:"payfurl-card-iframe"},null,40,y_),i.value?(ee(),ae("div",__)):Fe("",!0)],64))}}),PT="",S_=$e(E_,[["__scopeId","data-v-aadf7fda"]]);var or;(function(e){e.mastercard="mastercard",e.maestro="maestro",e.visa="visa",e.amex="amex",e.discover="discover"})(or||(or={}));const b_=[or.mastercard,or.maestro,or.visa,or.amex,or.discover];var ba;(function(e){e.NONE="NONE",e.FULL="FULL",e.POSTAL_COUNTRY="POSTAL_COUNTRY"})(ba||(ba={}));const I_="data:image/svg+xml;base64,ICA8c3ZnIHZpZXdCb3g9IjAgMCA0ODAgMTI3IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHBhdGggZmlsbD0iI2VhMDAxYiIKICAgICAgICAgIGQ9IiBNIDMzNC41MiAwLjAwIEwgMzQyLjc2IDAuMDAgUSAzNjIuMjIgMS42OCAzNzcuMzMgMTMuMzUgUSAzNzcuMjMgMTQuMjcgMzc2LjkzIDE0LjE0IEMgMzQ1LjE0IDQwLjc1IDM0NS44OCA4Ny4xOCAzNzcuNjAgMTEzLjUwIFEgMzYyLjIyIDEyNS4zMiAzNDIuODQgMTI3LjAwIEwgMzM0LjIzIDEyNy4wMCBDIDI4MS40NSAxMjIuNDcgMjU2LjA4IDYwLjMxIDI5MS41OCAyMC44MiBRIDMwOC4yNiAyLjI2IDMzNC41MiAwLjAwIFoiIC8+CiAgICA8cGF0aCBmaWxsPSIjZjc5ZjFhIgogICAgICAgICAgZD0iIE0gNDEyLjU4IDAuMDAgTCA0MjEuMDAgMC4wMCBDIDQ1My4yMCAzLjA5IDQ3Ny40MCAyNy4wNyA0ODAuMDAgNTkuMzQgTCA0ODAuMDAgNjcuNzMgQyA0NzcuMDMgOTkuOTcgNDUzLjAyIDEyNC41MyA0MjAuNjEgMTI3LjAwIEwgNDEyLjY3IDEyNy4wMCBRIDM5My4yMiAxMjUuNDYgMzc3LjcxIDExMy41OSBRIDQwMi40NiA5Mi4zNSA0MDEuNjggNjEuNDcgQyA0MDEuMTkgNDEuODAgMzkyLjI2IDI2LjE3IDM3Ny42NSAxMy40OCBRIDM5My4yMCAxLjU3IDQxMi41OCAwLjAwIFoiIC8+CiAgICA8cGF0aCBmaWxsPSIjMDAwMDAwIgogICAgICAgICAgZD0iIE0gMC4wMCAxMDMuNzQgTCAwLjAwIDIzLjI2IFEgMi43MSA5LjQ3IDE0LjQ3IDUuNDkgUSAxOC4yMSA0LjIyIDI1LjYzIDQuMjkgUSAzNi4xMiA0LjM5IDQ2LjU3IDQuMjggUSA0OS45OCA0LjI1IDUxLjMyIDQuOTUgQyA1NC40NyA2LjYyIDU0LjcxIDEyLjI3IDUxLjYwIDE0LjE4IFEgNTAuMzAgMTQuOTkgNDcuMjUgMTUuMDIgUSAzNS4yNSAxNS4xNCAyMy4yNiAxNS4wNCBRIDE0LjgyIDE0Ljk3IDEyLjA0IDIxLjIyIFEgMTAuNzUgMjQuMTIgMTAuNzUgMzIuNDcgUSAxMC43NyA2NC42NSAxMC43OCA5Ni44NCBDIDEwLjc5IDEwOC4wNSAxMy42MiAxMTIuMDkgMjQuODMgMTEyLjExIFEgNDQuODAgMTEyLjE1IDY0Ljc1IDExMi4wNyBDIDY4LjcyIDExMi4wNSA3MS41NSAxMDkuNTIgNzQuMjQgMTA2LjI2IFEgOTEuMDYgODUuODUgMTA4LjkxIDY0LjQ0IEEgMC44NiAwLjg2IDAuMCAwIDAgMTA4LjkxIDYzLjM0IFEgODguNTQgMzguNTAgNjcuOTEgMTMuMzQgQyA2NS43NSAxMC43MSA2NS45OSA3LjI4IDY4LjU3IDUuNDAgUSA3MC4wNSA0LjMyIDczLjU5IDQuMzIgUSA4OC40MyA0LjMxIDEwMy4yNSA0LjMzIFEgMTA1LjkwIDQuMzMgMTA3LjE3IDUuODAgUSAxMzAuNTggMzIuNzkgMTUzLjk0IDU5LjgxIEMgMTU2LjcwIDYzLjAwIDE1NS4yNSA2NS45MCAxNTIuNzMgNjguODggUSAxMzQuNTcgOTAuMjkgMTE2LjI0IDExMS43MSBBIDAuMzUgMC4zNSAwLjAgMCAwIDExNi41MSAxMTIuMjkgTCAxMzIuNDQgMTEyLjI0IEEgMS40MyAxLjQzIDAuMCAwIDAgMTMzLjU1IDExMS43MSBMIDE3Mi45NiA2My45MyBBIDAuODMgMC44MyAwLjAgMCAwIDE3Mi45NiA2Mi44NyBRIDE1Mi45NiAzOC41MCAxMzIuOTMgMTQuMDcgUSAxMzEuMzMgMTIuMTAgMTMxLjAyIDEwLjY5IEMgMTMwLjIzIDcuMDggMTMzLjk0IDMuNDQgMTM3LjM3IDQuMzMgUSAxMzkuMjcgNC44MyAxNDEuNTEgNy40OCBRIDE2My43NCAzMy43NyAxODYuMDYgNTkuOTggUSAxODkuMTMgNjMuNTggMTg1LjY1IDY3LjY2IFEgMTYyLjQ0IDk0LjkxIDEzOS4zNCAxMjEuNzEgQSAzLjEyIDMuMTAgMjAuMiAwIDEgMTM3LjAxIDEyMi43OCBRIDEyMC44NCAxMjIuODIgMTA0LjIzIDEyMi43NiBDIDk3LjcyIDEyMi43NCA5Ny4yNCAxMTcuMTQgMTAwLjY2IDExMi45NiBRIDEyMC42OSA4OC41MSAxNDAuNzEgNjQuMzAgQSAwLjk5IDAuOTkgMC4wIDAgMCAxNDAuNzEgNjMuMDQgTCAxMDEuNDYgMTUuNTYgQSAxLjIzIDEuMjMgMC4wIDAgMCAxMDAuNTEgMTUuMTEgTCA4NC4yOCAxNS4wMSBBIDAuMzkgMC4zOSAwLjAgMCAwIDgzLjk4IDE1LjY1IFEgMTAyLjkzIDM3Ljc1IDEyMS43MCA1OS41NiBDIDEyNS40MiA2My44OSAxMjIuMjYgNjYuOTQgMTE4LjkwIDcwLjkyIFEgOTkuNjcgOTMuNjYgODAuMzAgMTE2LjMwIFEgNzcuMzQgMTE5Ljc3IDcyLjMwIDEyMS41NSBRIDY4LjkzIDEyMi43NCA2My4wNiAxMjIuNzUgUSA0Mi43MiAxMjIuNzcgMjIuMzkgMTIyLjc3IEMgMTAuNTAgMTIyLjc3IDIuMzEgMTE1LjUxIDAuMDAgMTAzLjc0IFoiIC8+CiAgICA8cmVjdCBmaWxsPSIjMDAwMDAwIiB4PSIyMjguNzgiIHk9IjQuMjMiIHdpZHRoPSI0Ljk4IiBoZWlnaHQ9IjExOC43NiIgcng9IjIuNDEiIC8+CiAgICA8cGF0aCBmaWxsPSIjZmY1ZjAxIgogICAgICAgICAgZD0iIE0gMzc3LjMzIDEzLjM1IFEgMzc4LjI2IDEzLjU2IDM3Ny42NSAxMy40OCBDIDM5Mi4yNiAyNi4xNyA0MDEuMTkgNDEuODAgNDAxLjY4IDYxLjQ3IFEgNDAyLjQ2IDkyLjM1IDM3Ny43MSAxMTMuNTkgUSAzNzguMjcgMTEzLjU0IDM3Ny42MCAxMTMuNTAgQyAzNDUuODggODcuMTggMzQ1LjE0IDQwLjc1IDM3Ni45MyAxNC4xNCBRIDM3Ny4yMyAxNC4yNyAzNzcuMzMgMTMuMzUgWiIgLz4KICA8L3N2Zz4K",AT="",v_={},w_=e=>(Ht("data-v-d7e8386b"),e=e(),Vt(),e),C_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},T_=[w_(()=>x("polygon",{points:"39 10.44 37.56 9 24 22.56 10.44 9 9 10.44 22.56 24 9 37.56 10.44 39 24 25.44 37.56 39 39 37.56 25.44 24 39 10.44"},null,-1))];function D_(e,t){return ee(),ae("svg",C_,T_)}const Oi=$e(v_,[["render",D_],["__scopeId","data-v-d7e8386b"]]),P_=["onMousedown"],A_={class:"modal-header"},k_=["onClick"],N_={class:"main-title"},M_={class:"modal-body"},O_={key:0,class:"modal-footer"},R_=Oe({__name:"Modal",props:{width:null,height:null,mode:null,backdrop:null},emits:["close"],setup(e,{emit:t}){const n=e;function r(){t("close")}function s(){n.backdrop!=="static"&&r()}const i=kg(),o=Wt(()=>!!i.footer),a=Wt(()=>{const l=[];return n.width&&l.push(`width: ${n.width}`),n.height&&l.push(`height: ${n.height}`),l.join(";")}),c=Wt(()=>n.mode=="confirm"?"small":"");return(l,d)=>(ee(),ae("div",{class:"modal-mask",onMousedown:pa(s,["self"])},[x("div",{class:Yr(["modal-wrapper",be(c)]),role:"document",onClick:d[0]||(d[0]=pa(()=>{},["stop"]))},[x("div",{class:"modal-content",style:_t(be(a))},[x("div",A_,[x("div",{class:"close-icon",onClick:pa(r,["stop"])},[xe(Oi,{size:15})],8,k_),x("div",N_,[yi(l.$slots,"title",{},void 0,!0)])]),x("div",M_,[yi(l.$slots,"body",{},void 0,!0)]),be(o)?(ee(),ae("div",O_,[yi(l.$slots,"footer",{},void 0,!0)])):Fe("",!0),yi(l.$slots,"default",{},void 0,!0)],4)],2)],40,P_))}}),NT="",xu=$e(R_,[["__scopeId","data-v-2b2c8fc7"]]),Ia=e=>(Ht("data-v-584afce5"),e=e(),Vt(),e),x_=Ia(()=>x("img",{src:I_,alt:"Click To Pay",style:{width:"70px","margin-right":"20px"}},null,-1)),L_={class:"payfurl-form"},U_={class:"container-form"},F_={class:"row"},$_=Ia(()=>x("label",null,"Email Address",-1)),j_={key:0,class:"error"},H_={class:"row"},V_=Ia(()=>x("label",null,"Phone",-1)),B_={key:0,class:"error"},W_=Oe({__name:"LoginForm",emits:["close","submit"],setup(e,{emit:t}){const n=se(""),r=se(""),s=se({});function i(){return s.value={},ys(n.value)||(s.value.email="Please type valid email address"),r.value&&!Ai(r.value)&&(s.value.phone="Please type phone in international format"),Object.keys(s.value).length===0}function o(){i()&&t("submit",{email:n.value,phone:r.value})}function a(){t("close")}return(c,l)=>(ee(),tr(xu,{width:"350",onClose:a},{title:Ir(()=>[x_,ia(" Click To Pay Login ")]),body:Ir(()=>[x("div",L_,[x("div",U_,[x("div",F_,[$_,x("div",null,[Tt(x("input",{type:"text",maxlength:"100",placeholder:"Email Address",name:"email","onUpdate:modelValue":l[0]||(l[0]=d=>n.value=d)},null,512),[[Di,n.value]]),s.value.email?(ee(),ae("p",j_,Qe(s.value.email),1)):Fe("",!0)])]),x("div",H_,[V_,x("div",null,[Tt(x("input",{type:"text",maxlength:"100",placeholder:"Phone",name:"phone","onUpdate:modelValue":l[1]||(l[1]=d=>r.value=d)},null,512),[[Di,r.value]]),s.value.phone?(ee(),ae("p",B_,Qe(s.value.phone),1)):Fe("",!0)])])])])]),footer:Ir(()=>[x("div",{class:"payfurl-form",style:{padding:"0"}},[x("button",{onClick:o},"Continue")])]),_:1}))}}),MT="",OT="",z_=$e(W_,[["__scopeId","data-v-584afce5"]]);class K_{constructor(t,n){y(this,"log");y(this,"debug",!1);y(this,"amount",0);y(this,"currency","AUD");y(this,"customer",null);y(this,"options");y(this,"mcCheckoutService",null);y(this,"sdk",null);y(this,"srcOtpInput",null);y(this,"mcModal",null);y(this,"mcFrame",null);y(this,"cards",[]);y(this,"rememberMe",!0);y(this,"recognized",!1);y(this,"recognizeUserCallback",null);y(this,"supportedValidationChannels",[]);y(this,"validationChannelsNetwork","mastercard");y(this,"availableCardBrands",[]);this.log=t,this.debug=n.debug,this.options=n.options}setAmount(t){this.amount=t}getAmount(){return this.amount}setCurrency(t){this.currency=t}getCurrency(){return this.currency}setCustomerInfo(t){this.customer={...t}}getCustomerInfo(){return this.customer}getRememberMe(){return this.rememberMe}setRememberMe(t){this.rememberMe=t}getCards(){return this.cards}setCards(t){var r;this.cards=t;const n=document.getElementById("payfurl-card-iframe");if(n){try{(r=n.contentWindow)==null||r.postMessage({status:l_,cards:t},"*")}catch(s){this.log("[setCards] iframe error",s)}return}this.log("[setCards] iframe not found")}isSchemeSupported(t){return this.availableCardBrands.includes(Ey(t))}init(){this.initCss(),this.mcInitOtpInput(),this.mcModalInit();const t=["https://src.mastercard.com/srci/integration/components/src-ui-kit/src-ui-kit.esm.js","https://sandbox.src.mastercard.com/sdk/srcsdk.mastercard.js","https://sandbox.src.mastercard.com/srci/integration/2/lib.js?srcDpaId={dpaId}&locale=en_AU"];let n=0;const r=()=>{n++,n===t.length&&this.mcInitClickToPay()};t.forEach(i=>{const o=document.createElement("script");o.src=i.replace("{dpaId}",this.options.dpaId),i.includes("esm.js")&&(o.type="module"),o.onload=()=>{r()},o.onerror=a=>{var c;typeof a=="object"&&((c=a.target)==null?void 0:c.type)=="module"&&r()},document.head.appendChild(o)});const s=document.createElement("link");s.href="https://src.mastercard.com/srci/integration/components/src-ui-kit/src-ui-kit.css",s.rel="stylesheet",document.head.appendChild(s)}initCss(){const t=document.createElement("style");t.textContent=`
|
|
17
30
|
.click-to-pay-payfurl {
|
|
18
31
|
align-items: normal;
|
|
19
32
|
display: flex;
|
|
@@ -131,7 +144,7 @@ Component that was made reactive: `,e)),C(e,t,s,r,n,o,i,!0)}function au(e){retur
|
|
|
131
144
|
overflow-y: visible
|
|
132
145
|
}
|
|
133
146
|
}
|
|
134
|
-
`,document.head.appendChild(t)}mcInitOtpInput(){this.srcOtpInput=document.createElement("src-otp-input"),this.srcOtpInput.setAttribute("type","overlay"),this.srcOtpInput.setAttribute("display-cancel-option","true"),this.srcOtpInput.setAttribute("style","display: none;"),document.body.appendChild(this.srcOtpInput);let t="";const s=this;this.srcOtpInput.addEventListener("continue",function(){s.log("OTP: continue"),s.srcOtpInput.style.display="none",s.mcValidate(t)}),this.srcOtpInput.addEventListener("otpChanged",function(r){t=r.detail}),this.srcOtpInput.addEventListener("resendOtp",function(r){s.log("OTP: resendOtp",r),s.mcInitiateValidation()}),this.srcOtpInput.addEventListener("notYouRequested",function(r){s.log("OTP: notYouRequested",r),s.mcLogout(),s.showLoginForm()}),this.srcOtpInput.addEventListener("clickSignOutLink",function(r){s.log("OTP: clickSignOutLink",r),s.mcLogout(),s.showLoginForm()}),this.srcOtpInput.addEventListener("alternateRequested",function(r){s.log("OTP: alternateRequested",r),s.mcInitiateValidation()}),this.srcOtpInput.addEventListener("close",function(r){s.log("OTP: close",r),s.srcOtpInput.style.display="none"})}mcModalInit(){var o;const t=document.createElement("div");t.setAttribute("class","click-to-pay-payfurl"),t.setAttribute("style","display: none;");const s=document.createElement("div");s.setAttribute("class","modal-wrapper"),t.appendChild(s);const r=document.createElement("div");r.setAttribute("class","modal-content"),r.setAttribute("style","width: 771px; height: 100vh;");const n=document.createElement("div");n.setAttribute("class","modal-body"),r.appendChild(n);const i=document.createElement("iframe");i.setAttribute("style","width:100%;max-width:100vw;height:99%;max-height:99vh;border:0;overflow:hidden;"),i.id="mcModalBody-"+Math.random().toString(36),n.appendChild(i),s.appendChild(r),document.body.appendChild(t),this.mcModal=t;for(let a=0;a<window.frames.length;a++)try{((o=window.frames[a].frameElement)==null?void 0:o.id)===i.id&&(this.mcFrame=window.frames[a])}catch{}}mcModalShow(){this.mcModal&&(this.mcModal.style.display="block")}mcModalHide(){this.mcModal&&(this.mcModal.style.display="none")}mcHideOtpInput(){const t=this;customElements.whenDefined("src-otp-input").then(()=>{t.log("[src-otp-input], mcHideOtpInput",t.srcOtpInput),t.srcOtpInput.style.display="none"}).catch(s=>this.log("[customElements.whenDefined]",s))}mcShowOtpInput(t,s,r){this.log("[mcShowOtpInput]",t,r);const n=this;customElements.whenDefined("src-otp-input").then(()=>{n.log("[src-otp-input], mcShowOtpInput",n.srcOtpInput);const i=t.find(a=>a.identityType==="SMS"),o=i?i.maskedValidationChannel:t[0].maskedValidationChannel;n.srcOtpInput.loadSupportedValidationChannels(t),n.srcOtpInput.setAttribute("network-id",s),n.srcOtpInput.setAttribute("card-brands",s),n.srcOtpInput.setAttribute("masked-identity-value",o),r?n.srcOtpInput.setAttribute("error-reason",r):n.srcOtpInput.removeAttribute("error-reason"),n.srcOtpInput.style.display="block"}).catch(i=>this.log("[customElements.whenDefined]",i))}recognizeUser(){this.log("[recognizeUser]",this.getCustomerInfo());const t=()=>{this.recognizeUserCallback=null,this.setCards([]),this.mcIsRecognised()};this.mcCheckoutService?t():this.recognizeUserCallback=t}showLoginForm(){const{destroy:t}=Ke({el:document.body,component:Rh,props:{log:this.log},on:{close:()=>{t()},submit:({email:s,phone:r})=>{this.log("[LoginForm.submit]",s,r),t(),this.customer||this.setCustomerInfo({firstName:"",lastName:"",email:"",phoneNumber:""}),this.customer.email=s,this.customer.phoneNumber=r,this.setCards([]),this.mcIdLookup()}}})}checkoutWithCard(t,s,r){this.log("ClickToPayProcessor.checkoutWithExistingCard",t);const n=this;function i(l){n.log("[checkoutWithCard.promiseResolvedHandler]",l),n.mcModalHide(),s(l)}function o(l){n.log("[checkoutWithCard.promiseRejectedHandler]",l),n.mcModalHide(),r(l)}this.mcModalShow();const a={windowRef:this.mcFrame,srcDigitalCardId:t.srcDigitalCardId,dpaTransactionOptions:{transactionAmount:{transactionAmount:Number(this.amount),transactionCurrencyCode:this.currency}},rememberMe:this.rememberMe?"true":"false"};this.log("[checkoutWithCard]",a),this.mcCheckoutService.checkoutWithCard(a).then(i).catch(o)}checkoutWithNewCard(t,s,r,n,i,o){this.log("ClickToPayProcessor.checkoutWithNewCard"),this.mcEncryptCard(t,s,r,(a,l)=>{this.mcCheckoutWithNewCard(a,l,c=>{n&&this.mcEnrollCard(a,c.idToken),i(c)},o)},a=>{o(a)})}mcLogout(){window.mcCheckoutService.signOut(),this.mcHideOtpInput()}mcInitClickToPay(){var a,l,c,d;this.mcCheckoutService=new window.MastercardCheckoutServices,this.sdk=window.SRCSDK_MASTERCARD,window.mcCheckoutService=this.mcCheckoutService;const t=this;function s(u){t.log("[mcInitClickToPay.promiseResolvedHandler]",u),t.availableCardBrands=u.availableCardBrands,t.recognizeUserCallback?t.recognizeUserCallback():t.mcIsRecognised()}function r(u){t.log("[mcInitClickToPay.promiseRejectedHandler]",u)}const n=(l=(a=this.options)==null?void 0:a.cardBrands)!=null&&l.length?(c=this.options)==null?void 0:c.cardBrands:dh,i={dpaLocale:"en_US",dpaBillingPreference:ai.FULL};(d=this.options)!=null&&d.dpaBillingPreference&&(i.dpaBillingPreference=this.options.dpaBillingPreference);const o={srcDpaId:this.options.dpaId,dpaData:{dpaName:this.options.dpaName},dpaTransactionOptions:i,cardBrands:n};this.mcCheckoutService.init(o).then(s).catch(r)}mcIsRecognised(){const t=this;function s(n){t.log("[mcIsRecognised.promiseResolvedHandler]",n),t.recognized=n.recognized,t.recognized?t.mcGetCards():t.mcIdLookup()}function r(n){t.log("[mcIsRecognised.promiseRejectedHandler]",n)}this.sdk.isRecognized().then(s).catch(r)}mcIdLookup(t=!1){var a,l,c,d,u;if(this.log("[mcIdLookup]",this.customer,t),!((a=this.customer)!=null&&a.phoneNumber)&&!((l=this.customer)!=null&&l.email))return;(c=this.customer)!=null&&c.email||(t=!0);const s=this;function r(p){var y;s.log("[mcIdLookup.promiseResolvedHandler]",p),p.consumerPresent&&s.mcInitiateValidation(),!p.consumerPresent&&!t&&((y=s.customer)!=null&&y.phoneNumber)&&s.mcIdLookup(!0)}function n(p){s.log("[mcIdLookup.promiseRejectedHandler]",p)}const i=Pa(((d=this.customer)==null?void 0:d.phoneNumber)||""),o=t?{mobileNumber:{phoneNumber:i[1]||"",countryCode:i[0]||"61"}}:{email:(u=this.customer)==null?void 0:u.email};this.log("[mcIdLookup]",o),this.mcCheckoutService.idLookup(o).then(r).catch(n)}mcInitiateValidation(){const t=this;function s(n){t.log("[mcInitiateValidation.promiseResolvedHandler]",n),t.supportedValidationChannels=n.supportedValidationChannels,t.validationChannelsNetwork=n.network,n.maskedValidationChannel&&(!t.supportedValidationChannels||t.supportedValidationChannels.length===0)&&(t.supportedValidationChannels=[],(n.maskedValidationChannel.split(",")||[]).forEach(o=>{t.supportedValidationChannels.push({maskedValidationChannel:o,identityType:o.includes("@")?"EMAIL":"SMS",validationChannelId:o.includes("@")?"EMAIL":"SMS"})})),t.mcShowOtpInput(t.supportedValidationChannels,n.network)}function r(n){t.log("[mcInitiateValidation.promiseResolvedHandler]",n)}this.log("[mcInitiateValidation]"),this.mcCheckoutService.initiateValidation().then(s).catch(r)}mcValidate(t){const s=this;function r(){s.log("[mcValidate.promiseResolvedHandler]"),s.mcGetCards()}function n(i){s.log("[mcValidate.promiseRejectedHandler]",i),(i.reason==="CODE_INVALID"||i.reason==="RETRIES_EXCEEDED"||i.reason==="ACCT_INACCESSIBLE")&&s.mcShowOtpInput(s.supportedValidationChannels,s.validationChannelsNetwork,i.reason)}this.log("[mcValidate]",{value:t}),this.mcCheckoutService.validate({value:t}).then(r).catch(n)}mcGetCards(){const t=this;function s(n){t.log("[getCards.promiseResolvedHandler]",n),t.setCards(n)}function r(n){t.log("[getCards.promiseRejectedHandler]",n)}this.log("[getCards]"),this.mcCheckoutService.getCards().then(s).catch(r)}mcEncryptCard(t,s,r,n,i){const o=this;function a(u){o.log("encryptCard.promiseResolvedHandler",u),n(u.encryptedCard,u.cardBrand)}function l(u){o.log("encryptCard.promiseResolvedHandler",u),i(u)}const c=s.split("/"),d={primaryAccountNumber:t,panExpirationMonth:c[0],panExpirationYear:c[1],cardSecurityCode:r};this.mcCheckoutService.encryptCard(d).then(a).catch(l)}mcEnrollCard(t,s){const r=this;function n(a){r.log("enrollCard.promiseResolvedHandler",a)}function i(a){r.log("enrollCard.promiseRejectedHandler",a)}const o={encryptedCard:t,idToken:s};this.log("[enrollCard]",o),this.sdk.enrollCard(o).then(n).catch(i)}mcCheckoutWithNewCard(t,s,r,n){var c,d,u,p,y;const i=this;function o(m){if(i.log("checkoutWithNewCard.promiseResolvedHandler",m),i.mcModalHide(),m.checkoutActionCode==="SWITCH_CONSUMER"){i.showLoginForm();return}["CHANGE_CARD","CANCEL"].includes(m.checkoutActionCode)||r(m)}function a(m){i.log("checkoutWithNewCard.promiseRejectedHandler",m),i.mcModalHide(),n(m)}const l={windowRef:this.mcFrame,encryptedCard:t,cardBrand:s,rememberMe:this.rememberMe?"true":"false",consumer:{emailAddress:"",firstName:(c=this.customer)==null?void 0:c.firstName,lastName:(d=this.customer)==null?void 0:d.lastName},dpaTransactionOptions:{transactionAmount:{transactionAmount:Number(this.amount),transactionCurrencyCode:this.currency}}};if((u=this.customer)!=null&&u.email&&(l.consumer.emailAddress=this.customer.email),(p=this.customer)!=null&&p.phoneNumber){const m=Pa(((y=this.customer)==null?void 0:y.phoneNumber)||"");l.consumer.mobileNumber={phoneNumber:m[1]||"",countryCode:m[0]||"61"}}this.log("checkoutWithNewCard",l),this.mcModalShow(),this.mcCheckoutService.checkoutWithNewCard(l).then(o).catch(a)}}const nn={TOKENISE_CARD:"TOKENISE_CARD",GET_PROVIDER_INFO:"GET_PROVIDER_INFO"},Na=(e,t)=>({[nn.TOKENISE_CARD]:{url:e+"/token/card",method:"POST"},[nn.GET_PROVIDER_INFO]:{url:e+"/info/providers/"+t,method:"GET"}});class Uh{constructor(t,s){g(this,"container",null);g(this,"iframe",null);g(this,"form",null);g(this,"log");g(this,"debug",!1);g(this,"environment");g(this,"apiUrl","");g(this,"url","");g(this,"publicKey","");g(this,"customer",null);g(this,"threeDSEnabled",!1);g(this,"threeDsProcessor",null);g(this,"fraudProcessor",null);g(this,"clickToPayProcessor",null);g(this,"failureCallback",null);g(this,"successCallback",null);g(this,"httpInvoker");g(this,"destroy",()=>{});this.log=t,this.debug=s.debug,this.environment=s.environment,this.url=s.url,this.apiUrl=s.apiUrl,this.publicKey=s.publicKey,this.failureCallback=s.onFailure||null,this.successCallback=s.onSuccess||null;const r=new Tt(s.environment,Mt(s.publicKey));this.httpInvoker=new It(this.publicKey,s.version,r),window.addEventListener("message",this.messageHandler.bind(this))}addThreeDsProcessor(t){this.threeDsProcessor=t}addFraudProcessor(t){this.fraudProcessor=t}cleanUp(){var t;(t=this.destroy)==null||t.call(this),this.container=null,this.form=null,this.iframe=null}addCard(t,s,r,n,i,o){this.log("[addCard]",{providerId:r,amount:n,currency:i,options:o});const a=(o==null?void 0:o.threeDSEmail)||"";this.fraudProcessor&&(this.fraudProcessor.setAmount(n),this.fraudProcessor.setCurrency(i)),o!=null&&o.threeDSEnabled&&(ya(n,Fe,"Missing or invalid amount",this.failureCallback),ya(i,rt,"Missing or invalid currency",this.failureCallback),this.threeDSEnabled=!0),o!=null&&o.clickToPayEnabled&&(this.clickToPayProcessor=new Lh(this.log,{debug:this.debug,options:o.clickToPayOptions}),this.clickToPayProcessor.setAmount(n),this.clickToPayProcessor.setCurrency(i),this.customer&&this.clickToPayProcessor.setCustomerInfo({...this.customer,email:(o==null?void 0:o.threeDSEmail)||""}),this.clickToPayProcessor.init()),this.container=t||null,this.form=s;const l=Ke({el:this.container,component:uh,props:{log:this.log,debug:this.debug,iframeSrc:this.url,form:this.form,threeDSEnabled:this.threeDSEnabled},on:{load:c=>{var d;this.iframe=c,(d=c==null?void 0:c.contentWindow)==null||d.postMessage({status:zd,environment:this.environment,debug:this.debug,publicKey:this.publicKey,providerId:r,apiUrl:this.apiUrl,amount:n,currency:i,showEmail:(o==null?void 0:o.threeDSEnabled)&&!nr(a),visProviderId:o==null?void 0:o.visProviderId,requiredFields:o==null?void 0:o.requiredFields,clickToPayEnabled:o==null?void 0:o.clickToPayEnabled},"*")},submit:()=>{var d,u;As();const c={email:a,amount:n,currency:i,providerId:(o==null?void 0:o.threeDsProviderId)||""};(u=(d=this.iframe)==null?void 0:d.contentWindow)==null||u.postMessage({status:Xd,validateCard:!1,metadata:{fraudCheck:!!this.fraudProcessor,...c}},"*")}}});return this.destroy=l.destroy,this}messageHandler(t){var s,r,n,i,o,a,l,c,d,u,p,y,m,I,N,$,b,R,V,D,q,ie,ue,te,W,le,_e,O,L,k,H,v;if((s=t==null?void 0:t.data)!=null&&s.status){if(t.data.status===va){this.log("[sdk][cardProcessor]: message received",t.data),Oe();return}if(t.data.status===rn){this.log("[sdk][cardProcessor]: message received",t.data),Oe(),this.log("unable to tokenise payment information",t.data),X(this.container,t.data.message),(r=this.failureCallback)==null||r.call(this,{error:t.data.message});return}if(t.data.status===Jd){this.log("[sdk][cardProcessor]: message received",t.data),Oe(),t.stopPropagation(),this.iframe=null,tn(this.container,"Success");const w={token:t.data.tokenId};(n=t.data.options)!=null&&n.clickToPay&&(w.clickToPayData={billingAddress:(i=t.data.options)==null?void 0:i.clickToPay.billingAddress,panBin:((l=(a=(o=t.data.options)==null?void 0:o.clickToPay)==null?void 0:a.cardData)==null?void 0:l.panBin)||"",panLastFour:((u=(d=(c=t.data.options)==null?void 0:c.clickToPay)==null?void 0:d.cardData)==null?void 0:u.panLastFour)||"",scheme:((m=(y=(p=t.data.options)==null?void 0:p.clickToPay)==null?void 0:y.cardData)==null?void 0:m.scheme)||"",paymentCardType:(($=(N=(I=t.data.options)==null?void 0:I.clickToPay)==null?void 0:N.cardData)==null?void 0:$.paymentCardType)||""}),(b=this.successCallback)==null||b.call(this,w);return}if(t.data.status===eh&&(this.log("[sdk][cardProcessor]: message received",t.data),(R=this.clickToPayProcessor)==null||R.setRememberMe(!!t.data.message)),t.data.status===Qd){if(this.log("[sdk][cardProcessor]: message received",t.data),t.data.message){const F=((V=this.clickToPayProcessor)==null?void 0:V.getCustomerInfo())??{email:"",firstName:"",lastName:"",phoneNumber:""};t.data.message.email&&(F.email=t.data.message.email),t.data.message.phone&&(F.phoneNumber=t.data.message.phone),(D=this.clickToPayProcessor)==null||D.setCustomerInfo(F)}if(!((ie=(q=this.clickToPayProcessor)==null?void 0:q.getCustomerInfo())!=null&&ie.email)){this.log("[clickToPayProcessor][RecognizeUser]: no email found");return}(ue=this.clickToPayProcessor)==null||ue.recognizeUser();return}if(t.data.status==Bd){this.log("[sdk][cardProcessor]: message received",t.data);const w=((te=t.data.metadata)==null?void 0:te.click2pay)&&((W=this.clickToPayProcessor)==null?void 0:W.getRememberMe());if(w&&!t.data.message.srcDigitalCardId&&t.data.message.cardNumber&&!((le=this.clickToPayProcessor)!=null&&le.isSchemeSupported(t.data.message.cardNumber))){this.log("[clickToPayProcessor]: checkoutWithNewCard - Scheme is not supported!"),X(this.container,"Scheme is not supported!");return}if(w&&t.data.message.srcDigitalCardId){(_e=this.clickToPayProcessor)==null||_e.checkoutWithCard(t.data.message,F=>{this.log("[clickToPayProcessor]: checkoutWithCard",F),As(),this.tokeniseClickToPay({correlationId:F.checkoutResponseData.srcCorrelationId,merchantTransactionId:F.headers["merchant-transaction-id"]},null,null)},F=>{this.log("[clickToPayProcessor]: checkoutWithCard, error",F),Oe(),X(this.container,F.message)});return}if((O=this.fraudProcessor)==null||O.setPaymentInfo({cardNumber:t.data.message.cardNumber,expiryDate:t.data.message.expiryDate,cardholder:t.data.message.cardholder,ccv:t.data.message.ccv}),(L=this.threeDsProcessor)==null||L.setPaymentInfo({cardNumber:t.data.message.cardNumber,expiryDate:t.data.message.expiryDate,cardholder:t.data.message.cardholder,ccv:t.data.message.ccv}),t.data.message.email&&((k=this.threeDsProcessor)==null||k.setEmail(t.data.message.email)),(H=t.data.metadata)!=null&&H.fraudCheck){As(),(v=this.fraudProcessor)==null||v.fraudCheck(F=>{var re;if(F.decision!="Approved"&&F.stopPaymentOnFailure){Oe(),X(this.container,"Payment couldn't be processed"),(re=this.failureCallback)==null||re.call(this,{error:"Payment couldn't be processed"});return}this.onSubmit({cardNumber:t.data.message.cardNumber,expiryDate:t.data.message.expiryDate,cardholder:t.data.message.cardholder,ccv:t.data.message.ccv},F,w)},F=>{var re;Oe(),X(this.container,F.error),(re=this.failureCallback)==null||re.call(this,F)});return}this.onSubmit({cardNumber:t.data.message.cardNumber,expiryDate:t.data.message.expiryDate,cardholder:t.data.message.cardholder,ccv:t.data.message.ccv},null,w)}}}onSubmit(t,s,r){var n;if(this.log("[cardProcessor]: onSubmit",{fraudCheckResult:s,useClickToPayCheckout:r}),!this.threeDsProcessor){if(r){this.tokeniseWithClickToPay(t,null,s);return}this.tokenise(null,s);return}(n=this.threeDsProcessor)==null||n.threeDSInvoke(this.container,!1,i=>{if(Oe(),this.log("[threeDSInvoke], postAuthData",i),r){this.tokeniseWithClickToPay(t,i.threeDSServerTransID,s);return}this.tokenise(i.threeDSServerTransID,s)})}tokenise(t,s){var r;this.iframe&&((r=this.iframe.contentWindow)==null||r.postMessage({status:Ia,threeDSServerTransID:t,fraudCheckResult:s},"*"))}tokeniseWithClickToPay(t,s,r){var n;Oe(),(n=this.clickToPayProcessor)==null||n.checkoutWithNewCard(t.cardNumber,t.expiryDate,t.ccv||"",!0,i=>{this.log("[clickToPayProcessor]: checkoutWithNewCard",i),As(),this.tokeniseClickToPay({correlationId:i.checkoutResponseData.srcCorrelationId,merchantTransactionId:i.headers["merchant-transaction-id"]},s,r)},i=>{this.log("[clickToPayProcessor]: checkoutWithNewCard, error",i),Oe(),X(this.container,i.message)})}setAmount(t){var s;this.iframe&&((s=this.iframe.contentWindow)==null||s.postMessage({status:or,amount:t},"*"))}setCustomerInfo(t){this.customer={...t}}tokeniseCard(t,s,r,n,i,o,a,l){var u,p,y,m,I;if(!Fe(t)){this.log("missing parameter: providerId"),(u=this.failureCallback)==null||u.call(this,{error:"missing parameter: providerId"});return}if(!rd(s)){this.log("wrong parameter: cardNumber"),(p=this.failureCallback)==null||p.call(this,{error:"wrong parameter: cardNumber"});return}if(!id(r)){this.log("wrong parameter: expiryDate"),(y=this.failureCallback)==null||y.call(this,{error:"wrong parameter: expiryDate"});return}if(!ad(i)){this.log("wrong parameter: ccv"),(m=this.failureCallback)==null||m.call(this,{error:"wrong parameter: ccv"});return}const c=(N,$)=>{var b;this.log("tokeniseCardFailureCallback",N,$),Oe(),(b=this.failureCallback)==null||b.call(this,{error:"Unable to tokenise payment information"})},d=(N,$)=>{var V;this.log("tokeniseCardSuccessCallback",N,$),Oe();const R={token:JSON.parse($).tokenId};this.fraudProcessor&&(R.fraudCheckResult=this.fraudProcessor.getCheckResult()),(V=this.successCallback)==null||V.call(this,R)};(I=this.httpInvoker)==null||I.invoke(Na(this.apiUrl,t)[nn.TOKENISE_CARD].url,Na(this.apiUrl,t)[nn.TOKENISE_CARD].method,JSON.stringify({paymentInformation:{cardNumber:s,expiryDate:r,ccv:i,cardholder:n,threeDSServerTransID:a||null},vaultCard:!0,VaultExpireSeconds:4*3600,metadata:o,verify:l==null?void 0:l.verify,fraudCheck:this.fraudProcessor?this.fraudProcessor.getCheckResult():null}),d,c,{providerId:t})}tokeniseClickToPay(t,s,r){var n;this.iframe&&((n=this.iframe.contentWindow)==null||n.postMessage({status:Ia,clickToPay:t,threeDSServerTransID:s,fraudCheckResult:r},"*"))}}const ui=B("");function di(){return{errorMessage:ui,showErrorMessage:s=>{ui.value=s},hideErrorMessage:()=>{ui.value=""}}}const Ss=e=>(At("data-v-4d39ea7d"),e=e(),Nt(),e),Vh={id:"payfurl-payto-form",class:"payfurl-form"},Fh={key:0,class:"error text-normal"},jh={class:"row"},$h=Ss(()=>C("label",null,"Payer Name",-1)),Hh={class:"row"},Kh=Ss(()=>C("label",null,"Payer Id Type",-1)),Zh=[Ss(()=>C("option",{value:"PHONE"},"Phone",-1)),Ss(()=>C("option",{value:"EMAIL"},"Email",-1)),Ss(()=>C("option",{value:"ABN"},"Abn",-1))],Wh={class:"row"},Yh=Ss(()=>C("label",null," Pay Id ",-1)),Gh=["placeholder"],zh={key:0,class:"small"},Xh={key:1,class:"error"},Bh=ve({__name:"PayToForm",props:{log:null},emits:["submit"],setup(e,{emit:t}){const s=e,r=B({}),{isLoading:n}=Ze(),i=B(""),o=B("PHONE"),a=B(""),l=bt(()=>o.value==="PHONE"?"0405123456 or 0212341234":th(o.value.toLowerCase())),c=B(!0),{errorMessage:d}=di();function u(){return r.value.payId="",o.value==="PHONE"&&(qr(a.value)||(r.value.payId="Invalid phone number")),o.value==="EMAIL"&&(nr(a.value)||(r.value.payId="Invalid email")),o.value==="ABN"&&(ld(a.value)||(r.value.payId="Invalid ABN")),r.value.payId===""}function p(y){var m,I,N,$;if((m=y==null?void 0:y.data)!=null&&m.status){if(y.data.status===ri){if((I=s.log)==null||I.call(s,"[PayTo]: message received",y.data),!c.value||(y.stopPropagation(),s.log&&s.log("[PayTo]: form submit",{payerName:i.value,payIdType:o.value,payId:a.value}),!u()))return;t("submit",{payerName:i.value,payIdType:o.value,payId:o.value==="PHONE"?od(a.value):String(a.value).toLowerCase()})}y.data.status==="activate"&&y.data.component==="payto"&&((N=s.log)==null||N.call(s,"[PayTo]: message received",y.data),d.value="",c.value=!0),y.data.status==="deactivate"&&y.data.component==="payto"&&(($=s.log)==null||$.call(s,"[PayTo]: message received",y.data),c.value=!1)}}return at(()=>{window.addEventListener("message",p),window.addEventListener("keypress",function(y){y.altKey&&y.code==="KeyP"&&(y.preventDefault(),i.value="test",o.value="ABN",a.value="67384721620")})}),$t(()=>{window.removeEventListener("message",p)}),(y,m)=>(z(),ee("div",Vh,[lt(Ce(Wt,null,null,512),[[Cs,ce(n)]]),C("div",{class:"container-form",style:Te(`visibility: ${ce(n)?"hidden":"visible"}`)},[ce(d)?(z(),ee("div",Fh,Re(ce(d)),1)):Ae("",!0),C("div",jh,[$h,C("div",null,[lt(C("input",{type:"text",maxlength:"100",placeholder:"Payer Name","onUpdate:modelValue":m[0]||(m[0]=I=>i.value=I)},null,512),[[Jr,i.value]])])]),C("div",Hh,[Kh,C("div",null,[lt(C("select",{"onUpdate:modelValue":m[1]||(m[1]=I=>o.value=I)},Zh,512),[[Ku,o.value]])])]),C("div",Wh,[Yh,C("div",null,[lt(C("input",{type:"text",maxlength:"100",placeholder:ce(l),"onUpdate:modelValue":m[2]||(m[2]=I=>a.value=I),onKeyup:u},null,40,Gh),[[Jr,a.value]]),o.value==="PHONE"?(z(),ee("div",zh,"(mobile or landline with area code)")):Ae("",!0),r.value.payId?(z(),ee("p",Xh,Re(r.value.payId),1)):Ae("",!0)])])],4)]))}}),Pm="",Cm="",Jh=we(Bh,[["__scopeId","data-v-4d39ea7d"]]),Qh=e=>(At("data-v-f06289bf"),e=e(),Nt(),e),qh={id:"payfurl-payto-agreement",class:"payfurl-form"},ef=Qh(()=>C("div",{class:"message"},"Approve the agreement in your banking app",-1)),tf=ve({__name:"PayToAgreement",props:{debug:{type:Boolean}},setup(e){return(t,s)=>(z(),ee("div",qh,[Ce(Wt),ef]))}}),Am="",Nm="",sf=we(tf,[["__scopeId","data-v-f06289bf"]]),ws={TOKENISE:"TOKENISE",TOKEN_STATUS:"TOKEN_STATUS"},on=(e,t)=>({[ws.TOKENISE]:{url:e+"/token/payto",method:"POST"},[ws.TOKEN_STATUS]:{url:e+"/token/"+t,method:"GET"}});class rf{constructor(t,s){g(this,"container",null);g(this,"debug",!1);g(this,"log");g(this,"apiUrl","");g(this,"getPaymentOptions");g(this,"options",null);g(this,"providerId","");g(this,"tokenId","");g(this,"checkAgreementHandler",null);g(this,"failureCallback",null);g(this,"successCallback",null);g(this,"httpInvoker",null);g(this,"destroy",()=>{});g(this,"successPayToHandler",(t,s)=>{this.log("successPayToHandler",t,s);const r=JSON.parse(s);if(!r||!(r!=null&&r.tokenId))return this.failurePayToHandler(t,s);this.tokenId=r.tokenId,Ke({el:this.container,component:sf,props:{el:this.container,log:this.log}}),this.checkAgreement()});g(this,"failurePayToHandler",(t,s)=>{this.log("failurePayToHandler",t,s),Ze().stopLoading(),di().showErrorMessage("Invalid payment details")});g(this,"failurePayToAgreementHandler",(t,s)=>{var r;Ze().stopLoading(),this.log("failurePayToAgreementHandler",t,s),X(this.container,"Agreement has been canceled"),(r=this.failureCallback)==null||r.call(this,{error:"Agreement has been canceled",body:s})});this.log=t,this.debug=s.debug,this.apiUrl=s.apiUrl,this.getPaymentOptions=s.getPaymentOptions,this.failureCallback=s.onFailure||null,this.successCallback=s.onSuccess||null;const r=new Tt(s.environment,Mt(s.publicKey));this.httpInvoker=new It(s.publicKey,s.version,r)}cleanUp(){var t;(t=this.destroy)==null||t.call(this)}addPayTo(t,s,r,n){if(this.log("[addPayTo]",{amount:s,providerId:r,options:n}),this.container=t,this.providerId=r,this.options=n,!st(s))throw X(t,"Invalid amount: "+s),new TypeError("invalid amount: "+s);if(!String(n.description).trim())throw X(t,"Invalid description"),new TypeError("invalid description");if(n.maximumAmount||(n.maximumAmount=1e3),n.maximumAmount<0||n.maximumAmount>9999)throw X(t,"Invalid maximum amount: "+n.maximumAmount),new TypeError("invalid maximumAmount: "+n.maximumAmount);const i=Ke({el:this.container,component:Jh,props:{el:this.container,log:this.log},on:{submit:o=>{this.log("submit payto form",o),Ze().startLoading(),setTimeout(()=>{this.tokenise(o)},500)}}});this.destroy=i.destroy}tokenise(t){var r,n,i;const s={payerName:t.payerName,description:(r=this.options)==null?void 0:r.description,maximumAmount:(n=this.options)==null?void 0:n.maximumAmount,providerId:this.providerId,payerPayIdDetails:{payIdType:t.payIdType.toUpperCase(),payId:t.payId}};(i=this.httpInvoker)==null||i.invoke(on(this.apiUrl)[ws.TOKENISE].url,on(this.apiUrl)[ws.TOKENISE].method,JSON.stringify(s),this.successPayToHandler.bind(this),this.failurePayToHandler.bind(this))}successPayToAgreementHandler(){var t;Ze().stopLoading(),this.log("success agreement",this.tokenId),tn(this.container,"PayTo Agreement Approved"),(t=this.successCallback)==null||t.call(this,{token:this.tokenId})}checkAgreement(){var t;this.checkAgreementHandler||(this.checkAgreementHandler=setInterval(this.checkAgreement.bind(this),5e3)),(t=this.httpInvoker)==null||t.invoke(on(this.apiUrl,this.tokenId)[ws.TOKEN_STATUS].url,on(this.apiUrl,this.tokenId)[ws.TOKEN_STATUS].method,{},(s,r)=>{this.log("checkAgreement",s,r);const n=JSON.parse(r);if(!n)return clearInterval(this.checkAgreementHandler),this.failurePayToAgreementHandler(s,r);if(n.payToStatus!=="PENDING")return n.payToStatus==="ACTIVE"?(clearInterval(this.checkAgreementHandler),this.successPayToAgreementHandler()):(clearInterval(this.checkAgreementHandler),this.failurePayToAgreementHandler(s,""))},(s,r)=>(this.log("checkAgreement",s,r),clearInterval(this.checkAgreementHandler),this.failurePayToAgreementHandler(s,r)))}}var j;(function(e){e.AZUPAY="azupay",e.SHIFT="shift",e.PAYGLOCAL="payglocal",e.PESAPAL="pesapal",e.ADDI="addi",e.AFFIRM="affirm",e.AFTERPAY="afterpay",e.ALMA="alma",e.APLAZAME="aplazame",e.APLAZO="aplazo",e.ATOME="atome",e.BILLEASE="billease",e.CASHEW="cashew",e.CASHPRESSO="cashpresso",e.CLEARPAY="clearpay",e.CLEO="cleo",e.DANA="dana",e.EASYPAISA="easypaisa",e.FINVERO="finvero",e.FUPAY="fupay",e.GCASG="gcasg",e.GRABPAY="grabpay",e.HUMM="humm",e.KAKAOPAY="kakaopay",e.KLARNA="klarna",e.KUESKIPAY="kueskipay",e.LARA="lara",e.LATITUDEPAY="latitudepay",e.LAYBUY="laybuy",e.LIMEPAY="limepay",e.PACE="pace",e.PAGALEVE="pagaleve",e.PARIBAS="paribas",e.PAYWITHFOUR="paywithfour",e.PAYJUSTNOW="payjustnow",e.PAYTM="paytm",e.PAYBRIGHT="paybright",e.PAYFLEX="payflex",e.PAYRIGHT="payright",e.POSTPAY="postpay",e.RATEPAY="ratepay",e.RIVERTY="riverty",e.SCALAPAY="scalapay",e.SEZZLE="sezzle",e.SHOPBACK="shopback",e.SMARTPAY="smartpay",e.SOFINCO="sofinco",e.SPLITIT="splitit",e.TABBY="tabby",e.TAMARA="tamara",e.TENDOPAY="tendopay",e.TOUCHNGO="touchngo",e.TRIPLEA="triplea",e.TRUEMONEY="truemoney",e.TWISTO="twisto",e.UPLIFT="uplift",e.VALU="valu",e.ZEST="zest",e.ZIP="zip",e.ZOODPAY="zoodpay",e.BKASH="bkash",e.ERATY="eraty",e.PAYBYACCOUNT="pay_by_account",e.UPI="upi"})(j||(j={}));const hi={[j.AZUPAY]:{name:"PayID",description:"",buttonTitle:"Pay with PayID",icon:"PayId"},[j.SHIFT]:{name:"Shift",description:"",buttonTitle:"Pay with Shift",icon:"Shift"},[j.PAYGLOCAL]:{name:"PayGLocal",description:"",buttonTitle:"Pay with PayGLocal",icon:"PayGLocal"},[j.PESAPAL]:{name:"PesaPal",description:"",buttonTitle:"Pay with PesaPal",icon:"Pesapal"},[j.PAYBYACCOUNT]:{name:"Pay By Account",description:"",buttonTitle:"Pay with Pay By Account",icon:"PayByAccount"},[j.UPI]:{name:"UPI",description:"",buttonTitle:"Pay with UPI",icon:"Upi"},[j.ADDI]:{name:"Addi",description:"",buttonTitle:"Pay with Addi",icon:"Addi"},[j.AFFIRM]:{name:"Affirm",description:"",buttonTitle:"Pay with Affirm",icon:"Affirm"},[j.AFTERPAY]:{name:"Afterpay",description:"",buttonTitle:"Pay with Afterpay",icon:"Afterpay"},[j.ALMA]:{name:"Alma",description:"",buttonTitle:"Pay with Alma",icon:"Alma"},[j.APLAZAME]:{name:"Aplazame",description:"",buttonTitle:"Pay with Aplazame",icon:"Aplazame"},[j.APLAZO]:{name:"Aplazo",description:"",buttonTitle:"Pay with Aplazo",icon:"Aplazo"},[j.ATOME]:{name:"Atome",description:"",buttonTitle:"Pay with Atome",icon:"Atome"},[j.BILLEASE]:{name:"Billease",description:"",buttonTitle:"Pay with Billease",icon:"Billease"},[j.CASHEW]:{name:"Cashew",description:"",buttonTitle:"Pay with Cashew",icon:"Cashew"},[j.CASHPRESSO]:{name:"Cashpresso",description:"",buttonTitle:"Pay with Cashpresso",icon:"Cashpresso"},[j.CLEARPAY]:{name:"Clearpay",description:"",buttonTitle:"Pay with Clearpay",icon:"Clearpay"},[j.CLEO]:{name:"Cleo",description:"",buttonTitle:"Pay with Cleo",icon:"Cleo"},[j.DANA]:{name:"Dana",description:"",buttonTitle:"Pay with Dana",icon:"Dana"},[j.EASYPAISA]:{name:"Easypaisa",description:"",buttonTitle:"Pay with Easypaisa",icon:"Easypaisa"},[j.FINVERO]:{name:"Finvero",description:"",buttonTitle:"Pay with Finvero",icon:"Finvero"},[j.FUPAY]:{name:"FuPay",description:"",buttonTitle:"Pay with FuPay",icon:"Fupay"},[j.GCASG]:{name:"GCasg",description:"",buttonTitle:"Pay with GCasg",icon:"Gcasg"},[j.GRABPAY]:{name:"GrabPay",description:"",buttonTitle:"Pay with GrabPay",icon:"Grabpay"},[j.HUMM]:{name:"Humm",description:"",buttonTitle:"Pay with Humm",icon:"Humm"},[j.KAKAOPAY]:{name:"KakaoPay",description:"",buttonTitle:"Pay with KakaoPay",icon:"Kakaopay"},[j.KLARNA]:{name:"Klarna",description:"",buttonTitle:"Pay with Klarna",icon:"Klarna"},[j.KUESKIPAY]:{name:"KueskiPay",description:"",buttonTitle:"Pay with KueskiPay",icon:"Kueskipay"},[j.LARA]:{name:"Lara",description:"",buttonTitle:"Pay with Lara",icon:"Lara"},[j.LATITUDEPAY]:{name:"LatitudePay",description:"",buttonTitle:"Pay with LatitudePay",icon:"Latitudepay"},[j.LAYBUY]:{name:"Laybuy",description:"",buttonTitle:"Pay with Laybuy",icon:"Laybuy"},[j.LIMEPAY]:{name:"Limepay",description:"",buttonTitle:"Pay with Limepay",icon:"Limepay"},[j.PACE]:{name:"Pace",description:"",buttonTitle:"Pay with Pace",icon:"Pace"},[j.PAGALEVE]:{name:"Pagaleve",description:"",buttonTitle:"Pay with Pagaleve",icon:"Pagaleve"},[j.PARIBAS]:{name:"BNP Paribas",description:"",buttonTitle:"Pay with BNP Paribas",icon:"Paribas"},[j.PAYWITHFOUR]:{name:"Pay With Four",description:"",buttonTitle:"Pay with Pay With Four",icon:"Paywithfour"},[j.PAYJUSTNOW]:{name:"PayJustNow",description:"",buttonTitle:"Pay with PayJustNow",icon:"Payjustnow"},[j.PAYTM]:{name:"PayTM",description:"",buttonTitle:"Pay with PayTM",icon:"Paytm"},[j.PAYBRIGHT]:{name:"Paybright",description:"",buttonTitle:"Pay with Paybright",icon:"Paybright"},[j.PAYFLEX]:{name:"Payflex",description:"",buttonTitle:"Pay with Payflex",icon:"Payflex"},[j.PAYRIGHT]:{name:"Payright",description:"",buttonTitle:"Pay with Payright",icon:"Payright"},[j.POSTPAY]:{name:"Postpay",description:"",buttonTitle:"Pay with Postpay",icon:"Postpay"},[j.RATEPAY]:{name:"Ratepay",description:"",buttonTitle:"Pay with Ratepay",icon:"Ratepay"},[j.RIVERTY]:{name:"Riverty",description:"",buttonTitle:"Pay with Riverty",icon:"Riverty"},[j.SCALAPAY]:{name:"Scalapay",description:"",buttonTitle:"Pay with Scalapay",icon:"Scalapay"},[j.SEZZLE]:{name:"Sezzle",description:"",buttonTitle:"Pay with Sezzle",icon:"Sezzle"},[j.SHOPBACK]:{name:"ShopBack",description:"",buttonTitle:"Pay with ShopBack",icon:"Shopback"},[j.SMARTPAY]:{name:"Smartpay",description:"",buttonTitle:"Pay with Smartpay",icon:"Smartpay"},[j.SOFINCO]:{name:"Sofinco",description:"",buttonTitle:"Pay with Sofinco",icon:"Sofinco"},[j.SPLITIT]:{name:"Splitit",description:"",buttonTitle:"Pay with Splitit",icon:"Splitit"},[j.TABBY]:{name:"Tabby",description:"",buttonTitle:"Pay with Tabby",icon:"Tabby"},[j.TAMARA]:{name:"Tamara",description:"",buttonTitle:"Pay with Tamara",icon:"Tamara"},[j.TENDOPAY]:{name:"Tendopay",description:"",buttonTitle:"Pay with Tendopay",icon:"Tendopay"},[j.TOUCHNGO]:{name:"Touch'n Go",description:"",buttonTitle:"Pay with Touch'n Go",icon:"Touchngo"},[j.TRIPLEA]:{name:"Triple-A",description:"",buttonTitle:"Pay with Triple-A",icon:"Triplea"},[j.TRUEMONEY]:{name:"TrueMoney",description:"",buttonTitle:"Pay with TrueMoney",icon:"Truemoney"},[j.TWISTO]:{name:"Twisto",description:"",buttonTitle:"Pay with Twisto",icon:"Twisto"},[j.UPLIFT]:{name:"Uplift",description:"",buttonTitle:"Pay with Uplift",icon:"Uplift"},[j.VALU]:{name:"ValU",description:"",buttonTitle:"Pay with ValU",icon:"Valu"},[j.ZEST]:{name:"Zest Money",description:"",buttonTitle:"Pay with Zest Money",icon:"Zest"},[j.ZIP]:{name:"Zip",description:"",buttonTitle:"Pay with Zip",icon:"Zip"},[j.ZOODPAY]:{name:"Zoodpay",description:"",buttonTitle:"Pay with Zoodpay",icon:"Zoodpay"},[j.BKASH]:{name:"bKash",description:"",buttonTitle:"Pay with bKash",icon:"Bkash"},[j.ERATY]:{name:"eRaty",description:"",buttonTitle:"Pay with eRaty",icon:"Eraty"}},nf=["src"],of=ve({__name:"BnplPopup",props:{url:null,name:null},emits:["close"],setup(e,{emit:t}){const s=e,r=B(s.url);return B(null),zs(()=>s.url,n=>{r.value=n}),at(()=>{}),(n,i)=>(z(),cs(Aa,{width:"80vw",height:"80vh",backdrop:"static",onClose:i[0]||(i[0]=o=>t("close"))},{title:Es(()=>[Yn(Re(e.name),1)]),body:Es(()=>[C("iframe",{src:r.value,sandbox:"allow-same-origin allow-scripts allow-popups allow-forms"},null,8,nf)]),_:1}))}}),Sm="",wm="",af=we(of,[["__scopeId","data-v-deb26109"]]),lf=["id"],cf={key:0,class:"error text-normal"},uf={class:"row"},df={key:1,class:"error"},hf=ve({__name:"BnplForm",props:{log:null,providerType:null,options:null},emits:["activate","popup","popupClose","close","newWindow","newWindowClose"],setup(e,{emit:t}){const s=e,r=B(null),{isLoading:n}=Ze(),i=B(!0),o=B(s.providerType),a=B(""),l=B(null),{errorMessage:c}=di(),d=bt(()=>{var b;return((b=hi[o.value])==null?void 0:b.buttonTitle)||`Pay with ${o.value}`}),u=bt(()=>{var V,D;const b=((D=(V=l.value)==null?void 0:V.gatewayTransactionData)==null?void 0:D.RedirectUrl)||"";if(!b)return"";if(o.value===j.PAYBYACCOUNT)return b;const R=b.includes("?")?"&":"?";return`${b}${R}embedded=true`}),p=B(!1),y=B(!1),m=bt(()=>u.value&&!p.value&&!y.value);function I(b){var R,V,D,q,ie,ue,te,W,le,_e;if((R=b==null?void 0:b.data)!=null&&R.status){if(b.data.status==="activate"&&b.data.component==="bnpl"&&b.data.providerType===o.value&&((V=s.log)==null||V.call(s,"[BNPL]: message received",b.data),i.value=!0,t("activate",s.options)),b.data.status==="deactivate"&&b.data.component==="bnpl"&&b.data.providerType===o.value&&((D=s.log)==null||D.call(s,"[BNPL]: message received",b.data),i.value=!1),b.data.status==="checkout"&&b.data.component==="bnpl"&&b.data.providerType===o.value&&((q=s.log)==null||q.call(s,"[BNPL]: message received",b.data),c.value="",l.value=b.data.checkoutData,(ie=s.log)==null||ie.call(s,"[BNPL]: checkout",l.value)),b.data.status==="message"&&b.data.component==="bnpl"&&b.data.providerType===o.value&&((ue=s.log)==null||ue.call(s,"[BNPL]: message received",b.data),a.value=b.data.message,y.value=!1,p.value=!1),b.data.status==="error"&&b.data.component==="bnpl"&&b.data.providerType===o.value&&((te=s.log)==null||te.call(s,"[BNPL]: message received",b.data),a.value=b.data.error,b.data.originalError)){const O=JSON.parse(b.data.originalError);O!=null&&O.message&&(a.value=O.message)}b.data.status==="redirect"&&b.data.component==="bnpl"&&((W=s.log)==null||W.call(s,"[BNPL]: message received",b.data),p.value=!1,b.data.result==="failed"&&(a.value="Payment has been canceled",$())),b.data.component==="bnpl"&&b.data.providerType===j.PAYBYACCOUNT&&(b.data.status==="failure"?((le=s.log)==null||le.call(s,"[BNPL][PayByAccount]: message received",b.data),a.value=b.data.error,t("newWindowClose")):b.data.status==="success"&&((_e=s.log)==null||_e.call(s,"[BNPL][PayByAccount]: message received",b.data),c.value=""))}}function N(){var b,R,V;if(a.value="",o.value===j.PAYBYACCOUNT){(b=s.log)==null||b.call(s,"PayByAccount opens a new window");let D=400,q=645,ie=screen.width<D?0:(screen.width-D)/2,ue=screen.height<q?0:(screen.height-q)/2;window.open(u.value,"_blank","popup=yes, width="+D+", height="+q+", left="+ie+", top="+ue),t("newWindow",(R=l.value)==null?void 0:R.checkoutId)}else p.value=!0,y.value=!0,t("popup",(V=l.value)==null?void 0:V.checkoutId);return!1}function $(){p.value=!1,y.value=!1,t("popupClose")}return at(()=>{window.addEventListener("message",I),en(r.value,ir)||(i.value=!0,t("activate",s.options))}),$t(()=>{window.removeEventListener("message",I)}),(b,R)=>(z(),ee(Se,null,[lt(Ce(Wt,{"use-local":""},null,512),[[Cs,!ce(u)]]),y.value&&!p.value?(z(),cs(Wt,{key:0,message:"Finalise the payment"})):Ae("",!0),C("div",{id:`payfurl-${o.value}-form`,class:"payfurl-bnpl-form",ref_key:"root",ref:r},[C("div",{class:"container-form",style:Te(`visibility: ${ce(n)?"hidden":"visible"}`)},[ce(c)?(z(),ee("div",cf,Re(ce(c)),1)):Ae("",!0),C("div",uf,[ce(m)?(z(),ee("button",{key:0,onClick:N,type:"button"},Re(ce(d)),1)):Ae("",!0),a.value?(z(),ee("p",df,Re(a.value),1)):Ae("",!0)])],4)],8,lf),p.value?(z(),cs(af,{key:1,onClose:$,url:ce(u),name:ce(d)},null,8,["url","name"])):Ae("",!0)],64))}}),Dm="",Tm="",ff=we(hf,[["__scopeId","data-v-10bacb0d"]]),Ds={CHECKOUT:"CHECKOUT",CHECK_STATUS:"CHECK_STATUS"},an=(e,t)=>({[Ds.CHECKOUT]:{url:e+"/payment_method/checkout",method:"POST"},[Ds.CHECK_STATUS]:{url:e+"/checkout/"+t,method:"GET"}});class pf{constructor(t,s){g(this,"debug",!1);g(this,"log");g(this,"apiUrl","");g(this,"redirectUrl","");g(this,"checkStatusHandler",null);g(this,"failureCallback",null);g(this,"successCallback",null);g(this,"httpInvoker",null);g(this,"destroy",()=>{});g(this,"container",null);this.log=t,this.debug=s.debug,this.apiUrl=s.apiUrl,this.redirectUrl=s.redirectUrl,this.failureCallback=s.onFailure||null,this.successCallback=s.onSuccess||null;const r=new Tt(s.environment,Mt(s.publicKey));this.httpInvoker=new It(s.publicKey,s.version,r)}cleanUp(){var t;(t=this.destroy)==null||t.call(this)}addBnpl(t,s,r,n,i,o,a){this.log(`[addCheckout][${n}]`,{amount:s,providerId:i,providerType:n,options:o,bnplOptions:a}),this.validateOptions(t,s,r,o),this.container=t;let l=!1,c;const d=Ke({el:t,component:ff,props:{log:this.log,providerType:n,options:{providerId:i,amount:s,currency:r,bnplOptions:a}},on:{activate:u=>{if(l)return;l=!0,this.log(`[sdk][checkoutProcessor][${n}]: activate checkout form`,u);const p=()=>{l=!1};this.checkout(u,n,o,p),c=this.getMessageHandler(u,n,o,p).bind(this),window.addEventListener("message",c)},popup:u=>{this.log(`[sdk][checkoutProcessor][${n}]: popup open`,u),this.checkStatus(t,u,n,c)},popupClose:()=>{this.log(`[sdk][checkoutProcessor][${n}]: popup close`),this.stopCheckingStatus(null)},newWindow:u=>{this.log(`[sdk][checkoutProcessor][${n}]: new window open`,u),this.checkStatus(t,u,n,c)},newWindowClose:()=>{this.log(`[sdk][checkoutProcessor][${n}]: new window close`),this.stopCheckingStatus(null)}}});this.destroy=d.destroy}checkout(t,s,r,n){var i,o,a,l,c,d,u,p,y,m,I,N,$,b;(b=this.httpInvoker)==null||b.invoke(an(this.apiUrl)[Ds.CHECKOUT].url,an(this.apiUrl)[Ds.CHECKOUT].method,JSON.stringify({providerId:t.providerId,amount:t.amount,currency:t.currency,shippingAmount:r.shippingAmount,customer:{firstName:(i=r.customer)==null?void 0:i.firstName,lastName:(o=r.customer)==null?void 0:o.lastName,email:(a=r.customer)==null?void 0:a.email,phone:(l=r.customer)==null?void 0:l.phoneNumber,billingAddress:{name:((c=r.billingAddress)==null?void 0:c.firstName)+" "+((d=r.billingAddress)==null?void 0:d.lastName),addressLine1:(u=r.billingAddress)==null?void 0:u.streetAddress,addressLine2:(p=r.billingAddress)==null?void 0:p.streetAddress2,suburb:(y=r.billingAddress)==null?void 0:y.region,state:(m=r.billingAddress)==null?void 0:m.state,countryCode:(I=r.billingAddress)==null?void 0:I.country,postcode:(N=r.billingAddress)==null?void 0:N.postalCode}},items:($=r.orderItems)==null?void 0:$.map(R=>({name:R.name,reference:R.sku,quantity:R.quantity,amount:R.totalAmount})),options:{...t.bnplOptions,redirectUrl:this.redirectUrl}}),this.getSuccessCheckoutHandler(s).bind(this),(R,V)=>{n==null||n(R,V),this.getFailureCheckoutHandler(s).bind(this)(R,V)})}getSuccessCheckoutHandler(t){return(s,r)=>{this.log(`[sdk][checkoutProcessor][${t}]: successCheckoutHandler`,s,r);const n=JSON.parse(r),i=JSON.parse(window.atob(n.checkoutData));window.postMessage({status:"checkout",component:"bnpl",providerType:t,checkoutData:i},"*")}}getFailureCheckoutHandler(t){return(s,r)=>{this.log(`[sdk][checkoutProcessor][${t}]: failureCheckoutHandler`,s,r),Ze().stopLoading(),window.postMessage({status:"error",component:"bnpl",providerType:t,error:"Invalid payment details",originalError:r},"*")}}stopCheckingStatus(t){this.checkStatusHandler&&(clearInterval(this.checkStatusHandler),this.checkStatusHandler=null),t&&window.removeEventListener("message",t)}checkStatus(t,s,r,n){var l;this.checkStatusHandler||(this.checkStatusHandler=setInterval(this.checkStatus.bind(this,t,s,r,n),5e3),this.log(`[sdk][checkoutProcessor][${r}]: Starting polling...`));const i=this,o=(c,d)=>{Ze().stopLoading(),i.log("failureCheckStatusHandler",c,d),window.postMessage({status:"message",component:"bnpl",providerType:r,message:"Checkout has been cancelled"},"*")},a=(c,d)=>{var p;Ze().stopLoading(),i.log(`[sdk][checkoutProcessor][${r}]: successCheckStatusHandler`,{transactionId:c,token:d}),tn(t,"Confirming payment processed successfully");const u={};c&&(u.transactionId=c),d&&(u.token=d),(p=i.successCallback)==null||p.call(i,u)};(l=this.httpInvoker)==null||l.invoke(an(this.apiUrl,s)[Ds.CHECK_STATUS].url,an(this.apiUrl,s)[Ds.CHECK_STATUS].method,{},(c,d)=>{const u=JSON.parse(d);if(this.log("checkoutStatus",u),!u)return this.stopCheckingStatus(n),o(c,d);if(u.status=="SUCCESS"&&u.status==="SUCCESS")return this.stopCheckingStatus(n),a(u.transactionId,u.tokenId)},(c,d)=>(this.log(`[sdk][checkoutProcessor][${r}]: checkStatus`,{status:c,body:d}),this.stopCheckingStatus(n),o(c,d)))}validateOptions(t,s,r,n){var i,o,a,l,c,d,u,p,y,m,I,N,$,b,R,V,D,q,ie;if(!rt(r))throw X(t,"Invalid currency: "+r),new TypeError("Invalid currency: "+r);if(!st(s))throw X(t,"Invalid amount: "+s),new TypeError("Invalid amount: "+s);if(!Array.isArray(n.orderItems)||((i=n.orderItems)==null?void 0:i.length)===0)throw X(t,"Invalid order"),new TypeError("Invalid order");if(!((o=n.customer)!=null&&o.email)||!nr((a=n.customer)==null?void 0:a.email))throw X(t,"Invalid customer email"),new TypeError("Invalid customer email");if(!((l=n.customer)!=null&&l.firstName)&&!((c=n.customer)!=null&&c.lastName))throw X(t,"Invalid customer name"),new TypeError("Invalid customer name");if(!((d=n.customer)!=null&&d.phoneNumber)||!qr((u=n.customer)==null?void 0:u.phoneNumber))throw X(t,"Invalid customer phone number"),new TypeError("Invalid customer phone number");if(!((p=n.billingAddress)!=null&&p.email)||!nr((y=n.billingAddress)==null?void 0:y.email))throw X(t,"Invalid billing address email"),new TypeError("Invalid billing address email");if(!((m=n.billingAddress)!=null&&m.firstName)&&!((I=n.billingAddress)!=null&&I.lastName))throw X(t,"Invalid billing address name"),new TypeError("Invalid billing address name");if(!((N=n.billingAddress)!=null&&N.phoneNumber)||!qr(($=n.billingAddress)==null?void 0:$.phoneNumber))throw X(t,"Invalid billing address phone number"),new TypeError("Invalid billing address phone number");if(!((b=n.billingAddress)!=null&&b.streetAddress))throw X(t,"Invalid billing street address"),new TypeError("Invalid billing street address");if(!((R=n.billingAddress)!=null&&R.city))throw X(t,"Invalid billing city"),new TypeError("Invalid billing city");if(!((V=n.billingAddress)!=null&&V.country))throw X(t,"Invalid billing country"),new TypeError("Invalid billing country");if(!((D=n.billingAddress)!=null&&D.region))throw X(t,"Invalid billing region"),new TypeError("Invalid billing region");if(!((q=n.billingAddress)!=null&&q.state))throw X(t,"Invalid billing state"),new TypeError("Invalid billing state");if(!((ie=n.billingAddress)!=null&&ie.postalCode))throw X(t,"Invalid billing postal code"),new TypeError("Invalid billing postal code")}getMessageHandler(t,s,r,n){return i=>{var o;if((o=i==null?void 0:i.data)!=null&&o.status){if(i.data.status===or){if(Number(t.amount)==Number(i.data.amount))return;this.log(`[sdk][checkoutProcessor][${s}]: message received`,i.data),t.amount=Number(i.data.amount),this.checkout(t,s,r,n);return}if(i.data.status===sn){if(t.currency==i.data.currency)return;this.log(`[sdk][checkoutProcessor][${s}]: message received`,i.data),t.currency=i.data.currency,this.checkout(t,s,r,n);return}}}}}const kt={name:"@payfurl/client",private:!1,version:"4.5.9",files:["dist/sdk"],main:"./dist/sdk/payfurl.umd.js",module:"./dist/sdk/payfurl.es.js",types:"./dist/sdk/payfurl.d.ts",exports:{".":{import:"./dist/sdk/payfurl.es.js",require:"./dist/sdk/payfurl.umd.js"}},scripts:{dev:"vite -c vite.iframe.config.ts","build-iframe":"vite build -c vite.iframe.config.ts --emptyOutDir","build-sdk":"vite build -c vite.sdk.config.ts","build-all":"npm run build-iframe && npm run build-sdk",preview:"vite preview",server:"python3 -m http.server 3001"},dependencies:{dayjs:"^1.11.7",vue:"^3.2.47"},devDependencies:{"@babel/types":"^7.21.2","@rollup/plugin-typescript":"^11.0.0","@types/applepayjs":"^14.0.0","@types/node":"^18.14.2","@vitejs/plugin-vue":"^4.0.0","@vue/eslint-config-prettier":"^7.1.0","@vue/eslint-config-typescript":"^11.0.2",eslint:"^8.35.0","eslint-plugin-vue":"^9.9.0",prettier:"^2.8.4",typescript:"^4.9.5",vite:"^4.1.4","vue-tsc":"^1.2.0"}},fi={CHECK_FRAUD:"CHECK_FRAUD"},Sa=e=>({[fi.CHECK_FRAUD]:{url:e+"/fraud_check",method:"POST"}});class mf{constructor(t,s){g(this,"providerId","");g(this,"stopPaymentOnFailure",!1);g(this,"debug",!1);g(this,"log");g(this,"apiUrl","");g(this,"getFraudCheckData");g(this,"metadata",{});g(this,"amount",0);g(this,"currency","AUD");g(this,"address",null);g(this,"customer",null);g(this,"order",null);g(this,"paymentInformation",null);g(this,"paypalInformation",null);g(this,"failureCallback",null);g(this,"successCallback",null);g(this,"checkResult",null);g(this,"httpInvoker",null);this.log=t,this.providerId=s.providerId,this.stopPaymentOnFailure=s.stopPaymentOnFailure,this.debug=s.debug,this.apiUrl=s.apiUrl,this.metadata=s.metadata,this.getFraudCheckData=s.getFraudCheckData,this.failureCallback=s.onFailure||null,this.successCallback=s.onSuccess||null;const r=new Tt(s.environment,Mt(s.publicKey));this.httpInvoker=new It(s.publicKey,s.version,r)}fraudCheck(t,s){var r;if(!this.customer)return s({error:"Customer information is required"});if(!this.address)return s({error:"Address information is required"});if(!this.order)return s({error:"Order information is required"});if(!this.paymentInformation&&!this.paypalInformation)return s({error:"Payment information is required"});this.log("[fraudCheck]",{amount:this.amount,currency:this.currency,paymentInformation:this.paymentInformation,paypalInformation:this.paypalInformation,customer:this.customer,address:this.address,order:this.order,metadata:this.metadata}),(r=this.httpInvoker)==null||r.invoke(Sa(this.apiUrl)[fi.CHECK_FRAUD].url,Sa(this.apiUrl)[fi.CHECK_FRAUD].method,this.getFraudCheckData(this.providerId,this.amount,this.currency,this.paymentInformation,this.paypalInformation,this.customer,this.address,this.order,this.metadata),(n,i)=>{if(this.log("[fraudCheck], success",n,i,this.stopPaymentOnFailure),this.checkResult=JSON.parse(i),this.checkResult===null)return s({error:"Fraud Check Failed",body:i});this.checkResult.providerId=this.providerId,this.checkResult.stopPaymentOnFailure=this.stopPaymentOnFailure,t(this.checkResult)},(n,i)=>{this.log("[fraudCheck], failure",n,i),s({error:"Fraud Check Failed",body:i})})}setAmount(t){this.amount=t}setCurrency(t){this.currency=t}setAddressInfo(t){this.address={...t}}setCustomerInfo(t){this.customer={...t}}setOrderInfo(t){this.order={...t}}setPaymentInfo(t){this.paymentInformation={...t}}setPaypalInfo(t){this.paypalInformation={...t}}getProviderId(){return this.providerId}getCheckResult(){return this.checkResult}}const gf={style:{position:"relative"}},yf={key:0,class:"error text-normal"},_f=ve({__name:"GooglePayForm",props:{log:null,el:null,environment:null,amount:null,currency:null,options:null},emits:["complete","activate","close","error"],setup(e,{emit:t}){const s=e,r="payfurl-googlepay-script",n=B(null),i=B(s.amount),o=B(s.currency),a=B(!0),l=B("");let c=!1;const{isLoading:d}=Ze();function u(){if(document.getElementById(r)){R();return}if(c)return;c=!0,window.google=null;const D=document.createElement("script");D.src="https://pay.google.com/gp/p/js/pay.js",D.type="text/javascript",D.id=r,D.onload=R,document.body.appendChild(D)}let p=null;function y(){return p===null&&(p=new window.google.payments.api.PaymentsClient({environment:s.environment!=Qe.PRODUCTION?"TEST":"PRODUCTION"})),p}const m={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"]}};function I(){return{apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:[m]}}function N(){const q=y().createButton({onClick:$});s.el.appendChild(q)}function $(){const D=b(),q=y();s.log("[paymentData], request",D),q.loadPaymentData(D).then(function(ie){s.log("[paymentData], success",ie);const ue=JSON.parse(ie.paymentMethodData.tokenizationData.token);ie.paymentMethodData.tokenizationData={...ie.paymentMethodData.tokenizationData,...ue},t("complete",ie)}).catch(function(ie){s.log("[paymentData], error",ie),t("error",ie.message)})}function b(){return{apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:[{...m,tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:s.options.gateway,gatewayMerchantId:s.options.gatewayMerchantId}}}],transactionInfo:{totalPriceStatus:"FINAL",countryCode:"AU",currencyCode:o.value,totalPrice:i.value.toFixed(2)},merchantInfo:{merchantName:"Example Merchant"}}}function R(){y().isReadyToPay(I()).then(function(q){q.result&&N()}).catch(function(q){console.error("Load GooglePay error",q)})}function V(D){var q,ie,ue,te,W,le,_e;(q=D==null?void 0:D.data)!=null&&q.status&&(D.data.status==="activate"&&D.data.component==="googlepay"&&((ie=s.log)==null||ie.call(s,"[GooglePay]: message received",D.data),a.value=!0,t("activate"),u()),D.data.status==="deactivate"&&D.data.component==="googlepay"&&((ue=s.log)==null||ue.call(s,"[GooglePay]: message received",D.data),a.value=!1),D.data.status==="message"&&D.data.component==="googlepay"&&((te=s.log)==null||te.call(s,"[GooglePay]: message received",D.data),l.value=D.data.message),D.data.status==="error"&&D.data.component==="googlepay"&&((W=s.log)==null||W.call(s,"[GooglePay]: message received",D.data),l.value=D.data.error),D.data.status===or&&((le=s.log)==null||le.call(s,"[GooglePay]: message received",D.data),i.value=Number(D.data.amount)),D.data.status===sn&&((_e=s.log)==null||_e.call(s,"[GooglePay]: message received",D.data),o.value=D.data.currency))}return $t(()=>{window.removeEventListener("message",V)}),at(()=>{window.addEventListener("message",V),en(n.value,ir)||(a.value=!0,t("activate"),u())}),(D,q)=>(z(),ee(Se,null,[C("div",gf,[lt(Ce(Wt,null,null,512),[[Cs,ce(d)]])]),C("div",{style:{position:"relative"},ref_key:"root",ref:n},[l.value?(z(),ee("div",yf,Re(l.value),1)):Ae("",!0)],512)],64))}}),pi={ADD_CHARGE_WITH_GOOGLE_PAY:"ADD_CHARGE_WITH_GOOGLE_PAY"},wa=e=>({[pi.ADD_CHARGE_WITH_GOOGLE_PAY]:{url:e+"/charge/token/google",method:"POST"}});class bf{constructor(t,s){g(this,"log");g(this,"apiUrl","");g(this,"environment","");g(this,"failureCallback",null);g(this,"successCallback",null);g(this,"httpInvoker",null);g(this,"destroy",()=>{});g(this,"providerId","");g(this,"amount",0);g(this,"currency","");this.log=t,this.environment=s.environment,this.apiUrl=s.apiUrl,this.failureCallback=s.onFailure||null,this.successCallback=s.onSuccess||null;const r=new Tt(s.environment,Mt(s.publicKey));this.httpInvoker=new It(s.publicKey,s.version,r)}setAmount(t){this.amount=t}setCurrency(t){this.currency=t}cleanUp(){var t;(t=this.destroy)==null||t.call(this)}addGooglePay(t,s,r,n,i){this.log("[addGooglePay]",{providerId:s,amount:r,currency:n,options:i}),this.validateOptions(t,r,n,i),this.setAmount(r),this.setCurrency(n);let o=!1;const a=Ke({el:t,component:_f,props:{log:this.log,el:t,environment:this.environment,amount:this.amount,currency:this.currency,options:i},on:{activate:()=>{o||(o=!0,this.log("activate googlepay form"))},complete:l=>{this.log("[GooglePay]: complete",l);const c={amount:this.amount,currency:this.currency,paymentData:{paymentMethodData:{tokenizationData:{intermediateSigningKey:l.paymentMethodData.tokenizationData.intermediateSigningKey,protocolVersion:l.paymentMethodData.tokenizationData.protocolVersion,signature:l.paymentMethodData.tokenizationData.signature,signedMessage:l.paymentMethodData.tokenizationData.signedMessage}},paymentInfo:{cardDetails:l.paymentMethodData.info.cardDetails,cardNetwork:l.paymentMethodData.info.cardNetwork}}};this.addChargeWithGooglePay(t,s,c)},error:l=>{var c;this.log("[GooglePay]: error",l),X(t,"Unable to pay with Google Pay"),(c=this.failureCallback)==null||c.call(this,{error:"Unable to pay with Google Pay",body:l})}}});this.destroy=a.destroy}addChargeWithGooglePay(t,s,r){var n;this.log("[addChargeWithGooglePay]",r),(n=this.httpInvoker)==null||n.invoke(wa(this.apiUrl)[pi.ADD_CHARGE_WITH_GOOGLE_PAY].url,wa(this.apiUrl)[pi.ADD_CHARGE_WITH_GOOGLE_PAY].method,JSON.stringify(r),this.getSuccessAddChargeHandler(t).bind(this),this.getFailureAddChargeHandler(t).bind(this),{providerId:s})}getFailureAddChargeHandler(t){return(s,r)=>{var n;this.log("[GooglePay], failure",r),X(t,"Unable to pay with Google Pay"),(n=this.failureCallback)==null||n.call(this,{error:"Unable to pay with Google Pay",body:r})}}getSuccessAddChargeHandler(t){return(s,r)=>{var n;try{const i=JSON.parse(r);this.log("[GooglePay], success",i),(n=this.successCallback)==null||n.call(this,{transactionId:i.chargeId})}catch(i){this.log("error parsing addCharge response",i)}}}validateOptions(t,s,r,n){if(!rt(r))throw X(t,"Invalid currency: "+r),new TypeError("invalid currency: "+r);if(!st(s))throw X(t,"Invalid amount: "+s),new TypeError("invalid amount: "+s);if(!n.gateway)throw X(t,"Invalid gateway parameter"),new TypeError("Invalid gateway parameter");if(!n.gatewayMerchantId)throw X(t,"Invalid gateway merchant id parameter"),new TypeError("Invalid gateway merchant id parameter")}}const If={style:{position:"relative"}},vf={key:0,class:"error text-normal"},Ef=ve({__name:"ApplePayForm",props:{log:null,el:null,environment:null,amount:null,currency:null,options:null},emits:["submit","validate","activate","close","error","cancel"],setup(e,{emit:t}){const s=e,r="payfurl-applepay-script",n=B(null),i=B(s.amount),o=B(s.currency),a=B(!0),l=B("");let c=!1;const{isLoading:d}=Ze();function u(){if(s.log("[onApplePayButtonClicked]"),!ApplePaySession)return;const m={countryCode:"AU",currencyCode:o.value,merchantCapabilities:["supports3DS"],supportedNetworks:["visa","masterCard","amex","discover"],total:{label:s.options.lineItemLabel,type:"final",amount:Number(i.value).toFixed(2)}};s.log("[onApplePayButtonClicked], Create ApplePaySession",m);const I=new ApplePaySession(3,m);I.onvalidatemerchant=N=>{const $=N.validationURL;t("validate",{validationUrl:$,merchantIdentifier:s.options.merchantIdentifier,domainName:s.options.domainName,displayName:s.options.displayName},I)},I.onpaymentauthorized=N=>{s.log("[onpaymentauthorized]",N),t("submit",N.payment,I)},I.oncancel=N=>{s.log("[oncancel]",N),t("cancel")},I.begin()}function p(){if(document.getElementById(r)||c)return;c=!0,window.google=null;const m=document.createElement("script");m.src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js",m.type="text/javascript",m.id=r,m.onload=()=>{var N;const I=document.createElement("apple-pay-button");I.buttonstyle="black",I.locale="en-US",I.type="buy",I.onclick=u,(N=n.value)==null||N.appendChild(I)},document.body.appendChild(m)}function y(m){var I,N,$,b,R,V,D;(I=m==null?void 0:m.data)!=null&&I.status&&(m.data.status==="activate"&&m.data.component==="applepay"&&((N=s.log)==null||N.call(s,"[ApplePay]: message received",m.data),a.value=!0,t("activate"),p()),m.data.status==="deactivate"&&m.data.component==="applepay"&&(($=s.log)==null||$.call(s,"[ApplePay]: message received",m.data),a.value=!1),m.data.status==="message"&&m.data.component==="applepay"&&((b=s.log)==null||b.call(s,"[ApplePay]: message received",m.data),l.value=m.data.message),m.data.status==="error"&&m.data.component==="applepay"&&((R=s.log)==null||R.call(s,"[ApplePay]: message received",m.data),l.value=m.data.error),m.data.status===or&&((V=s.log)==null||V.call(s,"[ApplePay]: message received",m.data),i.value=Number(m.data.amount)),m.data.status===sn&&((D=s.log)==null||D.call(s,"[ApplePay]: message received",m.data),o.value=m.data.currency))}return $t(()=>{window.removeEventListener("message",y)}),at(()=>{window.addEventListener("message",y),en(n.value,ir)||(a.value=!0,t("activate"),p())}),(m,I)=>(z(),ee(Se,null,[C("div",If,[lt(Ce(Wt,null,null,512),[[Cs,ce(d)]])]),C("div",{style:{position:"relative"},ref_key:"root",ref:n},[l.value?(z(),ee("div",vf,Re(l.value),1)):Ae("",!0)],512)],64))}}),Ts={VALIDATE_MERCHANT:"VALIDATE_MERCHANT",ADD_CHARGE_WITH_APPLE_PAY:"ADD_CHARGE_WITH_APPLE_PAY"},ln=e=>({[Ts.VALIDATE_MERCHANT]:{url:e+"/charge/token/apple/validate",method:"POST"},[Ts.ADD_CHARGE_WITH_APPLE_PAY]:{url:e+"/charge/token/apple",method:"POST"}});class Pf{constructor(t,s){g(this,"log");g(this,"apiUrl","");g(this,"environment","");g(this,"failureCallback",null);g(this,"successCallback",null);g(this,"httpInvoker",null);g(this,"destroy",()=>{});g(this,"providerId","");g(this,"amount",0);g(this,"currency","");this.log=t,this.environment=s.environment,this.apiUrl=s.apiUrl,this.failureCallback=s.onFailure||null,this.successCallback=s.onSuccess||null;const r=new Tt(s.environment,Mt(s.publicKey));this.httpInvoker=new It(s.publicKey,s.version,r)}setAmount(t){this.amount=t}setCurrency(t){this.currency=t}cleanUp(){var t;(t=this.destroy)==null||t.call(this)}addApplePay(t,s,r,n,i){this.log("[addApplePay]",{providerId:s,amount:r,currency:n,options:i}),this.validateOptions(t,r,n,i),this.setAmount(r),this.setCurrency(n);let o=!1;const a=Ke({el:t,component:Ef,props:{log:this.log,el:t,environment:this.environment,amount:this.amount,currency:this.currency,options:i},on:{activate:()=>{o||(o=!0,this.log("activate applepay form"))},validate:(l,c)=>{this.log("[ApplePay]: validate",l),this.validateMerchant(t,s,l,c)},submit:(l,c)=>{this.log("[ApplePay]: complete",l);const d={amount:this.amount,currency:this.currency,token:l.token};this.addChargeWithApplePay(t,s,d,c)},error:(l,c)=>{var d;this.log("[ApplePay]: error",l),X(t,"Unable to pay with ApplePay"),c.completePayment({status:ApplePaySession.STATUS_FAILURE,errors:[{code:"unknown",message:l}]}),(d=this.failureCallback)==null||d.call(this,{error:"Unable to pay with ApplePay",body:l})},cancel:()=>{var l;this.log("[ApplePay]: cancel"),X(t,"ApplePay canceled"),(l=this.failureCallback)==null||l.call(this,{error:"ApplePay canceled"})}}});this.destroy=a.destroy}validateMerchant(t,s,r,n){var i;this.log("[validateMerchant]",r),(i=this.httpInvoker)==null||i.invoke(ln(this.apiUrl)[Ts.VALIDATE_MERCHANT].url,ln(this.apiUrl)[Ts.VALIDATE_MERCHANT].method,JSON.stringify(r),(o,a)=>{try{const l=JSON.parse(a);this.log("[validateMerchant], success",l),n.completeMerchantValidation(l)}catch(l){this.log("error parsing validateMerchant response",l)}},(o,a)=>{var l;this.log("[validateMerchant], failure",a),X(t,"Unable to pay with ApplePay"),(l=this.failureCallback)==null||l.call(this,{error:"Unable to pay with ApplePay",body:a})},{providerId:s})}addChargeWithApplePay(t,s,r,n){var i;this.log("[addChargeWithApplePay]",r),(i=this.httpInvoker)==null||i.invoke(ln(this.apiUrl)[Ts.ADD_CHARGE_WITH_APPLE_PAY].url,ln(this.apiUrl)[Ts.ADD_CHARGE_WITH_APPLE_PAY].method,JSON.stringify(r),this.getSuccessAddChargeHandler(t,n).bind(this),this.getFailureAddChargeHandler(t,n).bind(this),{providerId:s})}getFailureAddChargeHandler(t,s){return(r,n)=>{var i;this.log("[ApplePay], failure",n),X(t,"Unable to pay with ApplePay"),s.completePayment({status:ApplePaySession.STATUS_FAILURE,errors:[{code:"unknown",message:n}]}),(i=this.failureCallback)==null||i.call(this,{error:"Unable to pay with ApplePay",body:n})}}getSuccessAddChargeHandler(t,s){return(r,n)=>{var i;try{const o=JSON.parse(n);this.log("[ApplePay], success",o);const a={status:ApplePaySession.STATUS_SUCCESS,paymentToken:o};s.completePayment(a),(i=this.successCallback)==null||i.call(this,{transactionId:o.chargeId})}catch(o){this.log("error parsing addCharge response",o)}}}validateOptions(t,s,r,n){if(!rt(r))throw X(t,"Invalid currency: "+r),new TypeError("invalid currency: "+r);if(!st(s))throw X(t,"Invalid amount: "+s),new TypeError("invalid amount: "+s);if(!n.lineItemLabel)throw X(t,"Invalid lineItemLabel parameter"),new TypeError("Invalid lineItemLabel parameter");if(!n.domainName)throw X(t,"Invalid domainName parameter"),new TypeError("Invalid domainName parameter");if(!n.displayName)throw X(t,"Invalid displayName parameter"),new TypeError("Invalid displayName parameter");if(!n.merchantIdentifier)throw X(t,"Invalid merchantIdentifier parameter"),new TypeError("Invalid merchantIdentifier parameter")}}const Cf=[(e=>(At("data-v-7d3fe743"),e=e(),Nt(),e))(()=>C("path",{id:"XMLID_34_",d:`M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9
|
|
147
|
+
`,document.head.appendChild(t)}mcInitOtpInput(){this.srcOtpInput=document.createElement("src-otp-input"),this.srcOtpInput.setAttribute("type","overlay"),this.srcOtpInput.setAttribute("display-cancel-option","true"),this.srcOtpInput.setAttribute("style","display: none;"),document.body.appendChild(this.srcOtpInput);let t="";const n=this;this.srcOtpInput.addEventListener("continue",function(){n.log("OTP: continue"),n.srcOtpInput.style.display="none",n.mcValidate(t)}),this.srcOtpInput.addEventListener("otpChanged",function(r){t=r.detail}),this.srcOtpInput.addEventListener("resendOtp",function(r){n.log("OTP: resendOtp",r),n.mcInitiateValidation()}),this.srcOtpInput.addEventListener("notYouRequested",function(r){n.log("OTP: notYouRequested",r),n.mcLogout(),n.showLoginForm()}),this.srcOtpInput.addEventListener("clickSignOutLink",function(r){n.log("OTP: clickSignOutLink",r),n.mcLogout(),n.showLoginForm()}),this.srcOtpInput.addEventListener("alternateRequested",function(r){n.log("OTP: alternateRequested",r),n.mcInitiateValidation()}),this.srcOtpInput.addEventListener("close",function(r){n.log("OTP: close",r),n.srcOtpInput.style.display="none"})}mcModalInit(){var o;const t=document.createElement("div");t.setAttribute("class","click-to-pay-payfurl"),t.setAttribute("style","display: none;");const n=document.createElement("div");n.setAttribute("class","modal-wrapper"),t.appendChild(n);const r=document.createElement("div");r.setAttribute("class","modal-content"),r.setAttribute("style","width: 771px; height: 100vh;");const s=document.createElement("div");s.setAttribute("class","modal-body"),r.appendChild(s);const i=document.createElement("iframe");i.setAttribute("style","width:100%;max-width:100vw;height:99%;max-height:99vh;border:0;overflow:hidden;"),i.id="mcModalBody-"+Math.random().toString(36),s.appendChild(i),n.appendChild(r),document.body.appendChild(t),this.mcModal=t;for(let a=0;a<window.frames.length;a++)try{((o=window.frames[a].frameElement)==null?void 0:o.id)===i.id&&(this.mcFrame=window.frames[a])}catch{}}mcModalShow(){this.mcModal&&(this.mcModal.style.display="block")}mcModalHide(){this.mcModal&&(this.mcModal.style.display="none")}mcHideOtpInput(){const t=this;customElements.whenDefined("src-otp-input").then(()=>{t.log("[src-otp-input], mcHideOtpInput",t.srcOtpInput),t.srcOtpInput.style.display="none"}).catch(n=>this.log("[customElements.whenDefined]",n))}mcShowOtpInput(t,n,r){this.log("[mcShowOtpInput]",t,r);const s=this;customElements.whenDefined("src-otp-input").then(()=>{s.log("[src-otp-input], mcShowOtpInput",s.srcOtpInput);const i=t.find(a=>a.identityType==="SMS"),o=i?i.maskedValidationChannel:t[0].maskedValidationChannel;s.srcOtpInput.loadSupportedValidationChannels(t),s.srcOtpInput.setAttribute("network-id",n),s.srcOtpInput.setAttribute("card-brands",n),s.srcOtpInput.setAttribute("masked-identity-value",o),r?s.srcOtpInput.setAttribute("error-reason",r):s.srcOtpInput.removeAttribute("error-reason"),s.srcOtpInput.style.display="block"}).catch(i=>this.log("[customElements.whenDefined]",i))}recognizeUser(){this.log("[recognizeUser]",this.getCustomerInfo());const t=()=>{this.recognizeUserCallback=null,this.setCards([]),this.mcIsRecognised()};this.mcCheckoutService?t():this.recognizeUserCallback=t}showLoginForm(){const{destroy:t}=nt({el:document.body,component:z_,props:{log:this.log},on:{close:()=>{t()},submit:({email:n,phone:r})=>{this.log("[LoginForm.submit]",n,r),t(),this.customer||this.setCustomerInfo({firstName:"",lastName:"",email:"",phoneNumber:""}),this.customer.email=n,this.customer.phoneNumber=r,this.setCards([]),this.mcIdLookup()}}})}checkoutWithCard(t,n,r){this.log("ClickToPayProcessor.checkoutWithExistingCard",t);const s=this;function i(c){s.log("[checkoutWithCard.promiseResolvedHandler]",c),s.mcModalHide(),n(c)}function o(c){s.log("[checkoutWithCard.promiseRejectedHandler]",c),s.mcModalHide(),r(c)}this.mcModalShow();const a={windowRef:this.mcFrame,srcDigitalCardId:t.srcDigitalCardId,dpaTransactionOptions:{transactionAmount:{transactionAmount:Number(this.amount),transactionCurrencyCode:this.currency}},rememberMe:this.rememberMe?"true":"false"};this.log("[checkoutWithCard]",a),this.mcCheckoutService.checkoutWithCard(a).then(i).catch(o)}checkoutWithNewCard(t,n,r,s,i,o){this.log("ClickToPayProcessor.checkoutWithNewCard"),this.mcEncryptCard(t,n,r,(a,c)=>{this.mcCheckoutWithNewCard(a,c,l=>{s&&this.mcEnrollCard(a,l.idToken),i(l)},o)},a=>{o(a)})}mcLogout(){window.mcCheckoutService.signOut(),this.mcHideOtpInput()}mcInitClickToPay(){var a,c,l,d;this.mcCheckoutService=new window.MastercardCheckoutServices,this.sdk=window.SRCSDK_MASTERCARD,window.mcCheckoutService=this.mcCheckoutService;const t=this;function n(u){t.log("[mcInitClickToPay.promiseResolvedHandler]",u),t.availableCardBrands=u.availableCardBrands,t.recognizeUserCallback?t.recognizeUserCallback():t.mcIsRecognised()}function r(u){t.log("[mcInitClickToPay.promiseRejectedHandler]",u)}const s=(c=(a=this.options)==null?void 0:a.cardBrands)!=null&&c.length?(l=this.options)==null?void 0:l.cardBrands:b_,i={dpaLocale:"en_US",dpaBillingPreference:ba.FULL};(d=this.options)!=null&&d.dpaBillingPreference&&(i.dpaBillingPreference=this.options.dpaBillingPreference);const o={srcDpaId:this.options.dpaId,dpaData:{dpaName:this.options.dpaName},dpaTransactionOptions:i,cardBrands:s};this.mcCheckoutService.init(o).then(n).catch(r)}mcIsRecognised(){const t=this;function n(s){t.log("[mcIsRecognised.promiseResolvedHandler]",s),t.recognized=s.recognized,t.recognized?t.mcGetCards():t.mcIdLookup()}function r(s){t.log("[mcIsRecognised.promiseRejectedHandler]",s)}this.sdk.isRecognized().then(n).catch(r)}mcIdLookup(t=!1){var a,c,l,d,u;if(this.log("[mcIdLookup]",this.customer,t),!((a=this.customer)!=null&&a.phoneNumber)&&!((c=this.customer)!=null&&c.email))return;(l=this.customer)!=null&&l.email||(t=!0);const n=this;function r(h){var f;n.log("[mcIdLookup.promiseResolvedHandler]",h),h.consumerPresent&&n.mcInitiateValidation(),!h.consumerPresent&&!t&&((f=n.customer)!=null&&f.phoneNumber)&&n.mcIdLookup(!0)}function s(h){n.log("[mcIdLookup.promiseRejectedHandler]",h)}const i=Ou(((d=this.customer)==null?void 0:d.phoneNumber)||""),o=t?{mobileNumber:{phoneNumber:i[1]||"",countryCode:i[0]||"61"}}:{email:(u=this.customer)==null?void 0:u.email};this.log("[mcIdLookup]",o),this.mcCheckoutService.idLookup(o).then(r).catch(s)}mcInitiateValidation(){const t=this;function n(s){t.log("[mcInitiateValidation.promiseResolvedHandler]",s),t.supportedValidationChannels=s.supportedValidationChannels,t.validationChannelsNetwork=s.network,s.maskedValidationChannel&&(!t.supportedValidationChannels||t.supportedValidationChannels.length===0)&&(t.supportedValidationChannels=[],(s.maskedValidationChannel.split(",")||[]).forEach(o=>{t.supportedValidationChannels.push({maskedValidationChannel:o,identityType:o.includes("@")?"EMAIL":"SMS",validationChannelId:o.includes("@")?"EMAIL":"SMS"})})),t.mcShowOtpInput(t.supportedValidationChannels,s.network)}function r(s){t.log("[mcInitiateValidation.promiseResolvedHandler]",s)}this.log("[mcInitiateValidation]"),this.mcCheckoutService.initiateValidation().then(n).catch(r)}mcValidate(t){const n=this;function r(){n.log("[mcValidate.promiseResolvedHandler]"),n.mcGetCards()}function s(i){n.log("[mcValidate.promiseRejectedHandler]",i),(i.reason==="CODE_INVALID"||i.reason==="RETRIES_EXCEEDED"||i.reason==="ACCT_INACCESSIBLE")&&n.mcShowOtpInput(n.supportedValidationChannels,n.validationChannelsNetwork,i.reason)}this.log("[mcValidate]",{value:t}),this.mcCheckoutService.validate({value:t}).then(r).catch(s)}mcGetCards(){const t=this;function n(s){t.log("[getCards.promiseResolvedHandler]",s),t.setCards(s)}function r(s){t.log("[getCards.promiseRejectedHandler]",s)}this.log("[getCards]"),this.mcCheckoutService.getCards().then(n).catch(r)}mcEncryptCard(t,n,r,s,i){const o=this;function a(u){o.log("encryptCard.promiseResolvedHandler",u),s(u.encryptedCard,u.cardBrand)}function c(u){o.log("encryptCard.promiseResolvedHandler",u),i(u)}const l=n.split("/"),d={primaryAccountNumber:t,panExpirationMonth:l[0],panExpirationYear:l[1],cardSecurityCode:r};this.mcCheckoutService.encryptCard(d).then(a).catch(c)}mcEnrollCard(t,n){const r=this;function s(a){r.log("enrollCard.promiseResolvedHandler",a)}function i(a){r.log("enrollCard.promiseRejectedHandler",a)}const o={encryptedCard:t,idToken:n};this.log("[enrollCard]",o),this.sdk.enrollCard(o).then(s).catch(i)}mcCheckoutWithNewCard(t,n,r,s){var l,d,u,h,f;const i=this;function o(p){if(i.log("checkoutWithNewCard.promiseResolvedHandler",p),i.mcModalHide(),p.checkoutActionCode==="SWITCH_CONSUMER"){i.showLoginForm();return}["CHANGE_CARD","CANCEL"].includes(p.checkoutActionCode)||r(p)}function a(p){i.log("checkoutWithNewCard.promiseRejectedHandler",p),i.mcModalHide(),s(p)}const c={windowRef:this.mcFrame,encryptedCard:t,cardBrand:n,rememberMe:this.rememberMe?"true":"false",consumer:{emailAddress:"",firstName:(l=this.customer)==null?void 0:l.firstName,lastName:(d=this.customer)==null?void 0:d.lastName},dpaTransactionOptions:{transactionAmount:{transactionAmount:Number(this.amount),transactionCurrencyCode:this.currency}}};if((u=this.customer)!=null&&u.email&&(c.consumer.emailAddress=this.customer.email),(h=this.customer)!=null&&h.phoneNumber){const p=Ou(((f=this.customer)==null?void 0:f.phoneNumber)||"");c.consumer.mobileNumber={phoneNumber:p[1]||"",countryCode:p[0]||"61"}}this.log("checkoutWithNewCard",c),this.mcModalShow(),this.mcCheckoutService.checkoutWithNewCard(c).then(o).catch(a)}}const Ri={TOKENISE_CARD:"TOKENISE_CARD",GET_PROVIDER_INFO:"GET_PROVIDER_INFO"},Lu=(e,t)=>({[Ri.TOKENISE_CARD]:{url:e+"/token/card",method:"POST"},[Ri.GET_PROVIDER_INFO]:{url:e+"/info/providers/"+t,method:"GET"}});class G_{constructor(t,n){y(this,"container",null);y(this,"iframe",null);y(this,"form",null);y(this,"log");y(this,"debug",!1);y(this,"environment");y(this,"apiUrl","");y(this,"url","");y(this,"publicKey","");y(this,"customer",null);y(this,"threeDSEnabled",!1);y(this,"threeDsProcessor",null);y(this,"fraudProcessor",null);y(this,"clickToPayProcessor",null);y(this,"failureCallback",null);y(this,"successCallback",null);y(this,"httpInvoker");y(this,"destroy",()=>{});this.log=t,this.debug=n.debug,this.environment=n.environment,this.url=n.url,this.apiUrl=n.apiUrl,this.publicKey=n.publicKey,this.failureCallback=n.onFailure||null,this.successCallback=n.onSuccess||null;const r=new cn(n.environment,ln(n.publicKey));this.httpInvoker=new an(this.publicKey,n.version,r),window.addEventListener("message",this.messageHandler.bind(this))}addThreeDsProcessor(t){this.threeDsProcessor=t}addFraudProcessor(t){this.fraudProcessor=t}cleanUp(){var t;(t=this.destroy)==null||t.call(this),this.container=null,this.form=null,this.iframe=null}addCard(t,n,r,s,i,o){this.log("[addCard]",{providerId:r,amount:s,currency:i,options:o});const a=(o==null?void 0:o.threeDSEmail)||"";this.fraudProcessor&&(this.fraudProcessor.setAmount(s),this.fraudProcessor.setCurrency(i)),this.threeDsProcessor&&(this.threeDsProcessor.setEmail((o==null?void 0:o.threeDSEmail)||""),this.threeDsProcessor.setAmount(s),this.threeDsProcessor.setCurrency(i),this.threeDsProcessor.setClientParameters((o==null?void 0:o.clientParameters)||{})),o!=null&&o.threeDSEnabled&&(Du(s,rt,"Missing or invalid amount",this.failureCallback),Du(i,Et,"Missing or invalid currency",this.failureCallback),this.threeDSEnabled=!0),o!=null&&o.clickToPayEnabled&&(this.clickToPayProcessor=new K_(this.log,{debug:this.debug,options:o.clickToPayOptions}),this.clickToPayProcessor.setAmount(s),this.clickToPayProcessor.setCurrency(i),this.customer&&this.clickToPayProcessor.setCustomerInfo({...this.customer,email:(o==null?void 0:o.threeDSEmail)||""}),this.clickToPayProcessor.init()),this.container=t||null,this.form=n;const c=nt({el:this.container,component:S_,props:{log:this.log,debug:this.debug,iframeSrc:this.url,form:this.form,threeDSEnabled:this.threeDSEnabled},on:{load:l=>{var d;this.iframe=l,(d=l==null?void 0:l.contentWindow)==null||d.postMessage({status:s_,environment:this.environment,debug:this.debug,publicKey:this.publicKey,providerId:r,apiUrl:this.apiUrl,amount:s,currency:i,showEmail:(o==null?void 0:o.threeDSEnabled)&&!ys(a),visProviderId:o==null?void 0:o.visProviderId,requiredFields:o==null?void 0:o.requiredFields,clickToPayEnabled:o==null?void 0:o.clickToPayEnabled},"*")},submit:()=>{var d,u;An();const l={email:a,amount:s,currency:i,providerId:(o==null?void 0:o.threeDsProviderId)||""};(u=(d=this.iframe)==null?void 0:d.contentWindow)==null||u.postMessage({status:i_,validateCard:!1,metadata:{fraudCheck:!!this.fraudProcessor,...l}},"*")}}});return this.destroy=c.destroy,this}messageHandler(t){var n,r,s,i,o,a,c,l,d,u,h,f,p,_,S,I,E,k,M,T,V,$,J,X,D,G,te,R,F,U,j,v;if((n=t==null?void 0:t.data)!=null&&n.status){if(t.data.status===Nu){this.log("[sdk][cardProcessor]: message received",t.data),Ne();return}if(t.data.status===ya){this.log("[sdk][cardProcessor]: message received",t.data),Ne(),this.log("unable to tokenise payment information",t.data),ne(this.container,t.data.message),(r=this.failureCallback)==null||r.call(this,{error:t.data.message});return}if(t.data.status===a_){this.log("[sdk][cardProcessor]: message received",t.data),Ne(),t.stopPropagation(),this.iframe=null,Ni(this.container,"Success");const P={token:t.data.tokenId};(s=t.data.options)!=null&&s.clickToPay&&(P.clickToPayData={billingAddress:(i=t.data.options)==null?void 0:i.clickToPay.billingAddress,panBin:((c=(a=(o=t.data.options)==null?void 0:o.clickToPay)==null?void 0:a.cardData)==null?void 0:c.panBin)||"",panLastFour:((u=(d=(l=t.data.options)==null?void 0:l.clickToPay)==null?void 0:d.cardData)==null?void 0:u.panLastFour)||"",scheme:((p=(f=(h=t.data.options)==null?void 0:h.clickToPay)==null?void 0:f.cardData)==null?void 0:p.scheme)||"",paymentCardType:((I=(S=(_=t.data.options)==null?void 0:_.clickToPay)==null?void 0:S.cardData)==null?void 0:I.paymentCardType)||""}),(E=this.successCallback)==null||E.call(this,P);return}if(t.data.status===u_&&(this.log("[sdk][cardProcessor]: message received",t.data),(k=this.clickToPayProcessor)==null||k.setRememberMe(!!t.data.message)),t.data.status===c_){if(this.log("[sdk][cardProcessor]: message received",t.data),t.data.message){const W=((M=this.clickToPayProcessor)==null?void 0:M.getCustomerInfo())??{email:"",firstName:"",lastName:"",phoneNumber:""};t.data.message.email&&(W.email=t.data.message.email),t.data.message.phone&&(W.phoneNumber=t.data.message.phone),(T=this.clickToPayProcessor)==null||T.setCustomerInfo(W)}if(!(($=(V=this.clickToPayProcessor)==null?void 0:V.getCustomerInfo())!=null&&$.email)){this.log("[clickToPayProcessor][RecognizeUser]: no email found");return}(J=this.clickToPayProcessor)==null||J.recognizeUser();return}if(t.data.status==o_){this.log("[sdk][cardProcessor]: message received",t.data);const P=((X=t.data.metadata)==null?void 0:X.click2pay)&&((D=this.clickToPayProcessor)==null?void 0:D.getRememberMe());if(P&&!t.data.message.srcDigitalCardId&&t.data.message.cardNumber&&!((G=this.clickToPayProcessor)!=null&&G.isSchemeSupported(t.data.message.cardNumber))){this.log("[clickToPayProcessor]: checkoutWithNewCard - Scheme is not supported!"),ne(this.container,"Scheme is not supported!");return}if(P&&t.data.message.srcDigitalCardId){(te=this.clickToPayProcessor)==null||te.checkoutWithCard(t.data.message,W=>{this.log("[clickToPayProcessor]: checkoutWithCard",W),An(),this.tokeniseClickToPay({correlationId:W.checkoutResponseData.srcCorrelationId,merchantTransactionId:W.headers["merchant-transaction-id"]},null,null)},W=>{this.log("[clickToPayProcessor]: checkoutWithCard, error",W),Ne(),ne(this.container,W.message)});return}if((R=this.fraudProcessor)==null||R.setPaymentInfo({cardNumber:t.data.message.cardNumber,expiryDate:t.data.message.expiryDate,cardholder:t.data.message.cardholder,ccv:t.data.message.ccv}),(F=this.threeDsProcessor)==null||F.setPaymentInfo({cardNumber:t.data.message.cardNumber,expiryDate:t.data.message.expiryDate,cardholder:t.data.message.cardholder,ccv:t.data.message.ccv}),t.data.message.email&&((U=this.threeDsProcessor)==null||U.setEmail(t.data.message.email)),(j=t.data.metadata)!=null&&j.fraudCheck){An(),(v=this.fraudProcessor)==null||v.fraudCheck(W=>{var re;if(W.decision!="Approved"&&W.stopPaymentOnFailure){Ne(),ne(this.container,"Payment couldn't be processed"),(re=this.failureCallback)==null||re.call(this,{error:"Payment couldn't be processed"});return}this.onSubmit({cardNumber:t.data.message.cardNumber,expiryDate:t.data.message.expiryDate,cardholder:t.data.message.cardholder,ccv:t.data.message.ccv},W,P)},W=>{var re;Ne(),ne(this.container,W.error),(re=this.failureCallback)==null||re.call(this,W)});return}this.onSubmit({cardNumber:t.data.message.cardNumber,expiryDate:t.data.message.expiryDate,cardholder:t.data.message.cardholder,ccv:t.data.message.ccv},null,P)}}}onSubmit(t,n,r){var s;if(this.log("[cardProcessor]: onSubmit",{fraudCheckResult:n,useClickToPayCheckout:r}),!this.threeDsProcessor){if(r){this.tokeniseWithClickToPay(t,null,n);return}this.tokenise(null,n,{});return}(s=this.threeDsProcessor)==null||s.threeDSInvoke(this.container,!1,i=>{if(Ne(),this.log("[threeDSInvoke], postAuthData",i),r){this.tokeniseWithClickToPay(t,i.threeDSServerTransID,n);return}this.tokenise(i.threeDSServerTransID,n,i.externalThreeDsData)})}tokenise(t,n,r){var s;this.iframe&&((s=this.iframe.contentWindow)==null||s.postMessage({status:ku,threeDSServerTransID:t,fraudCheckResult:n,externalThreeDsData:r},"*"))}tokeniseWithClickToPay(t,n,r){var s;Ne(),(s=this.clickToPayProcessor)==null||s.checkoutWithNewCard(t.cardNumber,t.expiryDate,t.ccv||"",!0,i=>{this.log("[clickToPayProcessor]: checkoutWithNewCard",i),An(),this.tokeniseClickToPay({correlationId:i.checkoutResponseData.srcCorrelationId,merchantTransactionId:i.headers["merchant-transaction-id"]},n,r)},i=>{this.log("[clickToPayProcessor]: checkoutWithNewCard, error",i),Ne(),ne(this.container,i.message)})}setAmount(t){var n;this.iframe&&((n=this.iframe.contentWindow)==null||n.postMessage({status:Es,amount:t},"*"))}setCustomerInfo(t){this.customer={...t}}tokeniseCard(t,n,r,s,i,o,a,c){var u,h,f,p,_;if(!rt(t)){this.log("missing parameter: providerId"),(u=this.failureCallback)==null||u.call(this,{error:"missing parameter: providerId"});return}if(!fy(n)){this.log("wrong parameter: cardNumber"),(h=this.failureCallback)==null||h.call(this,{error:"wrong parameter: cardNumber"});return}if(!my(r)){this.log("wrong parameter: expiryDate"),(f=this.failureCallback)==null||f.call(this,{error:"wrong parameter: expiryDate"});return}if(!yy(i)){this.log("wrong parameter: ccv"),(p=this.failureCallback)==null||p.call(this,{error:"wrong parameter: ccv"});return}const l=(S,I)=>{var E;this.log("tokeniseCardFailureCallback",S,I),Ne(),(E=this.failureCallback)==null||E.call(this,{error:"Unable to tokenise payment information"})},d=(S,I)=>{var M;this.log("tokeniseCardSuccessCallback",S,I),Ne();const k={token:JSON.parse(I).tokenId};this.fraudProcessor&&(k.fraudCheckResult=this.fraudProcessor.getCheckResult()),(M=this.successCallback)==null||M.call(this,k)};(_=this.httpInvoker)==null||_.invoke(Lu(this.apiUrl,t)[Ri.TOKENISE_CARD].url,Lu(this.apiUrl,t)[Ri.TOKENISE_CARD].method,JSON.stringify({paymentInformation:{cardNumber:n,expiryDate:r,ccv:i,cardholder:s,threeDSServerTransID:a||null},vaultCard:!0,VaultExpireSeconds:4*3600,metadata:o,verify:c==null?void 0:c.verify,createNetworkToken:c==null?void 0:c.createNetworkToken,fraudCheck:this.fraudProcessor?this.fraudProcessor.getCheckResult():null}),d,l,{providerId:t})}tokeniseClickToPay(t,n,r){var s;this.iframe&&((s=this.iframe.contentWindow)==null||s.postMessage({status:ku,clickToPay:t,threeDSServerTransID:n,fraudCheckResult:r},"*"))}}const va=se("");function wa(){return{errorMessage:va,showErrorMessage:n=>{va.value=n},hideErrorMessage:()=>{va.value=""}}}const Cr=e=>(Ht("data-v-4d39ea7d"),e=e(),Vt(),e),Y_={id:"payfurl-payto-form",class:"payfurl-form"},Z_={key:0,class:"error text-normal"},X_={class:"row"},J_=Cr(()=>x("label",null,"Payer Name",-1)),q_={class:"row"},Q_=Cr(()=>x("label",null,"Payer Id Type",-1)),eE=[Cr(()=>x("option",{value:"PHONE"},"Phone",-1)),Cr(()=>x("option",{value:"EMAIL"},"Email",-1)),Cr(()=>x("option",{value:"ABN"},"Abn",-1))],tE={class:"row"},nE=Cr(()=>x("label",null," Pay Id ",-1)),rE=["placeholder"],sE={key:0,class:"small"},iE={key:1,class:"error"},oE=Oe({__name:"PayToForm",props:{log:null},emits:["submit"],setup(e,{emit:t}){const n=e,r=se({}),{isLoading:s}=lt(),i=se(""),o=se("PHONE"),a=se(""),c=Wt(()=>o.value==="PHONE"?"0405123456 or 0212341234":d_(o.value.toLowerCase())),l=se(!0),{errorMessage:d}=wa();function u(){return r.value.payId="",o.value==="PHONE"&&(Ai(a.value)||(r.value.payId="Invalid phone number")),o.value==="EMAIL"&&(ys(a.value)||(r.value.payId="Invalid email")),o.value==="ABN"&&(_y(a.value)||(r.value.payId="Invalid ABN")),r.value.payId===""}function h(f){var p,_,S,I;if((p=f==null?void 0:f.data)!=null&&p.status){if(f.data.status===ga){if((_=n.log)==null||_.call(n,"[PayTo]: message received",f.data),!l.value||(f.stopPropagation(),n.log&&n.log("[PayTo]: form submit",{payerName:i.value,payIdType:o.value,payId:a.value}),!u()))return;t("submit",{payerName:i.value,payIdType:o.value,payId:o.value==="PHONE"?gy(a.value):String(a.value).toLowerCase()})}f.data.status==="activate"&&f.data.component==="payto"&&((S=n.log)==null||S.call(n,"[PayTo]: message received",f.data),d.value="",l.value=!0),f.data.status==="deactivate"&&f.data.component==="payto"&&((I=n.log)==null||I.call(n,"[PayTo]: message received",f.data),l.value=!1)}}return Ct(()=>{window.addEventListener("message",h),window.addEventListener("keypress",function(f){f.altKey&&f.code==="KeyP"&&(f.preventDefault(),i.value="test",o.value="ABN",a.value="67384721620")})}),rn(()=>{window.removeEventListener("message",h)}),(f,p)=>(ee(),ae("div",Y_,[Tt(xe(Pn,null,null,512),[[ir,be(s)]]),x("div",{class:"container-form",style:_t(`visibility: ${be(s)?"hidden":"visible"}`)},[be(d)?(ee(),ae("div",Z_,Qe(be(d)),1)):Fe("",!0),x("div",X_,[J_,x("div",null,[Tt(x("input",{type:"text",maxlength:"100",placeholder:"Payer Name","onUpdate:modelValue":p[0]||(p[0]=_=>i.value=_)},null,512),[[Di,i.value]])])]),x("div",q_,[Q_,x("div",null,[Tt(x("select",{"onUpdate:modelValue":p[1]||(p[1]=_=>o.value=_)},eE,512),[[Qg,o.value]])])]),x("div",tE,[nE,x("div",null,[Tt(x("input",{type:"text",maxlength:"100",placeholder:be(c),"onUpdate:modelValue":p[2]||(p[2]=_=>a.value=_),onKeyup:u},null,40,rE),[[Di,a.value]]),o.value==="PHONE"?(ee(),ae("div",sE,"(mobile or landline with area code)")):Fe("",!0),r.value.payId?(ee(),ae("p",iE,Qe(r.value.payId),1)):Fe("",!0)])])],4)]))}}),UT="",FT="",aE=$e(oE,[["__scopeId","data-v-4d39ea7d"]]),cE=e=>(Ht("data-v-f06289bf"),e=e(),Vt(),e),lE={id:"payfurl-payto-agreement",class:"payfurl-form"},uE=cE(()=>x("div",{class:"message"},"Approve the agreement in your banking app",-1)),dE=Oe({__name:"PayToAgreement",props:{debug:{type:Boolean}},setup(e){return(t,n)=>(ee(),ae("div",lE,[xe(Pn),uE]))}}),$T="",jT="",hE=$e(dE,[["__scopeId","data-v-f06289bf"]]),Tr={TOKENISE:"TOKENISE",TOKEN_STATUS:"TOKEN_STATUS"},xi=(e,t)=>({[Tr.TOKENISE]:{url:e+"/token/payto",method:"POST"},[Tr.TOKEN_STATUS]:{url:e+"/token/"+t,method:"GET"}});class fE{constructor(t,n){y(this,"container",null);y(this,"debug",!1);y(this,"log");y(this,"apiUrl","");y(this,"getPaymentOptions");y(this,"options",null);y(this,"providerId","");y(this,"tokenId","");y(this,"checkAgreementHandler",null);y(this,"failureCallback",null);y(this,"successCallback",null);y(this,"httpInvoker",null);y(this,"destroy",()=>{});y(this,"successPayToHandler",(t,n)=>{this.log("successPayToHandler",t,n);const r=JSON.parse(n);if(!r||!(r!=null&&r.tokenId))return this.failurePayToHandler(t,n);this.tokenId=r.tokenId,nt({el:this.container,component:hE,props:{el:this.container,log:this.log}}),this.checkAgreement()});y(this,"failurePayToHandler",(t,n)=>{this.log("failurePayToHandler",t,n),lt().stopLoading(),wa().showErrorMessage("Invalid payment details")});y(this,"failurePayToAgreementHandler",(t,n)=>{var r;lt().stopLoading(),this.log("failurePayToAgreementHandler",t,n),ne(this.container,"Agreement has been canceled"),(r=this.failureCallback)==null||r.call(this,{error:"Agreement has been canceled",body:n})});this.log=t,this.debug=n.debug,this.apiUrl=n.apiUrl,this.getPaymentOptions=n.getPaymentOptions,this.failureCallback=n.onFailure||null,this.successCallback=n.onSuccess||null;const r=new cn(n.environment,ln(n.publicKey));this.httpInvoker=new an(n.publicKey,n.version,r)}cleanUp(){var t;(t=this.destroy)==null||t.call(this)}addPayTo(t,n,r,s){if(this.log("[addPayTo]",{amount:n,providerId:r,options:s}),this.container=t,this.providerId=r,this.options=s,!ct(n))throw ne(t,"Invalid amount: "+n),new TypeError("invalid amount: "+n);if(!String(s.description).trim())throw ne(t,"Invalid description"),new TypeError("invalid description");if(s.maximumAmount||(s.maximumAmount=1e3),s.maximumAmount<0||s.maximumAmount>9999)throw ne(t,"Invalid maximum amount: "+s.maximumAmount),new TypeError("invalid maximumAmount: "+s.maximumAmount);const i=nt({el:this.container,component:aE,props:{el:this.container,log:this.log},on:{submit:o=>{this.log("submit payto form",o),lt().startLoading(),setTimeout(()=>{this.tokenise(o)},500)}}});this.destroy=i.destroy}tokenise(t){var r,s,i;const n={payerName:t.payerName,description:(r=this.options)==null?void 0:r.description,maximumAmount:(s=this.options)==null?void 0:s.maximumAmount,providerId:this.providerId,payerPayIdDetails:{payIdType:t.payIdType.toUpperCase(),payId:t.payId}};(i=this.httpInvoker)==null||i.invoke(xi(this.apiUrl)[Tr.TOKENISE].url,xi(this.apiUrl)[Tr.TOKENISE].method,JSON.stringify(n),this.successPayToHandler.bind(this),this.failurePayToHandler.bind(this))}successPayToAgreementHandler(){var t;lt().stopLoading(),this.log("success agreement",this.tokenId),Ni(this.container,"PayTo Agreement Approved"),(t=this.successCallback)==null||t.call(this,{token:this.tokenId})}checkAgreement(){var t;this.checkAgreementHandler||(this.checkAgreementHandler=setInterval(this.checkAgreement.bind(this),5e3)),(t=this.httpInvoker)==null||t.invoke(xi(this.apiUrl,this.tokenId)[Tr.TOKEN_STATUS].url,xi(this.apiUrl,this.tokenId)[Tr.TOKEN_STATUS].method,{},(n,r)=>{this.log("checkAgreement",n,r);const s=JSON.parse(r);if(!s)return clearInterval(this.checkAgreementHandler),this.failurePayToAgreementHandler(n,r);if(s.payToStatus!=="PENDING")return s.payToStatus==="ACTIVE"?(clearInterval(this.checkAgreementHandler),this.successPayToAgreementHandler()):(clearInterval(this.checkAgreementHandler),this.failurePayToAgreementHandler(n,""))},(n,r)=>(this.log("checkAgreement",n,r),clearInterval(this.checkAgreementHandler),this.failurePayToAgreementHandler(n,r)))}}var Z;(function(e){e.AZUPAY="azupay",e.SHIFT="shift",e.PAYGLOCAL="payglocal",e.PESAPAL="pesapal",e.ADDI="addi",e.AFFIRM="affirm",e.AFTERPAY="afterpay",e.ALMA="alma",e.APLAZAME="aplazame",e.APLAZO="aplazo",e.ATOME="atome",e.BILLEASE="billease",e.CASHEW="cashew",e.CASHPRESSO="cashpresso",e.CLEARPAY="clearpay",e.CLEO="cleo",e.DANA="dana",e.EASYPAISA="easypaisa",e.FINVERO="finvero",e.FUPAY="fupay",e.GCASG="gcasg",e.GRABPAY="grabpay",e.HUMM="humm",e.KAKAOPAY="kakaopay",e.KLARNA="klarna",e.KUESKIPAY="kueskipay",e.LARA="lara",e.LATITUDEPAY="latitudepay",e.LAYBUY="laybuy",e.LIMEPAY="limepay",e.PACE="pace",e.PAGALEVE="pagaleve",e.PARIBAS="paribas",e.PAYWITHFOUR="paywithfour",e.PAYJUSTNOW="payjustnow",e.PAYTM="paytm",e.PAYBRIGHT="paybright",e.PAYFLEX="payflex",e.PAYRIGHT="payright",e.POSTPAY="postpay",e.RATEPAY="ratepay",e.RIVERTY="riverty",e.SCALAPAY="scalapay",e.SEZZLE="sezzle",e.SHOPBACK="shopback",e.SMARTPAY="smartpay",e.SOFINCO="sofinco",e.SPLITIT="splitit",e.TABBY="tabby",e.TAMARA="tamara",e.TENDOPAY="tendopay",e.TOUCHNGO="touchngo",e.TRIPLEA="triplea",e.TRUEMONEY="truemoney",e.TWISTO="twisto",e.UPLIFT="uplift",e.VALU="valu",e.ZEST="zest",e.ZIP="zip",e.ZOODPAY="zoodpay",e.BKASH="bkash",e.ERATY="eraty",e.PAYBYACCOUNT="pay_by_account",e.UPI="upi"})(Z||(Z={}));const Ca={[Z.AZUPAY]:{name:"PayID",description:"",buttonTitle:"Pay with PayID",icon:"PayId"},[Z.SHIFT]:{name:"Shift",description:"",buttonTitle:"Pay with Shift",icon:"Shift"},[Z.PAYGLOCAL]:{name:"PayGLocal",description:"",buttonTitle:"Pay with PayGLocal",icon:"PayGLocal"},[Z.PESAPAL]:{name:"PesaPal",description:"",buttonTitle:"Pay with PesaPal",icon:"Pesapal"},[Z.PAYBYACCOUNT]:{name:"Pay By Account",description:"",buttonTitle:"Pay with Pay By Account",icon:"PayByAccount"},[Z.UPI]:{name:"UPI",description:"",buttonTitle:"Pay with UPI",icon:"Upi"},[Z.ADDI]:{name:"Addi",description:"",buttonTitle:"Pay with Addi",icon:"Addi"},[Z.AFFIRM]:{name:"Affirm",description:"",buttonTitle:"Pay with Affirm",icon:"Affirm"},[Z.AFTERPAY]:{name:"Afterpay",description:"",buttonTitle:"Pay with Afterpay",icon:"Afterpay"},[Z.ALMA]:{name:"Alma",description:"",buttonTitle:"Pay with Alma",icon:"Alma"},[Z.APLAZAME]:{name:"Aplazame",description:"",buttonTitle:"Pay with Aplazame",icon:"Aplazame"},[Z.APLAZO]:{name:"Aplazo",description:"",buttonTitle:"Pay with Aplazo",icon:"Aplazo"},[Z.ATOME]:{name:"Atome",description:"",buttonTitle:"Pay with Atome",icon:"Atome"},[Z.BILLEASE]:{name:"Billease",description:"",buttonTitle:"Pay with Billease",icon:"Billease"},[Z.CASHEW]:{name:"Cashew",description:"",buttonTitle:"Pay with Cashew",icon:"Cashew"},[Z.CASHPRESSO]:{name:"Cashpresso",description:"",buttonTitle:"Pay with Cashpresso",icon:"Cashpresso"},[Z.CLEARPAY]:{name:"Clearpay",description:"",buttonTitle:"Pay with Clearpay",icon:"Clearpay"},[Z.CLEO]:{name:"Cleo",description:"",buttonTitle:"Pay with Cleo",icon:"Cleo"},[Z.DANA]:{name:"Dana",description:"",buttonTitle:"Pay with Dana",icon:"Dana"},[Z.EASYPAISA]:{name:"Easypaisa",description:"",buttonTitle:"Pay with Easypaisa",icon:"Easypaisa"},[Z.FINVERO]:{name:"Finvero",description:"",buttonTitle:"Pay with Finvero",icon:"Finvero"},[Z.FUPAY]:{name:"FuPay",description:"",buttonTitle:"Pay with FuPay",icon:"Fupay"},[Z.GCASG]:{name:"GCasg",description:"",buttonTitle:"Pay with GCasg",icon:"Gcasg"},[Z.GRABPAY]:{name:"GrabPay",description:"",buttonTitle:"Pay with GrabPay",icon:"Grabpay"},[Z.HUMM]:{name:"Humm",description:"",buttonTitle:"Pay with Humm",icon:"Humm"},[Z.KAKAOPAY]:{name:"KakaoPay",description:"",buttonTitle:"Pay with KakaoPay",icon:"Kakaopay"},[Z.KLARNA]:{name:"Klarna",description:"",buttonTitle:"Pay with Klarna",icon:"Klarna"},[Z.KUESKIPAY]:{name:"KueskiPay",description:"",buttonTitle:"Pay with KueskiPay",icon:"Kueskipay"},[Z.LARA]:{name:"Lara",description:"",buttonTitle:"Pay with Lara",icon:"Lara"},[Z.LATITUDEPAY]:{name:"LatitudePay",description:"",buttonTitle:"Pay with LatitudePay",icon:"Latitudepay"},[Z.LAYBUY]:{name:"Laybuy",description:"",buttonTitle:"Pay with Laybuy",icon:"Laybuy"},[Z.LIMEPAY]:{name:"Limepay",description:"",buttonTitle:"Pay with Limepay",icon:"Limepay"},[Z.PACE]:{name:"Pace",description:"",buttonTitle:"Pay with Pace",icon:"Pace"},[Z.PAGALEVE]:{name:"Pagaleve",description:"",buttonTitle:"Pay with Pagaleve",icon:"Pagaleve"},[Z.PARIBAS]:{name:"BNP Paribas",description:"",buttonTitle:"Pay with BNP Paribas",icon:"Paribas"},[Z.PAYWITHFOUR]:{name:"Pay With Four",description:"",buttonTitle:"Pay with Pay With Four",icon:"Paywithfour"},[Z.PAYJUSTNOW]:{name:"PayJustNow",description:"",buttonTitle:"Pay with PayJustNow",icon:"Payjustnow"},[Z.PAYTM]:{name:"PayTM",description:"",buttonTitle:"Pay with PayTM",icon:"Paytm"},[Z.PAYBRIGHT]:{name:"Paybright",description:"",buttonTitle:"Pay with Paybright",icon:"Paybright"},[Z.PAYFLEX]:{name:"Payflex",description:"",buttonTitle:"Pay with Payflex",icon:"Payflex"},[Z.PAYRIGHT]:{name:"Payright",description:"",buttonTitle:"Pay with Payright",icon:"Payright"},[Z.POSTPAY]:{name:"Postpay",description:"",buttonTitle:"Pay with Postpay",icon:"Postpay"},[Z.RATEPAY]:{name:"Ratepay",description:"",buttonTitle:"Pay with Ratepay",icon:"Ratepay"},[Z.RIVERTY]:{name:"Riverty",description:"",buttonTitle:"Pay with Riverty",icon:"Riverty"},[Z.SCALAPAY]:{name:"Scalapay",description:"",buttonTitle:"Pay with Scalapay",icon:"Scalapay"},[Z.SEZZLE]:{name:"Sezzle",description:"",buttonTitle:"Pay with Sezzle",icon:"Sezzle"},[Z.SHOPBACK]:{name:"ShopBack",description:"",buttonTitle:"Pay with ShopBack",icon:"Shopback"},[Z.SMARTPAY]:{name:"Smartpay",description:"",buttonTitle:"Pay with Smartpay",icon:"Smartpay"},[Z.SOFINCO]:{name:"Sofinco",description:"",buttonTitle:"Pay with Sofinco",icon:"Sofinco"},[Z.SPLITIT]:{name:"Splitit",description:"",buttonTitle:"Pay with Splitit",icon:"Splitit"},[Z.TABBY]:{name:"Tabby",description:"",buttonTitle:"Pay with Tabby",icon:"Tabby"},[Z.TAMARA]:{name:"Tamara",description:"",buttonTitle:"Pay with Tamara",icon:"Tamara"},[Z.TENDOPAY]:{name:"Tendopay",description:"",buttonTitle:"Pay with Tendopay",icon:"Tendopay"},[Z.TOUCHNGO]:{name:"Touch'n Go",description:"",buttonTitle:"Pay with Touch'n Go",icon:"Touchngo"},[Z.TRIPLEA]:{name:"Triple-A",description:"",buttonTitle:"Pay with Triple-A",icon:"Triplea"},[Z.TRUEMONEY]:{name:"TrueMoney",description:"",buttonTitle:"Pay with TrueMoney",icon:"Truemoney"},[Z.TWISTO]:{name:"Twisto",description:"",buttonTitle:"Pay with Twisto",icon:"Twisto"},[Z.UPLIFT]:{name:"Uplift",description:"",buttonTitle:"Pay with Uplift",icon:"Uplift"},[Z.VALU]:{name:"ValU",description:"",buttonTitle:"Pay with ValU",icon:"Valu"},[Z.ZEST]:{name:"Zest Money",description:"",buttonTitle:"Pay with Zest Money",icon:"Zest"},[Z.ZIP]:{name:"Zip",description:"",buttonTitle:"Pay with Zip",icon:"Zip"},[Z.ZOODPAY]:{name:"Zoodpay",description:"",buttonTitle:"Pay with Zoodpay",icon:"Zoodpay"},[Z.BKASH]:{name:"bKash",description:"",buttonTitle:"Pay with bKash",icon:"Bkash"},[Z.ERATY]:{name:"eRaty",description:"",buttonTitle:"Pay with eRaty",icon:"Eraty"}},pE=["src"],mE=Oe({__name:"CheckoutPopup",props:{url:null,name:null},emits:["close"],setup(e,{emit:t}){const n=e,r=se(n.url);return se(null),as(()=>n.url,s=>{r.value=s}),Ct(()=>{}),(s,i)=>(ee(),tr(xu,{width:"80vw",height:"80vh",backdrop:"static",onClose:i[0]||(i[0]=o=>t("close"))},{title:Ir(()=>[ia(Qe(e.name),1)]),body:Ir(()=>[x("iframe",{src:r.value,sandbox:"allow-same-origin allow-scripts allow-popups allow-forms"},null,8,pE)]),_:1}))}}),HT="",VT="",gE=$e(mE,[["__scopeId","data-v-5d26ad8f"]]),yE=["id"],_E={key:0,class:"error text-normal"},EE={class:"row"},SE={key:1,class:"error"},bE=Oe({__name:"CheckoutForm",props:{log:null,providerType:null,options:null},emits:["activate","popup","popupClose","close","newWindow","newWindowClose"],setup(e,{emit:t}){const n=e,r=se(null),{isLoading:s}=lt(),i=se(!0),o=se(n.providerType),a=se(""),c=se(null),{errorMessage:l}=wa(),d=Wt(()=>{var E;return((E=Ca[o.value])==null?void 0:E.buttonTitle)||`Pay with ${o.value}`}),u=Wt(()=>{var M,T;const E=((T=(M=c.value)==null?void 0:M.gatewayTransactionData)==null?void 0:T.RedirectUrl)||"";if(!E)return"";if(o.value===Z.PAYBYACCOUNT)return E;const k=E.includes("?")?"&":"?";return`${E}${k}embedded=true`}),h=se(!1),f=se(!1),p=Wt(()=>u.value&&!h.value&&!f.value);function _(E){var k,M,T,V,$,J,X,D,G,te;if((k=E==null?void 0:E.data)!=null&&k.status){if(E.data.status==="activate"&&E.data.component==="checkout"&&E.data.providerType===o.value&&((M=n.log)==null||M.call(n,"[BNPL]: message received",E.data),i.value=!0,t("activate",n.options)),E.data.status==="deactivate"&&E.data.component==="checkout"&&E.data.providerType===o.value&&((T=n.log)==null||T.call(n,"[BNPL]: message received",E.data),i.value=!1),E.data.status==="checkout"&&E.data.component==="checkout"&&E.data.providerType===o.value&&((V=n.log)==null||V.call(n,"[BNPL]: message received",E.data),l.value="",c.value=E.data.checkoutData,($=n.log)==null||$.call(n,"[BNPL]: checkout",c.value)),E.data.status==="message"&&E.data.component==="checkout"&&E.data.providerType===o.value&&((J=n.log)==null||J.call(n,"[BNPL]: message received",E.data),a.value=E.data.message,f.value=!1,h.value=!1),E.data.status==="error"&&E.data.component==="checkout"&&E.data.providerType===o.value&&((X=n.log)==null||X.call(n,"[BNPL]: message received",E.data),a.value=E.data.error,E.data.originalError)){const R=JSON.parse(E.data.originalError);R!=null&&R.message&&(a.value=R.message)}E.data.status==="redirect"&&E.data.component==="checkout"&&((D=n.log)==null||D.call(n,"[BNPL]: message received",E.data),h.value=!1,E.data.result==="failed"&&(a.value="Payment has been canceled",I())),E.data.component==="checkout"&&E.data.providerType===Z.PAYBYACCOUNT&&(E.data.status==="failure"?((G=n.log)==null||G.call(n,"[BNPL][PayByAccount]: message received",E.data),a.value=E.data.error,t("newWindowClose")):E.data.status==="success"&&((te=n.log)==null||te.call(n,"[BNPL][PayByAccount]: message received",E.data),l.value=""))}}function S(){var E,k,M;if(a.value="",o.value===Z.PAYBYACCOUNT){(E=n.log)==null||E.call(n,"PayByAccount opens a new window");let T=400,V=645,$=screen.width<T?0:(screen.width-T)/2,J=screen.height<V?0:(screen.height-V)/2;window.open(u.value,"_blank","popup=yes, width="+T+", height="+V+", left="+$+", top="+J),t("newWindow",(k=c.value)==null?void 0:k.checkoutId)}else h.value=!0,f.value=!0,t("popup",(M=c.value)==null?void 0:M.checkoutId);return!1}function I(){h.value=!1,f.value=!1,t("popupClose")}return Ct(()=>{window.addEventListener("message",_),ki(r.value,_s)||(i.value=!0,t("activate",n.options))}),rn(()=>{window.removeEventListener("message",_)}),(E,k)=>(ee(),ae(Ve,null,[Tt(xe(Pn,{"use-local":""},null,512),[[ir,!be(u)]]),f.value&&!h.value?(ee(),tr(Pn,{key:0,message:"Finalise the payment"})):Fe("",!0),x("div",{id:`payfurl-${o.value}-form`,class:"payfurl-checkout-form",ref_key:"root",ref:r},[x("div",{class:"container-form",style:_t(`visibility: ${be(s)?"hidden":"visible"}`)},[be(l)?(ee(),ae("div",_E,Qe(be(l)),1)):Fe("",!0),x("div",EE,[be(p)?(ee(),ae("button",{key:0,onClick:S,type:"button"},Qe(be(d)),1)):Fe("",!0),a.value?(ee(),ae("p",SE,Qe(a.value),1)):Fe("",!0)])],4)],8,yE),h.value?(ee(),tr(gE,{key:1,onClose:I,url:be(u),name:be(d)},null,8,["url","name"])):Fe("",!0)],64))}}),BT="",WT="",IE=$e(bE,[["__scopeId","data-v-f77c225e"]]),Dr={CHECKOUT:"CHECKOUT",CHECK_STATUS:"CHECK_STATUS"},Li=(e,t)=>({[Dr.CHECKOUT]:{url:e+"/payment_method/checkout",method:"POST"},[Dr.CHECK_STATUS]:{url:e+"/checkout/"+t,method:"GET"}});class vE{constructor(t,n){y(this,"debug",!1);y(this,"log");y(this,"apiUrl","");y(this,"redirectUrl","");y(this,"checkStatusHandler",null);y(this,"failureCallback",null);y(this,"successCallback",null);y(this,"httpInvoker",null);y(this,"destroy",()=>{});y(this,"container",null);this.log=t,this.debug=n.debug,this.apiUrl=n.apiUrl,this.redirectUrl=n.redirectUrl,this.failureCallback=n.onFailure||null,this.successCallback=n.onSuccess||null;const r=new cn(n.environment,ln(n.publicKey));this.httpInvoker=new an(n.publicKey,n.version,r)}cleanUp(){var t;(t=this.destroy)==null||t.call(this)}addCheckout(t,n,r,s,i,o,a){this.log(`[addCheckout][${s}]`,{amount:n,providerId:i,providerType:s,options:o,checkoutOptions:a}),this.validateOptions(t,n,r,o),this.container=t;let c=!1,l;const d=nt({el:t,component:IE,props:{log:this.log,providerType:s,options:{providerId:i,amount:n,currency:r,checkoutOptions:a}},on:{activate:u=>{if(c)return;c=!0,this.log(`[sdk][checkoutProcessor][${s}]: activate checkout form`,u);const h=()=>{c=!1};this.checkout(u,s,o,h),l=this.getMessageHandler(u,s,o,h).bind(this),window.addEventListener("message",l)},popup:u=>{this.log(`[sdk][checkoutProcessor][${s}]: popup open`,u),this.checkStatus(t,u,s,l)},popupClose:()=>{this.log(`[sdk][checkoutProcessor][${s}]: popup close`),this.stopCheckingStatus(null)},newWindow:u=>{this.log(`[sdk][checkoutProcessor][${s}]: new window open`,u),this.checkStatus(t,u,s,l)},newWindowClose:()=>{this.log(`[sdk][checkoutProcessor][${s}]: new window close`),this.stopCheckingStatus(null)}}});this.destroy=d.destroy}checkout(t,n,r,s){var i,o,a,c,l,d,u,h,f,p,_,S,I,E;(E=this.httpInvoker)==null||E.invoke(Li(this.apiUrl)[Dr.CHECKOUT].url,Li(this.apiUrl)[Dr.CHECKOUT].method,JSON.stringify({providerId:t.providerId,amount:t.amount,currency:t.currency,shippingAmount:r.shippingAmount,customer:{firstName:(i=r.customer)==null?void 0:i.firstName,lastName:(o=r.customer)==null?void 0:o.lastName,email:(a=r.customer)==null?void 0:a.email,phone:(c=r.customer)==null?void 0:c.phoneNumber,billingAddress:{name:((l=r.billingAddress)==null?void 0:l.firstName)+" "+((d=r.billingAddress)==null?void 0:d.lastName),addressLine1:(u=r.billingAddress)==null?void 0:u.streetAddress,addressLine2:(h=r.billingAddress)==null?void 0:h.streetAddress2,suburb:(f=r.billingAddress)==null?void 0:f.region,state:(p=r.billingAddress)==null?void 0:p.state,countryCode:(_=r.billingAddress)==null?void 0:_.country,postcode:(S=r.billingAddress)==null?void 0:S.postalCode}},items:(I=r.orderItems)==null?void 0:I.map(k=>({name:k.name,reference:k.sku,quantity:k.quantity,amount:k.totalAmount})),options:{...t.checkoutOptions,redirectUrl:this.redirectUrl}}),this.getSuccessCheckoutHandler(n).bind(this),(k,M)=>{s==null||s(k,M),this.getFailureCheckoutHandler(n).bind(this)(k,M)})}getSuccessCheckoutHandler(t){return(n,r)=>{this.log(`[sdk][checkoutProcessor][${t}]: successCheckoutHandler`,n,r);const s=JSON.parse(r),i=JSON.parse(window.atob(s.checkoutData));window.postMessage({status:"checkout",component:"checkout",providerType:t,checkoutData:i},"*")}}getFailureCheckoutHandler(t){return(n,r)=>{this.log(`[sdk][checkoutProcessor][${t}]: failureCheckoutHandler`,n,r),lt().stopLoading(),window.postMessage({status:"error",component:"checkout",providerType:t,error:"Invalid payment details",originalError:r},"*")}}stopCheckingStatus(t){this.checkStatusHandler&&(clearInterval(this.checkStatusHandler),this.checkStatusHandler=null),t&&window.removeEventListener("message",t)}checkStatus(t,n,r,s){var c;this.checkStatusHandler||(this.checkStatusHandler=setInterval(this.checkStatus.bind(this,t,n,r,s),5e3),this.log(`[sdk][checkoutProcessor][${r}]: Starting polling...`));const i=this,o=(l,d)=>{lt().stopLoading(),i.log("failureCheckStatusHandler",l,d),window.postMessage({status:"message",component:"checkout",providerType:r,message:"Checkout has been cancelled"},"*")},a=(l,d)=>{var h;lt().stopLoading(),i.log(`[sdk][checkoutProcessor][${r}]: successCheckStatusHandler`,{transactionId:l,token:d}),Ni(t,"Confirming payment processed successfully");const u={};l&&(u.transactionId=l),d&&(u.token=d),(h=i.successCallback)==null||h.call(i,u)};(c=this.httpInvoker)==null||c.invoke(Li(this.apiUrl,n)[Dr.CHECK_STATUS].url,Li(this.apiUrl,n)[Dr.CHECK_STATUS].method,{},(l,d)=>{const u=JSON.parse(d);if(this.log("checkoutStatus",u),!u)return this.stopCheckingStatus(s),o(l,d);if(u.status=="SUCCESS"&&u.status==="SUCCESS")return this.stopCheckingStatus(s),a(u.transactionId,u.tokenId)},(l,d)=>(this.log(`[sdk][checkoutProcessor][${r}]: checkStatus`,{status:l,body:d}),this.stopCheckingStatus(s),o(l,d)))}validateOptions(t,n,r,s){var i,o,a,c,l,d,u,h,f,p,_,S,I,E,k,M,T,V,$;if(!Et(r))throw ne(t,"Invalid currency: "+r),new TypeError("Invalid currency: "+r);if(!ct(n))throw ne(t,"Invalid amount: "+n),new TypeError("Invalid amount: "+n);if(!Array.isArray(s.orderItems)||((i=s.orderItems)==null?void 0:i.length)===0)throw ne(t,"Invalid order"),new TypeError("Invalid order");if(!((o=s.customer)!=null&&o.email)||!ys((a=s.customer)==null?void 0:a.email))throw ne(t,"Invalid customer email"),new TypeError("Invalid customer email");if(!((c=s.customer)!=null&&c.firstName)&&!((l=s.customer)!=null&&l.lastName))throw ne(t,"Invalid customer name"),new TypeError("Invalid customer name");if(!((d=s.customer)!=null&&d.phoneNumber)||!Ai((u=s.customer)==null?void 0:u.phoneNumber))throw ne(t,"Invalid customer phone number"),new TypeError("Invalid customer phone number");if(!((h=s.billingAddress)!=null&&h.email)||!ys((f=s.billingAddress)==null?void 0:f.email))throw ne(t,"Invalid billing address email"),new TypeError("Invalid billing address email");if(!((p=s.billingAddress)!=null&&p.firstName)&&!((_=s.billingAddress)!=null&&_.lastName))throw ne(t,"Invalid billing address name"),new TypeError("Invalid billing address name");if(!((S=s.billingAddress)!=null&&S.phoneNumber)||!Ai((I=s.billingAddress)==null?void 0:I.phoneNumber))throw ne(t,"Invalid billing address phone number"),new TypeError("Invalid billing address phone number");if(!((E=s.billingAddress)!=null&&E.streetAddress))throw ne(t,"Invalid billing street address"),new TypeError("Invalid billing street address");if(!((k=s.billingAddress)!=null&&k.city))throw ne(t,"Invalid billing city"),new TypeError("Invalid billing city");if(!((M=s.billingAddress)!=null&&M.country))throw ne(t,"Invalid billing country"),new TypeError("Invalid billing country");if(!((T=s.billingAddress)!=null&&T.region))throw ne(t,"Invalid billing region"),new TypeError("Invalid billing region");if(!((V=s.billingAddress)!=null&&V.state))throw ne(t,"Invalid billing state"),new TypeError("Invalid billing state");if(!(($=s.billingAddress)!=null&&$.postalCode))throw ne(t,"Invalid billing postal code"),new TypeError("Invalid billing postal code")}getMessageHandler(t,n,r,s){return i=>{var o;if((o=i==null?void 0:i.data)!=null&&o.status){if(i.data.status===Es){if(Number(t.amount)==Number(i.data.amount))return;this.log(`[sdk][checkoutProcessor][${n}]: message received`,i.data),t.amount=Number(i.data.amount),this.checkout(t,n,r,s);return}if(i.data.status===Mi){if(t.currency==i.data.currency)return;this.log(`[sdk][checkoutProcessor][${n}]: message received`,i.data),t.currency=i.data.currency,this.checkout(t,n,r,s);return}}}}}const un={name:"@payfurl/client",private:!1,version:"4.6.0",files:["dist/sdk"],main:"./dist/sdk/payfurl.umd.js",module:"./dist/sdk/payfurl.es.js",types:"./dist/sdk/payfurl.d.ts",exports:{".":{import:"./dist/sdk/payfurl.es.js",require:"./dist/sdk/payfurl.umd.js"}},scripts:{dev:"vite -c vite.iframe.config.ts","build-iframe":"vite build -c vite.iframe.config.ts --emptyOutDir","build-sdk":"vite build -c vite.sdk.config.ts","build-all":"npm run build-iframe && npm run build-sdk",preview:"vite preview",server:"python3 -m http.server 3001"},dependencies:{"@sentry/browser":"^7.100.1",dayjs:"^1.11.7",vue:"^3.2.47"},devDependencies:{"@babel/types":"^7.21.2","@rollup/plugin-typescript":"^11.0.0","@types/applepayjs":"^14.0.0","@types/node":"^18.14.2","@vitejs/plugin-vue":"^4.0.0","@vue/eslint-config-prettier":"^7.1.0","@vue/eslint-config-typescript":"^11.0.2",eslint:"^8.35.0","eslint-plugin-vue":"^9.9.0",prettier:"^2.8.4",typescript:"^4.9.5",vite:"^4.1.4","vue-tsc":"^1.2.0"}},Ta={CHECK_FRAUD:"CHECK_FRAUD"},Uu=e=>({[Ta.CHECK_FRAUD]:{url:e+"/fraud_check",method:"POST"}});class wE{constructor(t,n){y(this,"providerId","");y(this,"stopPaymentOnFailure",!1);y(this,"debug",!1);y(this,"log");y(this,"apiUrl","");y(this,"getFraudCheckData");y(this,"metadata",{});y(this,"amount",0);y(this,"currency","AUD");y(this,"address",null);y(this,"customer",null);y(this,"order",null);y(this,"paymentInformation",null);y(this,"paypalInformation",null);y(this,"failureCallback",null);y(this,"successCallback",null);y(this,"checkResult",null);y(this,"httpInvoker",null);this.log=t,this.providerId=n.providerId,this.stopPaymentOnFailure=n.stopPaymentOnFailure,this.debug=n.debug,this.apiUrl=n.apiUrl,this.metadata=n.metadata,this.getFraudCheckData=n.getFraudCheckData,this.failureCallback=n.onFailure||null,this.successCallback=n.onSuccess||null;const r=new cn(n.environment,ln(n.publicKey));this.httpInvoker=new an(n.publicKey,n.version,r)}fraudCheck(t,n){var r;if(!this.customer)return n({error:"Customer information is required"});if(!this.address)return n({error:"Address information is required"});if(!this.order)return n({error:"Order information is required"});if(!this.paymentInformation&&!this.paypalInformation)return n({error:"Payment information is required"});this.log("[fraudCheck]",{amount:this.amount,currency:this.currency,paymentInformation:this.paymentInformation,paypalInformation:this.paypalInformation,customer:this.customer,address:this.address,order:this.order,metadata:this.metadata}),(r=this.httpInvoker)==null||r.invoke(Uu(this.apiUrl)[Ta.CHECK_FRAUD].url,Uu(this.apiUrl)[Ta.CHECK_FRAUD].method,this.getFraudCheckData(this.providerId,this.amount,this.currency,this.paymentInformation,this.paypalInformation,this.customer,this.address,this.order,this.metadata),(s,i)=>{if(this.log("[fraudCheck], success",s,i,this.stopPaymentOnFailure),this.checkResult=JSON.parse(i),this.checkResult===null)return n({error:"Fraud Check Failed",body:i});this.checkResult.providerId=this.providerId,this.checkResult.stopPaymentOnFailure=this.stopPaymentOnFailure,t(this.checkResult)},(s,i)=>{this.log("[fraudCheck], failure",s,i),n({error:"Fraud Check Failed",body:i})})}setAmount(t){this.amount=t}setCurrency(t){this.currency=t}setAddressInfo(t){this.address={...t}}setCustomerInfo(t){this.customer={...t}}setOrderInfo(t){this.order={...t}}setPaymentInfo(t){this.paymentInformation={...t}}setPaypalInfo(t){this.paypalInformation={...t}}getProviderId(){return this.providerId}getCheckResult(){return this.checkResult}}const CE={style:{position:"relative"}},TE={key:0,class:"error text-normal"},DE=Oe({__name:"GooglePayForm",props:{log:null,el:null,environment:null,amount:null,currency:null,options:null},emits:["complete","activate","close","error"],setup(e,{emit:t}){const n=e,r="payfurl-googlepay-script",s=se(null),i=se(n.amount),o=se(n.currency),a=se(!0),c=se("");let l=!1;const{isLoading:d}=lt();function u(){if(document.getElementById(r)){k();return}if(l)return;l=!0,window.google=null;const T=document.createElement("script");T.src="https://pay.google.com/gp/p/js/pay.js",T.type="text/javascript",T.id=r,T.onload=k,document.body.appendChild(T)}let h=null;function f(){return h===null&&(h=new window.google.payments.api.PaymentsClient({environment:n.environment!=yt.PRODUCTION?"TEST":"PRODUCTION"})),h}const p={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"]}};function _(){return{apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:[p]}}function S(){const V=f().createButton({onClick:I});n.el.appendChild(V)}function I(){const T=E(),V=f();n.log("[paymentData], request",T),V.loadPaymentData(T).then(function($){n.log("[paymentData], success",$);const J=JSON.parse($.paymentMethodData.tokenizationData.token);$.paymentMethodData.tokenizationData={...$.paymentMethodData.tokenizationData,...J},t("complete",$)}).catch(function($){n.log("[paymentData], error",$),t("error",$.message)})}function E(){return{apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:[{...p,tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:n.options.gateway,gatewayMerchantId:n.options.gatewayMerchantId}}}],transactionInfo:{totalPriceStatus:"FINAL",countryCode:"AU",currencyCode:o.value,totalPrice:i.value.toFixed(2)},merchantInfo:{merchantName:"Example Merchant"}}}function k(){f().isReadyToPay(_()).then(function(V){V.result&&S()}).catch(function(V){console.error("Load GooglePay error",V)})}function M(T){var V,$,J,X,D,G,te;(V=T==null?void 0:T.data)!=null&&V.status&&(T.data.status==="activate"&&T.data.component==="googlepay"&&(($=n.log)==null||$.call(n,"[GooglePay]: message received",T.data),a.value=!0,t("activate"),u()),T.data.status==="deactivate"&&T.data.component==="googlepay"&&((J=n.log)==null||J.call(n,"[GooglePay]: message received",T.data),a.value=!1),T.data.status==="message"&&T.data.component==="googlepay"&&((X=n.log)==null||X.call(n,"[GooglePay]: message received",T.data),c.value=T.data.message),T.data.status==="error"&&T.data.component==="googlepay"&&((D=n.log)==null||D.call(n,"[GooglePay]: message received",T.data),c.value=T.data.error),T.data.status===Es&&((G=n.log)==null||G.call(n,"[GooglePay]: message received",T.data),i.value=Number(T.data.amount)),T.data.status===Mi&&((te=n.log)==null||te.call(n,"[GooglePay]: message received",T.data),o.value=T.data.currency))}return rn(()=>{window.removeEventListener("message",M)}),Ct(()=>{window.addEventListener("message",M),ki(s.value,_s)||(a.value=!0,t("activate"),u())}),(T,V)=>(ee(),ae(Ve,null,[x("div",CE,[Tt(xe(Pn,null,null,512),[[ir,be(d)]])]),x("div",{style:{position:"relative"},ref_key:"root",ref:s},[c.value?(ee(),ae("div",TE,Qe(c.value),1)):Fe("",!0)],512)],64))}}),Da={ADD_CHARGE_WITH_GOOGLE_PAY:"ADD_CHARGE_WITH_GOOGLE_PAY"},Fu=e=>({[Da.ADD_CHARGE_WITH_GOOGLE_PAY]:{url:e+"/charge/token/google",method:"POST"}});class PE{constructor(t,n){y(this,"log");y(this,"apiUrl","");y(this,"environment","");y(this,"failureCallback",null);y(this,"successCallback",null);y(this,"httpInvoker",null);y(this,"destroy",()=>{});y(this,"providerId","");y(this,"amount",0);y(this,"currency","");this.log=t,this.environment=n.environment,this.apiUrl=n.apiUrl,this.failureCallback=n.onFailure||null,this.successCallback=n.onSuccess||null;const r=new cn(n.environment,ln(n.publicKey));this.httpInvoker=new an(n.publicKey,n.version,r)}setAmount(t){this.amount=t}setCurrency(t){this.currency=t}cleanUp(){var t;(t=this.destroy)==null||t.call(this)}addGooglePay(t,n,r,s,i){this.log("[addGooglePay]",{providerId:n,amount:r,currency:s,options:i}),this.validateOptions(t,r,s,i),this.setAmount(r),this.setCurrency(s);let o=!1;const a=nt({el:t,component:DE,props:{log:this.log,el:t,environment:this.environment,amount:this.amount,currency:this.currency,options:i},on:{activate:()=>{o||(o=!0,this.log("activate googlepay form"))},complete:c=>{this.log("[GooglePay]: complete",c);const l={amount:this.amount,currency:this.currency,paymentData:{paymentMethodData:{tokenizationData:{intermediateSigningKey:c.paymentMethodData.tokenizationData.intermediateSigningKey,protocolVersion:c.paymentMethodData.tokenizationData.protocolVersion,signature:c.paymentMethodData.tokenizationData.signature,signedMessage:c.paymentMethodData.tokenizationData.signedMessage}},paymentInfo:{cardDetails:c.paymentMethodData.info.cardDetails,cardNetwork:c.paymentMethodData.info.cardNetwork}}};this.addChargeWithGooglePay(t,n,l)},error:c=>{var l;this.log("[GooglePay]: error",c),ne(t,"Unable to pay with Google Pay"),(l=this.failureCallback)==null||l.call(this,{error:"Unable to pay with Google Pay",body:c})}}});this.destroy=a.destroy}addChargeWithGooglePay(t,n,r){var s;this.log("[addChargeWithGooglePay]",r),(s=this.httpInvoker)==null||s.invoke(Fu(this.apiUrl)[Da.ADD_CHARGE_WITH_GOOGLE_PAY].url,Fu(this.apiUrl)[Da.ADD_CHARGE_WITH_GOOGLE_PAY].method,JSON.stringify(r),this.getSuccessAddChargeHandler(t).bind(this),this.getFailureAddChargeHandler(t).bind(this),{providerId:n})}getFailureAddChargeHandler(t){return(n,r)=>{var s;this.log("[GooglePay], failure",r),ne(t,"Unable to pay with Google Pay"),(s=this.failureCallback)==null||s.call(this,{error:"Unable to pay with Google Pay",body:r})}}getSuccessAddChargeHandler(t){return(n,r)=>{var s;try{const i=JSON.parse(r);this.log("[GooglePay], success",i),(s=this.successCallback)==null||s.call(this,{transactionId:i.chargeId})}catch(i){this.log("error parsing addCharge response",i)}}}validateOptions(t,n,r,s){if(!Et(r))throw ne(t,"Invalid currency: "+r),new TypeError("invalid currency: "+r);if(!ct(n))throw ne(t,"Invalid amount: "+n),new TypeError("invalid amount: "+n);if(!s.gateway)throw ne(t,"Invalid gateway parameter"),new TypeError("Invalid gateway parameter");if(!s.gatewayMerchantId)throw ne(t,"Invalid gateway merchant id parameter"),new TypeError("Invalid gateway merchant id parameter")}}const AE={style:{position:"relative"}},kE={key:0,class:"error text-normal"},NE=Oe({__name:"ApplePayForm",props:{log:null,el:null,environment:null,amount:null,currency:null,options:null},emits:["submit","validate","activate","close","error","cancel"],setup(e,{emit:t}){const n=e,r="payfurl-applepay-script",s=se(null),i=se(n.amount),o=se(n.currency),a=se(!0),c=se("");let l=!1;const{isLoading:d}=lt();function u(){if(n.log("[onApplePayButtonClicked]"),!ApplePaySession)return;const p={countryCode:"AU",currencyCode:o.value,merchantCapabilities:["supports3DS"],supportedNetworks:["visa","masterCard","amex","discover"],total:{label:n.options.lineItemLabel,type:"final",amount:Number(i.value).toFixed(2)}};n.log("[onApplePayButtonClicked], Create ApplePaySession",p);const _=new ApplePaySession(3,p);_.onvalidatemerchant=S=>{const I=S.validationURL;t("validate",{validationUrl:I,merchantIdentifier:n.options.merchantIdentifier,domainName:n.options.domainName,displayName:n.options.displayName},_)},_.onpaymentauthorized=S=>{n.log("[onpaymentauthorized]",S),t("submit",S.payment,_)},_.oncancel=S=>{n.log("[oncancel]",S),t("cancel")},_.begin()}function h(){if(document.getElementById(r)||l)return;l=!0,window.google=null;const p=document.createElement("script");p.src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js",p.type="text/javascript",p.id=r,p.onload=()=>{var S;const _=document.createElement("apple-pay-button");_.buttonstyle="black",_.locale="en-US",_.type="buy",_.onclick=u,(S=s.value)==null||S.appendChild(_)},document.body.appendChild(p)}function f(p){var _,S,I,E,k,M,T;(_=p==null?void 0:p.data)!=null&&_.status&&(p.data.status==="activate"&&p.data.component==="applepay"&&((S=n.log)==null||S.call(n,"[ApplePay]: message received",p.data),a.value=!0,t("activate"),h()),p.data.status==="deactivate"&&p.data.component==="applepay"&&((I=n.log)==null||I.call(n,"[ApplePay]: message received",p.data),a.value=!1),p.data.status==="message"&&p.data.component==="applepay"&&((E=n.log)==null||E.call(n,"[ApplePay]: message received",p.data),c.value=p.data.message),p.data.status==="error"&&p.data.component==="applepay"&&((k=n.log)==null||k.call(n,"[ApplePay]: message received",p.data),c.value=p.data.error),p.data.status===Es&&((M=n.log)==null||M.call(n,"[ApplePay]: message received",p.data),i.value=Number(p.data.amount)),p.data.status===Mi&&((T=n.log)==null||T.call(n,"[ApplePay]: message received",p.data),o.value=p.data.currency))}return rn(()=>{window.removeEventListener("message",f)}),Ct(()=>{window.addEventListener("message",f),ki(s.value,_s)||(a.value=!0,t("activate"),h())}),(p,_)=>(ee(),ae(Ve,null,[x("div",AE,[Tt(xe(Pn,null,null,512),[[ir,be(d)]])]),x("div",{style:{position:"relative"},ref_key:"root",ref:s},[c.value?(ee(),ae("div",kE,Qe(c.value),1)):Fe("",!0)],512)],64))}}),Pr={VALIDATE_MERCHANT:"VALIDATE_MERCHANT",ADD_CHARGE_WITH_APPLE_PAY:"ADD_CHARGE_WITH_APPLE_PAY"},Ui=e=>({[Pr.VALIDATE_MERCHANT]:{url:e+"/charge/token/apple/validate",method:"POST"},[Pr.ADD_CHARGE_WITH_APPLE_PAY]:{url:e+"/charge/token/apple",method:"POST"}});class ME{constructor(t,n){y(this,"log");y(this,"apiUrl","");y(this,"environment","");y(this,"failureCallback",null);y(this,"successCallback",null);y(this,"httpInvoker",null);y(this,"destroy",()=>{});y(this,"providerId","");y(this,"amount",0);y(this,"currency","");this.log=t,this.environment=n.environment,this.apiUrl=n.apiUrl,this.failureCallback=n.onFailure||null,this.successCallback=n.onSuccess||null;const r=new cn(n.environment,ln(n.publicKey));this.httpInvoker=new an(n.publicKey,n.version,r)}setAmount(t){this.amount=t}setCurrency(t){this.currency=t}cleanUp(){var t;(t=this.destroy)==null||t.call(this)}addApplePay(t,n,r,s,i){this.log("[addApplePay]",{providerId:n,amount:r,currency:s,options:i}),this.validateOptions(t,r,s,i),this.setAmount(r),this.setCurrency(s);let o=!1;const a=nt({el:t,component:NE,props:{log:this.log,el:t,environment:this.environment,amount:this.amount,currency:this.currency,options:i},on:{activate:()=>{o||(o=!0,this.log("activate applepay form"))},validate:(c,l)=>{this.log("[ApplePay]: validate",c),this.validateMerchant(t,n,c,l)},submit:(c,l)=>{this.log("[ApplePay]: complete",c);const d={amount:this.amount,currency:this.currency,token:c.token};this.addChargeWithApplePay(t,n,d,l)},error:(c,l)=>{var d;this.log("[ApplePay]: error",c),ne(t,"Unable to pay with ApplePay"),l.completePayment({status:ApplePaySession.STATUS_FAILURE,errors:[{code:"unknown",message:c}]}),(d=this.failureCallback)==null||d.call(this,{error:"Unable to pay with ApplePay",body:c})},cancel:()=>{var c;this.log("[ApplePay]: cancel"),ne(t,"ApplePay canceled"),(c=this.failureCallback)==null||c.call(this,{error:"ApplePay canceled"})}}});this.destroy=a.destroy}validateMerchant(t,n,r,s){var i;this.log("[validateMerchant]",r),(i=this.httpInvoker)==null||i.invoke(Ui(this.apiUrl)[Pr.VALIDATE_MERCHANT].url,Ui(this.apiUrl)[Pr.VALIDATE_MERCHANT].method,JSON.stringify(r),(o,a)=>{try{const c=JSON.parse(a);this.log("[validateMerchant], success",c),s.completeMerchantValidation(c)}catch(c){this.log("error parsing validateMerchant response",c)}},(o,a)=>{var c;this.log("[validateMerchant], failure",a),ne(t,"Unable to pay with ApplePay"),(c=this.failureCallback)==null||c.call(this,{error:"Unable to pay with ApplePay",body:a})},{providerId:n})}addChargeWithApplePay(t,n,r,s){var i;this.log("[addChargeWithApplePay]",r),(i=this.httpInvoker)==null||i.invoke(Ui(this.apiUrl)[Pr.ADD_CHARGE_WITH_APPLE_PAY].url,Ui(this.apiUrl)[Pr.ADD_CHARGE_WITH_APPLE_PAY].method,JSON.stringify(r),this.getSuccessAddChargeHandler(t,s).bind(this),this.getFailureAddChargeHandler(t,s).bind(this),{providerId:n})}getFailureAddChargeHandler(t,n){return(r,s)=>{var i;this.log("[ApplePay], failure",s),ne(t,"Unable to pay with ApplePay"),n.completePayment({status:ApplePaySession.STATUS_FAILURE,errors:[{code:"unknown",message:s}]}),(i=this.failureCallback)==null||i.call(this,{error:"Unable to pay with ApplePay",body:s})}}getSuccessAddChargeHandler(t,n){return(r,s)=>{var i;try{const o=JSON.parse(s);this.log("[ApplePay], success",o);const a={status:ApplePaySession.STATUS_SUCCESS,paymentToken:o};n.completePayment(a),(i=this.successCallback)==null||i.call(this,{transactionId:o.chargeId})}catch(o){this.log("error parsing addCharge response",o)}}}validateOptions(t,n,r,s){if(!Et(r))throw ne(t,"Invalid currency: "+r),new TypeError("invalid currency: "+r);if(!ct(n))throw ne(t,"Invalid amount: "+n),new TypeError("invalid amount: "+n);if(!s.lineItemLabel)throw ne(t,"Invalid lineItemLabel parameter"),new TypeError("Invalid lineItemLabel parameter");if(!s.domainName)throw ne(t,"Invalid domainName parameter"),new TypeError("Invalid domainName parameter");if(!s.displayName)throw ne(t,"Invalid displayName parameter"),new TypeError("Invalid displayName parameter");if(!s.merchantIdentifier)throw ne(t,"Invalid merchantIdentifier parameter"),new TypeError("Invalid merchantIdentifier parameter")}}const OE=[(e=>(Ht("data-v-7d3fe743"),e=e(),Vt(),e))(()=>x("path",{id:"XMLID_34_",d:`M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9
|
|
135
148
|
C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2
|
|
136
149
|
c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7
|
|
137
150
|
c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2
|
|
@@ -141,4 +154,35 @@ Component that was made reactive: `,e)),C(e,t,s,r,n,o,i,!0)}function au(e){retur
|
|
|
141
154
|
c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4
|
|
142
155
|
l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5
|
|
143
156
|
l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,16.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z
|
|
144
|
-
`},null,-1))],Af=ve({__name:"ApplePayIcon",props:{size:null,grayscale:{type:Boolean}},setup(e){const s=`--size: ${e.size}px`;return(r,n)=>(z(),ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 210.2","xml:space":"preserve",style:s},Cf))}}),Km="",Nf=we(Af,[["__scopeId","data-v-7d3fe743"]]),Ms={PROVIDER_INFO:"PROVIDER_INFO",PROVIDERS_INFO:"PROVIDERS_INFO"},cn=(e,t,s)=>({[Ms.PROVIDERS_INFO]:{url:e+"/info/providers/",method:"GET"},[Ms.PROVIDER_INFO]:{url:e+(s?"/info/providers/token/"+s:"/info/providers/"+t),method:"GET"}});class Sf{constructor(){g(this,"_submitFormHandlers",{});g(this,"environment",Qe.PRODUCTION);g(this,"debug",!1);g(this,"config",fa(Qe.PRODUCTION));g(this,"publicKey","");g(this,"amount",0);g(this,"currency","");g(this,"httpInvoker",null);g(this,"regionResolver",null);g(this,"destroyDropIn",()=>{});g(this,"threeDsProcessor",null);g(this,"paypalProcessor",null);g(this,"cardProcessor",null);g(this,"payToProcessor",null);g(this,"checkoutProcessors",[]);g(this,"fraudProcessor",null);g(this,"googlePayProcessor",null);g(this,"applePayProcessor",null);g(this,"userOnSuccess",null);g(this,"userOnFailure",null);g(this,"billingAddress",null);g(this,"customer",null);g(this,"order",null);g(this,"paymentOptions",{});g(this,"isSafari",!1);g(this,"initProcessorsHandlers",[])}init(t,s,r){if(window._payfurl)return window._payfurl;if(this.environment=t,this.debug=r,this.publicKey=s,this.config=fa(t),!this.config)throw this.showErrorMessage(null,"Error: Unable to configure SDK due to an incorrect environment setting."),new TypeError("Error: Unable to configure SDK due to an incorrect environment setting.");return this.regionResolver=new Tt(t,Mt(s)),this.httpInvoker=new It(s,kt.version,this.regionResolver),this.isSafari=navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"),this.loadCss(),window._payfurl=this,this}initCardProcessor(t){if(this.log("[initCardProcessor]",{container:t}),this.cardProcessor)return this.cardProcessor;const s=new Uh(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,url:this.config.url,apiUrl:this.config.apiUrl,version:kt.version,onSuccess:r=>{var i;this.log("[cardProcessor], success",r),r.token&&(this._setToken(t,r.token),setTimeout(()=>{var o;this.userOnSuccess||(o=this.getForm(t))==null||o.submit()},500));const n={token:r.token};r.clickToPayData&&(n.clickToPayData=r.clickToPayData),(i=this.userOnSuccess)==null||i.call(this,n)},onFailure:r=>{var n;this.log("[cardProcessor], failure",r),(n=this.userOnFailure)==null||n.call(this,{error:r.error})}});return this.amount&&s.setAmount(this.amount),this.customer&&s.setCustomerInfo(this.customer),this.threeDsProcessor&&s.addThreeDsProcessor(this.threeDsProcessor),this.fraudProcessor&&s.addFraudProcessor(this.fraudProcessor),this.cardProcessor=s,s}initPaypalProcessor(t){if(this.log("[initPaypalProcessor]",{container:t}),this.paypalProcessor)return this.paypalProcessor;const s=new oh(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,version:kt.version,onSuccess:r=>{var n;this.log("[paypalProcessor], success",r),!this.userOnSuccess&&r.transactionId&&(this._setToken(t,r.transactionId,"transactionId"),setTimeout(()=>{var i;(i=this.getForm(t))==null||i.submit()},500)),(n=this.userOnSuccess)==null||n.call(this,{transactionId:r.transactionId})},onFailure:r=>{var n;this.log("[paypalProcessor], failure",r),(n=this.userOnFailure)==null||n.call(this,{error:r.error})}});return this.amount&&s.setAmount(this.amount),this.fraudProcessor&&s.addFraudProcessor(this.fraudProcessor),this.paypalProcessor=s,s}initCheckoutProcessor(t){this.log("[initCheckoutProcessor]",{container:t});const s=new pf(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,redirectUrl:this.config.redirectUrl,version:kt.version,onSuccess:r=>{var i;this.log("[checkoutProcessor], success",r),this.userOnSuccess||(r.transactionId&&this._setToken(t,r.transactionId,"transactionId"),r.token&&this._setToken(t,r.token,"token"),setTimeout(()=>{var o;(o=this.getForm(t))==null||o.submit()},500));const n={};r.transactionId&&(n.transactionId=r.transactionId),r.token&&(n.token=r.token),(i=this.userOnSuccess)==null||i.call(this,n)},onFailure:r=>{var n;this.log("[bnplProcessor], failure",r),(n=this.userOnFailure)==null||n.call(this,{error:r.error})}});return this.checkoutProcessors.push(s),s}initGooglePayProcessor(t){if(this.log("[initGooglePayProcessor]",{container:t}),this.googlePayProcessor)return this.googlePayProcessor;const s=new bf(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,version:kt.version,onSuccess:r=>{var n;this.log("[googlePayProcessor], success",r),!this.userOnSuccess&&r.transactionId&&(this._setToken(t,r.transactionId,"transactionId"),setTimeout(()=>{var i;(i=this.getForm(t))==null||i.submit()},500)),(n=this.userOnSuccess)==null||n.call(this,{transactionId:r.transactionId})},onFailure:r=>{var n;this.log("[googlePayProcessor], failure",r),(n=this.userOnFailure)==null||n.call(this,{error:r.error})}});return this.amount&&s.setAmount(this.amount),this.currency&&s.setCurrency(this.currency),this.googlePayProcessor=s,this.googlePayProcessor}initApplePayProcessor(t){if(this.log("[initApplePayProcessor]",{container:t}),this.applePayProcessor)return this.applePayProcessor;const s=new Pf(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,version:kt.version,onSuccess:r=>{var n;this.log("[applePayProcessor], success",r),!this.userOnSuccess&&r.transactionId&&(this._setToken(t,r.transactionId,"transactionId"),setTimeout(()=>{var i;(i=this.getForm(t))==null||i.submit()},500)),(n=this.userOnSuccess)==null||n.call(this,{transactionId:r.transactionId})},onFailure:r=>{var n;this.log("[applePayProcessor], failure",r),(n=this.userOnFailure)==null||n.call(this,{error:r.error})}});return this.amount&&s.setAmount(this.amount),this.currency&&s.setCurrency(this.currency),this.applePayProcessor=s,this.applePayProcessor}initPayToProcessor(t){return this.log("[initPayToProcessor]",{container:t}),this.payToProcessor?this.payToProcessor:(this.payToProcessor=new rf(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,version:kt.version,getPaymentOptions:this.getPaymentOptions.bind(this),onSuccess:s=>{var r;this.log("[payToProcessor], success",s),s.token&&(this._setToken(t,s.token),setTimeout(()=>{var n;this.userOnSuccess||(n=this.getForm(t))==null||n.submit()},500)),(r=this.userOnSuccess)==null||r.call(this,{token:s.token})},onFailure:s=>{var r;this.log("[payToProcessor], failure",s),(r=this.userOnFailure)==null||r.call(this,{error:s.error})}}),this.payToProcessor)}loadCss(){const t=document.createElement("link");t.href=this.config.cssUrl+"style.css?v="+Math.random(),t.rel="stylesheet",t.media="screen,print",document.getElementsByTagName("head")[0].appendChild(t)}log(t,...s){this.debug&&console.log(t,s)}_cleanUp(t){var s,r,n,i,o,a,l,c,d;(s=this.getSubmit(t))==null||s.removeEventListener("click",this.getSubmitFormHandler(t)),(r=this.getForm(t))==null||r.removeEventListener("submit",this.getSubmitFormHandler(t)),(n=this.destroyDropIn)==null||n.call(this),(i=this.cardProcessor)==null||i.cleanUp(),(o=this.applePayProcessor)==null||o.cleanUp(),(a=this.googlePayProcessor)==null||a.cleanUp();for(const u of this.checkoutProcessors)(t==null?void 0:t.id)===((l=u.container)==null?void 0:l.id)&&u.cleanUp();this.checkoutProcessors=[],(c=this.paypalProcessor)==null||c.cleanUp(),(d=this.payToProcessor)==null||d.cleanUp(),t&&(t.innerHTML="")}getForm(t){var s;return((s=t==null?void 0:t.parentElement)==null?void 0:s.closest("form"))||null}getSubmit(t){const s=this.getForm(t);return s?s.querySelector('button[type="submit"]')||s.querySelector('input[type="submit"]'):null}_initForm(t){const s=this.getForm(t);if(!s)return;const r=this.getSubmit(t);r?r.addEventListener("click",this.getSubmitFormHandler(t)):s.addEventListener("submit",this.getSubmitFormHandler(t))}_setToken(t,s,r="token"){const n=this.getForm(t);if(!n)return;let i=n.querySelector('input[name="'+r+'"]');i||(i=document.createElement("input"),i.type="hidden",i.name=r,n.appendChild(i)),i.value=s}getSubmitFormHandler(t){const s=(t==null?void 0:t.id)||"container";if(this._submitFormHandlers[s])return this._submitFormHandlers[s];const r=n=>{this.log("[sdk], submitForm",n),n.preventDefault();const i=this.getForm(t);if(!(i!=null&&i.onsubmit&&!i.onsubmit(new SubmitEvent("submit")))){if(i){const o=i.querySelector('input[name="token"]');if(o!=null&&o.value){i.submit();return}}window.postMessage({status:ri},"*")}};return this._submitFormHandlers[s]=r,r}addCard(t,s,r){if(this.log("[addCard]",{providerId:s,options:r}),!Fe(s))throw new TypeError("missing parameter: providerId");const n=t&&document.getElementById(t)||null;if(!n)throw new TypeError("Container is not available");this._cleanUp(n),this._initForm(n);const i=Number(r==null?void 0:r.threeDSAmount)||0,o=(r==null?void 0:r.threeDSCurrency)||"";if(r!=null&&r.threeDSEnabled){if(!st(i))throw new TypeError("Missing parameter: amount");if(!rt(o))throw new TypeError("Missing parameter: currency")}return this.setAmount(i),this.setCurrency(o),this.initProcessors(n,i,o,s,"",{},(a,l)=>{r={...r,requiredFields:a,visProviderId:l.hasVisaInstallmentsProviders&&l.visaInstallmentsProviders[0]||"",clickToPayEnabled:(r==null?void 0:r.clickToPayEnabled)&&l.clickToPayEnabled,clickToPayOptions:{...l.clickToPayOptions,...r==null?void 0:r.clickToPayOptions},threeDSEnabled:!!l.required3dsProvider},this.initCardProcessor(n).addCard(n,this.getForm(n),s,i,o,r)}),this}addCardLeastCost(t,s,r,n){if(this.log("[addCardLeastCost]",{amount:s,currency:r,options:n}),n!=null&&n.threeDSEnabled){if(!st(s))throw new TypeError("Missing parameter: amount");if(!rt(r))throw new TypeError("Missing parameter: currency")}const i=t&&document.getElementById(t)||null;if(!i)throw new TypeError("Container is not available");return this._cleanUp(i),this._initForm(i),this.setAmount(s),this.setCurrency(r),this.initProcessors(i,s,r,"","",{},(o,a)=>{n={...n,requiredFields:o,visProviderId:a.hasVisaInstallmentsProviders&&a.visaInstallmentsProviders[0]||"",clickToPayEnabled:(n==null?void 0:n.clickToPayEnabled)&&a.clickToPayEnabled,clickToPayOptions:{...a.clickToPayOptions,...n==null?void 0:n.clickToPayOptions},threeDSEnabled:!!a.required3dsProvider},this.initCardProcessor(i).addCard(i,this.getForm(i),"",s,r,n)}),this}addDropIn(t,s,r,n){this.log("[addDropIn]",{amount:s,currency:r,options:n});const i=t&&document.getElementById(t)||null;if(!i)throw new TypeError("Container is not available");this._cleanUp(i),this._initForm(i),this.setAmount(s),this.setCurrency(r);const o=(n==null?void 0:n.cardProviderId)||"";return this.initProcessors(i,s,r,o,"",{},(a,l)=>{var N,$,b,R,V,D,q,ie,ue,te;n!=null&&n.paypalProviderId&&l.hasPaypalProviders&&l.paypalProviders.includes(n==null?void 0:n.paypalProviderId)&&(l.hasPaypalProviders=!0,l.paypalProviders.unshift(n==null?void 0:n.paypalProviderId)),n!=null&&n.payToProviderId&&l.hasPayToProviders&&l.payToProviders.includes(n==null?void 0:n.payToProviderId)&&(l.hasPayToProviders=!0,l.payToProviders.unshift(n==null?void 0:n.payToProviderId));const c=[l.hasCardProviders,l.hasPaypalProviders,l.hasPayToProviders,l.hasBnplProviders,l.hasGooglePayProviders].filter(Boolean).length>1,d={threeDSEnabled:!!l.required3dsProvider,threeDsProviderId:l.required3dsProvider||"",threeDSEmail:(n==null?void 0:n.threeDSEmail)||"",visProviderId:l.hasVisaInstallmentsProviders&&l.visaInstallmentsProviders[0]||"",clickToPayEnabled:l.clickToPayEnabled,clickToPayOptions:l.clickToPayOptions,requiredFields:a},u={hideShipping:!1,paypalButtonStyle:null,paypalEnablePayIn4:!1,transfer:null},p={description:String(n==null?void 0:n.payToDescription).trim()||String((N=l.payToProvidersWithOptions[0])==null?void 0:N.description)||"",maximumAmount:(n==null?void 0:n.payToMaximumAmount)||Number(($=l.payToProvidersWithOptions[0])==null?void 0:$.maximumAmount)||0},y={taxAmount:(b=this.order)==null?void 0:b.taxAmount,shippingAmount:(R=this.order)==null?void 0:R.shippingAmount,discountAmount:(V=this.order)==null?void 0:V.discountAmount,orderItems:(D=this.order)==null?void 0:D.orderItems,customer:this.customer||void 0,billingAddress:this.billingAddress||void 0},m={gateway:l.hasGooglePayProviders?l.googlePayProviders[0].gateway:"",gatewayMerchantId:l.hasGooglePayProviders?l.googlePayProviders[0].gatewayMerchantId:""},I={lineItemLabel:((q=n==null?void 0:n.applePayOptions)==null?void 0:q.lineItemLabel)||"",displayName:((ie=n==null?void 0:n.applePayOptions)==null?void 0:ie.displayName)||"",domainName:((ue=n==null?void 0:n.applePayOptions)==null?void 0:ue.domainName)||"",merchantIdentifier:((te=n==null?void 0:n.applePayOptions)==null?void 0:te.merchantIdentifier)||""};if(!c&&l.hasCardProviders){const W=t&&document.getElementById(t)||null;this.initCardProcessor(W).addCard(W,this.getForm(W),o,s,r,d);return}if(!c&&l.hasPaypalProviders){this.addPaypal(t,s,r,l.paypalProviders[0],u);return}if(!c&&l.hasPayToProviders){this.addPayTo(t,s,l.payToProviders[0],p);return}if(!c&&l.hasBnplProviders&&hi[l.bnplProviders[0].providerType]){l.bnplProviders[0].providerType==="upi"?this.addUpi(t,s,l.bnplProviders[0].providerId,(n==null?void 0:n.upiOptions)||{}):this.addBnpl(t,s,r,l.bnplProviders[0].providerType,l.bnplProviders[0].providerId,y,l.bnplProviders[0].options);return}if(!c&&l.hasGooglePayProviders){this.addGooglePay(t,s,r,l.googlePayProviders[0].providerId,m);return}if(!c&&this.isSafari&&Object.keys((n==null?void 0:n.applePayOptions)||{}).length>0){this.addApplePay(t,s,r,(n==null?void 0:n.applePayOptions.providerId)||"",I);return}if(c){const W=()=>{window.postMessage({status:"deactivate",component:"paypal"},"*"),window.postMessage({status:"deactivate",component:"card"},"*"),window.postMessage({status:"deactivate",component:"payto"},"*"),window.postMessage({status:"deactivate",component:"googlepay"},"*"),window.postMessage({status:"deactivate",component:"applepay"},"*"),l.hasBnplProviders&&l.bnplProviders.forEach(O=>{window.postMessage({status:"deactivate",component:"bnpl",providerType:O.providerType},"*")})},le=[];l.hasCardProviders&&le.push({title:"Card",description:"Credit or Debit",icon:pd,render:O=>{this.initCardProcessor(O).addCard(O,this.getForm(O),(n==null?void 0:n.cardProviderId)||"",s,r,d)},activate:()=>{W(),window.postMessage({status:"activate",component:"card"},"*")}}),l.hasPaypalProviders&&le.push({title:"Paypal",icon:dd,render:O=>{this.initPaypalProcessor(O).addPaypal(O,this.getForm(O),s,r,l.paypalProviders[0],u)},activate:()=>{W(),window.postMessage({status:"activate",component:"paypal"},"*")}}),l.hasPayToProviders&&(Fe(p.description)?le.push({title:"PayTo",icon:Id,render:O=>{this.initPayToProcessor(O).addPayTo(O,s,l.payToProviders[0],p)},activate:()=>{W(),window.postMessage({status:"activate",component:"payto"},"*")}}):console.log("Missing parameter: PayTo Description")),l.hasBnplProviders&&l.bnplProviders.forEach(O=>{var H,v;const L=hi[O.providerType];if(!L)return;const k=L.icon?`${this.config.cssUrl}icons/${L.icon}.svg`:null;le.push({title:L.name||O.providerType,description:L.description||((v=(H=O.options)==null?void 0:H.terms)==null?void 0:v.replaceAll(/(\d+\.\d{3,})/g,(w,F)=>parseFloat(F).toFixed(2))),icon:k,render:w=>{O.providerType==="upi"?this.addUpi(w.id,s,O.providerId,(n==null?void 0:n.upiOptions)||{}):this.initCheckoutProcessor(w).addBnpl(w,s,r,O.providerType,O.providerId,y,O.options)},activate:()=>{W(),window.postMessage({status:"activate",component:"bnpl",providerType:O.providerType},"*")}})}),l.hasGooglePayProviders&&le.push({title:"GooglePay",icon:yd,render:O=>{this.initGooglePayProcessor(O).addGooglePay(O,l.hasGooglePayProviders?l.googlePayProviders[0].providerId:"",s,r,m)},activate:()=>{W(),window.postMessage({status:"activate",component:"googlepay"},"*")}}),this.isSafari&&Object.keys((n==null?void 0:n.applePayOptions)||{}).length>0&&le.push({title:"ApplePay",icon:Nf,render:O=>{this.initApplePayProcessor(O).addApplePay(O,(n==null?void 0:n.applePayOptions.providerId)||"",s,r,I)},activate:()=>{W(),window.postMessage({status:"activate",component:"applepay"},"*")}});const _e=Ke({el:document.getElementById(t),component:Td,props:{elements:le}});this.destroyDropIn=_e.destroy}}),this}addPaypal(t,s,r,n,i){this.log("[addPaypal]",{amount:s,currency:r,providerId:n,options:i});const o=t&&document.getElementById(t)||null;if(!o)throw new TypeError("Container is not available");return this._cleanUp(o),this._initForm(o),this.setAmount(s),this.setCurrency(r),this.initProcessors(o,s,r,n,"",{},(a,l)=>{this.initPaypalProcessor(o).addPaypal(o,this.getForm(o),s,r,l.paypalProviders[0]||n,i)}),this}addPayTo(t,s,r,n){this.log("[addPayTo]",{amount:s,providerId:r,options:n});const i=t&&document.getElementById(t)||null;if(!i)throw new TypeError("Container is not available");this._cleanUp(i),this._initForm(i),this.setAmount(s);const o=(a,l)=>{this.log("[addPayTo, local]",{amount:s,localProviderId:a,localOptions:l}),this.initPayToProcessor(i).addPayTo(i,s,a,{maximumAmount:l.maximumAmount,description:l.description})};return r&&(n!=null&&n.maximumAmount)&&(n!=null&&n.description)?(o(r,n),this):(this.initProcessors(i,s,"AUD",r||"","",{},(a,l)=>{if(!l.hasPayToProviders)return this;const c=l.payToProvidersWithOptions[0];o(c.providerId,{maximumAmount:c.maximumAmount,description:c.description})}),this)}addGooglePay(t,s,r,n,i){if(this.log("[addGooglePay]",{amount:s,currency:r,providerId:n,options:i}),!st(s))throw new TypeError("Missing parameter: amount");if(!rt(r))throw new TypeError("Missing parameter: currency");const o=t&&document.getElementById(t)||null;if(!o)throw new TypeError("Container is not available");this._cleanUp(o),this._initForm(o),this.setAmount(s),this.setCurrency(r);const a=(l,c)=>{this.log("[addGooglePay, local]",{amount:s,currency:r,localProviderId:l,localOptions:c}),this.initGooglePayProcessor(o).addGooglePay(o,l,s,r,{gateway:c.gateway,gatewayMerchantId:c.gatewayMerchantId})};return n&&(i!=null&&i.gateway)&&(i!=null&&i.gatewayMerchantId)?(a(n,i),this):(this.initProcessors(o,s,r,n||"","",{},(l,c)=>{if(!c.hasGooglePayProviders)return this;const d=c.googlePayProviders[0];a(d.providerId,{gateway:d.gateway,gatewayMerchantId:d.gatewayMerchantId})}),this)}addApplePay(t,s,r,n,i){if(!this.isSafari)throw new TypeError("Your browser does not support ApplePay");if(this.log("[addApplePay]",{amount:s,currency:r,providerId:n,options:i}),!st(s))throw new TypeError("Missing parameter: amount");if(!rt(r))throw new TypeError("Missing parameter: currency");if(!n)throw new TypeError("Invalid providerId parameter");if(!i.domainName)throw new TypeError("Invalid domainName parameter");if(!i.merchantIdentifier)throw new TypeError("Invalid merchantIdentifier parameter");if(!i.displayName)throw new TypeError("Invalid displayName parameter");if(!i.lineItemLabel)throw new TypeError("Invalid lineItemLabel parameter");const o=t&&document.getElementById(t)||null;if(!o)throw new TypeError("Container is not available");return this._cleanUp(o),this._initForm(o),this.setAmount(s),this.setCurrency(r),this.initApplePayProcessor(o).addApplePay(o,n,s,r,i),this}addBnpl(t,s,r,n,i,o,a){var c,d,u,p,y,m,I,N;this.log(`[addCheckout], ${n}`,{parentId:t,amount:s,currency:r,providerType:n,providerId:i,options:o});const l=t&&document.getElementById(t)||null;if(!l)throw new TypeError("Container is not available");return this._cleanUp(l),this._initForm(l),this.setAmount(s),o||(o={}),!o.orderItems&&((c=this.order)!=null&&c.orderItems)&&(o.orderItems=(d=this.order)==null?void 0:d.orderItems.slice()),!o.taxAmount&&((u=this.order)!=null&&u.taxAmount)&&(o.taxAmount=(p=this.order)==null?void 0:p.taxAmount),!o.discountAmount&&((y=this.order)!=null&&y.discountAmount)&&(o.discountAmount=(m=this.order)==null?void 0:m.discountAmount),!o.shippingAmount&&((I=this.order)!=null&&I.shippingAmount)&&(o.shippingAmount=(N=this.order)==null?void 0:N.shippingAmount),!o.billingAddress&&this.billingAddress&&(o.billingAddress={...this.billingAddress}),!o.customer&&this.customer&&(o.customer={...this.customer}),this.initCheckoutProcessor(l).addBnpl(l,s,r,n,i,o,a),this}addUpi(t,s,r,n){var d;if(this.log("[addUpi]",{amount:s,providerId:r,options:n}),!Fe(r))throw new TypeError("Missing parameter: providerId");if(!Fe(n==null?void 0:n.email))throw new TypeError("Missing parameter: options.email");if(!Fe(n==null?void 0:n.name))throw new TypeError("Missing parameter: options.name");if(!Fe(n==null?void 0:n.documentId))throw new TypeError("Missing parameter: options.documentId");const i=t&&document.getElementById(t)||null;if(!i)throw new TypeError("Container is not available");this._initForm(i),this.setAmount(s);const o=((d=this.order)==null?void 0:d.orderItems)||[],a=this.customer||{},l=this.billingAddress||{};Fe(a.firstName)||(a.firstName=n.name),Fe(a.email)||(a.email=n.email),Fe(l.firstName)||(l.firstName=n.name),Fe(l.email)||(l.email=n.email),Fe(a.phoneNumber)||(a.phoneNumber="+3146781223"),Fe(l.phoneNumber)||(l.phoneNumber="+3146781223"),o.length===0&&o.push({name:"UPI Payment",sku:"UPI Payment",quantity:1,unitPrice:s,totalAmount:s});const c={taxAmount:0,shippingAmount:0,discountAmount:0,orderItems:o,customer:a,billingAddress:l};return this.initCheckoutProcessor(i).addBnpl(i,s,this.currency,"upi",r,c,{documentId:n.documentId,name:((a==null?void 0:a.firstName)+" "+(a==null?void 0:a.lastName)).trim(),email:a==null?void 0:a.email,subscriptionFrequencyUnit:n.subscriptionFrequencyUnit,subscriptionFrequency:String(n.subscriptionFrequency),subscriptionStartAt:n.subscriptionStartAt,subscriptionEndAt:n.subscriptionEndAt}),this}addThreeDsWithFullParameters(t,s,r,n,i,o,a,l,c){this.log("[addThreeDsWithFullParameters]",{cardNumber:Ca(s),expiryDate:r,cardholder:n,email:i,amount:o,currency:a,ccv:"***",options:c});const d=t&&document.getElementById(t)||null;if(!st(o))throw new TypeError("Missing parameter: amount");if(!rt(a))throw new TypeError("Missing parameter: currency");return this._cleanUp(d),this._initForm(d),this.setAmount(o),this.setCurrency(a),this.getPaymentOptions(o,a,u=>{var p;if(!u.hasThreeDsProviders){this.log("No 3DS providers found"),(p=this.userOnSuccess)==null||p.call(this,{});return}this.add3DsProcessor(d,u.threeDsProviders[0].providerId,u.threeDsProviders[0].providerType,"",()=>{var y,m,I;(y=this.threeDsProcessor)==null||y.setEmail(i),(m=this.threeDsProcessor)==null||m.setPaymentInfo({cardNumber:s,expiryDate:r,cardholder:n,ccv:l}),(I=this.threeDsProcessor)==null||I.threeDSInvoke(d,!!(c!=null&&c.requireChallenge),N=>{var $;Oe(),this.log("[threeDSInvoke], postAuthData",N),($=this.userOnSuccess)==null||$.call(this,{threeDSServerTransID:N.threeDSServerTransID})})},()=>{var y;this.log("Cannot load 3DS provider"),(y=this.userOnSuccess)==null||y.call(this,{})})}),this}tokeniseWith3Ds(t,s,r,n,i,o,a,l,c,d,u){if(this.log("[tokeniseWith3Ds]",{providerId:s,cardNumber:Ca(r),expiryDate:n,cardholder:i,ccv:"***",email:a,amount:l,currency:c,metadata:d,options:u}),!Fe(s))throw new TypeError("Missing parameter: providerId");if(!st(l))throw new TypeError("Missing parameter: amount");if(!rt(c))throw new TypeError("Missing parameter: currency");const p=t&&document.getElementById(t)||null;return this._cleanUp(p),this._initForm(p),this.setAmount(l),this.setCurrency(c),this.initProcessors(p,l,c,s,"",{},()=>{var m,I;const y=N=>{this.tokeniseCard(s,r,n,i,o,d,N,u)};this.threeDsProcessor?((m=this.threeDsProcessor)==null||m.setPaymentInfo({cardNumber:r,expiryDate:n,cardholder:i,ccv:o}),(I=this.threeDsProcessor)==null||I.threeDSInvoke(p,!!(u!=null&&u.requireChallenge),N=>{Oe(),this.log("[threeDSInvoke], postAuthData",N),y(N.threeDSServerTransID)})):(console.log("threeDsProcessor NOT FOUND"),y())}),this}tokeniseCard(t,s,r,n,i,o,a,l){return this.log("[tokeniseCard]",{providerId:t,cardNumber:s,expiryDate:r,cardHolderName:n,verify:l==null?void 0:l.verify,metadata:o}),this.initCardProcessor(null).tokeniseCard(t,s,r,n,i,o,a,l),this}addThreeDsWithToken(t,s,r,n,i,o){if(this.log("[addThreeDsWithToken]",{tokenId:t,email:s,amount:r,currency:n,options:o}),!Fe(t))throw new TypeError("Missing parameter: tokenId");if(!st(r))throw new TypeError("Missing parameter: amount");if(!rt(n))throw new TypeError("Missing parameter: currency");this.setAmount(r),this.setCurrency(n);const a="",l="",c="";return this.initProcessors(null,r,n,"",t,{},()=>{var d,u,p,y,m;if(!this.threeDsProcessor)throw(d=this.userOnFailure)==null||d.call(this,{error:"Cannot load 3DS provider"}),new TypeError("Cannot load 3DS provider");(u=this.threeDsProcessor)==null||u.setEmail(s),(p=this.threeDsProcessor)==null||p.setTokenId(t),(y=this.threeDsProcessor)==null||y.threeDSInvoke(null,!!(o!=null&&o.requireChallenge),I=>{var N;Oe(),this.log("[threeDSInvoke], postAuthData",I),(N=this.userOnSuccess)==null||N.call(this,{threeDSServerTransID:I.threeDSServerTransID})}),(m=this.threeDsProcessor)==null||m.setPaymentInfo({cardNumber:a,expiryDate:l,cardholder:c,ccv:i})}),this}getPaymentOptions(t,s,r){var a;this.log("[getPaymentOptions], request",{amount:t,currency:s});const n=`${t}${s}`;if(this.paymentOptions[n]){r==null||r(this.paymentOptions[n]);return}const i=(l,c)=>{throw this.log("[getPaymentOptions], failure",c),this.showErrorMessage(null,"Unable to configure SDK"),new TypeError("failed to configure, error: "+c)},o=(l,c)=>{const d=JSON.parse(c);this.log("[getPaymentOptions], success",d),this.paymentOptions[n]=d,r==null||r(d)};(a=this.httpInvoker)==null||a.invoke(cn(this.config.apiUrl)[Ms.PROVIDERS_INFO].url+`?amount=${t}¤cy=${s}`,cn(this.config.apiUrl)[Ms.PROVIDERS_INFO].method,{},o,i)}getProviderInfo(t,s,r,n,i,o){var c;this.log("[getProviderInfo], request",{providerId:t,amount:s,currency:r,token:n});const a=(d,u)=>{this.log("[getProviderInfo], error",d,u),o({error:"Unable to get provider information"})},l=(d,u)=>{this.log("[getProviderInfo], success",d,u);const p=JSON.parse(u);i(p)};(c=this.httpInvoker)==null||c.invoke(cn(this.config.apiUrl,t,n)[Ms.PROVIDER_INFO].url+`?amount=${s}¤cy=${r}`,cn(this.config.apiUrl,t,n)[Ms.PROVIDER_INFO].method,{},l,a)}setAmount(t){var s,r,n,i,o;return Number(t)===Number(this.amount)?this:(this.log("[setAmount]",Number(t)),this.amount=Number(t),(s=this.cardProcessor)==null||s.setAmount(this.amount),(r=this.threeDsProcessor)==null||r.setAmount(this.amount),(n=this.paypalProcessor)==null||n.setAmount(this.amount),(i=this.fraudProcessor)==null||i.setAmount(this.amount),(o=this.googlePayProcessor)==null||o.setAmount(this.amount),window.postMessage({status:or,amount:this.amount},"*"),this)}setCurrency(t){var s,r;return t===this.currency?this:(this.log("[setCurrency]",t),this.currency=t,(s=this.threeDsProcessor)==null||s.setCurrency(t),(r=this.googlePayProcessor)==null||r.setCurrency(t),window.postMessage({status:sn,currency:t},"*"),this)}onSuccess(t){this.userOnSuccess=t}onFailure(t){this.userOnFailure=t}showErrorMessage(t,s){this.log(s),X(t,s)}setBillingAddress(t){var s,r;return this.log("[setBillingAddress]",t),this.billingAddress={...t},(s=this.threeDsProcessor)==null||s.setAddressInfo(this.billingAddress),(r=this.fraudProcessor)==null||r.setAddressInfo(this.billingAddress),this}setCustomerInfo(t){var s,r;return this.log("[setCustomerInfo]",t),this.customer={...t},(s=this.cardProcessor)==null||s.setCustomerInfo(this.customer),(r=this.fraudProcessor)==null||r.setCustomerInfo(this.customer),this}setOrderInfo(t){var s;return this.log("[setOrderInfo]",t),this.order={...t},(s=this.fraudProcessor)==null||s.setOrderInfo(this.order),this}initProcessors(t,s,r,n,i,o,a){if(this.log("[initProcessors]",{amount:s,currency:r,cardProviderId:n,token:i,metadata:o}),this.initProcessorsHandlers.length>0){this.initProcessorsHandlers.push(a);return}this.initProcessorsHandlers.push(a);let l={},c="",d="",u=!1,p="",y="";const m=b=>{this.getProviderInfo(n,s,r,i||"",R=>{l=R.requiredFields,R.threeDsProviderId&&(p=R.threeDsProviderId,y=R.threeDsProviderType),b()},R=>{this.log("Unable to get provider information",R),b()})},I=(b,R,V,D)=>{if(!b||!R){D();return}this.addFraudProcessor(b,R,V,o,()=>{D()},()=>{this.log("Error loading fraud provider",R),D()})},N=(b,R,V)=>{if(!b||!R){V();return}this.add3DsProcessor(t,b,R,n,()=>{V()},()=>{this.log("Error loading 3ds provider",R),V()})},$=(b,R)=>{for(const V of this.initProcessorsHandlers)V(b,R);this.initProcessorsHandlers=[]};this.getPaymentOptions(s,r,b=>{if(b.hasThreeDsProviders&&(p=b.threeDsProviders[0].providerId,y=b.threeDsProviders[0].providerType),b.hasFraudProviders&&(c=b.fraudProviders[0].providerId,d=b.fraudProviders[0].providerType,u=b.fraudProviders[0].stopPaymentOnFailure),!n&&!i){I(c,d,u,()=>{N(p,y,()=>{$(l,b)})});return}m(()=>{I(c,d,u,()=>{N(p,y,()=>{$(l,b)})})})})}addFraudProcessor(t,s,r,n,i,o){if(this.log("[addFraudProcessor]",t,s,n),!this.amount||!this.currency||!this.billingAddress||!this.customer||!this.order){this.log("[addFraudProcessor], NOT loaded",{amount:this.amount,currency:this.currency,billingAddress:this.billingAddress,customer:this.customer,order:this.order}),i==null||i();return}tt(Object.assign({"./fraud/forter.ts":()=>Promise.resolve().then(()=>Mf),"./fraud/fraudCheck.type.ts":()=>Promise.resolve().then(()=>kf),"./fraud/fraudProvider.type.ts":()=>Promise.resolve().then(()=>Of),"./fraud/fraudStatus.type.ts":()=>Promise.resolve().then(()=>xf)}),`./fraud/${s.toLowerCase()}.ts`).then(a=>{var c,d;this.log(`Loading ${s}...`,a);const l=a.default();l!=null&&l.getFraudCheckData&&(this.fraudProcessor=new mf(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,version:kt.version,providerId:t,stopPaymentOnFailure:r,metadata:n,getFraudCheckData:l.getFraudCheckData,onSuccess:u=>{this.log("[fraudProcessor], success",u)},onFailure:u=>{this.log("[fraudProcessor], failure",u)}}),this.amount&&this.fraudProcessor.setAmount(this.amount),this.currency&&this.fraudProcessor.setCurrency(this.currency),this.billingAddress&&this.fraudProcessor.setAddressInfo(this.billingAddress),this.customer&&this.fraudProcessor.setCustomerInfo(this.customer),this.order&&this.fraudProcessor.setOrderInfo(this.order),(c=this.cardProcessor)==null||c.addFraudProcessor(this.fraudProcessor),(d=this.paypalProcessor)==null||d.addFraudProcessor(this.fraudProcessor),i==null||i())}).catch(a=>{this.log(`Error loading ${s}`,a),o==null||o()})}add3DsProcessor(t,s,r,n,i,o){this.log("[add3DsProcessor]",s,r),tt(Object.assign({"./3ds/ThreeDsAuthResponse.type.ts":()=>Promise.resolve().then(()=>Rf),"./3ds/ThreeDsInitResponse.type.ts":()=>Promise.resolve().then(()=>Lf),"./3ds/ThreeDsPostAuthResponse.type.ts":()=>Promise.resolve().then(()=>Vf),"./3ds/default.ts":()=>Promise.resolve().then(()=>rp),"./3ds/ecentric.ts":()=>Promise.resolve().then(()=>Ep),"./3ds/gpayments.ts":()=>Promise.resolve().then(()=>Fp)}),`./3ds/${r.toLowerCase()}.ts`).then(a=>{var c;this.log(`Loading ${r}...`,a);const l=a.default(this.log.bind(this),this.environment,t,this.config.apiUrl);l!=null&&l.setThreeDsProcessor&&(this.threeDsProcessor=new sh(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,version:kt.version,providerId:s,cardProviderId:n,threeDsInvoker:{onPreAuth:l.onPreAuth,onAuth:l.onAuth,onPostAuth:l.onPostAuth},onSuccess:d=>{var u;this.log("[threeDsProcessor], success",d),(u=this.userOnSuccess)==null||u.call(this,d)},onFailure:d=>{var u;this.log("[threeDsProcessor], failure",d),(u=this.userOnFailure)==null||u.call(this,{error:d.error})}}),this.amount&&this.threeDsProcessor.setAmount(this.amount),this.currency&&this.threeDsProcessor.setCurrency(this.currency),this.billingAddress&&this.threeDsProcessor.setAddressInfo(this.billingAddress),(c=this.cardProcessor)==null||c.addThreeDsProcessor(this.threeDsProcessor),l.setThreeDsProcessor(this.threeDsProcessor),i==null||i())}).catch(a=>{if(this.log(`Error loading ${r}`,a),r!=="default"){this.add3DsProcessor(t,s,"default",n,i,o);return}o==null||o()})}}const wf=new Sf;let Da="";const Df=(e,t,s,r,n,i,o,a,l)=>JSON.stringify({siteId:l.SiteId,providerId:e,amount:t,currency:s,paymentInformation:r,paypalInformation:n,customerInfo:{firstName:i.firstName,lastName:i.lastName,email:i.email,phone:i.phoneNumber},address:{line1:o.streetAddress,line2:o.streetAddress2,city:o.city,country:o.country,postalCode:o.postalCode,state:o.state},order:{items:a.orderItems.map(c=>({productCode:c.sku,quantity:c.quantity,amount:c.totalAmount}))},connectionInformation:{userAgent:navigator.userAgent,cookie:Da}});function Tf(){document.addEventListener("ftr:tokenReady",function(t){Da=t.detail});const e=document.createElement("script");return e.type="text/javascript",e.id="2e6515aa0b8e",e.innerHTML=window.atob("ICAgIChmdW5jdGlvbiAoKSB7CiAgICAgICAgdmFyIG1lcmNoYW50Q29uZmlnID0gewogICAgICAgICAgICBjc3A6IGZhbHNlCiAgICAgICAgfTsKICAgICAgICAKICAgICAgICB2YXIgc2l0ZUlkID0gIjJlNjUxNWFhMGI4ZSI7CmZ1bmN0aW9uIHQodCxuKXtmb3IodmFyIGU9dC5zcGxpdCgiIikscj0wO3I8ZS5sZW5ndGg7KytyKWVbcl09U3RyaW5nLmZyb21DaGFyQ29kZShlW3JdLmNoYXJDb2RlQXQoMCkrbik7cmV0dXJuIGUuam9pbigiIil9ZnVuY3Rpb24gbihuKXtyZXR1cm4gdChuLC1TKS5yZXBsYWNlKC8lU04lL2csc2l0ZUlkKX1mdW5jdGlvbiBlKCl7dmFyIHQ9Im5vIisib3AiKyJmbiIsbj0iZyIrImEiLGU9Im4iKyJhbWUiO3JldHVybiB3aW5kb3dbbl0mJndpbmRvd1tuXVtlXT09PXR9ZnVuY3Rpb24gcigpe3JldHVybiEoIW5hdmlnYXRvci5icmF2ZXx8ImZ1bmN0aW9uIiE9dHlwZW9mIG5hdmlnYXRvci5icmF2ZS5pc0JyYXZlKX1mdW5jdGlvbiBvKCl7cmV0dXJuIGRvY3VtZW50LmN1cnJlbnRTY3JpcHQmJmRvY3VtZW50LmN1cnJlbnRTY3JpcHQuc3JjfWZ1bmN0aW9uIGkodCl7dHJ5e0IuZXg9dCxlKCkmJi0xPT09Qi5leC5pbmRleE9mKFIudUIpJiYoQi5leCs9Ui51QikscigpJiYtMT09PUIuZXguaW5kZXhPZihSLnVCcikmJihCLmV4Kz1SLnVCciksbygpJiYtMT09PUIuZXguaW5kZXhPZihSLm5JTCkmJihCLmV4Kz1SLm5JTCksd2luZG93LmZ0cl9fc25wX2N3Y3x8KEIuZXgrPVIucyksRihCKX1jYXRjaCh0KXt9fWZ1bmN0aW9uIGModCxuKXtmdW5jdGlvbiBlKG8pe3RyeXtvLmJsb2NrZWRVUkk9PT10JiYobigpLGRvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIocixlKSl9Y2F0Y2godCl7ZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcihyLGUpfX12YXIgcj0ic2VjdXJpdHlwb2xpY3l2aW9sYXRpb24iO2RvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIocixlKSxzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7ZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcihyLGUpfSwyKjYwKjFlMyl9ZnVuY3Rpb24gYSh0LG4sZSxyKXt2YXIgbz0hMTt0PSJodHRwczovLyIrdCxjKHQsZnVuY3Rpb24oKXtyKCEwKSxvPSEwfSk7dmFyIGk9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgic2NyaXB0Iik7aS5vbmVycm9yPWZ1bmN0aW9uKCl7aWYoIW8pdHJ5e3IoITEpLG89ITB9Y2F0Y2godCl7fX0saS5vbmxvYWQ9ZSxpLnR5cGU9InRleHQvamF2YXNjcmlwdCIsaS5pZD0iZnRyX19zY3JpcHQiLGkuYXN5bmM9ITAsaS5zcmM9dDt2YXIgYT1kb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgic2NyaXB0IilbMF07YS5wYXJlbnROb2RlLmluc2VydEJlZm9yZShpLGEpfWZ1bmN0aW9uIHUodCxuLGUscil7dmFyIG89ITEsaT1uZXcgWE1MSHR0cFJlcXVlc3Q7aWYoYygiaHR0cHM6Iit0LGZ1bmN0aW9uKCl7ZShuZXcgRXJyb3IoIkNTUCBWaW9sYXRpb24iKSwhMCksbz0hMH0pLCIvLyI9PT10LnNsaWNlKDAsMikmJih0PSJodHRwczoiK3QpLCJ3aXRoQ3JlZGVudGlhbHMiaW4gaSlpLm9wZW4oIkdFVCIsdCwhMCk7ZWxzZXtpZigidW5kZWZpbmVkIj09dHlwZW9mIFhEb21haW5SZXF1ZXN0KXJldHVybjtpPW5ldyBYRG9tYWluUmVxdWVzdCxpLm9wZW4oIkdFVCIsdCl9T2JqZWN0LmtleXMocikuZm9yRWFjaChmdW5jdGlvbih0KXtpLnNldFJlcXVlc3RIZWFkZXIodCxyW3RdKX0pLGkub25sb2FkPWZ1bmN0aW9uKCl7ImZ1bmN0aW9uIj09dHlwZW9mIG4mJm4oaSl9LGkub25lcnJvcj1mdW5jdGlvbih0KXtpZigiZnVuY3Rpb24iPT10eXBlb2YgZSYmIW8pdHJ5e2UodCwhMSksbz0hMH1jYXRjaCh0KXt9fSxpLm9ucHJvZ3Jlc3M9ZnVuY3Rpb24oKXt9LGkub250aW1lb3V0PWZ1bmN0aW9uKCl7ImZ1bmN0aW9uIj09dHlwZW9mIGUmJmUoInRpbSIrImVvIisidXQiLCExKX0sc2V0VGltZW91dChmdW5jdGlvbigpe2kuc2VuZCgpfSwwKX1mdW5jdGlvbiBkKHQsc2l0ZUlkLG4pe2Z1bmN0aW9uIGUodCl7dmFyIG49dC50b1N0cmluZygxNik7cmV0dXJuIG4ubGVuZ3RoJTI/IjAiK246bn1mdW5jdGlvbiByKHQpe2lmKHQ8PTApcmV0dXJuIiI7Zm9yKHZhciBuPSIwMTIzNDU2Nzg5YWJjZGVmIixlPSIiLHI9MDtyPHQ7cisrKWUrPW5bTWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpKm4ubGVuZ3RoKV07cmV0dXJuIGV9ZnVuY3Rpb24gbyh0KXtmb3IodmFyIG49IiIscj0wO3I8dC5sZW5ndGg7cisrKW4rPWUodC5jaGFyQ29kZUF0KHIpKTtyZXR1cm4gbn1mdW5jdGlvbiBpKHQpe2Zvcih2YXIgbj10LnNwbGl0KCIiKSxlPTA7ZTxuLmxlbmd0aDsrK2UpbltlXT1TdHJpbmcuZnJvbUNoYXJDb2RlKDI1NV5uW2VdLmNoYXJDb2RlQXQoMCkpO3JldHVybiBuLmpvaW4oIiIpfW49bj8iMSI6IjAiO3ZhciBjPVtdO3JldHVybiBjLnB1c2godCksYy5wdXNoKHNpdGVJZCksYy5wdXNoKG4pLGZ1bmN0aW9uKHQpe3ZhciBuPTQwLGU9IiI7cmV0dXJuIHQubGVuZ3RoPG4vMiYmKGU9IiwiK3Iobi8yLXQubGVuZ3RoLTEpKSxvKGkodCtlKSl9KGMuam9pbigiLCIpKX1mdW5jdGlvbiBmKCl7ZnVuY3Rpb24gdCgpe1UmJihRKFIuZFVBTCksc2V0VGltZW91dChzLEUsUi5kVUFMKSl9ZnVuY3Rpb24gbih0LG4pe2kobj9SLnVBUytSLnVGK1IuY1A6Ui51QVMrUi51Ril9d2luZG93LmZ0cl9fZmRhZCh0LG4pfWZ1bmN0aW9uIHModCl7dHJ5e3ZhciBuPXQ9PT1SLnVERj9DOlU7aWYoIW4pcmV0dXJuO2Eobix2b2lkIDAsZnVuY3Rpb24oKXt0cnl7WCgpLGkodCtSLnVTKX1jYXRjaCh0KXt9fSxmdW5jdGlvbihuKXt0cnl7WCgpLEIudGQ9MSpuZXcgRGF0ZS1CLnRzLGkobj90K1IudUYrUi5jUDp0K1IudUYpLHQ9PT1SLnVERiYmZigpfWNhdGNoKHQpe2koUi5lVW9lKX19KX1jYXRjaChuKXtpKHQrUi5lVGx1KX19dmFyIHY9IjIyZzZvdHJ3amVxNnFzdTFmb3J4Z2l1cnF3MXFodzJ2d2R3eHYiLGg9ImZvcnQiLHc9ImVyVG8iLGw9ImtlbiI7d2luZG93LmZ0cl9fY29uZmlnPXttOm1lcmNoYW50Q29uZmlnLHM6IjE3IixzaTpzaXRlSWR9O3ZhciBtPSExLHA9aCt3K2wsZz0xMCxfPXt3cml0ZTpmdW5jdGlvbih0LG4sZSxyKXt2b2lkIDA9PT1yJiYocj0hMCk7dmFyIG8saTtpZihlPyhvPW5ldyBEYXRlLG8uc2V0VGltZShvLmdldFRpbWUoKSsyNCplKjYwKjYwKjFlMyksaT0iOyBleHBpcmVzPSIrby50b0dNVFN0cmluZygpKTppPSIiLCFyKXJldHVybiB2b2lkKGRvY3VtZW50LmNvb2tpZT1lc2NhcGUodCkrIj0iK2VzY2FwZShuKStpKyI7IHBhdGg9LyIpO2Zvcih2YXIgYz0xLGE9ZG9jdW1lbnQuZG9tYWluLnNwbGl0KCIuIiksdT1nLGQ9ITA7ZCYmYS5sZW5ndGg+PWMmJnU+MDspe3ZhciBmPWEuc2xpY2UoLWMpLmpvaW4oIi4iKTtkb2N1bWVudC5jb29raWU9ZXNjYXBlKHQpKyI9Iitlc2NhcGUobikraSsiOyBwYXRoPS87IGRvbWFpbj0iK2Y7dmFyIHM9Xy5yZWFkKHQpO251bGwhPXMmJnM9PW58fChmPSIuIitmLGRvY3VtZW50LmNvb2tpZT1lc2NhcGUodCkrIj0iK2VzY2FwZShuKStpKyI7IHBhdGg9LzsgZG9tYWluPSIrZiksZD0tMT09PWRvY3VtZW50LmNvb2tpZS5pbmRleE9mKHQrIj0iK24pLGMrKyx1LS19fSxyZWFkOmZ1bmN0aW9uKHQpe3ZhciBuPW51bGw7dHJ5e2Zvcih2YXIgZT1lc2NhcGUodCkrIj0iLHI9ZG9jdW1lbnQuY29va2llLnNwbGl0KCI7Iiksbz0zMixpPTA7aTxyLmxlbmd0aDtpKyspe2Zvcih2YXIgYz1yW2ldO2MuY2hhckNvZGVBdCgwKT09PW87KWM9Yy5zdWJzdHJpbmcoMSxjLmxlbmd0aCk7MD09PWMuaW5kZXhPZihlKSYmKG49dW5lc2NhcGUoYy5zdWJzdHJpbmcoZS5sZW5ndGgsYy5sZW5ndGgpKSl9fWZpbmFsbHl7cmV0dXJuIG59fX0seT13aW5kb3cuZnRyX19jb25maWcuczt5Kz0iY2siO3ZhciBUPWZ1bmN0aW9uKHQpe3ZhciBuPSExLGU9bnVsbCxyPWZ1bmN0aW9uKCl7dHJ5e2lmKCFlfHwhbilyZXR1cm47ZS5yZW1vdmUmJiJmdW5jdGlvbiI9PXR5cGVvZiBlLnJlbW92ZT9lLnJlbW92ZSgpOmRvY3VtZW50LmhlYWQucmVtb3ZlQ2hpbGQoZSksbj0hMX1jYXRjaCh0KXt9fTtkb2N1bWVudC5oZWFkJiYoIWZ1bmN0aW9uKCl7ZT1kb2N1bWVudC5jcmVhdGVFbGVtZW50KCJsaW5rIiksZS5zZXRBdHRyaWJ1dGUoInJlbCIsInByZSIrImNvbiIrIm5lY3QiKSxlLnNldEF0dHJpYnV0ZSgiY3JvcyIrInNvcmkiKyJnaW4iLCJhbm9ueW1vdXMiKSxlLm9ubG9hZD1yLGUub25lcnJvcj1yLGUuc2V0QXR0cmlidXRlKCJocmVmIix0KSxkb2N1bWVudC5oZWFkLmFwcGVuZENoaWxkKGUpLG49ITB9KCksc2V0VGltZW91dChyLDNlMykpfSxTPTMseD1uKHZ8fCIyMmc2b3Ryd2plcTZxc3UxZm9yeGdpdXJxdzFxaHcydndkd3h2IiksQT10KCJbMFVodHhodncwTEciLC1TKSxMPXQoIlswRnJ1dWhvZHdscnEwTEciLC1TKSxrPXQoIkxpMFFycWgwUGR3ZmsiLC1TKSxVLHE9ImZncTcxaXJ1d2h1MWZycCIsQz1uKCIoVlEoMSIrcSsiMnZxMihWUSgydmZ1bHN3MW12IiksRD1uKCIoVlEoMSIrcSsiMnZxVjIoVlEoMnZmdWxzdzFtdiIpLEU9MTA7d2luZG93LmZ0cl9fc3RhcnRTY3JpcHRMb2FkPTEqbmV3IERhdGU7dmFyIGI9ZnVuY3Rpb24odCl7dmFyIG49ImZ0Iisicjp0b2siKyJlblIiKyJlYWR5Ijt3aW5kb3cuZnRyX190dCYmY2xlYXJUaW1lb3V0KHdpbmRvdy5mdHJfX3R0KSx3aW5kb3cuZnRyX190dD1zZXRUaW1lb3V0KGZ1bmN0aW9uKCl7dHJ5e2RlbGV0ZSB3aW5kb3cuZnRyX190dCx0Kz0iX3R0Ijt2YXIgZT1kb2N1bWVudC5jcmVhdGVFdmVudCgiRXZlbnQiKTtlLmluaXRFdmVudChuLCExLCExKSxlLmRldGFpbD10LGRvY3VtZW50LmRpc3BhdGNoRXZlbnQoZSl9Y2F0Y2godCl7fX0sMWUzKX0sRj1mdW5jdGlvbih0KXt2YXIgbj1mdW5jdGlvbih0KXtyZXR1cm4gdHx8IiJ9LGU9bih0LmlkKSsiXyIrbih0LnRzKSsiXyIrbih0LnRkKSsiXyIrbih0LmV4KSsiXyIrbih5KTtfLndyaXRlKHAsZSw0MDAsITApLGIoZSksd2luZG93LmZ0cl9fZ3Q9ZX0sST1mdW5jdGlvbigpe3ZhciB0PV8ucmVhZChwKXx8IiIsbj10LnNwbGl0KCJfIiksZT1mdW5jdGlvbih0KXtyZXR1cm4gblt0XXx8dm9pZCAwfTtyZXR1cm57aWQ6ZSgwKSx0czplKDEpLHRkOmUoMiksZXg6ZSgzKSx2cjplKDQpfX0sVj1mdW5jdGlvbigpe2Zvcih2YXIgdD17fSxuPSJmZ3UiLGU9W10scj0wO3I8MjU2O3IrKyllW3JdPShyPDE2PyIwIjoiIikrci50b1N0cmluZygxNik7dmFyIG89ZnVuY3Rpb24odCxuLHIsbyxpKXt2YXIgYz1pPyItIjoiIjtyZXR1cm4gZVsyNTUmdF0rZVt0Pj44JjI1NV0rZVt0Pj4xNiYyNTVdK2VbdD4+MjQmMjU1XStjK2VbMjU1Jm5dK2Vbbj4+OCYyNTVdK2MrZVtuPj4xNiYxNXw2NF0rZVtuPj4yNCYyNTVdK2MrZVs2MyZyfDEyOF0rZVtyPj44JjI1NV0rYytlW3I+PjE2JjI1NV0rZVtyPj4yNCYyNTVdK2VbMjU1Jm9dK2Vbbz4+OCYyNTVdK2Vbbz4+MTYmMjU1XStlW28+PjI0JjI1NV19LGk9ZnVuY3Rpb24oKXtpZih3aW5kb3cuVWludDMyQXJyYXkmJndpbmRvdy5jcnlwdG8mJndpbmRvdy5jcnlwdG8uZ2V0UmFuZG9tVmFsdWVzKXt2YXIgdD1uZXcgd2luZG93LlVpbnQzMkFycmF5KDQpO3JldHVybiB3aW5kb3cuY3J5cHRvLmdldFJhbmRvbVZhbHVlcyh0KSx7ZDA6dFswXSxkMTp0WzFdLGQyOnRbMl0sZDM6dFszXX19cmV0dXJue2QwOjQyOTQ5NjcyOTYqTWF0aC5yYW5kb20oKT4+PjAsZDE6NDI5NDk2NzI5NipNYXRoLnJhbmRvbSgpPj4+MCxkMjo0Mjk0OTY3Mjk2Kk1hdGgucmFuZG9tKCk+Pj4wLGQzOjQyOTQ5NjcyOTYqTWF0aC5yYW5kb20oKT4+PjB9fSxjPWZ1bmN0aW9uKCl7dmFyIHQ9IiIsbj1mdW5jdGlvbih0LG4pe2Zvcih2YXIgZT0iIixyPXQ7cj4wOy0tcillKz1uLmNoYXJBdCgxZTMqTWF0aC5yYW5kb20oKSVuLmxlbmd0aCk7cmV0dXJuIGV9O3JldHVybiB0Kz1uKDIsIjAxMjM0NTY3ODkiKSx0Kz1uKDEsIjEyMzQ1Njc4OSIpLHQrPW4oOCwiMDEyMzQ1Njc4OSIpfTtyZXR1cm4gdC5zYWZlR2VuZXJhdGVOb0Rhc2g9ZnVuY3Rpb24oKXt0cnl7dmFyIHQ9aSgpO3JldHVybiBvKHQuZDAsdC5kMSx0LmQyLHQuZDMsITEpfWNhdGNoKHQpe3RyeXtyZXR1cm4gbitjKCl9Y2F0Y2godCl7fX19LHQuaXNWYWxpZE51bWVyaWNhbFRva2VuPWZ1bmN0aW9uKHQpe3JldHVybiB0JiZ0LnRvU3RyaW5nKCkubGVuZ3RoPD0xMSYmdC5sZW5ndGg+PTkmJnBhcnNlSW50KHQsMTApLnRvU3RyaW5nKCkubGVuZ3RoPD0xMSYmcGFyc2VJbnQodCwxMCkudG9TdHJpbmcoKS5sZW5ndGg+PTl9LHQuaXNWYWxpZFVVSURUb2tlbj1mdW5jdGlvbih0KXtyZXR1cm4gdCYmMzI9PT10LnRvU3RyaW5nKCkubGVuZ3RoJiYvXlthLXowLTldKyQvLnRlc3QodCl9LHQuaXNWYWxpZEZHVVRva2VuPWZ1bmN0aW9uKHQpe3JldHVybiAwPT10LmluZGV4T2YobikmJnQubGVuZ3RoPj0xMn0sdH0oKSxSPXt1REY6IlVERiIsZFVBTDoiZFVBTCIsdUFTOiJVQVMiLG1MZDoiMSIsZVRsdToiMiIsZVVvZToiMyIsdVM6IjQiLHVGOiI5Iix0bW9zOlsiVDUiLCJUMTAiLCJUMTUiLCJUMzAiLCJUNjAiXSx0bW9zU2VjczpbNSwxMCwxNSwzMCw2MF0sYklSOiI0MyIsdUI6InUiLHVCcjoiYiIsY1A6ImMiLG5JTDoiaSIsczoicyJ9O3RyeXt2YXIgQj1JKCk7dHJ5e0IuaWQmJihWLmlzVmFsaWROdW1lcmljYWxUb2tlbihCLmlkKXx8Vi5pc1ZhbGlkVVVJRFRva2VuKEIuaWQpfHxWLmlzVmFsaWRGR1VUb2tlbihCLmlkKSk/d2luZG93LmZ0cl9fbmNkPSExOihCLmlkPVYuc2FmZUdlbmVyYXRlTm9EYXNoKCksd2luZG93LmZ0cl9fbmNkPSEwKSxCLnRzPXdpbmRvdy5mdHJfX3N0YXJ0U2NyaXB0TG9hZCxGKEIpLHdpbmRvdy5mdHJfX3NucF9jd2M9ISFfLnJlYWQocCksd2luZG93LmZ0cl9fc25wX2N3Y3x8KEM9RCk7Zm9yKHZhciBHPSJmb3IiKyJ0ZXIiKyIuY28iKyJtIixNPSJodCIrInRwczovL2MiKyJkbjkuIitHLE89Imh0IisidHBzOi8vIitCLmlkKyItIitzaXRlSWQrIi5jZCIrIm4uIitHLGo9Imh0dHAiKyJzOi8vY2QiKyJuMy4iK0csTj1bTSxPLGpdLEg9MDtIPE4ubGVuZ3RoO0grKylUKE5bSF0pO3ZhciBQPW5ldyBBcnJheShSLnRtb3NTZWNzLmxlbmd0aCksUT1mdW5jdGlvbih0KXtmb3IodmFyIG49MDtuPFIudG1vc1NlY3MubGVuZ3RoO24rKylQW25dPXNldFRpbWVvdXQoaSwxZTMqUi50bW9zU2Vjc1tuXSx0K1IudG1vc1tuXSl9LFg9ZnVuY3Rpb24oKXtmb3IodmFyIHQ9MDt0PFIudG1vc1NlY3MubGVuZ3RoO3QrKyljbGVhclRpbWVvdXQoUFt0XSl9O3dpbmRvdy5mdHJfX2ZkYWQ9ZnVuY3Rpb24obixlKXtpZighbSl7bT0hMDt2YXIgcj17fTtyW2tdPWQod2luZG93LmZ0cl9fY29uZmlnLnMsc2l0ZUlkLHdpbmRvdy5mdHJfX2NvbmZpZy5tLmNzcCksdSh4LGZ1bmN0aW9uKGUpe3RyeXt2YXIgcj1lLmdldEFsbFJlc3BvbnNlSGVhZGVycygpLnRvTG93ZXJDYXNlKCk7aWYoci5pbmRleE9mKEwudG9Mb3dlckNhc2UoKSk+PTApe3ZhciBvPWUuZ2V0UmVzcG9uc2VIZWFkZXIoTCk7d2luZG93LmZ0cl9fYWx0ZDI9dChhdG9iKG8pLC1TLTEpfWlmKHIuaW5kZXhPZihBLnRvTG93ZXJDYXNlKCkpPDApcmV0dXJuO3ZhciBpPWUuZ2V0UmVzcG9uc2VIZWFkZXIoQSksYz10KGF0b2IoaSksLVMtMSk7aWYoYyl7dmFyIGE9Yy5zcGxpdCgiOiIpO2lmKGEmJjI9PT1hLmxlbmd0aCl7Zm9yKHZhciB1PWFbMF0sZD1hWzFdLGY9IiIscz0wLHY9MDtzPDIwOysrcylmKz1zJTM+MCYmdjwxMj9zaXRlSWQuY2hhckF0KHYrKyk6Qi5pZC5jaGFyQXQocyk7dmFyIGg9ZC5zcGxpdCgiLCIpO2lmKGgubGVuZ3RoPjEpe3ZhciB3PWhbMF0sbD1oWzFdO1U9dSsiLyIrdysiLiIrZisiLiIrbH19fW4oKX1jYXRjaCh0KXt9fSxmdW5jdGlvbih0LG4pe2UmJmUodCxuKX0scil9fSxRKFIudURGKSxzZXRUaW1lb3V0KHMsRSxSLnVERil9Y2F0Y2godCl7aShSLm1MZCl9fWNhdGNoKHQpe319KSgpOwo="),document.getElementsByTagName("body")[0].appendChild(e),{getFraudCheckData:Df}}const Mf=Object.freeze(Object.defineProperty({__proto__:null,default:Tf},Symbol.toStringTag,{value:"Module"})),kf=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var mi;(function(e){e.FORTER="forter"})(mi||(mi={}));const Of=Object.freeze(Object.defineProperty({__proto__:null,get FraudProviderType(){return mi}},Symbol.toStringTag,{value:"Module"})),xf=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Rf=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Lf=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Uf(){return{acsRenderingType:{acsInterface:"",acsUiTemplate:""},acsTransID:"",authenticationType:"",authenticationValue:"",challengeCancel:"",dsTransID:"",eci:"",interactionCounter:"",messageCategory:"",messageExtension:[],messageType:"",messageVersion:"",threeDSRequestorTransID:"",threeDSServerTransID:"",transStatus:"Y",transStatusReason:""}}const Vf=Object.freeze(Object.defineProperty({__proto__:null,getEmptySuccessThreeDsPostAuthResponse:Uf},Symbol.toStringTag,{value:"Module"})),Ff=e=>(At("data-v-c82daa22"),e=e(),Nt(),e),jf={class:"mask"},$f={class:"wrapper"},Hf={class:"container"},Kf=Ff(()=>C("iframe",{name:"ThreeDsChallengeIFrame"},null,-1)),Zf=["action"],Wf=["value"],Yf=ve({__name:"ThreeDsChallenge",props:{threeDSServerTransID:null,acsTransID:null,formAction:null},emits:["close","submit"],setup(e,{emit:t}){const s=e,r=B(null),n=JSON.stringify({threeDSServerTransID:s.threeDSServerTransID,acsTransID:s.acsTransID,messageVersion:"2.1.0",messageType:"CReq",challengeWindowSize:"01"}),i=encodeURI(window.btoa(n).replace(/=*$/,""));return at(()=>{var o;(o=r.value)==null||o.submit()}),(o,a)=>(z(),ee("div",jf,[C("div",$f,[C("div",Hf,[Ce(li,{onClick:a[0]||(a[0]=l=>t("close")),id:"3ds-challenge-close"}),Kf,C("form",{action:s.formAction,target:"ThreeDsChallengeIFrame",method:"post",ref_key:"form",ref:r},[C("input",{type:"hidden",name:"creq",value:ce(i)},null,8,Wf)],8,Zf)])])]))}}),Zm="",Wm="",Gf=we(Yf,[["__scopeId","data-v-c82daa22"]]);let gi=null,Ta,zf=null,fe=null,Ma="",ks="",ka="",Xf,ar=null;function We(e,...t){gi&&gi(e,t)}function Bf(){We("init authentication"),fe==null||fe.onPreAuth(qf,Ot),window.addEventListener("message",xa)}function yi(e){We("Do Authentication for transId",ks,e),fe==null||fe.onAuth(ka,Ma,ks,e,"",ep,Ot)}function Oa(){We("Do Post Authentication for transId",ks),fe==null||fe.onPostAuth({threeDSServerTransID:ks},Qf,Ot)}function Jf(e,t){const{destroy:s}=Ke({el:document.body,component:Gf,props:{threeDSServerTransID:ks,acsTransID:t,formAction:e},on:{close:()=>{s(),ar=null,fe==null||fe.onError({error:"Challenge cancelled"})}}});ar=s}function _i(){ar==null||ar(),window.removeEventListener("message",xa)}const Ot=(e,t)=>{if(_i(),e===404){fe==null||fe.onError({error:"This feature is only supported by ActiveServer v1.1.2+"});return}fe==null||fe.onError({error:"3D Secure failed",body:t})},Qf=(e,t)=>{_i();const s=JSON.parse(t);["Y","A"].includes(s.transStatus)?fe==null||fe.onSuccess(s):(We("3D Secure failed",s),fe==null||fe.onError({error:"3D Secure failed"}))},qf=(e,t)=>{const s=JSON.parse(t);if(We("[onInitAuthSuccess], default",s),Ma=s.threeDSRequestorTransID,ks=s.threeDSServerTransID,s.threeDSMonitorURL,ka=s.threeDSAuthURL,s.threeDSMethodURL){tp(s.threeDSServerTransID,s.threeDSMethodURL);return}yi(!1)},ep=(e,t)=>{const s=JSON.parse(t);if(We("[onDoAuthSuccess]",s),!s.transStatus){Ot(e,"No transStatus specified");return}switch(s.transStatus){case"C":if(!s.acsURL){Ot(e,"Invalid Challenge Url");return}Jf(s.acsURL,s.acsTransID);break;case"N":We("[threeDsAuth], 3DS Verification failed, transaction denied"),Ot(400,"3DS Verification failed, transaction denied");break;case"U":We("[threeDsAuth], Unable to perform 3DS verification"),Ot(400,"Unable to perform 3DS verification");break;case"R":We("[threeDsAuth], Unable to perform 3DS verification, rejected at issuer"),Ot(400,"Unable to perform 3DS verification, rejected at issuer");break;default:We("[threeDsAuth], 3DS challenge not required, tranStatus: "+s.transStatus),fe==null||fe.onSuccess({threeDSServerTransID:s.threeDSServerTransID,threeDSRequestorTransID:"",acsRenderingType:s.acsRenderingType,acsTransID:s.acsTransID,authenticationType:s.authenticationType,authenticationValue:s.authenticationValue,challengeCancel:"",dsTransID:s.dsTransID,eci:s.eci,interactionCounter:"",messageCategory:"",messageExtension:s.messageExtension,messageType:s.messageType,messageVersion:s.messageVersion,transStatus:s.transStatus,transStatusReason:s.transStatusReason});break}};function tp(e,t){We("[threeDsMethodInvoke]",{threeDSServerTransID:e,threeDSMethodURL:t});const s={threeDSServerTransID:e,threeDSMethodNotificationURL:Ta+"/3ds/method_invocation"},r=encodeURI(window.btoa(JSON.stringify(s)).replace(/=*$/,""));new si().invoke(t,"POST",{threeDSMethodData:r})}function xa(e){var t,s;if(!(!((t=e==null?void 0:e.data)!=null&&t.status)||((s=e==null?void 0:e.data)==null?void 0:s.status)===rn)){if(e.data.status==="3ds_method_invocation_complete"){We("3Ds Method invocation complete"),e.stopPropagation(),yi(!0);return}if(e.data.status==="3ds_challenge_complete"){We("3Ds Challenge complete",e.data),e.stopPropagation(),_i();const r=JSON.parse(window.atob(e.data.cres));We("cresData",r),["Y","A"].includes(r.transStatus)?Oa():["N","U","R"].includes(r.transStatus)&&(We("Failed 3DS Challenge",e.data),Ot(400,"Failed 3DS Challenge"))}}}function sp(e,t,s,r){return gi=e,zf=t,Xf=s||document.body,Ta=r,{onPreAuth:Bf,onAuth:yi,onPostAuth:Oa,setThreeDsProcessor:n=>{fe=n}}}const rp=Object.freeze(Object.defineProperty({__proto__:null,default:sp},Symbol.toStringTag,{value:"Module"})),np=e=>(At("data-v-82a75009"),e=e(),Nt(),e),ip={class:"mask"},op={class:"wrapper"},ap={class:"container"},lp=np(()=>C("iframe",{name:"ThreeDsChallengeIFrame"},null,-1)),cp=["action"],up=["value"],dp=ve({__name:"ecentric",props:{threeDSServerTransID:null,acsTransID:null,formAction:null,authenticationValue:null},setup(e){const t=e,s=B(null),r=t.authenticationValue;return at(()=>{var n;(n=s.value)==null||n.submit()}),(n,i)=>(z(),ee("div",ip,[C("div",op,[C("div",ap,[Ce(li,{onClick:i[0]||(i[0]=o=>n.emit("close"))}),lp,C("form",{action:t.formAction,target:"ThreeDsChallengeIFrame",method:"post",ref_key:"form",ref:s},[C("input",{type:"hidden",name:"PaReq",value:ce(r)},null,8,up)],8,cp)])])]))}}),Ym="",Gm="",hp=we(dp,[["__scopeId","data-v-82a75009"]]);let bi=null,Ra,fp=null,ye=null,La="",Os="",Ua="",pp,lr=null,Ii="";function Ye(e,...t){bi&&bi(e,t)}function mp(){Ye("init authentication"),ye==null||ye.onPreAuth(_p,xt),window.addEventListener("message",Fa)}function vi(e){Ye("Do Authentication for transId",Os,e),ye==null||ye.onAuth(Ua,La,Os,e,"",bp,xt)}function Va(){Ye("Do Post Authentication for transId",Os,Ii),ye==null||ye.onPostAuth({threeDSServerTransID:Os,authenticationValue:Ii},yp,xt)}function gp(e,t,s){const{destroy:r}=Ke({el:document.body,component:hp,props:{threeDSServerTransID:Os,acsTransID:t,formAction:e,authenticationValue:s},on:{close:()=>{r(),lr=null,ye==null||ye.onError({error:"Challenge cancelled"})}}});lr=r}function Ei(){lr==null||lr(),window.removeEventListener("message",Fa)}const xt=(e,t)=>{Ei(),ye==null||ye.onError({error:"3D Secure failed",body:t})},yp=(e,t)=>{Ei();const s=JSON.parse(t);["Y","A"].includes(s.transStatus)?ye==null||ye.onSuccess(s):(Ye("3D Secure failed",s),ye==null||ye.onError({error:"3D Secure failed"}))},_p=(e,t)=>{const s=JSON.parse(t);if(Ye("[onInitAuthSuccess]",s),La=s.threeDSRequestorTransID,Os=s.threeDSServerTransID,s.threeDSMonitorURL,Ua=s.threeDSAuthURL,s.threeDSMethodURL){Ip(s.threeDSServerTransID,s.threeDSMethodURL);return}vi(!1)},bp=(e,t)=>{const s=JSON.parse(t);if(Ye("[onDoAuthSuccess]",s),!s.transStatus){xt(e,"No transStatus specified");return}switch(s.transStatus){case"C":if(!s.acsURL){xt(e,"Invalid Challenge Url");return}gp(s.acsURL,s.acsTransID,s.authenticationValue);break;case"N":Ye("[threeDsAuth], 3DS Verification failed, transaction denied"),xt(400,"3DS Verification failed, transaction denied");break;case"U":Ye("[threeDsAuth], Unable to perform 3DS verification"),xt(400,"Unable to perform 3DS verification");break;case"R":Ye("[threeDsAuth], Unable to perform 3DS verification, rejected at issuer"),xt(400,"Unable to perform 3DS verification, rejected at issuer");break;default:Ye("[threeDsAuth], 3DS challenge not required, tranStatus: "+s.transStatus),ye==null||ye.onSuccess({threeDSServerTransID:s.threeDSServerTransID,threeDSRequestorTransID:"",acsRenderingType:s.acsRenderingType,acsTransID:s.acsTransID,authenticationType:s.authenticationType,authenticationValue:s.authenticationValue,challengeCancel:"",dsTransID:s.dsTransID,eci:s.eci,interactionCounter:"",messageCategory:"",messageExtension:s.messageExtension,messageType:s.messageType,messageVersion:s.messageVersion,transStatus:s.transStatus,transStatusReason:s.transStatusReason});break}};function Ip(e,t){Ye("[threeDsMethodInvoke]",{threeDSServerTransID:e,threeDSMethodURL:t});const s={threeDSServerTransID:e,threeDSMethodNotificationURL:Ra+"/3ds/method_invocation"},r=encodeURI(window.btoa(JSON.stringify(s)).replace(/=*$/,""));new si().invoke(t,"POST",{threeDSMethodData:r})}function Fa(e){var t,s;if(!(!((t=e==null?void 0:e.data)!=null&&t.status)||((s=e==null?void 0:e.data)==null?void 0:s.status)===rn)){if(e.data.status==="3ds_method_invocation_complete"){Ye("3Ds Method invocation complete"),e.stopPropagation(),vi(!0);return}e.data.status==="3ds_challenge_complete"&&(Ye("3Ds Challenge complete",e.data),e.stopPropagation(),Ei(),Ye("cresData",e.data.cres),e.data.cres?(Ii=e.data.cres,Va()):(Ye("Failed 3DS Challenge",e.data),xt(400,"Failed 3DS Challenge")))}}function vp(e,t,s,r){return bi=e,fp=t,pp=s||document.body,Ra=r,{onPreAuth:mp,onAuth:vi,onPostAuth:Va,setThreeDsProcessor:n=>{ye=n}}}const Ep=Object.freeze(Object.defineProperty({__proto__:null,default:vp},Symbol.toStringTag,{value:"Module"})),Pp={class:"mask"},Cp={class:"wrapper"},Ap=["src"],Np=ve({__name:"GPayments",props:{url:null,width:null,height:null},setup(e){const t=e;function s(){return{width:`${t.width||650}px`,height:`${t.height||400}px`}}return(r,n)=>(z(),ee("div",Pp,[C("div",Cp,[C("div",{class:"container",style:Te([s(),{padding:"0",margin:"0"}])},[C("iframe",{src:t.url,style:Te(s())},null,12,Ap)],4)])]))}}),zm="",Xm="",Sp=we(Np,[["__scopeId","data-v-9b0ef3a8"]]);let Pi=null,wp,Dp=null,Pe=null,ja="",cr="",$a="",Tp,ur=null;function et(e,...t){Pi&&Pi(e,t)}function Mp(){et("init authentication"),window.addEventListener("message",Ha),Pe==null||Pe.onPreAuth(xp,Yt)}function Ci(e,t){et("Do Authentication for transId",cr),Pe==null||Pe.onAuth($a,ja,cr,e,t,Rp,Yt)}function un(){et("Do Post Authentication for transId",cr),Pe==null||Pe.onPostAuth({threeDSServerTransID:cr},Op,Yt)}function kp(e){const{destroy:t}=Ke({el:document.body,component:Sp,props:{url:e,width:390,height:400},on:{close:()=>{t(),ur=null}}});ur=t}function Ai(){ur==null||ur(),window.removeEventListener("message",Ha)}const Yt=(e,t)=>{if(Ai(),e===404){Pe==null||Pe.onError({error:"This feature is only supported by ActiveServer v1.1.2+"});return}Pe==null||Pe.onError({error:"3D Secure failed",body:t})},Op=(e,t)=>{Ai();const s=JSON.parse(t);["Y","A"].includes(s.transStatus)?Pe==null||Pe.onSuccess(s):(et("3D Secure failed",s),Pe==null||Pe.onError({error:"3D Secure failed"}))},xp=(e,t)=>{const s=JSON.parse(t);if(et("[onInitAuthSuccess], gpayments",s),!s.threeDSAuthURL){Yt(e,"No AuthUrl specified");return}if(ja=s.threeDSRequestorTransID,cr=s.threeDSServerTransID,s.threeDSMonitorURL,$a=s.threeDSAuthURL,s.threeDsServerCallbackUrl){Up(s.threeDsServerCallbackUrl);return}Ci(!1,"")},Rp=(e,t)=>{const s=JSON.parse(t);if(et("[onDoAuthSuccess]",s),!s.transStatus){Yt(e,"No transStatus specified");return}switch(s.transStatus){case"C":if(!s.acsURL){Yt(e,"Invalid Challenge Url");return}kp(s.acsURL);break;case"D":if(!s.threeDSMonitorURL){Yt(e,"Invalid Result Mon Url");return}Lp(s.threeDSMonitorURL);break;default:un();break}};let dr=null;function Lp(e){if(dr)return;const t=new It("","",null);dr=setInterval(()=>{t.invoke(e,"GET",{},(s,r)=>{const n=JSON.parse(r);if(!n.event){et("Invalid mon url result",r);return}if(n.event==="AuthResultNotReady"){et("AuthResultNotReady, retry in 2 seconds");return}else n.event==="AuthResultReady"?(et("AuthResultReady",n),un()):et("Invalid mon url result",n)},(s,r)=>{dr&&(clearInterval(dr),dr=null),Yt(s,"Invalid mon url result")})},2e3)}function Ha(e){var t,s;if(console.log("[gpayments]: message received",e.data),!(!((t=e==null?void 0:e.data)!=null&&t.status)||((s=e==null?void 0:e.data)==null?void 0:s.status)===rn)){if(e.data.status==="3ds_method_invocation_complete"){et("3Ds Method invocation complete"),e.stopPropagation(),Ci(!0,e.data.browserInfo);return}if(e.data.status==="3ds_challenge_complete"){e.stopPropagation(),Ai(),et("3Ds Challenge complete",e.data),un();return}}}function Up(e){et("init3DSFrame",e);const t=document.createElement("iframe");t.src=e,t.style.width="1px",t.style.height="1px",t.style.border="0",document.body.appendChild(t)}function Vp(e,t,s,r){return Pi=e,Dp=t,Tp=s||document.body,wp=r,{onPreAuth:Mp,onAuth:Ci,onPostAuth:un,setThreeDsProcessor:n=>{Pe=n}}}const Fp=Object.freeze(Object.defineProperty({__proto__:null,default:Vp},Symbol.toStringTag,{value:"Module"}));return wf});
|
|
157
|
+
`},null,-1))],RE=Oe({__name:"ApplePayIcon",props:{size:null,grayscale:{type:Boolean}},setup(e){const n=`--size: ${e.size}px`;return(r,s)=>(ee(),ae("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 210.2","xml:space":"preserve",style:n},OE))}}),rD="",xE=$e(RE,[["__scopeId","data-v-7d3fe743"]]),$u=Object.prototype.toString;function ju(e){switch($u.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ar(e,Error)}}function Ar(e,t){return $u.call(e)===`[object ${t}]`}function Pa(e){return Ar(e,"ErrorEvent")}function Hu(e){return Ar(e,"DOMError")}function LE(e){return Ar(e,"DOMException")}function dn(e){return Ar(e,"String")}function Aa(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ka(e){return e===null||Aa(e)||typeof e!="object"&&typeof e!="function"}function kr(e){return Ar(e,"Object")}function Fi(e){return typeof Event<"u"&&ar(e,Event)}function UE(e){return typeof Element<"u"&&ar(e,Element)}function FE(e){return Ar(e,"RegExp")}function $i(e){return!!(e&&e.then&&typeof e.then=="function")}function $E(e){return kr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function jE(e){return typeof e=="number"&&e!==e}function ar(e,t){try{return e instanceof t}catch{return!1}}function Vu(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Nr(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Bu(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{Vu(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function HE(e,t,n=!1){return dn(e)?FE(t)?t.test(e):dn(t)?n?e===t:e.includes(t):!1:!1}function Ss(e,t=[],n=!1){return t.some(r=>HE(e,r,n))}function VE(e,t,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!ar(o.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=BE(Na(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function Na(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if(ar(r[s],Error)){Wu(o,a);const l=e(t,r[s]),d=c.length;zu(l,s,d,a),c=Na(e,t,n,r[s],s,[l,...c],l,d)}return Array.isArray(r.errors)&&r.errors.forEach((l,d)=>{if(ar(l,Error)){Wu(o,a);const u=e(t,l),h=c.length;zu(u,`errors[${d}]`,h,a),c=Na(e,t,n,l,s,[u,...c],u,h)}}),c}function Wu(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function zu(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function BE(e,t){return e.map(n=>(n.value&&(n.value=Nr(n.value,t)),n))}function ji(e){return e&&e.Math==Math?e:void 0}const pe=typeof globalThis=="object"&&ji(globalThis)||typeof window=="object"&&ji(window)||typeof self=="object"&&ji(self)||typeof global=="object"&&ji(global)||function(){return this}()||{};function Ma(){return pe}function Ku(e,t,n){const r=n||pe,s=r.__SENTRY__=r.__SENTRY__||{};return s[e]||(s[e]=t())}const Oa=Ma(),WE=80;function Hi(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let l;const d=Array.isArray(t)?t:t.keyAttrs,u=!Array.isArray(t)&&t.maxStringLength||WE;for(;n&&i++<r&&(l=zE(n,d),!(l==="html"||i>1&&o+s.length*c+l.length>=u));)s.push(l),o+=l.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function zE(e,t){const n=e,r=[];let s,i,o,a,c;if(!n||!n.tagName)return"";if(Oa.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const l=t&&t.length?t.filter(u=>n.getAttribute(u)).map(u=>[u,n.getAttribute(u)]):null;if(l&&l.length)l.forEach(u=>{r.push(`[${u[0]}="${u[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&dn(s))for(i=s.split(/\s+/),c=0;c<i.length;c++)r.push(`.${i[c]}`);const d=["aria-label","type","name","title","alt"];for(c=0;c<d.length;c++)o=d[c],a=n.getAttribute(o),a&&r.push(`[${o}="${a}"]`);return r.join("")}function KE(){try{return Oa.document.location.href}catch{return""}}function GE(e){if(!Oa.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const bs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,YE="Sentry Logger ",Ra=["debug","info","warn","error","log","assert","trace"],Vi={};function cr(e){if(!("console"in pe))return e();const t=pe.console,n={},r=Object.keys(Vi);r.forEach(s=>{const i=Vi[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function ZE(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return bs?Ra.forEach(n=>{t[n]=(...r)=>{e&&cr(()=>{pe.console[n](`${YE}[${n}]:`,...r)})}}):Ra.forEach(n=>{t[n]=()=>{}}),t}const K=ZE(),XE=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function JE(e){return e==="http"||e==="https"}function Is(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function qE(e){const t=XE.exec(e);if(!t){cr(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i,o="",a]=t.slice(1);let c="",l=a;const d=l.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),l=d.pop()),l){const u=l.match(/^\d+/);u&&(l=u[0])}return Gu({host:i,pass:s,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function Gu(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function QE(e){if(!bs)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(K.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?JE(r)?t&&isNaN(parseInt(t,10))?(K.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(K.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(K.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function eS(e){const t=typeof e=="string"?qE(e):Gu(e);if(!(!t||!QE(t)))return t}class Kt extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function Xe(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);typeof s=="function"&&Yu(s,r),e[t]=s}function vs(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{bs&&K.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Yu(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,vs(e,"__sentry_original__",t)}catch{}}function xa(e){return e.__sentry_original__}function tS(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Zu(e){if(ju(e))return{message:e.message,name:e.name,stack:e.stack,...Ju(e)};if(Fi(e)){const t={type:e.type,target:Xu(e.target),currentTarget:Xu(e.currentTarget),...Ju(e)};return typeof CustomEvent<"u"&&ar(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Xu(e){try{return UE(e)?Hi(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Ju(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function nS(e,t=40){const n=Object.keys(Zu(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Nr(n[0],t);for(let r=n.length;r>0;r--){const s=n.slice(0,r).join(", ");if(!(s.length>t))return r===n.length?s:Nr(s,t)}return""}function Nt(e){return La(e,new Map)}function La(e,t){if(rS(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const s of Object.keys(e))typeof e[s]<"u"&&(r[s]=La(e[s],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(s=>{r.push(La(s,t))}),r}return e}function rS(e){if(!kr(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const qu=50,Qu=/\(error: (.*)\)/,ed=/captureMessage|captureException/;function td(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{const s=[],i=n.split(`
|
|
158
|
+
`);for(let o=r;o<i.length;o++){const a=i[o];if(a.length>1024)continue;const c=Qu.test(a)?a.replace(Qu,"$1"):a;if(!c.match(/\S*Error: /)){for(const l of t){const d=l(c);if(d){s.push(d);break}}if(s.length>=qu)break}}return iS(s)}}function sS(e){return Array.isArray(e)?td(...e):e}function iS(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),ed.test(t[t.length-1].function||"")&&(t.pop(),ed.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,qu).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}const Ua="<anonymous>";function hn(e){try{return!e||typeof e!="function"?Ua:e.name||Ua}catch{return Ua}}const Bi={},nd={};function lr(e,t){Bi[e]=Bi[e]||[],Bi[e].push(t)}function ur(e,t){nd[e]||(t(),nd[e]=!0)}function Mt(e,t){const n=e&&Bi[e];if(n)for(const r of n)try{r(t)}catch(s){bs&&K.error(`Error while triggering instrumentation handler.
|
|
159
|
+
Type: ${e}
|
|
160
|
+
Name: ${hn(r)}
|
|
161
|
+
Error:`,s)}}function oS(e){const t="console";lr(t,e),ur(t,aS)}function aS(){"console"in pe&&Ra.forEach(function(e){e in pe.console&&Xe(pe.console,e,function(t){return Vi[e]=t,function(...n){Mt("console",{args:n,level:e});const s=Vi[e];s&&s.apply(pe.console,n)}})})}function bt(){const e=pe,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function rd(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function kn(e){const{message:t,event_id:n}=e;if(t)return t;const r=rd(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Fa(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function ws(e,t){const n=rd(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const i={...s&&s.data,...t.data};n.mechanism.data=i}}function sd(e){if(e&&e.__sentry_captured__)return!0;try{vs(e,"__sentry_captured__",!0)}catch{}return!1}function id(e){return Array.isArray(e)?e:[e]}const Mr=pe,cS=1e3;let od,$a,ja;function ad(e){const t="dom";lr(t,e),ur(t,lS)}function lS(){if(!Mr.document)return;const e=Mt.bind(null,"dom"),t=cd(e,!0);Mr.document.addEventListener("click",t,!1),Mr.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=Mr[n]&&Mr[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Xe(r,"addEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,l=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},d=l[i]=l[i]||{refCount:0};if(!d.handler){const u=cd(e);d.handler=u,s.call(this,i,u,a)}d.refCount++}catch{}return s.call(this,i,o,a)}}),Xe(r,"removeEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,l=c.__sentry_instrumentation_handlers__||{},d=l[i];d&&(d.refCount--,d.refCount<=0&&(s.call(this,i,d.handler,a),d.handler=void 0,delete l[i]),Object.keys(l).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,o,a)}}))})}function uS(e){if(e.type!==$a)return!1;try{if(!e.target||e.target._sentryId!==ja)return!1}catch{}return!0}function dS(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function cd(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=hS(n);if(dS(n.type,r))return;vs(n,"_sentryCaptured",!0),r&&!r._sentryId&&vs(r,"_sentryId",bt());const s=n.type==="keypress"?"input":n.type;uS(n)||(e({event:n,name:s,global:t}),$a=n.type,ja=r?r._sentryId:void 0),clearTimeout(od),od=Mr.setTimeout(()=>{ja=void 0,$a=void 0},cS)}}function hS(e){try{return e.target}catch{return null}}const Ha=Ma();function ld(){if(!("fetch"in Ha))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Va(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function fS(){if(typeof EdgeRuntime=="string")return!0;if(!ld())return!1;if(Va(Ha.fetch))return!0;let e=!1;const t=Ha.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Va(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){bs&&K.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function ud(e){const t="fetch";lr(t,e),ur(t,pS)}function pS(){fS()&&Xe(pe,"fetch",function(e){return function(...t){const{method:n,url:r}=mS(t),s={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return Mt("fetch",{...s}),e.apply(pe,t).then(i=>{const o={...s,endTimestamp:Date.now(),response:i};return Mt("fetch",o),i},i=>{const o={...s,endTimestamp:Date.now(),error:i};throw Mt("fetch",o),i})}})}function Ba(e,t){return!!e&&typeof e=="object"&&!!e[t]}function dd(e){return typeof e=="string"?e:e?Ba(e,"url")?e.url:e.toString?e.toString():"":""}function mS(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:dd(n),method:Ba(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:dd(t),method:Ba(t,"method")?String(t.method).toUpperCase():"GET"}}let Wi=null;function gS(e){const t="error";lr(t,e),ur(t,yS)}function yS(){Wi=pe.onerror,pe.onerror=function(e,t,n,r,s){return Mt("error",{column:r,error:s,line:n,msg:e,url:t}),Wi&&!Wi.__SENTRY_LOADER__?Wi.apply(this,arguments):!1},pe.onerror.__SENTRY_INSTRUMENTED__=!0}let zi=null;function _S(e){const t="unhandledrejection";lr(t,e),ur(t,ES)}function ES(){zi=pe.onunhandledrejection,pe.onunhandledrejection=function(e){return Mt("unhandledrejection",e),zi&&!zi.__SENTRY_LOADER__?zi.apply(this,arguments):!0},pe.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ki=Ma();function SS(){const e=Ki.chrome,t=e&&e.app&&e.app.runtime,n="history"in Ki&&!!Ki.history.pushState&&!!Ki.history.replaceState;return!t&&n}const Cs=pe;let Gi;function Wa(e){const t="history";lr(t,e),ur(t,bS)}function bS(){if(!SS())return;const e=Cs.onpopstate;Cs.onpopstate=function(...n){const r=Cs.location.href,s=Gi;if(Gi=r,Mt("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=Gi,o=String(s);Gi=o,Mt("history",{from:i,to:o})}return n.apply(this,r)}}Xe(Cs.history,"pushState",t),Xe(Cs.history,"replaceState",t)}const IS=pe,dr="__sentry_xhr_v3__";function hd(e){const t="xhr";lr(t,e),ur(t,vS)}function vS(){if(!IS.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;Xe(e,"open",function(t){return function(...n){const r=Date.now(),s=dn(n[0])?n[0].toUpperCase():void 0,i=wS(n[1]);if(!s||!i)return t.apply(this,n);this[dr]={method:s,url:i,request_headers:{}},s==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const a=this[dr];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}const c={args:[s,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};Mt("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Xe(this,"onreadystatechange",function(a){return function(...c){return o(),a.apply(this,c)}}):this.addEventListener("readystatechange",o),Xe(this,"setRequestHeader",function(a){return function(...c){const[l,d]=c,u=this[dr];return u&&dn(l)&&dn(d)&&(u.request_headers[l.toLowerCase()]=d),a.apply(this,c)}}),t.apply(this,n)}}),Xe(e,"send",function(t){return function(...n){const r=this[dr];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return Mt("xhr",s),t.apply(this,n)}})}function wS(e){if(dn(e))return e;try{return e.toString()}catch{}}function CS(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function TS(){return"npm"}function DS(){return!CS()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function fd(){return typeof window<"u"&&(!DS()||PS())}function PS(){return pe.process!==void 0&&pe.process.type==="renderer"}function AS(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let i=0;i<t.length;i++)if(t[i]===s)return!0;return t.push(s),!1}function r(s){if(e)t.delete(s);else for(let i=0;i<t.length;i++)if(t[i]===s){t.splice(i,1);break}}return[n,r]}function Gt(e,t=100,n=1/0){try{return za("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function pd(e,t=3,n=100*1024){const r=Gt(e,t);return OS(r)>n?pd(e,t-1,n):r}function za(e,t,n=1/0,r=1/0,s=AS()){const[i,o]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!jE(t))return t;const a=kS(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const f=l.toJSON();return za("",f,c-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let u=0;const h=Zu(t);for(const f in h){if(!Object.prototype.hasOwnProperty.call(h,f))continue;if(u>=r){d[f]="[MaxProperties ~]";break}const p=h[f];d[f]=za(f,p,c-1,r,s),u++}return o(t),d}function kS(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Vu(t))return"[VueViewModel]";if($E(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${hn(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=NS(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function NS(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function MS(e){return~-encodeURI(e).split(/%..|./).length}function OS(e){return MS(JSON.stringify(e))}var fn;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(fn||(fn={}));function Or(e){return new It(t=>{t(e)})}function Ka(e){return new It((t,n)=>{n(e)})}class It{constructor(t){It.prototype.__init.call(this),It.prototype.__init2.call(this),It.prototype.__init3.call(this),It.prototype.__init4.call(this),this._state=fn.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new It((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new It((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}__init(){this._resolve=t=>{this._setResult(fn.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(fn.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===fn.PENDING){if($i(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===fn.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===fn.RESOLVED&&n[1](this._value),this._state===fn.REJECTED&&n[2](this._value),n[0]=!0)})}}}function RS(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]}function s(o){if(!n())return Ka(new Kt("Not adding Promise because buffer limit was reached."));const a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new It((a,c)=>{let l=t.length;if(!l)return a(!0);const d=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(u=>{Or(u).then(()=>{--l||(clearTimeout(d),a(!0))},c)})})}return{$:t,add:s,drain:i}}function Ga(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const xS=["fatal","error","warning","log","info","debug"];function LS(e){return e==="warn"?"warning":xS.includes(e)?e:"log"}const md=1e3;function Ts(){return Date.now()/md}function US(){const{performance:e}=pe;if(!e||!e.now)return Ts;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/md}const gd=US(),FS=(()=>{const{performance:e}=pe;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=s<t,o=e.timing&&e.timing.navigationStart,c=typeof o=="number"?Math.abs(o+n-r):t,l=c<t;return i||l?s<=c?e.timeOrigin:o:r})();function hr(e,t=[]){return[e,t]}function $S(e,t){const[n,r]=e;return[n,[...r,t]]}function yd(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function Ya(e,t){return(t||new TextEncoder).encode(e)}function jS(e,t){const[n,r]=e;let s=JSON.stringify(n);function i(o){typeof s=="string"?s=typeof o=="string"?s+o:[Ya(s,t),o]:s.push(typeof o=="string"?Ya(o,t):o)}for(const o of r){const[a,c]=o;if(i(`
|
|
162
|
+
${JSON.stringify(a)}
|
|
163
|
+
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let l;try{l=JSON.stringify(c)}catch{l=JSON.stringify(Gt(c))}i(l)}}return typeof s=="string"?s:HS(s)}function HS(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function VS(e,t){const n=typeof e.data=="string"?Ya(e.data,t):e.data;return[Nt({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const BS={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",statsd:"unknown"};function _d(e){return BS[e]}function Za(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ed(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Is(r)},...s&&{trace:Nt({...s})}}}function WS(e,t,n){const r=[{type:"client_report"},{timestamp:n||Ts(),discarded_events:e}];return hr(t?{dsn:t}:{},[r])}const zS=60*1e3;function KS(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?zS:r-t}function GS(e,t){return e[t]||e.all||0}function Sd(e,t,n=Date.now()){return GS(e,t)>n}function bd(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,l]=a.split(":",2),d=parseInt(c,10),u=(isNaN(d)?60:d)*1e3;if(!l)s.all=r+u;else for(const h of l.split(";"))s[h]=r+u}else o?s.all=r+KS(o,r):t===429&&(s.all=r+60*1e3);return s}function YS(e,t){return e??t()}function Xa(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}const De=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Yi="production";function Ja(){return Ku("globalEventProcessors",()=>[])}function ZS(e){Ja().push(e)}function Zi(e,t,n,r=0){return new It((s,i)=>{const o=e[r];if(t===null||typeof o!="function")s(t);else{const a=o({...t},n);De&&o.id&&a===null&&K.log(`Event processor "${o.id}" dropped event`),$i(a)?a.then(c=>Zi(e,c,n,r+1).then(s)).then(null,i):Zi(e,a,n,r+1).then(s).then(null,i)}})}function Id(e){const t=gd(),n={sid:bt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>XS(n)};return e&&fr(n,e),n}function fr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||gd(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:bt()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function vd(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),fr(e,n)}function XS(e){return Nt({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const JS=1;function qS(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,tags:a,origin:c}=pr(e);return Nt({data:r,op:s,parent_span_id:i,span_id:t,status:o,tags:a,trace_id:n,origin:c})}function pr(e){return QS(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function QS(e){return typeof e.getSpanJSON=="function"}function e0(e){const{traceFlags:t}=e.spanContext();return!!(t&JS)}function wd(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||bt(),timestamp:t.timestamp||Ts()},l=n.integrations||e.integrations.map(S=>S.name);t0(c,e),s0(c,l),t.type===void 0&&n0(c,e.stackParser);const d=o0(r,n.captureContext);n.mechanism&&ws(c,n.mechanism);const u=s&&s.getEventProcessors?s.getEventProcessors():[],h=S0().getScopeData();if(i){const S=i.getScopeData();Rd(h,S)}if(d){const S=d.getScopeData();Rd(h,S)}const f=[...n.attachments||[],...h.attachments];f.length&&(n.attachments=f),Od(c,h);const p=[...u,...Ja(),...h.eventProcessors];return Zi(p,c,n).then(S=>(S&&r0(S),typeof o=="number"&&o>0?i0(S,o,a):S))}function t0(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:Yi),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=Nr(e.message,i));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=Nr(o.value,i));const a=e.request;a&&a.url&&(a.url=Nr(a.url,i))}const Cd=new WeakMap;function n0(e,t){const n=pe._sentryDebugIds;if(!n)return;let r;const s=Cd.get(t);s?r=s:(r=new Map,Cd.set(t,r));const i=Object.keys(n).reduce((o,a)=>{let c;const l=r.get(a);l?c=l:(c=t(a),r.set(a,c));for(let d=c.length-1;d>=0;d--){const u=c[d];if(u.filename){o[u.filename]=n[a];break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function r0(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function s0(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function i0(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:Gt(s.data,t,n)}}))},...e.user&&{user:Gt(e.user,t,n)},...e.contexts&&{contexts:Gt(e.contexts,t,n)},...e.extra&&{extra:Gt(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Gt(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>{const i=pr(s).data;return i&&(s.data=Gt(i,t,n)),s})),r}function o0(e,t){if(!t)return e;const n=e?e.clone():new Yt;return n.update(t),n}function a0(e){if(e)return c0(e)?{captureContext:e}:u0(e)?{captureContext:e}:e}function c0(e){return e instanceof Yt||typeof e=="function"}const l0=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function u0(e){return Object.keys(e).some(t=>l0.includes(t))}function Xi(e,t){return Zt().captureException(e,a0(t))}function Td(e,t){return Zt().captureEvent(e,t)}function Nn(e,t){Zt().addBreadcrumb(e,t)}function d0(e,t){Zt().setContext(e,t)}function h0(...e){const t=Zt();if(e.length===2){const[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function Me(){return Zt().getClient()}function Mn(){return Zt().getScope()}function Dd(e){const t=Me(),n=Ps(),r=Mn(),{release:s,environment:i=Yi}=t&&t.getOptions()||{},{userAgent:o}=pe.navigator||{},a=Id({release:s,environment:i,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status==="ok"&&fr(c,{status:"exited"}),Pd(),n.setSession(a),r.setSession(a),a}function Pd(){const e=Ps(),t=Mn(),n=t.getSession()||e.getSession();n&&vd(n),Ad(),e.setSession(),t.setSession()}function Ad(){const e=Ps(),t=Mn(),n=Me(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function kd(e=!1){if(e){Pd();return}Ad()}function Nd(e){return e.transaction}function Md(e,t,n){const r=t.getOptions(),{publicKey:s}=t.getDsn()||{},{segment:i}=n&&n.getUser()||{},o=Nt({environment:r.environment||Yi,release:r.release,user_segment:i,public_key:s,trace_id:e});return t.emit&&t.emit("createDsc",o),o}function f0(e){const t=Me();if(!t)return{};const n=Md(pr(e).trace_id||"",t,Mn()),r=Nd(e);if(!r)return n;const s=r&&r._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:i,source:o}=r.metadata;i!=null&&(n.sample_rate=`${i}`);const a=pr(r);return o&&o!=="url"&&(n.transaction=a.description),n.sampled=String(e0(r)),t.emit&&t.emit("createDsc",n),n}function Od(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;p0(e,t),r&&y0(e,r),_0(e,n),m0(e,s),g0(e,i)}function Rd(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:d,attachments:u,propagationContext:h,transactionName:f,span:p}=t;Ds(e,"extra",n),Ds(e,"tags",r),Ds(e,"user",s),Ds(e,"contexts",i),Ds(e,"sdkProcessingMetadata",a),o&&(e.level=o),f&&(e.transactionName=f),p&&(e.span=p),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),u.length&&(e.attachments=[...e.attachments,...u]),e.propagationContext={...e.propagationContext,...h}}function Ds(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function p0(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t,c=Nt(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=Nt(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const d=Nt(s);d&&Object.keys(d).length&&(e.user={...d,...e.user});const u=Nt(i);u&&Object.keys(u).length&&(e.contexts={...u,...e.contexts}),o&&(e.level=o),a&&(e.transaction=a)}function m0(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function g0(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function y0(e,t){e.contexts={trace:qS(t),...e.contexts};const n=Nd(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:f0(t),...e.sdkProcessingMetadata};const r=pr(n).description;r&&(e.tags={transaction:r,...e.tags})}}function _0(e,t){e.fingerprint=e.fingerprint?id(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const E0=100;let qa;class Yt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=xd()}static clone(t){return t?t.clone():new Yt}clone(){const t=new Yt;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&fr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){const n=t(this);return n instanceof Yt?n:this}return t instanceof Yt?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession),t._propagationContext&&(this._propagationContext=t._propagationContext)):kr(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=xd(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:E0;if(r<=0)return this;const s={timestamp:Ts(),...t},i=this._breadcrumbs;return i.push(s),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:s,_extra:i,_user:o,_level:a,_fingerprint:c,_eventProcessors:l,_propagationContext:d,_sdkProcessingMetadata:u,_transactionName:h,_span:f}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:s,extra:i,user:o,level:a,fingerprint:c||[],eventProcessors:l,propagationContext:d,sdkProcessingMetadata:u,transactionName:h,span:f}}applyToEvent(t,n={},r=[]){Od(t,this.getScopeData());const s=[...r,...Ja(),...this._eventProcessors];return Zi(s,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:bt();if(!this._client)return K.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r&&r.event_id?r.event_id:bt();if(!this._client)return K.warn("No client configured on scope - will not capture message!"),s;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},this),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:bt();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(K.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function S0(){return qa||(qa=new Yt),qa}function xd(){return{traceId:bt(),spanId:bt().substring(16)}}const Qa="7.100.1",Ld=parseFloat(Qa),b0=100;class Ud{constructor(t,n,r,s=Ld){this._version=s;let i;n?i=n:(i=new Yt,i.setClient(t));let o;r?o=r:(o=new Yt,o.setClient(t)),this._stack=[{scope:i}],t&&this.bindClient(t),this._isolationScope=o}isOlderThan(t){return this._version<t}bindClient(t){const n=this.getStackTop();n.client=t,n.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const n=this.pushScope();let r;try{r=t(n)}catch(s){throw this.popScope(),s}return $i(r)?r.then(s=>(this.popScope(),s),s=>{throw this.popScope(),s}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:bt(),s=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:s,...n,event_id:r}),r}captureMessage(t,n,r){const s=this._lastEventId=r&&r.event_id?r.event_id:bt(),i=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s}),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:bt();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){const{scope:r,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=b0}=s.getOptions&&s.getOptions()||{};if(o<=0)return;const c={timestamp:Ts(),...t},l=i?cr(()=>i(c,n)):c;l!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",l,n),r.addBreadcrumb(l,o))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){const{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){const n=Fd(this);try{t(this)}finally{Fd(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return De&&K.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){const r=this._callExtensionMethod("startTransaction",t,n);return De&&!r&&(this.getClient()?K.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
164
|
+
Sentry.addTracingExtensions();
|
|
165
|
+
Sentry.init({...});
|
|
166
|
+
`):K.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&vd(r),this._sendSessionUpdate(),n.setSession()}startSession(t){const{scope:n,client:r}=this.getStackTop(),{release:s,environment:i=Yi}=r&&r.getOptions()||{},{userAgent:o}=pe.navigator||{},a=Id({release:s,environment:i,user:n.getUser(),...o&&{userAgent:o},...t}),c=n.getSession&&n.getSession();return c&&c.status==="ok"&&fr(c,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(t,...n){const s=Ji().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[t]=="function")return s.extensions[t].apply(this,n);De&&K.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Ji(){return pe.__SENTRY__=pe.__SENTRY__||{extensions:{},hub:void 0},pe}function Fd(e){const t=Ji(),n=ec(t);return $d(t,e),n}function Zt(){const e=Ji();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return I0(e)}function Ps(){return Zt().getIsolationScope()}function I0(e=Ji()){return(!v0(e)||ec(e).isOlderThan(Ld))&&$d(e,new Ud),ec(e)}function v0(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function ec(e){return Ku("hub",()=>new Ud,e)}function $d(e,t){if(!e)return!1;const n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}const w0="sentry.source";function C0(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function T0(e,t,n,r){const s=Za(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:Is(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return hr(i,[o])}function D0(e,t,n,r){const s=Za(n),i=e.type&&e.type!=="replay_event"?e.type:"event";C0(e,n&&n.sdk);const o=Ed(e,s,r,t);return delete e.sdkProcessingMetadata,hr(o,[[{type:i},e]])}const P0="7";function A0(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function k0(e){return`${A0(e)}${e.projectId}/envelope/`}function N0(e,t){return tS({sentry_key:e.publicKey,sentry_version:P0,...t&&{sentry_client:`${t.name}/${t.version}`}})}function M0(e,t={}){const n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${k0(e)}?${N0(e,r)}`}const jd=[];function O0(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function R0(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=id(n(t)):r=t;const s=O0(r),i=L0(s,o=>o.name==="Debug");if(i!==-1){const[o]=s.splice(i,1);s.push(o)}return s}function x0(e,t){const n={};return t.forEach(r=>{r&&Vd(e,r,n)}),n}function Hd(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Vd(e,t,n){if(n[t.name]){De&&K.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,jd.indexOf(t.name)===-1&&(t.setupOnce(ZS,Zt),jd.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}De&&K.log(`Integration installed: ${t.name}`)}function L0(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function On(e,t){return Object.assign(function(...r){return t(...r)},{id:e})}function sD(e){return e}function U0(e){let t="";for(const n of e){const r=Object.entries(n.tags),s=r.length>0?`|#${r.map(([i,o])=>`${i}:${o}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${s}|T${n.timestamp}
|
|
167
|
+
`}return t}function F0(e,t,n,r){const s={sent_at:new Date().toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(s.dsn=Is(t));const i=$0(e);return hr(s,[i])}function $0(e){const t=U0(e);return[{type:"statsd",length:t.length},t]}const Bd="Not capturing exception because it's already been captured.";class j0{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=eS(t.dsn):De&&K.warn("No DSN provided, client will not send events."),this._dsn){const n=M0(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if(sd(t)){De&&K.log(Bd);return}let s=n&&n.event_id;return this._process(this.eventFromException(t,n).then(i=>this._captureEvent(i,n,r)).then(i=>{s=i})),s}captureMessage(t,n,r,s){let i=r&&r.event_id;const o=Aa(t)?t:String(t),a=ka(t)?this.eventFromMessage(o,n,r):this.eventFromException(t,r);return this._process(a.then(c=>this._captureEvent(c,r,s)).then(c=>{i=c})),i}captureEvent(t,n,r){if(n&&n.originalException&&sd(n.originalException)){De&&K.log(Bd);return}let s=n&&n.event_id;const o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,n,o||r).then(a=>{s=a})),s}captureSession(t){typeof t.release!="string"?De&&K.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),fr(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):Or(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return De&&K.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const n=this._integrations[t.name];Vd(this,t,this._integrations),n||Hd(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=D0(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=$S(r,VS(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=T0(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=`${t}:${n}`;De&&K.log(`Adding outcome: "${s}"`),this._outcomes[s]=this._outcomes[s]+1||1}}captureAggregateMetrics(t){De&&K.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const n=F0(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=x0(this,t),Hd(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let r=!1,s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const c of i){const l=c.mechanism;if(l&&l.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(fr(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new It(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s=Ps()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),wd(i,t,n,r,this,s).then(a=>{if(a===null)return a;const c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:d,spanId:u,parentSpanId:h,dsc:f}=c;a.contexts={trace:{trace_id:d,span_id:u,parent_span_id:h},...a.contexts};const p=f||Md(d,this,r);a.sdkProcessingMetadata={dynamicSamplingContext:p,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(De){const i=s;i.logLevel==="log"?K.log(i.message):K.warn(i)}})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:i}=s,o=zd(t),a=Wd(t),c=t.type||"error",l=`before send for type \`${c}\``;if(a&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),Ka(new Kt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const d=c==="replay_event"?"replay":c,h=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,h).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",d,t),new Kt("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return f;const _=V0(s,f,n);return H0(_,l)}).then(f=>{if(f===null)throw this.recordDroppedEvent("before_send",d,t),new Kt(`${l} returned \`null\`, will not send event.`,"log");const p=r&&r.getSession();!o&&p&&this._updateSessionFromEvent(p,f);const _=f.transaction_info;if(o&&_&&f.transaction!==t.transaction){const S="custom";f.transaction_info={..._,source:S}}return this.sendEvent(f,n),f}).then(null,f=>{throw f instanceof Kt?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new Kt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
168
|
+
Reason: ${f}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{De&&K.error("Error while sending event:",n)});De&&K.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[r,s]=n.split(":");return{reason:r,category:s,quantity:t[n]}})}}function H0(e,t){const n=`${t} must return \`null\` or a valid event.`;if($i(e))return e.then(r=>{if(!kr(r)&&r!==null)throw new Kt(n);return r},r=>{throw new Kt(`${t} rejected with ${r}`)});if(!kr(e)&&e!==null)throw new Kt(n);return e}function V0(e,t,n){const{beforeSend:r,beforeSendTransaction:s}=e;return Wd(t)&&r?r(t,n):zd(t)&&s?s(t,n):t}function Wd(e){return e.type===void 0}function zd(e){return e.type==="transaction"}function B0(e){const t=Me();!t||!t.addEventProcessor||t.addEventProcessor(e)}function W0(e,t){t.debug===!0&&(De?K.enable():cr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Mn().update(t.initialScope);const r=new e(t);z0(r),K0(r)}function z0(e){const n=Zt().getStackTop();n.client=e,n.scope.setClient(e)}function K0(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const G0=30;function Kd(e,t,n=RS(e.bufferSize||G0)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(yd(o,(u,h)=>{const f=_d(h);if(Sd(r,f)){const p=Gd(u,h);e.recordDroppedEvent("ratelimit_backoff",f,p)}else a.push(u)}),a.length===0)return Or();const c=hr(o[0],a),l=u=>{yd(c,(h,f)=>{const p=Gd(h,f);e.recordDroppedEvent(u,_d(f),p)})},d=()=>t({body:jS(c,e.textEncoder)}).then(u=>(u.statusCode!==void 0&&(u.statusCode<200||u.statusCode>=300)&&De&&K.warn(`Sentry responded with status code ${u.statusCode} to sent event.`),r=bd(r,u),u),u=>{throw l("network_error"),u});return n.add(d).then(u=>u,u=>{if(u instanceof Kt)return De&&K.error("Skipped sending event because buffer is full."),l("queue_overflow"),Or();throw u})}return i.__sentry__baseTransport__=!0,{send:i,flush:s}}function Gd(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Y0(e,t){const n=t&&J0(t)?t.getClient():t,r=n&&n.getDsn(),s=n&&n.getOptions().tunnel;return X0(e,r)||Z0(e,s)}function Z0(e,t){return t?Yd(e)===Yd(t):!1}function X0(e,t){return t?e.includes(t.host):!1}function Yd(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function J0(e){return e.getClient!==void 0}function q0(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Qa})),version:Qa}),e._metadata=s}const Q0=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],eb=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],Zd="InboundFilters",Xd=(e={})=>({name:Zd,setupOnce(){},processEvent(t,n,r){const s=r.getOptions(),i=tb(e,s);return nb(t,i)?null:t}});On(Zd,Xd);function tb(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Q0],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:eb],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function nb(e,t){return t.ignoreInternal&&cb(e)?(De&&K.warn(`Event dropped due to being internal Sentry Error.
|
|
169
|
+
Event: ${kn(e)}`),!0):rb(e,t.ignoreErrors)?(De&&K.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
170
|
+
Event: ${kn(e)}`),!0):sb(e,t.ignoreTransactions)?(De&&K.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
171
|
+
Event: ${kn(e)}`),!0):ib(e,t.denyUrls)?(De&&K.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
172
|
+
Event: ${kn(e)}.
|
|
173
|
+
Url: ${qi(e)}`),!0):ob(e,t.allowUrls)?!1:(De&&K.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
174
|
+
Event: ${kn(e)}.
|
|
175
|
+
Url: ${qi(e)}`),!0)}function rb(e,t){return e.type||!t||!t.length?!1:ab(e).some(n=>Ss(n,t))}function sb(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Ss(n,t):!1}function ib(e,t){if(!t||!t.length)return!1;const n=qi(e);return n?Ss(n,t):!1}function ob(e,t){if(!t||!t.length)return!0;const n=qi(e);return n?Ss(n,t):!0}function ab(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),De&&t.length===0&&K.error(`Could not extract message for event ${kn(e)}`),t}function cb(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function lb(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function qi(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?lb(t):null}catch{return De&&K.error(`Cannot extract url for event ${kn(e)}`),null}}let Jd;const qd="FunctionToString",Qd=new WeakMap,eh=()=>({name:qd,setupOnce(){Jd=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=xa(this),n=Qd.has(Me())&&t!==void 0?t:this;return Jd.apply(n,e)}}catch{}},setup(e){Qd.set(e,!0)}});On(qd,eh);const ub=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,pn=pe,db=(e,t,n)=>{let r,s;return i=>{t.value>=0&&(i||n)&&(s=t.value-(r||0),(s||r===void 0)&&(r=t.value,t.delta=s,e(t)))}},hb=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,fb=()=>{const e=pn.performance.timing,t=pn.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(const r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},th=()=>pn.__WEB_VITALS_POLYFILL__?pn.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||fb()):pn.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],nh=()=>{const e=th();return e&&e.activationStart||0},pb=(e,t)=>{const n=th();let r="navigate";return n&&(pn.document.prerendering||nh()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:hb(),navigationType:r}},rh=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{t(s.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},sh=(e,t)=>{const n=r=>{(r.type==="pagehide"||pn.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};let Qi=-1;const mb=()=>pn.document.visibilityState==="hidden"&&!pn.document.prerendering?0:1/0,gb=()=>{sh(({timeStamp:e})=>{Qi=e},!0)},yb=()=>(Qi<0&&(Qi=mb(),gb()),{get firstHiddenTime(){return Qi}}),ih={},_b=e=>{const t=yb(),n=pb("LCP");let r;const s=o=>{const a=o[o.length-1];if(a){const c=Math.max(a.startTime-nh(),0);c<t.firstHiddenTime&&(n.value=c,n.entries=[a],r())}},i=rh("largest-contentful-paint",s);if(i){r=db(e,n);const o=()=>{ih[n.id]||(s(i.takeRecords()),i.disconnect(),ih[n.id]=!0,r(!0))};return["keydown","click"].forEach(a=>{addEventListener(a,o,{once:!0,capture:!0})}),sh(o,!0),o}},As={},eo={};let oh;function Eb(e,t=!1){return Ib("lcp",e,bb,oh,t)}function Sb(e,t){return ch(e,t),eo[e]||(vb(e),eo[e]=!0),lh(e,t)}function ah(e,t){const n=As[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(s){ub&&K.error(`Error while triggering instrumentation handler.
|
|
176
|
+
Type: ${e}
|
|
177
|
+
Name: ${hn(r)}
|
|
178
|
+
Error:`,s)}}function bb(){return _b(e=>{ah("lcp",{metric:e}),oh=e})}function Ib(e,t,n,r,s=!1){ch(e,t);let i;return eo[e]||(i=n(),eo[e]=!0),r&&t({metric:r}),lh(e,t,s?i:void 0)}function vb(e){const t={};e==="event"&&(t.durationThreshold=0),rh(e,n=>{ah(e,{entries:n})},t)}function ch(e,t){As[e]=As[e]||[],As[e].push(t)}function lh(e,t,n){return()=>{n&&n();const r=As[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}const we=pe;let tc=0;function uh(){return tc>0}function wb(){tc++,setTimeout(()=>{tc--})}function Rr(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return s;if(xa(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const i=s.map(o=>Rr(o,t));return e.apply(this,i)}catch(i){throw wb(),h0(o=>{o.addEventProcessor(a=>(t.mechanism&&(Fa(a,void 0,void 0),ws(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),Xi(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Yu(r,e),vs(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const mn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function dh(e,t){const n=rc(e,t),r={type:t&&t.name,value:Pb(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Cb(e,t,n,r){const s=Me(),i=s&&s.getOptions().normalizeDepth,o={exception:{values:[{type:Fi(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Nb(t,{isUnhandledRejection:r})}]},extra:{__serialized__:pd(t,i)}};if(n){const a=rc(e,n);a.length&&(o.exception.values[0].stacktrace={frames:a})}return o}function nc(e,t){return{exception:{values:[dh(e,t)]}}}function rc(e,t){const n=t.stacktrace||t.stack||"",r=Db(t);try{return e(n,r)}catch{}return[]}const Tb=/Minified React error #\d+;/i;function Db(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(Tb.test(e.message))return 1}return 0}function Pb(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Ab(e,t,n,r){const s=n&&n.syntheticException||void 0,i=sc(e,t,s,r);return ws(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Or(i)}function kb(e,t,n="info",r,s){const i=r&&r.syntheticException||void 0,o=ic(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Or(o)}function sc(e,t,n,r,s){let i;if(Pa(t)&&t.error)return nc(e,t.error);if(Hu(t)||LE(t)){const o=t;if("stack"in t)i=nc(e,t);else{const a=o.name||(Hu(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;i=ic(e,c,n,r),Fa(i,c)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return ju(t)?nc(e,t):kr(t)||Fi(t)?(i=Cb(e,t,n,s),ws(i,{synthetic:!0}),i):(i=ic(e,t,n,r),Fa(i,`${t}`,void 0),ws(i,{synthetic:!0}),i)}function ic(e,t,n,r){const s={};if(r&&n){const i=rc(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(Aa(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function Nb(e,{isUnhandledRejection:t}){const n=nS(e),r=t?"promise rejection":"exception";return Pa(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Fi(e)?`Event \`${Mb(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Mb(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Ob(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Is(r)}},i=Rb(e);return hr(s,[i])}function Rb(e){return[{type:"user_report"},e]}class xb extends j0{constructor(t){const n=we.SENTRY_SDK_SOURCE||TS();q0(t,"browser",["browser"],n),super(t),t.sendClientReports&&we.document&&we.document.addEventListener("visibilitychange",()=>{we.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Ab(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return kb(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){mn&&K.warn("SDK not enabled, will not capture user feedback.");return}const n=Ob(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){mn&&K.log("No outcomes to send");return}if(!this._dsn){mn&&K.log("No dsn provided, will not send outcomes");return}mn&&K.log("Sending outcomes:",t);const n=WS(t,this._options.tunnel&&Is(this._dsn));this._sendEnvelope(n)}}let ks;function Lb(){if(ks)return ks;if(Va(we.fetch))return ks=we.fetch.bind(we);const e=we.document;let t=we.fetch;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){mn&&K.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return ks=t.bind(we)}function Ub(){ks=void 0}function Fb(e,t=Lb()){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then(c=>(n-=o,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Ub(),n-=o,r--,Ka(c)}}return Kd(e,s)}const $b=4;function jb(e){function t(n){return new It((r,s)=>{const i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{i.readyState===$b&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const o in e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&i.setRequestHeader(o,e.headers[o]);i.send(n.body)})}return Kd(e,t)}const to="?",Hb=30,Vb=40,Bb=50;function oc(e,t,n,r){const s={filename:e,function:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Wb=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zb=/\((\S*)(?::(\d+))(?::(\d+))\)/,Kb=[Hb,e=>{const t=Wb.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const i=zb.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}const[r,s]=hh(t[1]||to,t[2]);return oc(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],Gb=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Yb=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Zb=[Bb,e=>{const t=Gb.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=Yb.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||to;return[s,r]=hh(s,r),oc(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],Xb=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Jb=td(...[Kb,Zb,[Vb,e=>{const t=Xb.exec(e);return t?oc(t[2],t[1]||to,+t[3],t[4]?+t[4]:void 0):void 0}]]),hh=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:to,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},no=1024,fh="Breadcrumbs",ph=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:fh,setupOnce(){},setup(n){t.console&&oS(eI(n)),t.dom&&ad(Qb(n,t.dom)),t.xhr&&hd(tI(n)),t.fetch&&ud(nI(n)),t.history&&Wa(rI(n)),t.sentry&&n.on&&n.on("beforeSendEvent",qb(n))}}};On(fh,ph);function qb(e){return function(n){Me()===e&&Nn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:kn(n)},{event:n})}}function Qb(e,t){return function(r){if(Me()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>no&&(mn&&K.warn(`\`dom.maxStringLength\` cannot exceed ${no}, but a value of ${a} was configured. Sentry will use ${no} instead.`),a=no),typeof o=="string"&&(o=[o]);try{const l=r.event,d=sI(l)?l.target:l;s=Hi(d,{keyAttrs:o,maxStringLength:a}),i=GE(d)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),Nn(c,{event:r.event,name:r.name,global:r.global})}}function eI(e){return function(n){if(Me()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:LS(n.level),message:Bu(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Bu(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Nn(r,{input:n.args,level:n.level})}}function tI(e){return function(n){if(Me()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[dr];if(!r||!s||!i)return;const{method:o,url:a,status_code:c,body:l}=i,d={method:o,url:a,status_code:c},u={xhr:n.xhr,input:l,startTimestamp:r,endTimestamp:s};Nn({category:"xhr",data:d,type:"http"},u)}}function nI(e){return function(n){if(Me()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};Nn({category:"fetch",data:i,level:"error",type:"http"},o)}else{const i=n.response,o={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:s};Nn({category:"fetch",data:o,type:"http"},a)}}}function rI(e){return function(n){if(Me()!==e)return;let r=n.from,s=n.to;const i=Ga(we.location.href);let o=r?Ga(r):void 0;const a=Ga(s);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),Nn({category:"navigation",data:{from:r,to:s}})}}function sI(e){return!!e&&!!e.target}const mh="Dedupe",gh=()=>{let e;return{name:mh,setupOnce(){},processEvent(t){if(t.type)return t;try{if(iI(t,e))return mn&&K.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};On(mh,gh);function iI(e,t){return t?!!(oI(e,t)||aI(e,t)):!1}function oI(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!_h(e,t)||!yh(e,t))}function aI(e,t){const n=Eh(t),r=Eh(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!_h(e,t)||!yh(e,t))}function yh(e,t){let n=Sh(e),r=Sh(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function _h(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Eh(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Sh(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const bh="GlobalHandlers",Ih=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:bh,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(cI(n),wh("onerror")),t.onunhandledrejection&&(lI(n),wh("onunhandledrejection"))}}};On(bh,Ih);function cI(e){gS(t=>{const{stackParser:n,attachStacktrace:r}=Ch();if(Me()!==e||uh())return;const{msg:s,url:i,line:o,column:a,error:c}=t,l=c===void 0&&dn(s)?hI(s,i,o,a):vh(sc(n,c||s,void 0,r,!1),i,o,a);l.level="error",Td(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function lI(e){_S(t=>{const{stackParser:n,attachStacktrace:r}=Ch();if(Me()!==e||uh())return;const s=uI(t),i=ka(s)?dI(s):sc(n,s,void 0,r,!0);i.level="error",Td(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function uI(e){if(ka(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function dI(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function hI(e,t,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=Pa(e)?e.message:e,o="Error";const a=i.match(s);return a&&(o=a[1],i=a[2]),vh({exception:{values:[{type:o,value:i}]}},t,n,r)}function vh(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],l=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,u=dn(t)&&t.length>0?t:KE();return c.length===0&&c.push({colno:l,filename:u,function:"?",in_app:!0,lineno:d}),e}function wh(e){mn&&K.log(`Global Handler attached: ${e}`)}function Ch(){const e=Me();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Th="HttpContext",Dh=()=>({name:Th,setupOnce(){},preprocessEvent(e){if(!we.navigator&&!we.location&&!we.document)return;const t=e.request&&e.request.url||we.location&&we.location.href,{referrer:n}=we.document||{},{userAgent:r}=we.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:s};e.request=i}});On(Th,Dh);const fI="cause",pI=5,Ph="LinkedErrors",Ah=(e={})=>{const t=e.limit||pI,n=e.key||fI;return{name:Ph,setupOnce(){},preprocessEvent(r,s,i){const o=i.getOptions();VE(dh,o.stackParser,o.maxValueLength,n,t,r,s)}}};On(Ph,Ah);const mI=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],kh="TryCatch",Nh=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:kh,setupOnce(){t.setTimeout&&Xe(we,"setTimeout",Mh),t.setInterval&&Xe(we,"setInterval",Mh),t.requestAnimationFrame&&Xe(we,"requestAnimationFrame",gI),t.XMLHttpRequest&&"XMLHttpRequest"in we&&Xe(XMLHttpRequest.prototype,"send",yI);const n=t.eventTarget;n&&(Array.isArray(n)?n:mI).forEach(_I)}}};On(kh,Nh);function Mh(e){return function(...t){const n=t[0];return t[0]=Rr(n,{mechanism:{data:{function:hn(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function gI(e){return function(t){return e.apply(this,[Rr(t,{mechanism:{data:{function:"requestAnimationFrame",handler:hn(e)},handled:!1,type:"instrument"}})])}}function yI(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&Xe(n,s,function(i){const o={mechanism:{data:{function:s,handler:hn(i)},handled:!1,type:"instrument"}},a=xa(i);return a&&(o.mechanism.data.handler=hn(a)),Rr(i,o)})}),e.apply(this,t)}}function _I(e){const t=we,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Xe(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=Rr(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:hn(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,Rr(i,{mechanism:{data:{function:"addEventListener",handler:hn(i),target:e},handled:!1,type:"instrument"}}),o])}}),Xe(n,"removeEventListener",function(r){return function(s,i,o){const a=i;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,o)}catch{}return r.call(this,s,a,o)}}))}const EI=[Xd(),eh(),Nh(),ph(),Ih(),Ah(),gh(),Dh()];function SI(e){return[...EI]}function bI(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=SI()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),we.SENTRY_RELEASE&&we.SENTRY_RELEASE.id&&(e.release=we.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:sS(e.stackParser||Jb),integrations:R0(e),transport:e.transport||(ld()?Fb:jb)};W0(xb,t),e.autoSessionTracking&&II()}function II(){if(typeof we.document>"u"){mn&&K.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Dd({ignoreDuration:!0}),kd(),Wa(({from:e,to:t})=>{e!==void 0&&e!==t&&(Dd({ignoreDuration:!0}),kd())})}const Pe=pe,ac="sentryReplaySession",vI="replay_event",cc="Unable to send Replay",wI=3e5,CI=9e5,TI=5e3,DI=5500,PI=6e4,AI=5e3,kI=3,Oh=15e4,ro=5e3,NI=3e3,MI=300,lc=2e7,OI=4999,RI=15e3,Rh=36e5;function xI(e,t){return e??t()}function so(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var Ye;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Ye||(Ye={}));function LI(e){return e.nodeType===e.ELEMENT_NODE}function Ns(e){const t=so([e,"optionalAccess",n=>n.host]);return so([t,"optionalAccess",n=>n.shadowRoot])===e}function Ms(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function UI(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function FI(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function io(e){try{const t=e.rules||e.cssRules;return t?UI(Array.from(t,xh).join("")):null}catch{return null}}function xh(e){let t;if(jI(e))try{t=io(e.styleSheet)||FI(e)}catch{}else if(HI(e)&&e.selectorText.includes(":"))return $I(e.cssText);return t||e.cssText}function $I(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function jI(e){return"styleSheet"in e}function HI(e){return"selectorText"in e}class Lh{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=so([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return xI(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function VI(){return new Lh}function oo({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function Os({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function xr(e){return e.toLowerCase()}function uc(e){return e.toUpperCase()}const Uh="__rrweb_original__";function BI(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=Uh in i?i[Uh]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function dc(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?xr(t):null}function ao(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}let WI=1;const zI=new RegExp("[^a-z0-9-_:]"),Rs=-2;function hc(){return WI++}function KI(e){if(e instanceof HTMLFormElement)return"form";const t=xr(e.tagName);return zI.test(t)?"div":t}function GI(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Lr,Fh;const YI=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ZI=/^(?:[a-z+]+:)?\/\//i,XI=/^www\..*/i,JI=/^(data:)([^,]*),(.*)/i;function co(e,t){return(e||"").replace(YI,(n,r,s,i,o,a)=>{const c=s||o||a,l=r||i||"";if(!c)return n;if(ZI.test(c)||XI.test(c))return`url(${l}${c}${l})`;if(JI.test(c))return`url(${l}${c}${l})`;if(c[0]==="/")return`url(${l}${GI(t)+c}${l})`;const d=t.split("/"),u=c.split("/");d.pop();for(const h of u)h!=="."&&(h===".."?d.pop():d.push(h));return`url(${l}${d.join("/")}${l})`})}const qI=/^[^ \t\n\r\u000c]+/,QI=/^[, \t\n\r\u000c]+/;function ev(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(QI),!(n>=t.length);){let i=r(qI);if(i.slice(-1)===",")i=Ur(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=Ur(e,i);let a=!1;for(;;){const c=t.charAt(n);if(c===""){s.push((i+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((i+o).trim());break}else c==="("&&(a=!0);o+=c,n+=1}}}return s.join(", ")}function Ur(e,t){if(!t||t.trim()==="")return t;const n=e.createElement("a");return n.href=t,n.href}function tv(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function fc(){const e=document.createElement("a");return e.href="",e.href}function $h(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Ur(e,r):n==="srcset"?ev(e,r):n==="style"?co(r,fc()):t==="object"&&n==="data"?Ur(e,r):typeof i=="function"?i(n,r,s):r)}function jh(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function nv(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function rv(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function mr(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:mr(e.parentNode,t,n,r+1)}function Fr(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(rv(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function $r(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const l=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(l))return!0}let a=-1,c=-1;if(i){if(c=mr(o,Fr(r,s)),c<0)return!0;a=mr(o,Fr(t,n),c>=0?c:1/0)}else{if(a=mr(o,Fr(t,n)),a<0)return!1;c=mr(o,Fr(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function sv(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=setTimeout(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function iv(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(i),r=!0,t()})}function ov(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:d,maskTextSelector:u,unmaskTextSelector:h,inlineStylesheet:f,maskInputOptions:p={},maskTextFn:_,maskInputFn:S,dataURLOptions:I={},inlineImages:E,recordCanvas:k,keepIframeSrcFn:M,newlyAddedElement:T=!1}=t,V=av(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Ye.Document,childNodes:[],compatMode:e.compatMode}:{type:Ye.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ye.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:V};case e.ELEMENT_NODE:return lv(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:f,maskAttributeFn:c,maskInputOptions:p,maskInputFn:S,dataURLOptions:I,inlineImages:E,recordCanvas:k,keepIframeSrcFn:M,newlyAddedElement:T,rootId:V,maskAllText:a,maskTextClass:l,unmaskTextClass:d,maskTextSelector:u,unmaskTextSelector:h});case e.TEXT_NODE:return cv(e,{maskAllText:a,maskTextClass:l,unmaskTextClass:d,maskTextSelector:u,unmaskTextSelector:h,maskTextFn:_,maskInputOptions:p,maskInputFn:S,rootId:V});case e.CDATA_SECTION_NODE:return{type:Ye.CDATA,textContent:"",rootId:V};case e.COMMENT_NODE:return{type:Ye.Comment,textContent:e.textContent||"",rootId:V};default:return!1}}function av(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function cv(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:d}=t,u=e.parentNode&&e.parentNode.tagName;let h=e.textContent;const f=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0,_=u==="TEXTAREA"?!0:void 0;if(f&&h){try{e.nextSibling||e.previousSibling||so([e,"access",I=>I.parentNode,"access",I=>I.sheet,"optionalAccess",I=>I.cssRules])&&(h=io(e.parentNode.sheet))}catch(I){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${I}`,e)}h=co(h,fc())}p&&(h="SCRIPT_PLACEHOLDER");const S=$r(e,r,i,s,o,n);if(!f&&!p&&!_&&h&&S&&(h=a?a(h):h.replace(/[\S]/g,"*")),_&&h&&(c.textarea||S)&&(h=l?l(h,e.parentNode):h.replace(/[\S]/g,"*")),u==="OPTION"&&h){const I=oo({type:null,tagName:u,maskInputOptions:c});h=Os({isMasked:$r(e,r,i,s,o,I),element:e,value:h,maskInputFn:l})}return{type:Ye.Text,textContent:h||"",isStyle:f,rootId:d}}function lv(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:d={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:p=!1,rootId:_,maskAllText:S,maskTextClass:I,unmaskTextClass:E,maskTextSelector:k,unmaskTextSelector:M}=t,T=nv(e,r,s,i),V=KI(e);let $={};const J=e.attributes.length;for(let D=0;D<J;D++){const G=e.attributes[D];G.name&&!jh(V,G.name,G.value)&&($[G.name]=$h(n,V,xr(G.name),G.value,e,c))}if(V==="link"&&o){const D=Array.from(n.styleSheets).find(te=>te.href===e.href);let G=null;D&&(G=io(D)),G&&(delete $.rel,delete $.href,$._cssText=co(G,D.href))}if(V==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const D=io(e.sheet);D&&($._cssText=co(D,fc()))}if(V==="input"||V==="textarea"||V==="select"||V==="option"){const D=e,G=dc(D),te=ao(D,uc(V),G),R=D.checked;if(G!=="submit"&&G!=="button"&&te){const F=$r(D,I,k,E,M,oo({type:G,tagName:uc(V),maskInputOptions:a}));$.value=Os({isMasked:F,element:D,value:te,maskInputFn:l})}R&&($.checked=R)}if(V==="option"&&(e.selected&&!a.select?$.selected=!0:delete $.selected),V==="canvas"&&h){if(e.__context==="2d")BI(e)||($.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const D=e.toDataURL(d.type,d.quality),G=document.createElement("canvas");G.width=e.width,G.height=e.height;const te=G.toDataURL(d.type,d.quality);D!==te&&($.rr_dataURL=D)}}if(V==="img"&&u){Lr||(Lr=n.createElement("canvas"),Fh=Lr.getContext("2d"));const D=e,G=D.crossOrigin;D.crossOrigin="anonymous";const te=()=>{D.removeEventListener("load",te);try{Lr.width=D.naturalWidth,Lr.height=D.naturalHeight,Fh.drawImage(D,0,0),$.rr_dataURL=Lr.toDataURL(d.type,d.quality)}catch(R){console.warn(`Cannot inline img src=${D.currentSrc}! Error: ${R}`)}G?$.crossOrigin=G:D.removeAttribute("crossorigin")};D.complete&&D.naturalWidth!==0?te():D.addEventListener("load",te)}if((V==="audio"||V==="video")&&($.rr_mediaState=e.paused?"paused":"played",$.rr_mediaCurrentTime=e.currentTime),p||(e.scrollLeft&&($.rr_scrollLeft=e.scrollLeft),e.scrollTop&&($.rr_scrollTop=e.scrollTop)),T){const{width:D,height:G}=e.getBoundingClientRect();$={class:$.class,rr_width:`${D}px`,rr_height:`${G}px`}}V==="iframe"&&!f($.src)&&(e.contentDocument||($.rr_src=$.src),delete $.src);let X;try{customElements.get(V)&&(X=!0)}catch{}return{type:Ye.Element,tagName:V,attributes:$,childNodes:[],isSVG:tv(e)||void 0,needBlock:T,rootId:_,isCustom:X}}function Ae(e){return e==null?"":e.toLowerCase()}function uv(e,t){if(t.comment&&e.type===Ye.Comment)return!0;if(e.type===Ye.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Ae(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Ae(e.attributes.name)==="application-name"||Ae(e.attributes.rel)==="icon"||Ae(e.attributes.rel)==="apple-touch-icon"||Ae(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Ae(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ae(e.attributes.property).match(/^(og|twitter|fb):/)||Ae(e.attributes.name).match(/^(og|twitter):/)||Ae(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Ae(e.attributes.name)==="robots"||Ae(e.attributes.name)==="googlebot"||Ae(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Ae(e.attributes.name)==="author"||Ae(e.attributes.name)==="generator"||Ae(e.attributes.name)==="framework"||Ae(e.attributes.name)==="publisher"||Ae(e.attributes.name)==="progid"||Ae(e.attributes.property).match(/^article:/)||Ae(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Ae(e.attributes.name)==="google-site-verification"||Ae(e.attributes.name)==="yandex-verification"||Ae(e.attributes.name)==="csrf-token"||Ae(e.attributes.name)==="p:domain_verify"||Ae(e.attributes.name)==="verify-v1"||Ae(e.attributes.name)==="verification"||Ae(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function jr(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:u,skipChild:h=!1,inlineStylesheet:f=!0,maskInputOptions:p={},maskAttributeFn:_,maskTextFn:S,maskInputFn:I,slimDOMOptions:E,dataURLOptions:k={},inlineImages:M=!1,recordCanvas:T=!1,onSerialize:V,onIframeLoad:$,iframeLoadTimeout:J=5e3,onStylesheetLoad:X,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:G=()=>!1,newlyAddedElement:te=!1}=t;let{preserveWhiteSpace:R=!0}=t;const F=ov(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:u,inlineStylesheet:f,maskInputOptions:p,maskAttributeFn:_,maskTextFn:S,maskInputFn:I,dataURLOptions:k,inlineImages:M,recordCanvas:T,keepIframeSrcFn:G,newlyAddedElement:te});if(!F)return console.warn(e,"not serialized"),null;let U;r.hasNode(e)?U=r.getId(e):uv(F,E)||!R&&F.type===Ye.Text&&!F.isStyle&&!F.textContent.replace(/^\s+|\s+$/gm,"").length?U=Rs:U=hc();const j=Object.assign(F,{id:U});if(r.add(e,j),U===Rs)return null;V&&V(e);let v=!h;if(j.type===Ye.Element){v=v&&!j.needBlock,delete j.needBlock;const P=e.shadowRoot;P&&Ms(P)&&(j.isShadowHost=!0)}if((j.type===Ye.Document||j.type===Ye.Element)&&v){E.headWhitespace&&j.type===Ye.Element&&j.tagName==="head"&&(R=!1);const P={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:u,skipChild:h,inlineStylesheet:f,maskInputOptions:p,maskAttributeFn:_,maskTextFn:S,maskInputFn:I,slimDOMOptions:E,dataURLOptions:k,inlineImages:M,recordCanvas:T,preserveWhiteSpace:R,onSerialize:V,onIframeLoad:$,iframeLoadTimeout:J,onStylesheetLoad:X,stylesheetLoadTimeout:D,keepIframeSrcFn:G};for(const W of Array.from(e.childNodes)){const re=jr(W,P);re&&j.childNodes.push(re)}if(LI(e)&&e.shadowRoot)for(const W of Array.from(e.shadowRoot.childNodes)){const re=jr(W,P);re&&(Ms(e.shadowRoot)&&(re.isShadow=!0),j.childNodes.push(re))}}return e.parentNode&&Ns(e.parentNode)&&Ms(e.parentNode)&&(j.isShadow=!0),j.type===Ye.Element&&j.tagName==="iframe"&&sv(e,()=>{const P=e.contentDocument;if(P&&$){const W=jr(P,{doc:P,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskAttributeFn:_,maskTextFn:S,maskInputFn:I,slimDOMOptions:E,dataURLOptions:k,inlineImages:M,recordCanvas:T,preserveWhiteSpace:R,onSerialize:V,onIframeLoad:$,iframeLoadTimeout:J,onStylesheetLoad:X,stylesheetLoadTimeout:D,keepIframeSrcFn:G});W&&$(e,W)}},J),j.type===Ye.Element&&j.tagName==="link"&&j.attributes.rel==="stylesheet"&&iv(e,()=>{if(X){const P=jr(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskAttributeFn:_,maskTextFn:S,maskInputFn:I,slimDOMOptions:E,dataURLOptions:k,inlineImages:M,recordCanvas:T,preserveWhiteSpace:R,onSerialize:V,onIframeLoad:$,iframeLoadTimeout:J,onStylesheetLoad:X,stylesheetLoadTimeout:D,keepIframeSrcFn:G});P&&X(e,P)}},D),j}function dv(e,t){const{mirror:n=new Lh,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:d=null,inlineStylesheet:u=!0,inlineImages:h=!1,recordCanvas:f=!1,maskAllInputs:p=!1,maskAttributeFn:_,maskTextFn:S,maskInputFn:I,slimDOM:E=!1,dataURLOptions:k,preserveWhiteSpace:M,onSerialize:T,onIframeLoad:V,iframeLoadTimeout:$,onStylesheetLoad:J,stylesheetLoadTimeout:X,keepIframeSrcFn:D=()=>!1}=t||{};return jr(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:u,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:p===!1?{}:p,maskAttributeFn:_,maskTextFn:S,maskInputFn:I,slimDOMOptions:E===!0||E==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:E==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:E===!1?{}:E,dataURLOptions:k,inlineImages:h,recordCanvas:f,preserveWhiteSpace:M,onSerialize:T,onIframeLoad:V,iframeLoadTimeout:$,onStylesheetLoad:J,stylesheetLoadTimeout:X,keepIframeSrcFn:D,newlyAddedElement:!1})}function Rn(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function ut(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Hr=`Please stop import mirror directly. Instead of that,\r
|
|
179
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
180
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Hh={map:{},getId(){return console.error(Hr),-1},getNode(){return console.error(Hr),null},removeNodeFromMap(){console.error(Hr)},has(){return console.error(Hr),!1},reset(){console.error(Hr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Hh=new Proxy(Hh,{get(e,t,n){return t==="map"&&console.error(Hr),Reflect.get(e,t,n)}}));function xs(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=t-(o-s),c=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),s=o,e.apply(c,i)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function Vh(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){setTimeout(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>Vh(e,t,i||{},!0)}function pc(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let lo=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(lo=()=>new Date().getTime());function Bh(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:Rn([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||Rn([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||Rn([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:Rn([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||Rn([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||Rn([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Wh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function zh(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ot(e,t,n,r,s){if(!e)return!1;const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!i)return!1;const o=Fr(t,n);if(!s){const l=r&&i.matches(r);return o(i)&&!l}const a=mr(i,o);let c=-1;return a<0?!1:(r&&(c=mr(i,Fr(null,r))),a>-1&&c<0?!0:a<c)}function hv(e,t){return t.getId(e)!==-1}function mc(e,t){return t.getId(e)===Rs}function Kh(e,t){if(Ns(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Kh(e.parentNode,t):!0:!0}function gc(e){return!!e.changedTouches}function fv(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Gh(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Yh(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function yc(e){return!!Rn([e,"optionalAccess",t=>t.shadowRoot])}class pv{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return YS(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Zh(e){let t=null;return Rn([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function mv(e){let t=e,n;for(;n=Zh(t);)t=n;return t}function gv(e){const t=e.ownerDocument;if(!t)return!1;const n=mv(e);return t.contains(n)}function Xh(e){const t=e.ownerDocument;return t?t.contains(e)||gv(e):!1}let _c;function yv(){if(_c)return _c;const e=window.document;let t=window.requestAnimationFrame;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.requestAnimationFrame&&(t=r.requestAnimationFrame),e.head.removeChild(n)}catch{}return _c=t.bind(window)}function _v(...e){return yv()(...e)}var le=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(le||{}),ue=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ue||{}),dt=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(dt||{}),gn=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(gn||{});function Ev(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function Jh(e){return"__ln"in e}class Sv{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=Ev([n,"optionalAccess",s=>s.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Jh(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Jh(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const qh=(e,t)=>`${e}@${t}`;class bv{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new Sv,s=c=>{let l=c,d=Rs;for(;d===Rs;)l=l&&l.nextSibling,d=l&&this.mirror.getId(l);return d},i=c=>{if(!c.parentNode||!Xh(c))return;const l=Ns(c.parentNode)?this.mirror.getId(Zh(c)):this.mirror.getId(c.parentNode),d=s(c);if(l===-1||d===-1)return r.addNode(c);const u=jr(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:h=>{Gh(h,this.mirror)&&this.iframeManager.addIframe(h),Yh(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),yc(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(h,f)=>{this.iframeManager.attachIframe(h,f),this.shadowDomManager.observeAttachShadow(h)},onStylesheetLoad:(h,f)=>{this.stylesheetManager.attachLinkElement(h,f)}});u&&(t.push({parentId:l,nextId:d,node:u}),n.add(u.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Qh(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!tf(this.droppedSet,c)&&!Qh(this.removes,c,this.mirror)||tf(this.movedSet,c)?i(c):this.droppedSet.add(c);let o=null;for(;r.length;){let c=null;if(o){const l=this.mirror.getId(o.value.parentNode),d=s(o.value);l!==-1&&d!==-1&&(c=o)}if(!c){let l=r.tail;for(;l;){const d=l;if(l=l.previous,d){const u=this.mirror.getId(d.value.parentNode);if(s(d.value)===-1)continue;if(u!==-1){c=d;break}else{const f=d.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=f.parentNode.host;if(this.mirror.getId(p)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}o=c.previous,r.removeNode(c.value),i(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:l}=c;if(typeof l.style=="string"){const d=JSON.stringify(c.styleDiff),u=JSON.stringify(c._unchangedStyles);d.length<l.style.length&&(d+u).split("var(").length===l.style.split("var(").length&&(l.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:l}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(mc(t.target,this.mirror))return;let n;try{n=document.implementation.createHTMLDocument()}catch{n=this.doc}switch(t.type){case"characterData":{const r=t.target.textContent;!Ot(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:$r(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&r?this.maskTextFn?this.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let s=t.attributeName,i=t.target.getAttribute(s);if(s==="value"){const a=dc(r),c=r.tagName;i=ao(r,c,a);const l=oo({maskInputOptions:this.maskInputOptions,tagName:c,type:a}),d=$r(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);i=Os({isMasked:d,element:r,value:i,maskInputFn:this.maskInputFn})}if(Ot(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let o=this.attributes.find(a=>a.node===t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)s="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!jh(r.tagName,s)&&(o.attributes[s]=$h(this.doc,xr(r.tagName),xr(s),i,r,this.maskAttributeFn),s==="style")){const a=n.createElement("span");t.oldValue&&a.setAttribute("style",t.oldValue);for(const c of Array.from(r.style)){const l=r.style.getPropertyValue(c),d=r.style.getPropertyPriority(c);l!==a.style.getPropertyValue(c)||d!==a.style.getPropertyPriority(c)?d===""?o.styleDiff[c]=l:o.styleDiff[c]=[l,d]:o._unchangedStyles[c]=[l,d]}for(const c of Array.from(a.style))r.style.getPropertyValue(c)===""&&(o.styleDiff[c]=!1)}break}case"childList":{if(Ot(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const s=this.mirror.getId(r),i=Ns(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ot(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||mc(r,this.mirror)||!hv(r,this.mirror)||(this.addedSet.has(r)?(Ec(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||Kh(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[qh(s,i)]?Ec(this.movedSet,r):this.removes.push({parentId:i,id:s,isShadow:Ns(t.target)&&Ms(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(mc(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[qh(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ot(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),yc(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ec(e,t){e.delete(t),t.childNodes.forEach(n=>Ec(e,n))}function Qh(e,t,n){return e.length===0?!1:ef(e,t,n)}function ef(e,t,n){const{parentNode:r}=t;if(!r)return!1;const s=n.getId(r);return e.some(i=>i.id===s)?!0:ef(e,r,n)}function tf(e,t){return e.size===0?!1:nf(e,t)}function nf(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:nf(e,n):!1}let Ls;function Iv(e){Ls=e}function vv(){Ls=void 0}const me=e=>Ls?(...n)=>{try{return e(...n)}catch(r){if(Ls&&Ls(r)===!0)return()=>{};throw r}}:e;function Xt(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}const Vr=[];function Us(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function rf(e,t){const n=new bv;Vr.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=Xt([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(me(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function wv({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const c=xs(me(u=>{const h=Date.now()-a;e(o.map(f=>(f.timeOffset-=h,f)),u),o=[],a=null}),i),l=me(xs(me(u=>{const h=Us(u),{clientX:f,clientY:p}=gc(u)?u.changedTouches[0]:u;a||(a=lo()),o.push({x:f,y:p,id:r.getId(h),timeOffset:lo()-a}),c(typeof DragEvent<"u"&&u instanceof DragEvent?ue.Drag:u instanceof MouseEvent?ue.MouseMove:ue.TouchMove)}),s,{trailing:!1})),d=[ut("mousemove",l,n),ut("touchmove",l,n),ut("drag",l,n)];return me(()=>{d.forEach(u=>u())})}function Cv({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[];let l=null;const d=u=>h=>{const f=Us(h);if(Ot(f,r,s,i,!0))return;let p=null,_=u;if("pointerType"in h){switch(h.pointerType){case"mouse":p=gn.Mouse;break;case"touch":p=gn.Touch;break;case"pen":p=gn.Pen;break}p===gn.Touch?dt[u]===dt.MouseDown?_="TouchStart":dt[u]===dt.MouseUp&&(_="TouchEnd"):gn.Pen}else gc(h)&&(p=gn.Touch);p!==null?(l=p,(_.startsWith("Touch")&&p===gn.Touch||_.startsWith("Mouse")&&p===gn.Mouse)&&(p=null)):dt[u]===dt.Click&&(p=l,l=null);const S=gc(h)?h.changedTouches[0]:h;if(!S)return;const I=n.getId(f),{clientX:E,clientY:k}=S;me(e)({type:dt[_],id:I,x:E,y:k,...p!==null&&{pointerType:p}})};return Object.keys(dt).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&a[u]!==!1).forEach(u=>{let h=xr(u);const f=d(u);if(window.PointerEvent)switch(dt[u]){case dt.MouseDown:case dt.MouseUp:h=h.replace("mouse","pointer");break;case dt.TouchStart:case dt.TouchEnd:return}c.push(ut(h,f,t))}),me(()=>{c.forEach(u=>u())})}function sf({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=me(xs(me(c=>{const l=Us(c);if(!l||Ot(l,r,s,i,!0))return;const d=n.getId(l);if(l===t&&t.defaultView){const u=Bh(t.defaultView);e({id:d,x:u.left,y:u.top})}else e({id:d,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return ut("scroll",a,t)}function Tv({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=me(xs(me(()=>{const i=Wh(),o=zh();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return ut("resize",s,t)}const Dv=["INPUT","TEXTAREA","SELECT"],of=new WeakMap;function Pv({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:d,userTriggeredOnInput:u,maskTextClass:h,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:_}){function S($){let J=Us($);const X=$.isTrusted,D=J&&uc(J.tagName);if(D==="OPTION"&&(J=J.parentElement),!J||!D||Dv.indexOf(D)<0||Ot(J,r,s,i,!0))return;const G=J;if(G.classList.contains(o)||a&&G.matches(a))return;const te=dc(J);let R=ao(G,D,te),F=!1;const U=oo({maskInputOptions:c,tagName:D,type:te}),j=$r(J,h,p,f,_,U);(te==="radio"||te==="checkbox")&&(F=J.checked),R=Os({isMasked:j,element:J,value:R,maskInputFn:l}),I(J,u?{text:R,isChecked:F,userTriggered:X}:{text:R,isChecked:F});const v=J.name;te==="radio"&&v&&F&&t.querySelectorAll(`input[type="radio"][name="${v}"]`).forEach(P=>{if(P!==J){const W=Os({isMasked:j,element:P,value:ao(P,D,te),maskInputFn:l});I(P,u?{text:W,isChecked:!F,userTriggered:!1}:{text:W,isChecked:!F})}})}function I($,J){const X=of.get($);if(!X||X.text!==J.text||X.isChecked!==J.isChecked){of.set($,J);const D=n.getId($);me(e)({...J,id:D})}}const k=(d.input==="last"?["change"]:["input","change"]).map($=>ut($,me(S),t)),M=t.defaultView;if(!M)return()=>{k.forEach($=>$())};const T=M.Object.getOwnPropertyDescriptor(M.HTMLInputElement.prototype,"value"),V=[[M.HTMLInputElement.prototype,"value"],[M.HTMLInputElement.prototype,"checked"],[M.HTMLSelectElement.prototype,"value"],[M.HTMLTextAreaElement.prototype,"value"],[M.HTMLSelectElement.prototype,"selectedIndex"],[M.HTMLOptionElement.prototype,"selected"]];return T&&T.set&&k.push(...V.map($=>Vh($[0],$[1],{set(){me(S)({target:this,isTrusted:!1})}},!1,M))),me(()=>{k.forEach($=>$())})}function uo(e){const t=[];function n(r,s){if(ho("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||ho("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||ho("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||ho("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function xn(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Av({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:me((d,u,h)=>{const[f,p]=h,{id:_,styleId:S}=xn(u,t,n.styleMirror);return(_&&_!==-1||S&&S!==-1)&&e({id:_,styleId:S,adds:[{rule:f,index:p}]}),d.apply(u,h)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:me((d,u,h)=>{const[f]=h,{id:p,styleId:_}=xn(u,t,n.styleMirror);return(p&&p!==-1||_&&_!==-1)&&e({id:p,styleId:_,removes:[{index:f}]}),d.apply(u,h)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:me((d,u,h)=>{const[f]=h,{id:p,styleId:_}=xn(u,t,n.styleMirror);return(p&&p!==-1||_&&_!==-1)&&e({id:p,styleId:_,replace:f}),d.apply(u,h)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:me((d,u,h)=>{const[f]=h,{id:p,styleId:_}=xn(u,t,n.styleMirror);return(p&&p!==-1||_&&_!==-1)&&e({id:p,styleId:_,replaceSync:f}),d.apply(u,h)})}));const c={};fo("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(fo("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),fo("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),fo("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach(([d,u])=>{l[d]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(l[d].insertRule,{apply:me((h,f,p)=>{const[_,S]=p,{id:I,styleId:E}=xn(f.parentStyleSheet,t,n.styleMirror);return(I&&I!==-1||E&&E!==-1)&&e({id:I,styleId:E,adds:[{rule:_,index:[...uo(f),S||0]}]}),h.apply(f,p)})}),u.prototype.deleteRule=new Proxy(l[d].deleteRule,{apply:me((h,f,p)=>{const[_]=p,{id:S,styleId:I}=xn(f.parentStyleSheet,t,n.styleMirror);return(S&&S!==-1||I&&I!==-1)&&e({id:S,styleId:I,removes:[{index:[...uo(f),_]}]}),h.apply(f,p)})})}),me(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([d,u])=>{u.prototype.insertRule=l[d].insertRule,u.prototype.deleteRule=l[d].deleteRule})})}function af({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?Xt([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):Xt([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),i=Xt([s,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(Xt([s,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return Xt([i,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const a=Xt([i,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,o)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return a}}),me(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function kv({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:me((a,c,l)=>{const[d,u,h]=l;if(n.has(d))return i.apply(c,[d,u,h]);const{id:f,styleId:p}=xn(Xt([c,"access",_=>_.parentRule,"optionalAccess",_=>_.parentStyleSheet]),t,r.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,set:{property:d,value:u,priority:h},index:uo(c.parentRule)}),a.apply(c,l)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:me((a,c,l)=>{const[d]=l;if(n.has(d))return o.apply(c,[d]);const{id:u,styleId:h}=xn(Xt([c,"access",f=>f.parentRule,"optionalAccess",f=>f.parentStyleSheet]),t,r.styleMirror);return(u&&u!==-1||h&&h!==-1)&&e({id:u,styleId:h,remove:{property:d},index:uo(c.parentRule)}),a.apply(c,l)})}),me(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function Nv({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=me(l=>xs(me(d=>{const u=Us(d);if(!u||Ot(u,t,n,r,!0))return;const{currentTime:h,volume:f,muted:p,playbackRate:_}=u;e({type:l,id:s.getId(u),currentTime:h,volume:f,muted:p,playbackRate:_})}),i.media||500)),c=[ut("play",a(0),o),ut("pause",a(1),o),ut("seeked",a(2),o),ut("volumechange",a(3),o),ut("ratechange",a(4),o)];return me(()=>{c.forEach(l=>l())})}function Mv({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(c,l,d){const u=new i(c,l,d);return s.set(u,{family:c,buffer:typeof l!="string",descriptors:d,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),u};const o=pc(t.fonts,"add",function(a){return function(c){return setTimeout(me(()=>{const l=s.get(c);l&&(e(l),s.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(o),me(()=>{r.forEach(a=>a())})}function Ov(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const c=me(()=>{const l=t.getSelection();if(!l||a&&Xt([l,"optionalAccess",h=>h.isCollapsed]))return;a=l.isCollapsed||!1;const d=[],u=l.rangeCount||0;for(let h=0;h<u;h++){const f=l.getRangeAt(h),{startContainer:p,startOffset:_,endContainer:S,endOffset:I}=f;Ot(p,r,s,i,!0)||Ot(S,r,s,i,!0)||d.push({start:n.getId(p),startOffset:_,end:n.getId(S),endOffset:I})}o({ranges:d})});return c(),ut("selectionchange",c)}function Rv({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:pc(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function xv(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};const r=rf(e,e.doc),s=wv(e),i=Cv(e),o=sf(e),a=Tv(e,{win:n}),c=Pv(e),l=Nv(e),d=Av(e,{win:n}),u=af(e,e.doc),h=kv(e,{win:n}),f=e.collectFonts?Mv(e):()=>{},p=Ov(e),_=Rv(e),S=[];for(const I of e.plugins)S.push(I.observer(I.callback,n,I.options));return me(()=>{Vr.forEach(I=>I.reset()),r.disconnect(),s(),i(),o(),a(),c(),l(),d(),u(),h(),f(),p(),_(),S.forEach(I=>I())})}function ho(e){return typeof window[e]<"u"}function fo(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Sc{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}function cf(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}class Lv{constructor(){this.crossOriginIframeMirror=new Sc(hc),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Uv{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Sc(hc),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Sc(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),cf([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case le.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:le.IncrementalSnapshot,data:{source:ue.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case le.Meta:case le.Load:case le.DomContentLoaded:return!1;case le.Plugin:return n;case le.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case le.IncrementalSnapshot:switch(n.data.source){case ue.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case ue.Drag:case ue.TouchMove:case ue.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case ue.ViewportResize:return!1;case ue.MediaInteraction:case ue.MouseInteraction:case ue.Scroll:case ue.CanvasMutation:case ue.Input:return this.replaceIds(n.data,t,["id"]),n;case ue.StyleSheetRule:case ue.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case ue.Font:return n;case ue.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case ue.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),cf([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,t,["styleId"])})]),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Ye.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Fv{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class $v{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Ms(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const r=rf({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(sf({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(af({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(pc(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&Xh(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class lf{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class jv{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new pv,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:xh(a),index:c}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Hv{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){_v(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}function Be(e){const t=e;return t.timestamp=lo(),t}let po;const Rt=VI();function Ln(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:d="rr-mask",unmaskTextClass:u=null,maskTextSelector:h=null,unmaskTextSelector:f=null,inlineStylesheet:p=!0,maskAllInputs:_,maskInputOptions:S,slimDOMOptions:I,maskAttributeFn:E,maskInputFn:k,maskTextFn:M,packFn:T,sampling:V={},dataURLOptions:$={},mousemoveWait:J,recordCanvas:X=!1,recordCrossOriginIframes:D=!1,recordAfter:G=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:te=!1,collectFonts:R=!1,inlineImages:F=!1,plugins:U,keepIframeSrcFn:j=()=>!1,ignoreCSSAttributes:v=new Set([]),errorHandler:P,onMutation:W,getCanvasManager:re}=e;Iv(P);const Ee=D?window.parent===window:!0;let he=!1;if(!Ee)try{window.parent.document&&(he=!1)}catch{he=!0}if(Ee&&!t)throw new Error("emit function is required");J!==void 0&&V.mousemove===void 0&&(V.mousemove=J),Rt.reset();const ge=_===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:S!==void 0?S:{},Ze=I===!0||I==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:I==="all",headMetaDescKeywords:I==="all"}:I||{};fv();let st,xt=0;const Je=w=>{for(const L of U||[])L.eventProcessor&&(w=L.eventProcessor(w));return T&&!he&&(w=T(w)),w},ye=(w,L)=>{if(Xa([Vr,"access",C=>C[0],"optionalAccess",C=>C.isFrozen,"call",C=>C()])&&w.type!==le.FullSnapshot&&!(w.type===le.IncrementalSnapshot&&w.data.source===ue.Mutation)&&Vr.forEach(C=>C.unfreeze()),Ee)Xa([t,"optionalCall",C=>C(Je(w),L)]);else if(he){const C={type:"rrweb",event:Je(w),origin:window.location.origin,isCheckout:L};window.parent.postMessage(C,"*")}if(w.type===le.FullSnapshot)st=w,xt=0;else if(w.type===le.IncrementalSnapshot){if(w.data.source===ue.Mutation&&w.data.isAttachIframe)return;xt++;const C=r&&xt>=r,N=n&&w.timestamp-st.timestamp>n;(C||N)&&H(!0)}},Ue=w=>{ye(Be({type:le.IncrementalSnapshot,data:{source:ue.Mutation,...w}}))},qe=w=>ye(Be({type:le.IncrementalSnapshot,data:{source:ue.Scroll,...w}})),_n=w=>ye(Be({type:le.IncrementalSnapshot,data:{source:ue.CanvasMutation,...w}})),qt=w=>ye(Be({type:le.IncrementalSnapshot,data:{source:ue.AdoptedStyleSheet,...w}})),m=new jv({mutationCb:Ue,adoptedStyleSheetCb:qt}),g=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Lv:new Uv({mirror:Rt,mutationCb:Ue,stylesheetManager:m,recordCrossOriginIframes:D,wrappedEmit:ye});for(const w of U||[])w.getMirror&&w.getMirror({nodeMirror:Rt,crossOriginIframeMirror:g.crossOriginIframeMirror,crossOriginIframeStyleMirror:g.crossOriginIframeStyleMirror});const b=new Hv,O=Bv(re,{mirror:Rt,win:window,mutationCb:w=>ye(Be({type:le.IncrementalSnapshot,data:{source:ue.CanvasMutation,...w}})),recordCanvas:X,blockClass:s,blockSelector:i,unblockSelector:o,sampling:V.canvas,dataURLOptions:$,errorHandler:P}),A=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Fv:new $v({mutationCb:Ue,scrollCb:qe,bypassOptions:{onMutation:W,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:l,maskTextClass:d,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:ge,dataURLOptions:$,maskAttributeFn:E,maskTextFn:M,maskInputFn:k,recordCanvas:X,inlineImages:F,sampling:V,slimDOMOptions:Ze,iframeManager:g,stylesheetManager:m,canvasManager:O,keepIframeSrcFn:j,processedNodeManager:b},mirror:Rt}),H=(w=!1)=>{ye(Be({type:le.Meta,data:{href:window.location.href,width:zh(),height:Wh()}}),w),m.reset(),A.init(),Vr.forEach(C=>C.lock());const L=dv(document,{mirror:Rt,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:l,maskTextClass:d,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:f,inlineStylesheet:p,maskAllInputs:ge,maskAttributeFn:E,maskInputFn:k,maskTextFn:M,slimDOM:Ze,dataURLOptions:$,recordCanvas:X,inlineImages:F,onSerialize:C=>{Gh(C,Rt)&&g.addIframe(C),Yh(C,Rt)&&m.trackLinkElement(C),yc(C)&&A.addShadowRoot(C.shadowRoot,document)},onIframeLoad:(C,N)=>{g.attachIframe(C,N),A.observeAttachShadow(C)},onStylesheetLoad:(C,N)=>{m.attachLinkElement(C,N)},keepIframeSrcFn:j});if(!L)return console.warn("Failed to snapshot the document");ye(Be({type:le.FullSnapshot,data:{node:L,initialOffset:Bh(window)}})),Vr.forEach(C=>C.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&m.adoptStyleSheets(document.adoptedStyleSheets,Rt.getId(document))};po=H;try{const w=[],L=N=>me(xv)({onMutation:W,mutationCb:Ue,mousemoveCb:(B,Y)=>ye(Be({type:le.IncrementalSnapshot,data:{source:Y,positions:B}})),mouseInteractionCb:B=>ye(Be({type:le.IncrementalSnapshot,data:{source:ue.MouseInteraction,...B}})),scrollCb:qe,viewportResizeCb:B=>ye(Be({type:le.IncrementalSnapshot,data:{source:ue.ViewportResize,...B}})),inputCb:B=>ye(Be({type:le.IncrementalSnapshot,data:{source:ue.Input,...B}})),mediaInteractionCb:B=>ye(Be({type:le.IncrementalSnapshot,data:{source:ue.MediaInteraction,...B}})),styleSheetRuleCb:B=>ye(Be({type:le.IncrementalSnapshot,data:{source:ue.StyleSheetRule,...B}})),styleDeclarationCb:B=>ye(Be({type:le.IncrementalSnapshot,data:{source:ue.StyleDeclaration,...B}})),canvasMutationCb:_n,fontCb:B=>ye(Be({type:le.IncrementalSnapshot,data:{source:ue.Font,...B}})),selectionCb:B=>{ye(Be({type:le.IncrementalSnapshot,data:{source:ue.Selection,...B}}))},customElementCb:B=>{ye(Be({type:le.IncrementalSnapshot,data:{source:ue.CustomElement,...B}}))},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:d,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:f,maskInputOptions:ge,inlineStylesheet:p,sampling:V,recordCanvas:X,inlineImages:F,userTriggeredOnInput:te,collectFonts:R,doc:N,maskAttributeFn:E,maskInputFn:k,maskTextFn:M,keepIframeSrcFn:j,blockSelector:i,unblockSelector:o,slimDOMOptions:Ze,dataURLOptions:$,mirror:Rt,iframeManager:g,stylesheetManager:m,shadowDomManager:A,processedNodeManager:b,canvasManager:O,ignoreCSSAttributes:v,plugins:Xa([U,"optionalAccess",B=>B.filter,"call",B=>B(Y=>Y.observer),"optionalAccess",B=>B.map,"call",B=>B(Y=>({observer:Y.observer,options:Y.options,callback:q=>ye(Be({type:le.Plugin,data:{plugin:Y.name,payload:q}}))}))])||[]},{});g.addLoadListener(N=>{try{w.push(L(N.contentDocument))}catch(B){console.warn(B)}});const C=()=>{H(),w.push(L(document))};return document.readyState==="interactive"||document.readyState==="complete"?C():(w.push(ut("DOMContentLoaded",()=>{ye(Be({type:le.DomContentLoaded,data:{}})),G==="DOMContentLoaded"&&C()})),w.push(ut("load",()=>{ye(Be({type:le.Load,data:{}})),G==="load"&&C()},window))),()=>{w.forEach(N=>N()),b.destroy(),po=void 0,vv()}}catch(w){console.warn(w)}}function Vv(e){if(!po)throw new Error("please take full snapshot after start recording");po(e)}Ln.mirror=Rt,Ln.takeFullSnapshot=Vv;function Bv(e,t){try{return e?e(t):new lf}catch{return console.warn("Unable to initialize CanvasManager"),new lf}}const Wv=3,zv=5;function bc(e){return e>9999999999?e:e*1e3}function Ic(e){return e>9999999999?e/1e3:e}function Fs(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:le.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Gt(t,10,1e3)}}),t.category==="console")))}const Kv="button,a";function uf(e){return e.closest(Kv)||e}function df(e){const t=hf(e);return!t||!(t instanceof Element)?t:uf(t)}function hf(e){return Gv(e)?e.target:e}function Gv(e){return typeof e=="object"&&!!e&&"target"in e}let Un;function Yv(e){return Un||(Un=[],Zv()),Un.push(e),()=>{const t=Un?Un.indexOf(e):-1;t>-1&&Un.splice(t,1)}}function Zv(){Xe(Pe,"open",function(e){return function(...t){if(Un)try{Un.forEach(n=>n())}catch{}return e.apply(Pe,t)}})}function Xv(e,t,n){e.handleClick(t,n)}class Jv{constructor(t,n,r=Fs){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=Yv(()=>{this._lastMutation=ff()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(Qv(n,this._ignoreSelector)||!ew(t))return;const r={timestamp:Ic(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Ic(t)}registerScroll(t=Date.now()){this._lastScroll=Ic(t)}registerClick(t){const n=uf(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=ff();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=t;if(i){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,l=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Pe.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:l,clickCount:o||1}};this._addBreadcrumbEvent(n,d);return}if(o>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Pe.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const qv=["A","BUTTON","INPUT"];function Qv(e,t){return!!(!qv.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function ew(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function ff(){return Date.now()/1e3}function tw(e,t){try{if(!nw(t))return;const{source:n}=t.data;if(n===ue.Mutation&&e.registerMutation(t.timestamp),n===ue.Scroll&&e.registerScroll(t.timestamp),rw(t)){const{type:r,id:s}=t.data,i=Ln.mirror.getNode(s);i instanceof HTMLElement&&r===dt.Click&&e.registerClick(i)}}catch{}}function nw(e){return e.type===Wv}function rw(e){return e.data.source===ue.MouseInteraction}function Jt(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var mo;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(mo||(mo={}));const sw=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function iw(e){const t={};for(const n in e)if(sw.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const ow=e=>t=>{if(!e.isEnabled())return;const n=aw(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&Xv(e.clickDetector,n,df(t.event)),Fs(e,n)};function pf(e,t){const n=Ln.mirror.getId(e),r=n&&Ln.mirror.getNode(n),s=r&&Ln.mirror.getMeta(r),i=s&&lw(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===mo.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:iw(i.attributes)}}:{}}}function aw(e){const{target:t,message:n}=cw(e);return Jt({category:`ui.${e.name}`,...pf(t,n)})}function cw(e){const t=e.name==="click";let n,r=null;try{r=t?df(e.event):hf(e.event),n=Hi(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function lw(e){return e.type===mo.Element}function uw(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=dw(t);n&&Fs(e,n)}function dw(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||hw(o)||!i)return null;const a=t||r||s,c=i.length===1;if(!a&&c)return null;const l=Hi(o,{maxStringLength:200})||"<unknown>",d=pf(o,l);return Jt({category:"ui.keyDown",message:l,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function hw(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const mf={resource:yw,paint:mw,navigation:gw};function fw(e){return e.map(pw).filter(Boolean)}function pw(e){return mf[e.entryType]?mf[e.entryType](e):null}function Br(e){return((FS||Pe.performance.timeOrigin)+e)/1e3}function mw(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=Br(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function gw(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:d,loadEventEnd:u,redirectCount:h,startTime:f,transferSize:p,type:_}=e;return s===0?null:{type:`${t}.${_}`,start:Br(f),end:Br(i),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:u,domComplete:i,redirectCount:h}}}function yw(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Br(i),end:Br(s),name:r,data:{size:l,statusCode:c,decodedBodySize:o,encodedBodySize:a}}}function _w(e){const t=e.entries,n=t[t.length-1],r=n?n.element:void 0,s=e.value,i=Br(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:s,size:s,nodeId:r?Ln.mirror.getId(r):void 0}}}function Ew(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(Sb(s,n))}),r.push(Eb(({metric:s})=>{e.replayPerformanceEntries.push(_w(s))})),()=>{r.forEach(s=>s())}}const Ce=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Sw='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function bw(){const e=new Blob([Sw]);return URL.createObjectURL(e)}function ht(e,t){Ce&&(K.info(e),t&&gf(e))}function Wr(e,t){Ce&&(K.info(e),t&&setTimeout(()=>{gf(e)},0))}function gf(e){Nn({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class vc extends Error{constructor(){super(`Event buffer exceeded maximum size of ${lc}.`)}}class yf{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>lc)throw new vc;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?bc(t):null}}class Iw{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){ht("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",o),!c.success){Ce&&K.error("[Replay]",c.response),i(new Error("Error in compression worker"));return}s(c.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class vw{constructor(t){this._worker=new Iw(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=bc(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>lc?Promise.reject(new vc):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Ce&&K.warn('[Replay] Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class ww{constructor(t){this._fallback=new yf,this._compression=new vw(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{ht("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n}=this._fallback,r=[];for(const s of t)r.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(s){Ce&&K.warn("[Replay] Failed to add events when switching buffers.",s)}}}function Cw({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Tw(t);if(n)return n}return ht("[Replay] Using simple buffer"),new yf}function Tw(e){try{const t=e||Dw();if(!t)return;ht(`[Replay] Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new ww(n)}catch{ht("[Replay] Failed to create compression worker")}}function Dw(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?bw():""}function wc(){try{return"sessionStorage"in Pe&&!!Pe.sessionStorage}catch{return!1}}function Pw(e){Aw(),e.session=void 0}function Aw(){if(wc())try{Pe.sessionStorage.removeItem(ac)}catch{}}function _f(e){return e===void 0?!1:Math.random()<e}function Ef(e){const t=Date.now(),n=e.id||bt(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function Cc(e){if(wc())try{Pe.sessionStorage.setItem(ac,JSON.stringify(e))}catch{}}function kw(e,t){return _f(e)?"session":t?"buffer":!1}function Sf({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=kw(e,t),i=Ef({sampled:s,previousSessionId:r});return n&&Cc(i),i}function Nw(e){if(!wc())return null;try{const t=Pe.sessionStorage.getItem(ac);if(!t)return null;const n=JSON.parse(t);return Wr("[Replay] Loading existing session",e),Ef(n)}catch{return null}}function Tc(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function bf(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Tc(e.started,t,r)||Tc(e.lastActivity,n,r)}function If(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!bf(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Dc({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},s){const i=s.stickySession&&Nw(e);return i?If(i,{sessionIdleExpire:t,maxReplayDuration:n})?(Wr("[Replay] Session in sessionStorage is expired, creating new one..."),Sf(s,{previousSessionId:i.id})):i:(Wr("[Replay] Creating new session",e),Sf(s,{previousSessionId:r}))}function Mw(e){return e.type===le.Custom}function Pc(e,t,n){return wf(e,t)?(vf(e,t,n),!0):!1}function Ow(e,t,n){return wf(e,t)?vf(e,t,n):Promise.resolve(null)}async function vf(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const r=e.getOptions(),s=Rw(t,r.beforeAddRecordingEvent);return s?await e.eventBuffer.addEvent(s):void 0}catch(r){const s=r&&r instanceof vc?"addEventSizeExceeded":"addEvent";Ce&&K.error(r),await e.stop({reason:s});const i=Me();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function wf(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=bc(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(ht(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function Rw(e,t){try{if(typeof t=="function"&&Mw(e))return t(e)}catch(n){return Ce&&K.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}function Ac(e){return!e.type}function kc(e){return e.type==="transaction"}function xw(e){return e.type==="replay_event"}function Cf(e){return e.type==="feedback"}function Tf(e){const t=Fw();return(n,r)=>{if(!e.isEnabled()||!Ac(n)&&!kc(n))return;const s=r&&r.statusCode;if(!(t&&(!s||s<200||s>=300))){if(kc(n)){Lw(e,n);return}Uw(e,n)}}}function Lw(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Uw(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function Fw(){const e=Me();if(!e)return!1;const t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function $w(e){return t=>{!e.isEnabled()||!Ac(t)||jw(e,t)}}function jw(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=Jt({category:"replay.hydrate-error"});Fs(e,r)}}function Hw(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function Vw(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:le.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function Bw(e,t){return e.recordingMode!=="buffer"||t.message===cc||!t.exception||t.type?!1:_f(e.getOptions().errorSampleRate)}function Ww(e,t=!1){const n=t?Tf(e):void 0;return Object.assign((r,s)=>e.isEnabled()?xw(r)?(delete r.breadcrumbs,r):!Ac(r)&&!kc(r)&&!Cf(r)||!e.checkAndHandleExpiredSession()?r:Cf(r)?(e.flush(),r.contexts.feedback.replay_id=e.getSessionId(),Vw(e,r),r):Hw(r,s)&&!e.getOptions()._experiments.captureExceptions?(Ce&&K.log("[Replay] Ignoring error from rrweb internals",r),null):((Bw(e,r)||e.recordingMode==="session")&&(r.tags={...r.tags,replayId:e.getSessionId()}),n&&n(r,{statusCode:200}),r):r,{id:"Replay"})}function go(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:le.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function zw(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Kw(e){return t=>{if(!e.isEnabled())return;const n=zw(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(go(e,[n]),!1)))}}function Gw(e,t){return Ce&&e.getOptions()._experiments.traceInternals?!1:Y0(t,Me())}function yo(e,t){e.isEnabled()&&t!==null&&(Gw(e,t.name)||e.addUpdate(()=>(go(e,[t]),!0)))}function Yw(e){const{startTimestamp:t,endTimestamp:n,fetchData:r,response:s}=e;if(!n)return null;const{method:i,url:o}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s?s.status:void 0}}}function Zw(e){return t=>{if(!e.isEnabled())return;const n=Yw(t);yo(e,n)}}function Xw(e){const{startTimestamp:t,endTimestamp:n,xhr:r}=e,s=r[dr];if(!t||!n||!s)return null;const{method:i,url:o,status_code:a}=s;return o===void 0?null:{type:"resource.xhr",name:o,start:t/1e3,end:n/1e3,data:{method:i,statusCode:a}}}function Jw(e){return t=>{if(!e.isEnabled())return;const n=Xw(t);yo(e,n)}}function _o(e,t){if(e)try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=kf(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Df(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Pf(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[kf(e)];if(!e)return[void 0]}catch{return Ce&&K.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ce&&K.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Eo(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Af(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:Nt({method:i,statusCode:o,request:a,response:c})}}function $s(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Fn(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:i}=qw(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function Nc(e,t){return Object.keys(e).reduce((n,r)=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=e[r]),n},{})}function kf(e){return new URLSearchParams(e).toString()}function qw(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Oh,n=Qw(e);if(t){const r=e.slice(0,Oh);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Qw(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function So(e,t){const n=e1(e);return Ss(n,t)}function e1(e,t=Pe.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Pe.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function t1(e,t,n){try{const r=await r1(e,t,n),s=Af("resource.fetch",r);yo(n.replay,s)}catch(r){Ce&&K.error("[Replay] Failed to capture fetch breadcrumb",r)}}function n1(e,t,n){const{input:r,response:s}=t,i=r?Nf(r):void 0,o=_o(i,n.textEncoder),a=s?Df(s.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),a!==void 0&&(e.data.response_body_size=a)}async function r1(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:a,status_code:c=0,request_body_size:l,response_body_size:d}=e.data,u=So(o,n.networkDetailAllowUrls)&&!So(o,n.networkDetailDenyUrls),h=u?s1(n,t.input,l):$s(l),f=await i1(u,n,t.response,d);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:h,response:f}}function s1({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?c1(n,t):{};if(!e)return Fn(s,r,void 0);const i=Nf(n),[o,a]=Pf(i),c=Fn(s,r,o);return a?Eo(c,a):c}async function i1(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},s,i){if(!e&&i!==void 0)return $s(i);const o=s?Mf(s.headers,r):{};if(!s||!t&&i!==void 0)return Fn(o,i,void 0);const[a,c]=await a1(s),l=o1(a,{networkCaptureBodies:t,textEncoder:n,responseBodySize:i,captureDetails:e,headers:o});return c?Eo(l,c):l}function o1(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:s,headers:i}){try{const o=e&&e.length&&r===void 0?_o(e,n):r;return s?t?Fn(i,o,e):Fn(i,o,void 0):$s(o)}catch(o){return Ce&&K.warn("[Replay] Failed to serialize response body",o),Fn(i,r,void 0)}}async function a1(e){const t=l1(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await u1(t)]}catch(n){return Ce&&K.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function Nf(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function Mf(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function c1(e,t){return e.length===1&&typeof e[0]!="string"?Of(e[0],t):e.length===2?Of(e[1],t):{}}function Of(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Mf(n,t):Array.isArray(n)?{}:Nc(n,t):{}}function l1(e){try{return e.clone()}catch(t){Ce&&K.warn("[Replay] Failed to clone response body",t)}}function u1(e){return new Promise((t,n)=>{const r=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);d1(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function d1(e){return await e.text()}async function h1(e,t,n){try{const r=p1(e,t,n),s=Af("resource.xhr",r);yo(n.replay,s)}catch(r){Ce&&K.error("[Replay] Failed to capture xhr breadcrumb",r)}}function f1(e,t,n){const{xhr:r,input:s}=t;if(!r)return;const i=_o(s,n.textEncoder),o=r.getResponseHeader("content-length")?Df(r.getResponseHeader("content-length")):_1(r.response,r.responseType,n.textEncoder);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function p1(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=t,{url:c,method:l,status_code:d=0,request_body_size:u,response_body_size:h}=e.data;if(!c)return null;if(!a||!So(c,n.networkDetailAllowUrls)||So(c,n.networkDetailDenyUrls)){const V=$s(u),$=$s(h);return{startTimestamp:s,endTimestamp:i,url:c,method:l,statusCode:d,request:V,response:$}}const f=a[dr],p=f?Nc(f.request_headers,n.networkRequestHeaders):{},_=Nc(m1(a),n.networkResponseHeaders),[S,I]=n.networkCaptureBodies?Pf(o):[void 0],[E,k]=n.networkCaptureBodies?g1(a):[void 0],M=Fn(p,u,S),T=Fn(_,h,E);return{startTimestamp:s,endTimestamp:i,url:c,method:l,statusCode:d,request:I?Eo(M,I):M,response:k?Eo(T,k):T}}function m1(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
181
|
+
`).reduce((n,r)=>{const[s,i]=r.split(": ");return n[s.toLowerCase()]=i,n},{}):{}}function g1(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return y1(e.response,e.responseType)}catch(n){t.push(n)}return Ce&&K.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function y1(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch{return Ce&&K.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ce&&K.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function _1(e,t,n){try{const r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return _o(r,n)}catch{return}}function E1(e){const t=Me();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a};t&&t.on?t.on("beforeAddBreadcrumb",(l,d)=>S1(c,l,d)):(ud(Zw(e)),hd(Jw(e)))}catch{}}function S1(e,t,n){if(t.data)try{b1(t)&&v1(n)&&(f1(t,n,e),h1(t,n,e)),I1(t)&&w1(n)&&(n1(t,n,e),t1(t,n,e))}catch{Ce&&K.warn("Error when enriching network breadcrumb")}}function b1(e){return e.category==="xhr"}function I1(e){return e.category==="fetch"}function v1(e){return e&&e.xhr}function w1(e){return e&&e.response}let Rf=null;function C1(e){return!!e.category}const T1=e=>t=>{if(!e.isEnabled())return;const n=D1(t);n&&Fs(e,n)};function D1(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return Rf===t||!t||(Rf=t,!C1(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:t.category==="console"?P1(t):Jt(t)}function P1(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return Jt(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>ro?(n=!0,`${s.slice(0,ro)}…`):s;if(typeof s=="object")try{const i=Gt(s,7);return JSON.stringify(i).length>ro?(n=!0,`${JSON.stringify(i,null,2).slice(0,ro)}…`):i}catch{}return s});return Jt({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function A1(e){const t=Mn(),n=Me();t.addScopeListener(T1(e)),ad(ow(e)),Wa(Kw(e)),E1(e);const r=Ww(e,!xf(n));n&&n.addEventProcessor?n.addEventProcessor(r):B0(r),xf(n)&&(n.on("beforeSendEvent",$w(e)),n.on("afterSendEvent",Tf(e)),n.on("createDsc",s=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(s.replay_id=i)}),n.on("startTransaction",s=>{e.lastTransaction=s}),n.on("finishTransaction",s=>{e.lastTransaction=s}),n.on("beforeSendFeedback",(s,i)=>{const o=e.getSessionId();i&&i.includeReplay&&e.isEnabled()&&o&&(e.flush(),s.contexts&&s.contexts.feedback&&(s.contexts.feedback.replay_id=o))}))}function xf(e){return!!(e&&e.on)}async function k1(e){try{return Promise.all(go(e,[N1(Pe.performance.memory)]))}catch{return[]}}function N1(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function M1(e,t,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function l(){return s!==void 0||i!==void 0?a():r}function d(){return s&&clearTimeout(s),s=setTimeout(a,t),o&&i===void 0&&(i=setTimeout(a,o)),r}return d.cancel=c,d.flush=l,d}function O1(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Ce&&K.warn("[Replay] Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&tw(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!Pc(e,n,s))return!0;if(!s)return!1;if(x1(e,s),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){const i=e.eventBuffer.getEarliestTimestamp();i&&(ht(`[Replay] Updating session start time to earliest event in buffer to ${new Date(i)}`,e.getOptions()._experiments.traceInternals),e.session.started=i,e.getOptions().stickySession&&Cc(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function R1(e){const t=e.getOptions();return{type:le.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function x1(e,t){!t||!e.session||e.session.segmentId!==0||Pc(e,R1(e),!1)}function L1(e,t,n,r){return hr(Ed(e,Za(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function U1({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
182
|
+
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function F1({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit&&e.emit("preprocessEvent",r,i);const o=await wd(e.getOptions(),r,i,t,e,Ps());if(!o)return null;o.platform=o.platform||"javascript";const a=e.getSdkMetadata&&e.getSdkMetadata(),{name:c,version:l}=a&&a.sdk||{};return o.sdk={...o.sdk,name:c||"sentry.javascript.unknown",version:l||"0.0.0"},o}async function $1({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=U1({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,initialTimestamp:d}=r,u=Me(),h=Mn(),f=u&&u.getTransport(),p=u&&u.getDsn();if(!u||!f||!p||!i.sampled)return;const _={type:vI,replay_start_timestamp:d/1e3,timestamp:s/1e3,error_ids:c,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},S=await F1({scope:h,client:u,replayId:t,event:_});if(!S){u.recordDroppedEvent("event_processor","replay",_),ht("An event processor returned `null`, will not send event.");return}delete S.sdkProcessingMetadata;const I=L1(S,o,p,u.getOptions().tunnel);let E;try{E=await f.send(I)}catch(M){const T=new Error(cc);try{T.cause=M}catch{}throw T}if(!E)return E;if(typeof E.statusCode=="number"&&(E.statusCode<200||E.statusCode>=300))throw new Lf(E.statusCode);const k=bd({},E);if(Sd(k,"replay"))throw new Uf(k);return E}class Lf extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Uf extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Ff(e,t={count:0,interval:AI}){const{recordingData:n,options:r}=e;if(n.length)try{return await $1(e),!0}catch(s){if(s instanceof Lf||s instanceof Uf)throw s;if(d0("Replays",{_retryCount:t.count}),Ce&&r._experiments&&r._experiments.captureExceptions&&Xi(s),t.count>=kI){const i=new Error(`${cc} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{setTimeout(async()=>{try{await Ff(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const $f="__THROTTLED",j1="__SKIPPED";function H1(e,t,n){const r=new Map,s=a=>{const c=a-n;r.forEach((l,d)=>{d<c&&r.delete(d)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0);let o=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(s(c),i()>=t){const d=o;return o=!0,d?j1:$f}o=!1;const l=r.get(c)||0;return r.set(c,l+1),e(...a)}}class $n{constructor({options:t,recordingOptions:n}){$n.prototype.__init.call(this),$n.prototype.__init2.call(this),$n.prototype.__init3.call(this),$n.prototype.__init4.call(this),$n.prototype.__init5.call(this),$n.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:wI,sessionIdleExpire:CI},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=M1(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=H1((o,a)=>Ow(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(NI,r),timeout:r,scrollTimeout:MI,ignoreSelector:s?s.join(","):""}:void 0;i&&(this.clickDetector=new Jv(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options;if(!(n<=0&&r<=0)){if(this._initializeSessionForSampling(t),!this.session){this._handleException(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Wr(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Wr("[Replay] Starting replay in session mode",this._options._experiments.traceInternals);const t=Dc({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Wr("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=Dc({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Ln({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:PI},emit:O1(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{ht(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Pw(this)}catch(r){this._handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),ht("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),ht("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();ht("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Tc(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Pe.location.pathname}${Pe.location.hash}${Pe.location.search}`,n=`${Pe.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===$f){const s=Jt({category:"replay.throttled"});this.addUpdate(()=>!Pc(this,{type:zv,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastTransaction||Mn().getTransaction(),r=(t&&pr(t).data||{})[w0];if(!(!t||!r||!["route","custom"].includes(r)))return pr(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Cw({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){Ce&&K.error("[Replay]",t),Ce&&this._options._experiments&&this._options._experiments.captureExceptions&&Xi(t)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Dc({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return If(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{Pe.document.addEventListener("visibilitychange",this._handleVisibilityChange),Pe.addEventListener("blur",this._handleWindowBlur),Pe.addEventListener("focus",this._handleWindowFocus),Pe.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(A1(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=Ew(this)}_removeListeners(){try{Pe.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Pe.removeEventListener("blur",this._handleWindowBlur),Pe.removeEventListener("focus",this._handleWindowFocus),Pe.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{Pe.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=Jt({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=Jt({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{uw(this,t)}}_doChangeToBackgroundTasks(t){!this.session||bf(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){ht("[Replay] Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:le.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=fw(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(go(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Ce&&K.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await k1(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await Ff({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});const r=Me();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Ce&&K.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){ht(`[Replay] Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),i&&this._debouncedFlush();return}const a=this.eventBuffer;if(a&&this.session.segmentId===0&&!a.hasCheckout&&ht("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(c){Ce&&K.error(c)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Cc(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=Jt({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function js(e,t,n,r){const s=typeof r=="string"?r.split(","):[],i=[...e,...s,...t];return typeof n<"u"&&(typeof n=="string"&&i.push(`.${n}`),cr(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),i.join(",")}function V1({mask:e,unmask:t,block:n,unblock:r,ignore:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,ignoreClass:l}){const d=['base[href="/"]'],u=js(e,[".sentry-mask","[data-sentry-mask]"],a,c),h=js(t,[".sentry-unmask","[data-sentry-unmask]"]),f={maskTextSelector:u,unmaskTextSelector:h,blockSelector:js(n,[".sentry-block","[data-sentry-block]",...d],i,o),unblockSelector:js(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:js(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return i instanceof RegExp&&(f.blockClass=i),a instanceof RegExp&&(f.maskTextClass=a),f}function B1({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const jf='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',W1=["content-length","content-type","accept"];let Hf=!1;const z1=e=>new bo(e);class bo{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=TI,flushMaxDelay:n=DI,minReplayDuration:r=OI,maxReplayDuration:s=Rh,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},sessionSampleRate:l,errorSampleRate:d,maskAllText:u=!0,maskAllInputs:h=!0,blockAllMedia:f=!0,mutationBreadcrumbLimit:p=750,mutationLimit:_=1e4,slowClickTimeout:S=7e3,slowClickIgnoreSelectors:I=[],networkDetailAllowUrls:E=[],networkDetailDenyUrls:k=[],networkCaptureBodies:M=!0,networkRequestHeaders:T=[],networkResponseHeaders:V=[],mask:$=[],maskAttributes:J=["title","placeholder"],unmask:X=[],block:D=[],unblock:G=[],ignore:te=[],maskFn:R,beforeAddRecordingEvent:F,beforeErrorSampling:U,blockClass:j,blockSelector:v,maskInputOptions:P,maskTextClass:W,maskTextSelector:re,ignoreClass:Ee}={}){this.name=bo.id;const he=V1({mask:$,unmask:X,block:D,unblock:G,ignore:te,blockClass:j,blockSelector:v,maskTextClass:W,maskTextSelector:re,ignoreClass:Ee});if(this._recordingOptions={maskAllInputs:h,maskAllText:u,maskInputOptions:{...P||{},password:!0},maskTextFn:R,maskInputFn:R,maskAttributeFn:(ge,Ze,st)=>B1({maskAttributes:J,maskAllText:u,privacyOptions:he,key:ge,value:Ze,el:st}),...he,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:ge=>{try{ge.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,RI),maxReplayDuration:Math.min(s,Rh),stickySession:i,sessionSampleRate:l,errorSampleRate:d,useCompression:o,workerUrl:a,blockAllMedia:f,maskAllInputs:h,maskAllText:u,mutationBreadcrumbLimit:p,mutationLimit:_,slowClickTimeout:S,slowClickIgnoreSelectors:I,networkDetailAllowUrls:E,networkDetailDenyUrls:k,networkCaptureBodies:M,networkRequestHeaders:Vf(T),networkResponseHeaders:Vf(V),beforeAddRecordingEvent:F,beforeErrorSampling:U,_experiments:c},typeof l=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
|
|
183
|
+
This option is deprecated and will be removed soon.
|
|
184
|
+
Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
|
|
185
|
+
Sentry.init({ replaysSessionSampleRate: ${l} })`),this._initialOptions.sessionSampleRate=l),typeof d=="number"&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
|
|
186
|
+
This option is deprecated and will be removed soon.
|
|
187
|
+
Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
|
|
188
|
+
Sentry.init({ replaysOnErrorSampleRate: ${d} })`),this._initialOptions.errorSampleRate=d),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${jf}`:jf),this._isInitialized&&fd())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Hf}set _isInitialized(t){Hf=t}setupOnce(){fd()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const t=K1(this._initialOptions);this._replay=new $n({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const n=Me().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}bo.__initStatic();function K1(e){const t=Me(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Nt(e)};return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&cr(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate=="number"&&(r.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(cr(()=>{console.warn("SDK client is not available.")}),r)}function Vf(e){return[...W1,...e.map(t=>t.toLowerCase())]}const zr={PROVIDER_INFO:"PROVIDER_INFO",PROVIDERS_INFO:"PROVIDERS_INFO"},Io=(e,t,n)=>({[zr.PROVIDERS_INFO]:{url:e+"/info/providers/",method:"GET"},[zr.PROVIDER_INFO]:{url:e+(n?"/info/providers/token/"+n:"/info/providers/"+t),method:"GET"}});function We(e,t,n){const r=n.value;n.value=function(...s){try{return r.apply(this,s)}catch(i){throw Xi(i),i}}}class je{constructor(){y(this,"_submitFormHandlers",{});y(this,"environment",yt.PRODUCTION);y(this,"debug",!1);y(this,"config",vu(yt.PRODUCTION));y(this,"publicKey","");y(this,"amount",0);y(this,"currency","");y(this,"httpInvoker",null);y(this,"regionResolver",null);y(this,"destroyDropIn",()=>{});y(this,"threeDsProcessor",null);y(this,"paypalProcessor",null);y(this,"cardProcessor",null);y(this,"payToProcessor",null);y(this,"checkoutProcessors",[]);y(this,"fraudProcessor",null);y(this,"googlePayProcessor",null);y(this,"applePayProcessor",null);y(this,"userOnSuccess",null);y(this,"userOnFailure",null);y(this,"billingAddress",null);y(this,"customer",null);y(this,"order",null);y(this,"paymentOptions",{});y(this,"isSafari",!1);y(this,"initProcessorsHandlers",[])}initializeSentry(t,n){const r=yt.PRODUCTION!==n?{tracesSampleRate:1,replaysSessionSampleRate:1,replaysOnErrorSampleRate:1}:{tracesSampleRate:.2,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1};bI({dsn:t,environment:n,integrations:[z1({maskAllText:!0,blockAllMedia:!0})],beforeSend(s,i){var a;function o(c){const l=/\b(?:\d[ -]*?){13,16}\b/g,d=/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g;let u=c.replace(l,"[REDACTED CC]");return u=u.replace(d,"[REDACTED EMAIL]"),u}return(a=s.exception)!=null&&a.values&&s.exception.values.forEach(c=>{var l,d;typeof c.value=="string"&&(c.value=o(c.value)),(d=(l=c.stacktrace)==null?void 0:l.frames)==null||d.forEach(u=>{typeof u.function=="string"&&(u.function=o(u.function))})}),s},...r})}init(t,n,r){if(window._payfurl)return window._payfurl;if(this.environment=t,this.debug=r,this.publicKey=n,this.config=vu(t),!this.config)throw this.showErrorMessage(null,"Error: Unable to configure SDK due to an incorrect environment setting."),new TypeError("Error: Unable to configure SDK due to an incorrect environment setting.");const s=this.config.sentryUrl;return s?this.initializeSentry(s,t):console.log("Sentry is disabled. No sentry dns is provided."),this.regionResolver=new cn(t,ln(n)),this.httpInvoker=new an(n,un.version,this.regionResolver),this.isSafari=navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"),this.loadCss(),window._payfurl=this,this}initCardProcessor(t){if(this.log("[initCardProcessor]",{container:t}),this.cardProcessor)return this.cardProcessor;const n=new G_(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,url:this.config.url,apiUrl:this.config.apiUrl,version:un.version,onSuccess:r=>{var i;this.log("[cardProcessor], success",r),r.token&&(this._setToken(t,r.token),setTimeout(()=>{var o;this.userOnSuccess||(o=this.getForm(t))==null||o.submit()},500));const s={token:r.token};r.clickToPayData&&(s.clickToPayData=r.clickToPayData),(i=this.userOnSuccess)==null||i.call(this,s)},onFailure:r=>{var s;this.log("[cardProcessor], failure",r),(s=this.userOnFailure)==null||s.call(this,{error:r.error})}});return this.amount&&n.setAmount(this.amount),this.customer&&n.setCustomerInfo(this.customer),this.threeDsProcessor&&n.addThreeDsProcessor(this.threeDsProcessor),this.fraudProcessor&&n.addFraudProcessor(this.fraudProcessor),this.cardProcessor=n,n}initPaypalProcessor(t){if(this.log("[initPaypalProcessor]",{container:t}),this.paypalProcessor)return this.paypalProcessor;const n=new g_(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,version:un.version,onSuccess:r=>{var s;this.log("[paypalProcessor], success",r),!this.userOnSuccess&&r.transactionId&&(this._setToken(t,r.transactionId,"transactionId"),setTimeout(()=>{var i;(i=this.getForm(t))==null||i.submit()},500)),(s=this.userOnSuccess)==null||s.call(this,{transactionId:r.transactionId})},onFailure:r=>{var s;this.log("[paypalProcessor], failure",r),(s=this.userOnFailure)==null||s.call(this,{error:r.error})}});return this.amount&&n.setAmount(this.amount),this.fraudProcessor&&n.addFraudProcessor(this.fraudProcessor),this.paypalProcessor=n,n}initCheckoutProcessor(t){this.log("[initCheckoutProcessor]",{container:t});const n=new vE(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,redirectUrl:this.config.redirectUrl,version:un.version,onSuccess:r=>{var i;this.log("[checkoutProcessor], success",r),this.userOnSuccess||(r.transactionId&&this._setToken(t,r.transactionId,"transactionId"),r.token&&this._setToken(t,r.token,"token"),setTimeout(()=>{var o;(o=this.getForm(t))==null||o.submit()},500));const s={};r.transactionId&&(s.transactionId=r.transactionId),r.token&&(s.token=r.token),(i=this.userOnSuccess)==null||i.call(this,s)},onFailure:r=>{var s;this.log("[checkoutProcessor], failure",r),(s=this.userOnFailure)==null||s.call(this,{error:r.error})}});return this.checkoutProcessors.push(n),n}initGooglePayProcessor(t){if(this.log("[initGooglePayProcessor]",{container:t}),this.googlePayProcessor)return this.googlePayProcessor;const n=new PE(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,version:un.version,onSuccess:r=>{var s;this.log("[googlePayProcessor], success",r),!this.userOnSuccess&&r.transactionId&&(this._setToken(t,r.transactionId,"transactionId"),setTimeout(()=>{var i;(i=this.getForm(t))==null||i.submit()},500)),(s=this.userOnSuccess)==null||s.call(this,{transactionId:r.transactionId})},onFailure:r=>{var s;this.log("[googlePayProcessor], failure",r),(s=this.userOnFailure)==null||s.call(this,{error:r.error})}});return this.amount&&n.setAmount(this.amount),this.currency&&n.setCurrency(this.currency),this.googlePayProcessor=n,this.googlePayProcessor}initApplePayProcessor(t){if(this.log("[initApplePayProcessor]",{container:t}),this.applePayProcessor)return this.applePayProcessor;const n=new ME(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,version:un.version,onSuccess:r=>{var s;this.log("[applePayProcessor], success",r),!this.userOnSuccess&&r.transactionId&&(this._setToken(t,r.transactionId,"transactionId"),setTimeout(()=>{var i;(i=this.getForm(t))==null||i.submit()},500)),(s=this.userOnSuccess)==null||s.call(this,{transactionId:r.transactionId})},onFailure:r=>{var s;this.log("[applePayProcessor], failure",r),(s=this.userOnFailure)==null||s.call(this,{error:r.error})}});return this.amount&&n.setAmount(this.amount),this.currency&&n.setCurrency(this.currency),this.applePayProcessor=n,this.applePayProcessor}initPayToProcessor(t){return this.log("[initPayToProcessor]",{container:t}),this.payToProcessor?this.payToProcessor:(this.payToProcessor=new fE(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,version:un.version,getPaymentOptions:this.getPaymentOptions.bind(this),onSuccess:n=>{var r;this.log("[payToProcessor], success",n),n.token&&(this._setToken(t,n.token),setTimeout(()=>{var s;this.userOnSuccess||(s=this.getForm(t))==null||s.submit()},500)),(r=this.userOnSuccess)==null||r.call(this,{token:n.token})},onFailure:n=>{var r;this.log("[payToProcessor], failure",n),(r=this.userOnFailure)==null||r.call(this,{error:n.error})}}),this.payToProcessor)}loadCss(){const t=document.createElement("link");t.href=this.config.cssUrl+"style.css?v="+Math.random(),t.rel="stylesheet",t.media="screen,print",document.getElementsByTagName("head")[0].appendChild(t)}log(t,...n){this.debug&&console.log(t,n)}_cleanUp(t){var n,r,s,i,o,a,c,l,d;(n=this.getSubmit(t))==null||n.removeEventListener("click",this.getSubmitFormHandler(t)),(r=this.getForm(t))==null||r.removeEventListener("submit",this.getSubmitFormHandler(t)),(s=this.destroyDropIn)==null||s.call(this),(i=this.cardProcessor)==null||i.cleanUp(),(o=this.applePayProcessor)==null||o.cleanUp(),(a=this.googlePayProcessor)==null||a.cleanUp();for(const u of this.checkoutProcessors)(t==null?void 0:t.id)===((c=u.container)==null?void 0:c.id)&&u.cleanUp();this.checkoutProcessors=[],(l=this.paypalProcessor)==null||l.cleanUp(),(d=this.payToProcessor)==null||d.cleanUp(),t&&(t.innerHTML="")}getForm(t){var n;return((n=t==null?void 0:t.parentElement)==null?void 0:n.closest("form"))||null}getSubmit(t){const n=this.getForm(t);return n?n.querySelector('button[type="submit"]')||n.querySelector('input[type="submit"]'):null}_initForm(t){const n=this.getForm(t);if(!n)return;const r=this.getSubmit(t);r?r.addEventListener("click",this.getSubmitFormHandler(t)):n.addEventListener("submit",this.getSubmitFormHandler(t))}_setToken(t,n,r="token"){const s=this.getForm(t);if(!s)return;let i=s.querySelector('input[name="'+r+'"]');i||(i=document.createElement("input"),i.type="hidden",i.name=r,s.appendChild(i)),i.value=n}getSubmitFormHandler(t){const n=(t==null?void 0:t.id)||"container";if(this._submitFormHandlers[n])return this._submitFormHandlers[n];const r=s=>{this.log("[sdk], submitForm",s),s.preventDefault();const i=this.getForm(t);if(!(i!=null&&i.onsubmit&&!i.onsubmit(new SubmitEvent("submit")))){if(i){const o=i.querySelector('input[name="token"]');if(o!=null&&o.value){i.submit();return}}window.postMessage({status:ga},"*")}};return this._submitFormHandlers[n]=r,r}addCard(t,n,r){this.log("[addCard]",{providerId:n,options:r});const s=t&&document.getElementById(t)||null;if(!s)throw new TypeError("Container is not available");if(!rt(n))throw this.showErrorMessage(s,"Missing parameter: providerId"),new TypeError("Missing parameter: providerId");const i=Number(r==null?void 0:r.amount)||0,o=(r==null?void 0:r.currency)||"";if(i&&!ct(i))throw this.showErrorMessage(s,"Missing parameter: amount"),new TypeError("Missing parameter: amount");return this._cleanUp(s),this._initForm(s),this.setAmount(i),this.setCurrency(o),this.initProcessors(s,i,o,n,"",{},(a,c)=>{const l={...r,requiredFields:a.requiredFields,clientParameters:a.clientParameters,visProviderId:c.hasVisaInstallmentsProviders&&c.visaInstallmentsProviders[0]||"",clickToPayEnabled:(r==null?void 0:r.clickToPayEnabled)&&c.clickToPayEnabled,clickToPayOptions:{...c.clickToPayOptions,...r==null?void 0:r.clickToPayOptions},threeDSEnabled:!!c.required3dsProvider};if(l.threeDSEnabled){if(!ct(i))throw this.showErrorMessage(s,"Missing parameter: amount"),new TypeError("Missing parameter: amount");if(!Et(o))throw this.showErrorMessage(s,"Missing parameter: currency"),new TypeError("Missing parameter: currency")}this.initCardProcessor(s).addCard(s,this.getForm(s),n,i,o,l)}),this}addCardLeastCost(t,n,r,s){this.log("[addCardLeastCost]",{amount:n,currency:r,options:s});const i=t&&document.getElementById(t)||null;if(!i)throw new TypeError("Container is not available");return this._cleanUp(i),this._initForm(i),this.setAmount(n),this.setCurrency(r),this.initProcessors(i,n,r,"","",{},(o,a)=>{if({...s,requiredFields:o.requiredFields,clientParameters:o.clientParameters,visProviderId:a.hasVisaInstallmentsProviders&&a.visaInstallmentsProviders[0]||"",clickToPayEnabled:(s==null?void 0:s.clickToPayEnabled)&&a.clickToPayEnabled,clickToPayOptions:{...a.clickToPayOptions,...s==null?void 0:s.clickToPayOptions},threeDSEnabled:!!a.required3dsProvider}.threeDSEnabled){if(!ct(n))throw this.showErrorMessage(i,"Missing parameter: amount"),new TypeError("Missing parameter: amount");if(!Et(r))throw this.showErrorMessage(i,"Missing parameter: currency"),new TypeError("Missing parameter: currency")}this.initCardProcessor(i).addCard(i,this.getForm(i),"",n,r,s)}),this}addDropIn(t,n,r,s){this.log("[addDropIn]",{amount:n,currency:r,options:s});const i=t&&document.getElementById(t)||null;if(!i)throw new TypeError("Container is not available");this._cleanUp(i),this._initForm(i),this.setAmount(n),this.setCurrency(r);const o=(s==null?void 0:s.cardProviderId)||"";return this.initProcessors(i,n,r,o,"",{},(a,c)=>{var S,I,E,k,M,T,V,$,J,X;s!=null&&s.paypalProviderId&&c.hasPaypalProviders&&c.paypalProviders.includes(s==null?void 0:s.paypalProviderId)&&(c.hasPaypalProviders=!0,c.paypalProviders.unshift(s==null?void 0:s.paypalProviderId)),s!=null&&s.payToProviderId&&c.hasPayToProviders&&c.payToProviders.includes(s==null?void 0:s.payToProviderId)&&(c.hasPayToProviders=!0,c.payToProviders.unshift(s==null?void 0:s.payToProviderId));const l=[c.hasCardProviders,c.hasPaypalProviders,c.hasPayToProviders,c.hasBnplProviders,c.hasGooglePayProviders].filter(Boolean).length>1,d={threeDSEnabled:!!c.required3dsProvider,threeDsProviderId:c.required3dsProvider||"",threeDSEmail:(s==null?void 0:s.threeDSEmail)||"",visProviderId:c.hasVisaInstallmentsProviders&&c.visaInstallmentsProviders[0]||"",clickToPayEnabled:(s==null?void 0:s.clickToPayEnabled)&&c.clickToPayEnabled,clickToPayOptions:{...c.clickToPayOptions,...s==null?void 0:s.clickToPayOptions},requiredFields:a.requiredFields,clientParameters:a.clientParameters},u={hideShipping:!1,paypalButtonStyle:null,paypalEnablePayIn4:!1,transfer:null},h={description:String(s==null?void 0:s.payToDescription).trim()||String((S=c.payToProvidersWithOptions[0])==null?void 0:S.description)||"",maximumAmount:(s==null?void 0:s.payToMaximumAmount)||Number((I=c.payToProvidersWithOptions[0])==null?void 0:I.maximumAmount)||0},f={taxAmount:(E=this.order)==null?void 0:E.taxAmount,shippingAmount:(k=this.order)==null?void 0:k.shippingAmount,discountAmount:(M=this.order)==null?void 0:M.discountAmount,orderItems:(T=this.order)==null?void 0:T.orderItems,customer:this.customer||void 0,billingAddress:this.billingAddress||void 0},p={gateway:c.hasGooglePayProviders?c.googlePayProviders[0].gateway:"",gatewayMerchantId:c.hasGooglePayProviders?c.googlePayProviders[0].gatewayMerchantId:""},_={lineItemLabel:((V=s==null?void 0:s.applePayOptions)==null?void 0:V.lineItemLabel)||"",displayName:(($=s==null?void 0:s.applePayOptions)==null?void 0:$.displayName)||"",domainName:((J=s==null?void 0:s.applePayOptions)==null?void 0:J.domainName)||"",merchantIdentifier:((X=s==null?void 0:s.applePayOptions)==null?void 0:X.merchantIdentifier)||""};if(!l&&c.hasCardProviders){const D=t&&document.getElementById(t)||null;this.initCardProcessor(D).addCard(D,this.getForm(D),o,n,r,d);return}if(!l&&c.hasPaypalProviders){this.addPaypal(t,n,r,c.paypalProviders[0],u);return}if(!l&&c.hasPayToProviders){this.addPayTo(t,n,c.payToProviders[0],h);return}if(!l&&c.hasBnplProviders&&Ca[c.bnplProviders[0].providerType]){c.bnplProviders[0].providerType==="upi"?this.addUpi(t,n,c.bnplProviders[0].providerId,(s==null?void 0:s.upiOptions)||{}):this.addCheckout(t,n,r,c.bnplProviders[0].providerType,c.bnplProviders[0].providerId,f,c.bnplProviders[0].options);return}if(!l&&c.hasGooglePayProviders){this.addGooglePay(t,n,r,c.googlePayProviders[0].providerId,p);return}if(!l&&this.isSafari&&Object.keys((s==null?void 0:s.applePayOptions)||{}).length>0){this.addApplePay(t,n,r,(s==null?void 0:s.applePayOptions.providerId)||"",_);return}if(l){const D=()=>{window.postMessage({status:"deactivate",component:"paypal"},"*"),window.postMessage({status:"deactivate",component:"card"},"*"),window.postMessage({status:"deactivate",component:"payto"},"*"),window.postMessage({status:"deactivate",component:"googlepay"},"*"),window.postMessage({status:"deactivate",component:"applepay"},"*"),c.hasBnplProviders&&c.bnplProviders.forEach(R=>{window.postMessage({status:"deactivate",component:"checkout",providerType:R.providerType},"*")})},G=[];if(c.hasCardProviders&&G.push({title:"Card",description:"Credit or Debit",icon:wy,render:R=>{this.initCardProcessor(R).addCard(R,this.getForm(R),(s==null?void 0:s.cardProviderId)||"",n,r,d)},activate:()=>{D(),window.postMessage({status:"activate",component:"card"},"*")}}),c.hasPaypalProviders&&G.push({title:"Paypal",icon:by,render:R=>{this.initPaypalProcessor(R).addPaypal(R,this.getForm(R),n,r,c.paypalProviders[0],u)},activate:()=>{D(),window.postMessage({status:"activate",component:"paypal"},"*")}}),c.hasPayToProviders)if(rt(h.description))G.push({title:"PayTo",icon:ky,render:R=>{this.initPayToProcessor(R).addPayTo(R,n,c.payToProviders[0],h)},activate:()=>{D(),window.postMessage({status:"activate",component:"payto"},"*")}});else throw this.showErrorMessage(i,"Missing parameter: PayTo Description"),new TypeError("Missing parameter: PayTo Description");c.hasBnplProviders&&c.bnplProviders.forEach(R=>{var j,v;const F=Ca[R.providerType];if(!F)return;const U=F.icon?`${this.config.cssUrl}icons/${F.icon}.svg`:null;G.push({title:F.name||R.providerType,description:F.description||((v=(j=R.options)==null?void 0:j.terms)==null?void 0:v.replaceAll(/(\d+\.\d{3,})/g,(P,W)=>parseFloat(W).toFixed(2))),icon:U,render:P=>{R.providerType==="upi"?this.addUpi(P.id,n,R.providerId,(s==null?void 0:s.upiOptions)||{}):this.initCheckoutProcessor(P).addCheckout(P,n,r,R.providerType,R.providerId,f,R.options)},activate:()=>{D(),window.postMessage({status:"activate",component:"checkout",providerType:R.providerType},"*")}})}),c.hasGooglePayProviders&&G.push({title:"GooglePay",icon:Dy,render:R=>{this.initGooglePayProcessor(R).addGooglePay(R,c.hasGooglePayProviders?c.googlePayProviders[0].providerId:"",n,r,p)},activate:()=>{D(),window.postMessage({status:"activate",component:"googlepay"},"*")}}),this.isSafari&&Object.keys((s==null?void 0:s.applePayOptions)||{}).length>0&&G.push({title:"ApplePay",icon:xE,render:R=>{this.initApplePayProcessor(R).addApplePay(R,(s==null?void 0:s.applePayOptions.providerId)||"",n,r,_)},activate:()=>{D(),window.postMessage({status:"activate",component:"applepay"},"*")}});const te=nt({el:document.getElementById(t),component:jy,props:{elements:G}});this.destroyDropIn=te.destroy}}),this}addPaypal(t,n,r,s,i){this.log("[addPaypal]",{amount:n,currency:r,providerId:s,options:i});const o=t&&document.getElementById(t)||null;if(!o)throw new TypeError("Container is not available");if(!ct(n))throw this.showErrorMessage(o,"Missing parameter: amount"),new TypeError("Missing parameter: amount");if(!Et(r))throw this.showErrorMessage(o,"Missing parameter: currency"),new TypeError("Missing parameter: currency");return this._cleanUp(o),this._initForm(o),this.setAmount(n),this.setCurrency(r),this.initProcessors(o,n,r,s||"","",{},(a,c)=>{const l=c.paypalProviders[0]||s||"";if(!l)throw this.showErrorMessage(o,"Missing parameter: Provider Id"),new TypeError("Missing parameter: Provider Id");this.initPaypalProcessor(o).addPaypal(o,this.getForm(o),n,r,l,i)}),this}addPayTo(t,n,r,s){this.log("[addPayTo]",{amount:n,providerId:r,options:s});const i=t&&document.getElementById(t)||null;if(!i)throw new TypeError("Container is not available");if(!ct(n))throw this.showErrorMessage(i,"Missing parameter: amount"),new TypeError("Missing parameter: amount");this._cleanUp(i),this._initForm(i),this.setAmount(n),this.setCurrency("AUD");const o=(a,c)=>{this.log("[addPayTo, local]",{amount:n,localProviderId:a,localOptions:c}),this.initPayToProcessor(i).addPayTo(i,n,a,{maximumAmount:c.maximumAmount,description:c.description})};return r&&(s!=null&&s.maximumAmount)&&(s!=null&&s.description)?(o(r,s),this):(this.initProcessors(i,n,"AUD",r||"","",{},(a,c)=>{if(!c.hasPayToProviders)return this;const l=c.payToProvidersWithOptions[0];o(l.providerId,{maximumAmount:l.maximumAmount,description:l.description})}),this)}addGooglePay(t,n,r,s,i){this.log("[addGooglePay]",{amount:n,currency:r,providerId:s,options:i});const o=t&&document.getElementById(t)||null;if(!o)throw new TypeError("Container is not available");if(!ct(n))throw this.showErrorMessage(o,"Missing parameter: amount"),new TypeError("Missing parameter: amount");if(!Et(r))throw this.showErrorMessage(o,"Missing parameter: currency"),new TypeError("Missing parameter: currency");this._cleanUp(o),this._initForm(o),this.setAmount(n),this.setCurrency(r);const a=(c,l)=>{this.log("[addGooglePay, local]",{amount:n,currency:r,localProviderId:c,localOptions:l}),this.initGooglePayProcessor(o).addGooglePay(o,c,n,r,{gateway:l.gateway,gatewayMerchantId:l.gatewayMerchantId})};return s&&(i!=null&&i.gateway)&&(i!=null&&i.gatewayMerchantId)?(a(s,i),this):(this.initProcessors(o,n,r,s||"","",{},(c,l)=>{if(!l.hasGooglePayProviders)return this;const d=l.googlePayProviders[0];a(d.providerId,{gateway:d.gateway,gatewayMerchantId:d.gatewayMerchantId})}),this)}addApplePay(t,n,r,s,i){if(!this.isSafari)throw new TypeError("Your browser does not support ApplePay");if(this.log("[addApplePay]",{amount:n,currency:r,providerId:s,options:i}),!s)throw new TypeError("Invalid providerId parameter");if(!i.domainName)throw new TypeError("Invalid domainName parameter");if(!i.merchantIdentifier)throw new TypeError("Invalid merchantIdentifier parameter");if(!i.displayName)throw new TypeError("Invalid displayName parameter");if(!i.lineItemLabel)throw new TypeError("Invalid lineItemLabel parameter");const o=t&&document.getElementById(t)||null;if(!o)throw new TypeError("Container is not available");if(!ct(n))throw this.showErrorMessage(o,"Missing parameter: amount"),new TypeError("Missing parameter: amount");if(!Et(r))throw this.showErrorMessage(o,"Missing parameter: currency"),new TypeError("Missing parameter: currency");return this._cleanUp(o),this._initForm(o),this.setAmount(n),this.setCurrency(r),this.initApplePayProcessor(o).addApplePay(o,s,n,r,i),this}addCheckout(t,n,r,s,i,o,a){var l,d,u,h,f,p,_,S;this.log(`[addCheckout], ${s}`,{parentId:t,amount:n,currency:r,providerType:s,providerId:i,options:o});const c=t&&document.getElementById(t)||null;if(!c)throw new TypeError("Container is not available");return this._cleanUp(c),this._initForm(c),this.setAmount(n),o||(o={}),!o.orderItems&&((l=this.order)!=null&&l.orderItems)&&(o.orderItems=(d=this.order)==null?void 0:d.orderItems.slice()),!o.taxAmount&&((u=this.order)!=null&&u.taxAmount)&&(o.taxAmount=(h=this.order)==null?void 0:h.taxAmount),!o.discountAmount&&((f=this.order)!=null&&f.discountAmount)&&(o.discountAmount=(p=this.order)==null?void 0:p.discountAmount),!o.shippingAmount&&((_=this.order)!=null&&_.shippingAmount)&&(o.shippingAmount=(S=this.order)==null?void 0:S.shippingAmount),!o.billingAddress&&this.billingAddress&&(o.billingAddress={...this.billingAddress}),!o.customer&&this.customer&&(o.customer={...this.customer}),this.initCheckoutProcessor(c).addCheckout(c,n,r,s,i,o,a),this}addUpi(t,n,r,s){var d;this.log("[addUpi]",{amount:n,providerId:r,options:s});const i=t&&document.getElementById(t)||null;if(!i)throw new TypeError("Container is not available");if(!rt(r))throw this.showErrorMessage(i,"Missing parameter: providerId"),new TypeError("Missing parameter: providerId");if(!rt(s==null?void 0:s.email))throw this.showErrorMessage(i,"Missing parameter: options.email"),new TypeError("Missing parameter: options.email");if(!rt(s==null?void 0:s.name))throw this.showErrorMessage(i,"Missing parameter: options.name"),new TypeError("Missing parameter: options.name");if(!rt(s==null?void 0:s.documentId))throw this.showErrorMessage(i,"Missing parameter: options.documentId"),new TypeError("Missing parameter: options.documentId");this._initForm(i),this.setAmount(n);const o=((d=this.order)==null?void 0:d.orderItems)||[],a=this.customer||{},c=this.billingAddress||{};rt(a.firstName)||(a.firstName=s.name),rt(a.email)||(a.email=s.email),rt(c.firstName)||(c.firstName=s.name),rt(c.email)||(c.email=s.email),rt(a.phoneNumber)||(a.phoneNumber="+3146781223"),rt(c.phoneNumber)||(c.phoneNumber="+3146781223"),o.length===0&&o.push({name:"UPI Payment",sku:"UPI Payment",quantity:1,unitPrice:n,totalAmount:n});const l={taxAmount:0,shippingAmount:0,discountAmount:0,orderItems:o,customer:a,billingAddress:c};return this.initCheckoutProcessor(i).addCheckout(i,n,this.currency,"upi",r,l,{documentId:s.documentId,name:((a==null?void 0:a.firstName)+" "+(a==null?void 0:a.lastName)).trim(),email:a==null?void 0:a.email,subscriptionFrequencyUnit:s.subscriptionFrequencyUnit,subscriptionFrequency:String(s.subscriptionFrequency),subscriptionStartAt:s.subscriptionStartAt,subscriptionEndAt:s.subscriptionEndAt}),this}addThreeDsWithFullParameters(t,n,r,s,i,o,a,c,l){this.log("[addThreeDsWithFullParameters]",{cardNumber:Ru(n),expiryDate:r,cardholder:s,email:i,amount:o,currency:a,ccv:"***",options:l});const d=t&&document.getElementById(t)||null;if(!ct(o))throw this.showErrorMessage(d,"Missing parameter: amount"),new TypeError("Missing parameter: amount");if(!Et(a))throw this.showErrorMessage(d,"Missing parameter: currency"),new TypeError("Missing parameter: currency");return this._cleanUp(d),this._initForm(d),this.setAmount(o),this.setCurrency(a),this.getPaymentOptions(o,a,u=>{var h;if(!u.hasThreeDsProviders){this.log("No 3DS providers found"),(h=this.userOnSuccess)==null||h.call(this,{});return}this.add3DsProcessor(d,u.threeDsProviders[0].providerId,u.threeDsProviders[0].providerType,"",{},()=>{var f,p,_;(f=this.threeDsProcessor)==null||f.setEmail(i),(p=this.threeDsProcessor)==null||p.setPaymentInfo({cardNumber:n,expiryDate:r,cardholder:s,ccv:c}),(_=this.threeDsProcessor)==null||_.threeDSInvoke(d,!!(l!=null&&l.requireChallenge),S=>{var I;Ne(),this.log("[threeDSInvoke], postAuthData",S),(I=this.userOnSuccess)==null||I.call(this,{threeDSServerTransID:S.threeDSServerTransID})})},()=>{var f;this.log("Cannot load 3DS provider"),(f=this.userOnSuccess)==null||f.call(this,{})})}),this}tokeniseWith3Ds(t,n,r,s,i,o,a,c,l,d,u){this.log("[tokeniseWith3Ds]",{providerId:n,cardNumber:Ru(r),expiryDate:s,cardholder:i,ccv:"***",email:a,amount:c,currency:l,metadata:d,options:u});const h=t&&document.getElementById(t)||null;if(!rt(n))throw this.showErrorMessage(h,"Missing parameter: providerId"),new TypeError("Missing parameter: providerId");if(!ct(c))throw new TypeError("Missing parameter: amount");if(!Et(l))throw new TypeError("Missing parameter: currency");return this._cleanUp(h),this._initForm(h),this.setAmount(c),this.setCurrency(l),this.initProcessors(h,c,l,n,"",{},()=>{var p,_;const f=S=>{this.tokeniseCard(n,r,s,i,o,d,S,u)};this.threeDsProcessor?((p=this.threeDsProcessor)==null||p.setPaymentInfo({cardNumber:r,expiryDate:s,cardholder:i,ccv:o}),(_=this.threeDsProcessor)==null||_.threeDSInvoke(h,!!(u!=null&&u.requireChallenge),S=>{Ne(),this.log("[threeDSInvoke], postAuthData",S),f(S.threeDSServerTransID)})):(console.log("threeDsProcessor NOT FOUND"),f())}),this}tokeniseCard(t,n,r,s,i,o,a,c){return this.log("[tokeniseCard]",{providerId:t,cardNumber:n,expiryDate:r,cardHolderName:s,verify:c==null?void 0:c.verify,metadata:o}),this.initCardProcessor(null).tokeniseCard(t,n,r,s,i,o,a,c),this}addThreeDsWithToken(t,n,r,s,i,o){if(this.log("[addThreeDsWithToken]",{tokenId:t,email:n,amount:r,currency:s,options:o}),!rt(t))throw new TypeError("Missing parameter: tokenId");if(!ct(r))throw new TypeError("Missing parameter: amount");if(!Et(s))throw new TypeError("Missing parameter: currency");this.setAmount(r),this.setCurrency(s);const a="",c="",l="";return this.initProcessors(null,r,s,"",t,{},()=>{var d,u,h,f,p;if(!this.threeDsProcessor)throw(d=this.userOnFailure)==null||d.call(this,{error:"Cannot load 3DS provider"}),new TypeError("Cannot load 3DS provider");(u=this.threeDsProcessor)==null||u.setEmail(n),(h=this.threeDsProcessor)==null||h.setTokenId(t),(f=this.threeDsProcessor)==null||f.threeDSInvoke(null,!!(o!=null&&o.requireChallenge),_=>{var S;Ne(),this.log("[threeDSInvoke], postAuthData",_),(S=this.userOnSuccess)==null||S.call(this,{threeDSServerTransID:_.threeDSServerTransID})}),(p=this.threeDsProcessor)==null||p.setPaymentInfo({cardNumber:a,expiryDate:c,cardholder:l,ccv:i})}),this}getPaymentOptions(t,n,r){var a;this.log("[getPaymentOptions], request",{amount:t,currency:n});const s=`${t}${n}`;if(this.paymentOptions[s]){r==null||r(this.paymentOptions[s]);return}const i=(c,l)=>{throw this.log("[getPaymentOptions], failure",l),this.showErrorMessage(null,"Unable to configure SDK"),new TypeError("failed to configure, error: "+l)},o=(c,l)=>{const d=JSON.parse(l);this.log("[getPaymentOptions], success",d),this.paymentOptions[s]=d,r==null||r(d)};(a=this.httpInvoker)==null||a.invoke(Io(this.config.apiUrl)[zr.PROVIDERS_INFO].url+`?amount=${t}¤cy=${n}`,Io(this.config.apiUrl)[zr.PROVIDERS_INFO].method,{},o,i)}getProviderInfo(t,n,r,s,i,o){var l;this.log("[getProviderInfo], request",{providerId:t,amount:n,currency:r,token:s});const a=(d,u)=>{this.log("[getProviderInfo], error",d,u),o({error:"Unable to get provider information"})},c=(d,u)=>{this.log("[getProviderInfo], success",d,u);const h=JSON.parse(u);this.log("[getProviderInfo], data",h),i(h)};(l=this.httpInvoker)==null||l.invoke(Io(this.config.apiUrl,t,s)[zr.PROVIDER_INFO].url+`?amount=${n}¤cy=${r}`,Io(this.config.apiUrl,t,s)[zr.PROVIDER_INFO].method,{},c,a)}setAmount(t){var n,r,s,i,o;return Number(t)===Number(this.amount)?this:Number(t)<0?this:(this.log("[setAmount]",Number(t)),this.amount=Number(t),(n=this.cardProcessor)==null||n.setAmount(this.amount),(r=this.threeDsProcessor)==null||r.setAmount(this.amount),(s=this.paypalProcessor)==null||s.setAmount(this.amount),(i=this.fraudProcessor)==null||i.setAmount(this.amount),(o=this.googlePayProcessor)==null||o.setAmount(this.amount),window.postMessage({status:Es,amount:this.amount},"*"),this)}setCurrency(t){var n,r;return t===this.currency?this:(this.log("[setCurrency]",t),this.currency=t,(n=this.threeDsProcessor)==null||n.setCurrency(t),(r=this.googlePayProcessor)==null||r.setCurrency(t),window.postMessage({status:Mi,currency:t},"*"),this)}onSuccess(t){this.userOnSuccess=t}onFailure(t){this.userOnFailure=t}showErrorMessage(t,n){this.log(n),ne(t,n)}setBillingAddress(t){var n,r;return this.log("[setBillingAddress]",t),this.billingAddress={...t},(n=this.threeDsProcessor)==null||n.setAddressInfo(this.billingAddress),(r=this.fraudProcessor)==null||r.setAddressInfo(this.billingAddress),this}setCustomerInfo(t){var n,r;return this.log("[setCustomerInfo]",t),this.customer={...t},(n=this.cardProcessor)==null||n.setCustomerInfo(this.customer),(r=this.fraudProcessor)==null||r.setCustomerInfo(this.customer),this}setOrderInfo(t){var n;return this.log("[setOrderInfo]",t),this.order={...t},(n=this.fraudProcessor)==null||n.setOrderInfo(this.order),this}initProcessors(t,n,r,s,i,o,a){if(this.log("[initProcessors]",{amount:n,currency:r,cardProviderId:s,token:i,metadata:o}),this.initProcessorsHandlers.length>0){this.initProcessorsHandlers.push(a);return}this.initProcessorsHandlers.push(a);let c={},l="",d="",u=!1,h="",f="";const p=E=>{this.getProviderInfo(s,n,r,i||"",k=>{c={...k},k.threeDsProviderId&&(h=k.threeDsProviderId,f=k.threeDsProviderType),E()},k=>{this.log("Unable to get provider information",k),E()})},_=(E,k,M,T)=>{if(!E||!k){T();return}this.addFraudProcessor(E,k,M,o,()=>{T()},()=>{this.log("Error loading fraud provider",k),T()})},S=(E,k,M)=>{if(!E||!k){M();return}this.add3DsProcessor(t,E,k,s,c.clientParameters||{},()=>{M()},()=>{this.log("Error loading 3ds provider",k),M()})},I=(E,k)=>{for(const M of this.initProcessorsHandlers)M(E,k);this.initProcessorsHandlers=[]};this.getPaymentOptions(n,r,E=>{if(E.hasThreeDsProviders&&(h=E.threeDsProviders[0].providerId,f=E.threeDsProviders[0].providerType),E.hasFraudProviders&&(l=E.fraudProviders[0].providerId,d=E.fraudProviders[0].providerType,u=E.fraudProviders[0].stopPaymentOnFailure),!s&&!i){_(l,d,u,()=>{S(h,f,()=>{I(c,E)})});return}p(()=>{_(l,d,u,()=>{S(h,f,()=>{I(c,E)})})})})}addFraudProcessor(t,n,r,s,i,o){if(this.log("[addFraudProcessor]",t,n,s),!this.amount||!this.currency||!this.billingAddress||!this.customer||!this.order){this.log("[addFraudProcessor], NOT loaded",{amount:this.amount,currency:this.currency,billingAddress:this.billingAddress,customer:this.customer,order:this.order}),i==null||i();return}vt(Object.assign({"./fraud/forter.ts":()=>Promise.resolve().then(()=>X1),"./fraud/fraudCheck.type.ts":()=>Promise.resolve().then(()=>J1),"./fraud/fraudProvider.type.ts":()=>Promise.resolve().then(()=>q1),"./fraud/fraudStatus.type.ts":()=>Promise.resolve().then(()=>Q1)}),`./fraud/${n.toLowerCase()}.ts`).then(a=>{var l,d;this.log(`Loading ${n}...`,a);const c=a.default();c!=null&&c.getFraudCheckData&&(this.fraudProcessor=new wE(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,version:un.version,providerId:t,stopPaymentOnFailure:r,metadata:s,getFraudCheckData:c.getFraudCheckData,onSuccess:u=>{this.log("[fraudProcessor], success",u)},onFailure:u=>{this.log("[fraudProcessor], failure",u)}}),this.amount&&this.fraudProcessor.setAmount(this.amount),this.currency&&this.fraudProcessor.setCurrency(this.currency),this.billingAddress&&this.fraudProcessor.setAddressInfo(this.billingAddress),this.customer&&this.fraudProcessor.setCustomerInfo(this.customer),this.order&&this.fraudProcessor.setOrderInfo(this.order),(l=this.cardProcessor)==null||l.addFraudProcessor(this.fraudProcessor),(d=this.paypalProcessor)==null||d.addFraudProcessor(this.fraudProcessor),i==null||i())}).catch(a=>{this.log(`Error loading ${n}`,a),o==null||o()})}add3DsProcessor(t,n,r,s,i,o,a){this.log("[add3DsProcessor]",n,r),vt(Object.assign({"./3ds/DefaultThreeDsProvider.ts":()=>Promise.resolve().then(()=>lC),"./3ds/GPaymentsThreeDsProvider.ts":()=>Promise.resolve().then(()=>mC),"./3ds/NmiThreeDsProvider.ts":()=>Promise.resolve().then(()=>vC),"./3ds/ThreeDsAuthResponse.type.ts":()=>Promise.resolve().then(()=>wC),"./3ds/ThreeDsInitResponse.type.ts":()=>Promise.resolve().then(()=>CC),"./3ds/ThreeDsPostAuthResponse.type.ts":()=>Promise.resolve().then(()=>DC),"./3ds/ThreeDsProvider.interface.ts":()=>Promise.resolve().then(()=>PC),"./3ds/default.ts":()=>Promise.resolve().then(()=>kC),"./3ds/ecentric.ts":()=>Promise.resolve().then(()=>ZC),"./3ds/gpayments.ts":()=>Promise.resolve().then(()=>JC),"./3ds/nmi.ts":()=>Promise.resolve().then(()=>QC)}),`./3ds/${r.toLowerCase()}.ts`).then(c=>{var d;this.log(`Loading ${r}...`,c);const l=c.default(this.log.bind(this),t,{environment:this.environment,apiUrl:this.config.apiUrl,clientParameters:i});l!=null&&l.setThreeDsProcessor&&(this.threeDsProcessor=new h_(this.log.bind(this),{debug:this.debug,environment:this.environment,publicKey:this.publicKey,apiUrl:this.config.apiUrl,version:un.version,providerId:n,cardProviderId:s,threeDsInvoker:{onPreAuth:l.onPreAuth.bind(l),onAuth:l.onAuth.bind(l),onPostAuth:l.onPostAuth.bind(l)},onSuccess:u=>{var h;this.log("[threeDsProcessor], success",u),(h=this.userOnSuccess)==null||h.call(this,u)},onFailure:u=>{var h;this.log("[threeDsProcessor], failure",u),(h=this.userOnFailure)==null||h.call(this,{error:u.error})}}),this.amount&&this.threeDsProcessor.setAmount(this.amount),this.currency&&this.threeDsProcessor.setCurrency(this.currency),this.billingAddress&&this.threeDsProcessor.setAddressInfo(this.billingAddress),(d=this.cardProcessor)==null||d.addThreeDsProcessor(this.threeDsProcessor),l.setThreeDsProcessor(this.threeDsProcessor),o==null||o())}).catch(c=>{if(this.log(`Error loading ${r}`,c),r!=="default"){this.add3DsProcessor(t,n,"default",s,i,o,a);return}a==null||a()})}}_e([We],je.prototype,"init",null),_e([We],je.prototype,"addCard",null),_e([We],je.prototype,"addCardLeastCost",null),_e([We],je.prototype,"addDropIn",null),_e([We],je.prototype,"addPaypal",null),_e([We],je.prototype,"addPayTo",null),_e([We],je.prototype,"addGooglePay",null),_e([We],je.prototype,"addApplePay",null),_e([We],je.prototype,"addCheckout",null),_e([We],je.prototype,"addUpi",null),_e([We],je.prototype,"addThreeDsWithFullParameters",null),_e([We],je.prototype,"tokeniseWith3Ds",null),_e([We],je.prototype,"tokeniseCard",null),_e([We],je.prototype,"addThreeDsWithToken",null),_e([We],je.prototype,"setAmount",null),_e([We],je.prototype,"onSuccess",null),_e([We],je.prototype,"onFailure",null),_e([We],je.prototype,"setBillingAddress",null),_e([We],je.prototype,"setCustomerInfo",null),_e([We],je.prototype,"setOrderInfo",null);const G1=new je;let Bf="";const Y1=(e,t,n,r,s,i,o,a,c)=>JSON.stringify({siteId:c.SiteId,providerId:e,amount:t,currency:n,paymentInformation:r,paypalInformation:s,customerInfo:{firstName:i.firstName,lastName:i.lastName,email:i.email,phone:i.phoneNumber},address:{line1:o.streetAddress,line2:o.streetAddress2,city:o.city,country:o.country,postalCode:o.postalCode,state:o.state},order:{items:a.orderItems.map(l=>({productCode:l.sku,quantity:l.quantity,amount:l.totalAmount}))},connectionInformation:{userAgent:navigator.userAgent,cookie:Bf}});function Z1(){document.addEventListener("ftr:tokenReady",function(t){Bf=t.detail});const e=document.createElement("script");return e.type="text/javascript",e.id="2e6515aa0b8e",e.innerHTML=window.atob("ICAgIChmdW5jdGlvbiAoKSB7CiAgICAgICAgdmFyIG1lcmNoYW50Q29uZmlnID0gewogICAgICAgICAgICBjc3A6IGZhbHNlCiAgICAgICAgfTsKICAgICAgICAKICAgICAgICB2YXIgc2l0ZUlkID0gIjJlNjUxNWFhMGI4ZSI7CmZ1bmN0aW9uIHQodCxuKXtmb3IodmFyIGU9dC5zcGxpdCgiIikscj0wO3I8ZS5sZW5ndGg7KytyKWVbcl09U3RyaW5nLmZyb21DaGFyQ29kZShlW3JdLmNoYXJDb2RlQXQoMCkrbik7cmV0dXJuIGUuam9pbigiIil9ZnVuY3Rpb24gbihuKXtyZXR1cm4gdChuLC1TKS5yZXBsYWNlKC8lU04lL2csc2l0ZUlkKX1mdW5jdGlvbiBlKCl7dmFyIHQ9Im5vIisib3AiKyJmbiIsbj0iZyIrImEiLGU9Im4iKyJhbWUiO3JldHVybiB3aW5kb3dbbl0mJndpbmRvd1tuXVtlXT09PXR9ZnVuY3Rpb24gcigpe3JldHVybiEoIW5hdmlnYXRvci5icmF2ZXx8ImZ1bmN0aW9uIiE9dHlwZW9mIG5hdmlnYXRvci5icmF2ZS5pc0JyYXZlKX1mdW5jdGlvbiBvKCl7cmV0dXJuIGRvY3VtZW50LmN1cnJlbnRTY3JpcHQmJmRvY3VtZW50LmN1cnJlbnRTY3JpcHQuc3JjfWZ1bmN0aW9uIGkodCl7dHJ5e0IuZXg9dCxlKCkmJi0xPT09Qi5leC5pbmRleE9mKFIudUIpJiYoQi5leCs9Ui51QikscigpJiYtMT09PUIuZXguaW5kZXhPZihSLnVCcikmJihCLmV4Kz1SLnVCciksbygpJiYtMT09PUIuZXguaW5kZXhPZihSLm5JTCkmJihCLmV4Kz1SLm5JTCksd2luZG93LmZ0cl9fc25wX2N3Y3x8KEIuZXgrPVIucyksRihCKX1jYXRjaCh0KXt9fWZ1bmN0aW9uIGModCxuKXtmdW5jdGlvbiBlKG8pe3RyeXtvLmJsb2NrZWRVUkk9PT10JiYobigpLGRvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIocixlKSl9Y2F0Y2godCl7ZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcihyLGUpfX12YXIgcj0ic2VjdXJpdHlwb2xpY3l2aW9sYXRpb24iO2RvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIocixlKSxzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7ZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcihyLGUpfSwyKjYwKjFlMyl9ZnVuY3Rpb24gYSh0LG4sZSxyKXt2YXIgbz0hMTt0PSJodHRwczovLyIrdCxjKHQsZnVuY3Rpb24oKXtyKCEwKSxvPSEwfSk7dmFyIGk9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgic2NyaXB0Iik7aS5vbmVycm9yPWZ1bmN0aW9uKCl7aWYoIW8pdHJ5e3IoITEpLG89ITB9Y2F0Y2godCl7fX0saS5vbmxvYWQ9ZSxpLnR5cGU9InRleHQvamF2YXNjcmlwdCIsaS5pZD0iZnRyX19zY3JpcHQiLGkuYXN5bmM9ITAsaS5zcmM9dDt2YXIgYT1kb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgic2NyaXB0IilbMF07YS5wYXJlbnROb2RlLmluc2VydEJlZm9yZShpLGEpfWZ1bmN0aW9uIHUodCxuLGUscil7dmFyIG89ITEsaT1uZXcgWE1MSHR0cFJlcXVlc3Q7aWYoYygiaHR0cHM6Iit0LGZ1bmN0aW9uKCl7ZShuZXcgRXJyb3IoIkNTUCBWaW9sYXRpb24iKSwhMCksbz0hMH0pLCIvLyI9PT10LnNsaWNlKDAsMikmJih0PSJodHRwczoiK3QpLCJ3aXRoQ3JlZGVudGlhbHMiaW4gaSlpLm9wZW4oIkdFVCIsdCwhMCk7ZWxzZXtpZigidW5kZWZpbmVkIj09dHlwZW9mIFhEb21haW5SZXF1ZXN0KXJldHVybjtpPW5ldyBYRG9tYWluUmVxdWVzdCxpLm9wZW4oIkdFVCIsdCl9T2JqZWN0LmtleXMocikuZm9yRWFjaChmdW5jdGlvbih0KXtpLnNldFJlcXVlc3RIZWFkZXIodCxyW3RdKX0pLGkub25sb2FkPWZ1bmN0aW9uKCl7ImZ1bmN0aW9uIj09dHlwZW9mIG4mJm4oaSl9LGkub25lcnJvcj1mdW5jdGlvbih0KXtpZigiZnVuY3Rpb24iPT10eXBlb2YgZSYmIW8pdHJ5e2UodCwhMSksbz0hMH1jYXRjaCh0KXt9fSxpLm9ucHJvZ3Jlc3M9ZnVuY3Rpb24oKXt9LGkub250aW1lb3V0PWZ1bmN0aW9uKCl7ImZ1bmN0aW9uIj09dHlwZW9mIGUmJmUoInRpbSIrImVvIisidXQiLCExKX0sc2V0VGltZW91dChmdW5jdGlvbigpe2kuc2VuZCgpfSwwKX1mdW5jdGlvbiBkKHQsc2l0ZUlkLG4pe2Z1bmN0aW9uIGUodCl7dmFyIG49dC50b1N0cmluZygxNik7cmV0dXJuIG4ubGVuZ3RoJTI/IjAiK246bn1mdW5jdGlvbiByKHQpe2lmKHQ8PTApcmV0dXJuIiI7Zm9yKHZhciBuPSIwMTIzNDU2Nzg5YWJjZGVmIixlPSIiLHI9MDtyPHQ7cisrKWUrPW5bTWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpKm4ubGVuZ3RoKV07cmV0dXJuIGV9ZnVuY3Rpb24gbyh0KXtmb3IodmFyIG49IiIscj0wO3I8dC5sZW5ndGg7cisrKW4rPWUodC5jaGFyQ29kZUF0KHIpKTtyZXR1cm4gbn1mdW5jdGlvbiBpKHQpe2Zvcih2YXIgbj10LnNwbGl0KCIiKSxlPTA7ZTxuLmxlbmd0aDsrK2UpbltlXT1TdHJpbmcuZnJvbUNoYXJDb2RlKDI1NV5uW2VdLmNoYXJDb2RlQXQoMCkpO3JldHVybiBuLmpvaW4oIiIpfW49bj8iMSI6IjAiO3ZhciBjPVtdO3JldHVybiBjLnB1c2godCksYy5wdXNoKHNpdGVJZCksYy5wdXNoKG4pLGZ1bmN0aW9uKHQpe3ZhciBuPTQwLGU9IiI7cmV0dXJuIHQubGVuZ3RoPG4vMiYmKGU9IiwiK3Iobi8yLXQubGVuZ3RoLTEpKSxvKGkodCtlKSl9KGMuam9pbigiLCIpKX1mdW5jdGlvbiBmKCl7ZnVuY3Rpb24gdCgpe1UmJihRKFIuZFVBTCksc2V0VGltZW91dChzLEUsUi5kVUFMKSl9ZnVuY3Rpb24gbih0LG4pe2kobj9SLnVBUytSLnVGK1IuY1A6Ui51QVMrUi51Ril9d2luZG93LmZ0cl9fZmRhZCh0LG4pfWZ1bmN0aW9uIHModCl7dHJ5e3ZhciBuPXQ9PT1SLnVERj9DOlU7aWYoIW4pcmV0dXJuO2Eobix2b2lkIDAsZnVuY3Rpb24oKXt0cnl7WCgpLGkodCtSLnVTKX1jYXRjaCh0KXt9fSxmdW5jdGlvbihuKXt0cnl7WCgpLEIudGQ9MSpuZXcgRGF0ZS1CLnRzLGkobj90K1IudUYrUi5jUDp0K1IudUYpLHQ9PT1SLnVERiYmZigpfWNhdGNoKHQpe2koUi5lVW9lKX19KX1jYXRjaChuKXtpKHQrUi5lVGx1KX19dmFyIHY9IjIyZzZvdHJ3amVxNnFzdTFmb3J4Z2l1cnF3MXFodzJ2d2R3eHYiLGg9ImZvcnQiLHc9ImVyVG8iLGw9ImtlbiI7d2luZG93LmZ0cl9fY29uZmlnPXttOm1lcmNoYW50Q29uZmlnLHM6IjE3IixzaTpzaXRlSWR9O3ZhciBtPSExLHA9aCt3K2wsZz0xMCxfPXt3cml0ZTpmdW5jdGlvbih0LG4sZSxyKXt2b2lkIDA9PT1yJiYocj0hMCk7dmFyIG8saTtpZihlPyhvPW5ldyBEYXRlLG8uc2V0VGltZShvLmdldFRpbWUoKSsyNCplKjYwKjYwKjFlMyksaT0iOyBleHBpcmVzPSIrby50b0dNVFN0cmluZygpKTppPSIiLCFyKXJldHVybiB2b2lkKGRvY3VtZW50LmNvb2tpZT1lc2NhcGUodCkrIj0iK2VzY2FwZShuKStpKyI7IHBhdGg9LyIpO2Zvcih2YXIgYz0xLGE9ZG9jdW1lbnQuZG9tYWluLnNwbGl0KCIuIiksdT1nLGQ9ITA7ZCYmYS5sZW5ndGg+PWMmJnU+MDspe3ZhciBmPWEuc2xpY2UoLWMpLmpvaW4oIi4iKTtkb2N1bWVudC5jb29raWU9ZXNjYXBlKHQpKyI9Iitlc2NhcGUobikraSsiOyBwYXRoPS87IGRvbWFpbj0iK2Y7dmFyIHM9Xy5yZWFkKHQpO251bGwhPXMmJnM9PW58fChmPSIuIitmLGRvY3VtZW50LmNvb2tpZT1lc2NhcGUodCkrIj0iK2VzY2FwZShuKStpKyI7IHBhdGg9LzsgZG9tYWluPSIrZiksZD0tMT09PWRvY3VtZW50LmNvb2tpZS5pbmRleE9mKHQrIj0iK24pLGMrKyx1LS19fSxyZWFkOmZ1bmN0aW9uKHQpe3ZhciBuPW51bGw7dHJ5e2Zvcih2YXIgZT1lc2NhcGUodCkrIj0iLHI9ZG9jdW1lbnQuY29va2llLnNwbGl0KCI7Iiksbz0zMixpPTA7aTxyLmxlbmd0aDtpKyspe2Zvcih2YXIgYz1yW2ldO2MuY2hhckNvZGVBdCgwKT09PW87KWM9Yy5zdWJzdHJpbmcoMSxjLmxlbmd0aCk7MD09PWMuaW5kZXhPZihlKSYmKG49dW5lc2NhcGUoYy5zdWJzdHJpbmcoZS5sZW5ndGgsYy5sZW5ndGgpKSl9fWZpbmFsbHl7cmV0dXJuIG59fX0seT13aW5kb3cuZnRyX19jb25maWcuczt5Kz0iY2siO3ZhciBUPWZ1bmN0aW9uKHQpe3ZhciBuPSExLGU9bnVsbCxyPWZ1bmN0aW9uKCl7dHJ5e2lmKCFlfHwhbilyZXR1cm47ZS5yZW1vdmUmJiJmdW5jdGlvbiI9PXR5cGVvZiBlLnJlbW92ZT9lLnJlbW92ZSgpOmRvY3VtZW50LmhlYWQucmVtb3ZlQ2hpbGQoZSksbj0hMX1jYXRjaCh0KXt9fTtkb2N1bWVudC5oZWFkJiYoIWZ1bmN0aW9uKCl7ZT1kb2N1bWVudC5jcmVhdGVFbGVtZW50KCJsaW5rIiksZS5zZXRBdHRyaWJ1dGUoInJlbCIsInByZSIrImNvbiIrIm5lY3QiKSxlLnNldEF0dHJpYnV0ZSgiY3JvcyIrInNvcmkiKyJnaW4iLCJhbm9ueW1vdXMiKSxlLm9ubG9hZD1yLGUub25lcnJvcj1yLGUuc2V0QXR0cmlidXRlKCJocmVmIix0KSxkb2N1bWVudC5oZWFkLmFwcGVuZENoaWxkKGUpLG49ITB9KCksc2V0VGltZW91dChyLDNlMykpfSxTPTMseD1uKHZ8fCIyMmc2b3Ryd2plcTZxc3UxZm9yeGdpdXJxdzFxaHcydndkd3h2IiksQT10KCJbMFVodHhodncwTEciLC1TKSxMPXQoIlswRnJ1dWhvZHdscnEwTEciLC1TKSxrPXQoIkxpMFFycWgwUGR3ZmsiLC1TKSxVLHE9ImZncTcxaXJ1d2h1MWZycCIsQz1uKCIoVlEoMSIrcSsiMnZxMihWUSgydmZ1bHN3MW12IiksRD1uKCIoVlEoMSIrcSsiMnZxVjIoVlEoMnZmdWxzdzFtdiIpLEU9MTA7d2luZG93LmZ0cl9fc3RhcnRTY3JpcHRMb2FkPTEqbmV3IERhdGU7dmFyIGI9ZnVuY3Rpb24odCl7dmFyIG49ImZ0Iisicjp0b2siKyJlblIiKyJlYWR5Ijt3aW5kb3cuZnRyX190dCYmY2xlYXJUaW1lb3V0KHdpbmRvdy5mdHJfX3R0KSx3aW5kb3cuZnRyX190dD1zZXRUaW1lb3V0KGZ1bmN0aW9uKCl7dHJ5e2RlbGV0ZSB3aW5kb3cuZnRyX190dCx0Kz0iX3R0Ijt2YXIgZT1kb2N1bWVudC5jcmVhdGVFdmVudCgiRXZlbnQiKTtlLmluaXRFdmVudChuLCExLCExKSxlLmRldGFpbD10LGRvY3VtZW50LmRpc3BhdGNoRXZlbnQoZSl9Y2F0Y2godCl7fX0sMWUzKX0sRj1mdW5jdGlvbih0KXt2YXIgbj1mdW5jdGlvbih0KXtyZXR1cm4gdHx8IiJ9LGU9bih0LmlkKSsiXyIrbih0LnRzKSsiXyIrbih0LnRkKSsiXyIrbih0LmV4KSsiXyIrbih5KTtfLndyaXRlKHAsZSw0MDAsITApLGIoZSksd2luZG93LmZ0cl9fZ3Q9ZX0sST1mdW5jdGlvbigpe3ZhciB0PV8ucmVhZChwKXx8IiIsbj10LnNwbGl0KCJfIiksZT1mdW5jdGlvbih0KXtyZXR1cm4gblt0XXx8dm9pZCAwfTtyZXR1cm57aWQ6ZSgwKSx0czplKDEpLHRkOmUoMiksZXg6ZSgzKSx2cjplKDQpfX0sVj1mdW5jdGlvbigpe2Zvcih2YXIgdD17fSxuPSJmZ3UiLGU9W10scj0wO3I8MjU2O3IrKyllW3JdPShyPDE2PyIwIjoiIikrci50b1N0cmluZygxNik7dmFyIG89ZnVuY3Rpb24odCxuLHIsbyxpKXt2YXIgYz1pPyItIjoiIjtyZXR1cm4gZVsyNTUmdF0rZVt0Pj44JjI1NV0rZVt0Pj4xNiYyNTVdK2VbdD4+MjQmMjU1XStjK2VbMjU1Jm5dK2Vbbj4+OCYyNTVdK2MrZVtuPj4xNiYxNXw2NF0rZVtuPj4yNCYyNTVdK2MrZVs2MyZyfDEyOF0rZVtyPj44JjI1NV0rYytlW3I+PjE2JjI1NV0rZVtyPj4yNCYyNTVdK2VbMjU1Jm9dK2Vbbz4+OCYyNTVdK2Vbbz4+MTYmMjU1XStlW28+PjI0JjI1NV19LGk9ZnVuY3Rpb24oKXtpZih3aW5kb3cuVWludDMyQXJyYXkmJndpbmRvdy5jcnlwdG8mJndpbmRvdy5jcnlwdG8uZ2V0UmFuZG9tVmFsdWVzKXt2YXIgdD1uZXcgd2luZG93LlVpbnQzMkFycmF5KDQpO3JldHVybiB3aW5kb3cuY3J5cHRvLmdldFJhbmRvbVZhbHVlcyh0KSx7ZDA6dFswXSxkMTp0WzFdLGQyOnRbMl0sZDM6dFszXX19cmV0dXJue2QwOjQyOTQ5NjcyOTYqTWF0aC5yYW5kb20oKT4+PjAsZDE6NDI5NDk2NzI5NipNYXRoLnJhbmRvbSgpPj4+MCxkMjo0Mjk0OTY3Mjk2Kk1hdGgucmFuZG9tKCk+Pj4wLGQzOjQyOTQ5NjcyOTYqTWF0aC5yYW5kb20oKT4+PjB9fSxjPWZ1bmN0aW9uKCl7dmFyIHQ9IiIsbj1mdW5jdGlvbih0LG4pe2Zvcih2YXIgZT0iIixyPXQ7cj4wOy0tcillKz1uLmNoYXJBdCgxZTMqTWF0aC5yYW5kb20oKSVuLmxlbmd0aCk7cmV0dXJuIGV9O3JldHVybiB0Kz1uKDIsIjAxMjM0NTY3ODkiKSx0Kz1uKDEsIjEyMzQ1Njc4OSIpLHQrPW4oOCwiMDEyMzQ1Njc4OSIpfTtyZXR1cm4gdC5zYWZlR2VuZXJhdGVOb0Rhc2g9ZnVuY3Rpb24oKXt0cnl7dmFyIHQ9aSgpO3JldHVybiBvKHQuZDAsdC5kMSx0LmQyLHQuZDMsITEpfWNhdGNoKHQpe3RyeXtyZXR1cm4gbitjKCl9Y2F0Y2godCl7fX19LHQuaXNWYWxpZE51bWVyaWNhbFRva2VuPWZ1bmN0aW9uKHQpe3JldHVybiB0JiZ0LnRvU3RyaW5nKCkubGVuZ3RoPD0xMSYmdC5sZW5ndGg+PTkmJnBhcnNlSW50KHQsMTApLnRvU3RyaW5nKCkubGVuZ3RoPD0xMSYmcGFyc2VJbnQodCwxMCkudG9TdHJpbmcoKS5sZW5ndGg+PTl9LHQuaXNWYWxpZFVVSURUb2tlbj1mdW5jdGlvbih0KXtyZXR1cm4gdCYmMzI9PT10LnRvU3RyaW5nKCkubGVuZ3RoJiYvXlthLXowLTldKyQvLnRlc3QodCl9LHQuaXNWYWxpZEZHVVRva2VuPWZ1bmN0aW9uKHQpe3JldHVybiAwPT10LmluZGV4T2YobikmJnQubGVuZ3RoPj0xMn0sdH0oKSxSPXt1REY6IlVERiIsZFVBTDoiZFVBTCIsdUFTOiJVQVMiLG1MZDoiMSIsZVRsdToiMiIsZVVvZToiMyIsdVM6IjQiLHVGOiI5Iix0bW9zOlsiVDUiLCJUMTAiLCJUMTUiLCJUMzAiLCJUNjAiXSx0bW9zU2VjczpbNSwxMCwxNSwzMCw2MF0sYklSOiI0MyIsdUI6InUiLHVCcjoiYiIsY1A6ImMiLG5JTDoiaSIsczoicyJ9O3RyeXt2YXIgQj1JKCk7dHJ5e0IuaWQmJihWLmlzVmFsaWROdW1lcmljYWxUb2tlbihCLmlkKXx8Vi5pc1ZhbGlkVVVJRFRva2VuKEIuaWQpfHxWLmlzVmFsaWRGR1VUb2tlbihCLmlkKSk/d2luZG93LmZ0cl9fbmNkPSExOihCLmlkPVYuc2FmZUdlbmVyYXRlTm9EYXNoKCksd2luZG93LmZ0cl9fbmNkPSEwKSxCLnRzPXdpbmRvdy5mdHJfX3N0YXJ0U2NyaXB0TG9hZCxGKEIpLHdpbmRvdy5mdHJfX3NucF9jd2M9ISFfLnJlYWQocCksd2luZG93LmZ0cl9fc25wX2N3Y3x8KEM9RCk7Zm9yKHZhciBHPSJmb3IiKyJ0ZXIiKyIuY28iKyJtIixNPSJodCIrInRwczovL2MiKyJkbjkuIitHLE89Imh0IisidHBzOi8vIitCLmlkKyItIitzaXRlSWQrIi5jZCIrIm4uIitHLGo9Imh0dHAiKyJzOi8vY2QiKyJuMy4iK0csTj1bTSxPLGpdLEg9MDtIPE4ubGVuZ3RoO0grKylUKE5bSF0pO3ZhciBQPW5ldyBBcnJheShSLnRtb3NTZWNzLmxlbmd0aCksUT1mdW5jdGlvbih0KXtmb3IodmFyIG49MDtuPFIudG1vc1NlY3MubGVuZ3RoO24rKylQW25dPXNldFRpbWVvdXQoaSwxZTMqUi50bW9zU2Vjc1tuXSx0K1IudG1vc1tuXSl9LFg9ZnVuY3Rpb24oKXtmb3IodmFyIHQ9MDt0PFIudG1vc1NlY3MubGVuZ3RoO3QrKyljbGVhclRpbWVvdXQoUFt0XSl9O3dpbmRvdy5mdHJfX2ZkYWQ9ZnVuY3Rpb24obixlKXtpZighbSl7bT0hMDt2YXIgcj17fTtyW2tdPWQod2luZG93LmZ0cl9fY29uZmlnLnMsc2l0ZUlkLHdpbmRvdy5mdHJfX2NvbmZpZy5tLmNzcCksdSh4LGZ1bmN0aW9uKGUpe3RyeXt2YXIgcj1lLmdldEFsbFJlc3BvbnNlSGVhZGVycygpLnRvTG93ZXJDYXNlKCk7aWYoci5pbmRleE9mKEwudG9Mb3dlckNhc2UoKSk+PTApe3ZhciBvPWUuZ2V0UmVzcG9uc2VIZWFkZXIoTCk7d2luZG93LmZ0cl9fYWx0ZDI9dChhdG9iKG8pLC1TLTEpfWlmKHIuaW5kZXhPZihBLnRvTG93ZXJDYXNlKCkpPDApcmV0dXJuO3ZhciBpPWUuZ2V0UmVzcG9uc2VIZWFkZXIoQSksYz10KGF0b2IoaSksLVMtMSk7aWYoYyl7dmFyIGE9Yy5zcGxpdCgiOiIpO2lmKGEmJjI9PT1hLmxlbmd0aCl7Zm9yKHZhciB1PWFbMF0sZD1hWzFdLGY9IiIscz0wLHY9MDtzPDIwOysrcylmKz1zJTM+MCYmdjwxMj9zaXRlSWQuY2hhckF0KHYrKyk6Qi5pZC5jaGFyQXQocyk7dmFyIGg9ZC5zcGxpdCgiLCIpO2lmKGgubGVuZ3RoPjEpe3ZhciB3PWhbMF0sbD1oWzFdO1U9dSsiLyIrdysiLiIrZisiLiIrbH19fW4oKX1jYXRjaCh0KXt9fSxmdW5jdGlvbih0LG4pe2UmJmUodCxuKX0scil9fSxRKFIudURGKSxzZXRUaW1lb3V0KHMsRSxSLnVERil9Y2F0Y2godCl7aShSLm1MZCl9fWNhdGNoKHQpe319KSgpOwo="),document.getElementsByTagName("body")[0].appendChild(e),{getFraudCheckData:Y1}}const X1=Object.freeze(Object.defineProperty({__proto__:null,default:Z1},Symbol.toStringTag,{value:"Module"})),J1=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Mc;(function(e){e.FORTER="forter"})(Mc||(Mc={}));const q1=Object.freeze(Object.defineProperty({__proto__:null,get FraudProviderType(){return Mc}},Symbol.toStringTag,{value:"Module"})),Q1=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),eC=e=>(Ht("data-v-c82daa22"),e=e(),Vt(),e),tC={class:"mask"},nC={class:"wrapper"},rC={class:"container"},sC=eC(()=>x("iframe",{name:"ThreeDsChallengeIFrame"},null,-1)),iC=["action"],oC=["value"],aC=Oe({__name:"ThreeDsChallenge",props:{threeDSServerTransID:null,acsTransID:null,formAction:null},emits:["close","submit"],setup(e,{emit:t}){const n=e,r=se(null),s=JSON.stringify({threeDSServerTransID:n.threeDSServerTransID,acsTransID:n.acsTransID,messageVersion:"2.1.0",messageType:"CReq",challengeWindowSize:"01"}),i=encodeURI(window.btoa(s).replace(/=*$/,""));return Ct(()=>{var o;(o=r.value)==null||o.submit()}),(o,a)=>(ee(),ae("div",tC,[x("div",nC,[x("div",rC,[xe(Oi,{onClick:a[0]||(a[0]=c=>t("close")),id:"3ds-challenge-close"}),sC,x("form",{action:n.formAction,target:"ThreeDsChallengeIFrame",method:"post",ref_key:"form",ref:r},[x("input",{type:"hidden",name:"creq",value:be(i)},null,8,oC)],8,iC)])])]))}}),_D="",ED="",cC=$e(aC,[["__scopeId","data-v-c82daa22"]]),Wf="3ds_method_invocation_complete",zf="3ds_challenge_complete";class vo{constructor(t,n,r){y(this,"type","default");y(this,"log");y(this,"container");y(this,"options");y(this,"threeDsProcessor",null);y(this,"threeDSDestroy",()=>{});y(this,"threeDSServerTransID","");y(this,"threeDSAuthURL","");y(this,"threeDSRequestorTransID","");y(this,"threeDSMonitorURL","");y(this,"internalMessageHandler",this.messageHandler.bind(this));y(this,"onError",(t,n)=>{var r,s;if(this.closeChallenge(),Ne(),t===404){(r=this.threeDsProcessor)==null||r.onError({error:"This feature is only supported by ActiveServer v1.1.2+"});return}(s=this.threeDsProcessor)==null||s.onError({error:"3D Secure failed",body:n})});y(this,"onSuccess",(t,n)=>{var s,i;this.closeChallenge(),Ne();const r=JSON.parse(n);["Y","A"].includes(r.transStatus)?(s=this.threeDsProcessor)==null||s.onSuccess(r):(this.log(`[${this.type}]: 3D Secure failed`,r),(i=this.threeDsProcessor)==null||i.onError({error:"3D Secure failed"}))});y(this,"onInitAuthSuccess",(t,n)=>{const r=JSON.parse(n);if(this.log(`[${this.type}][onInitAuthSuccess]`,r),this.threeDSRequestorTransID=r.threeDSRequestorTransID,this.threeDSServerTransID=r.threeDSServerTransID,this.threeDSMonitorURL=r.threeDSMonitorURL,this.threeDSAuthURL=r.threeDSAuthURL,r.threeDSMethodURL){this.threeDsMethodInvoke(r.threeDSServerTransID,r.threeDSMethodURL);return}this.onAuth(!1,"")});y(this,"onDoAuthSuccess",(t,n)=>{var s;const r=JSON.parse(n);if(this.log(`[${this.type}][onDoAuthSuccess]`,r),!r.transStatus){this.onError(t,"No transStatus specified");return}switch(r.transStatus){case"C":if(!r.acsURL){this.onError(t,"Invalid Challenge Url");return}this.doChallenge(r.acsURL,r.acsTransID);break;case"N":this.log(`[${this.type}][threeDsAuth], 3DS Verification failed, transaction denied`),this.onError(400,"3DS Verification failed, transaction denied");break;case"U":this.log(`[${this.type}][threeDsAuth], Unable to perform 3DS verification`),this.onError(400,"Unable to perform 3DS verification");break;case"R":this.log(`[${this.type}][threeDsAuth], Unable to perform 3DS verification, rejected at issuer`),this.onError(400,"Unable to perform 3DS verification, rejected at issuer");break;default:this.log(`[${this.type}][threeDsAuth], 3DS challenge not required, tranStatus: ${r.transStatus}`),(s=this.threeDsProcessor)==null||s.onSuccess({threeDSServerTransID:r.threeDSServerTransID,threeDSRequestorTransID:"",acsRenderingType:r.acsRenderingType,acsTransID:r.acsTransID,authenticationType:r.authenticationType,authenticationValue:r.authenticationValue,challengeCancel:"",dsTransID:r.dsTransID,eci:r.eci,interactionCounter:"",messageCategory:"",messageExtension:r.messageExtension,messageType:r.messageType,messageVersion:r.messageVersion,transStatus:r.transStatus,transStatusReason:r.transStatusReason});break}});this.log=t,this.container=n,this.options=r}onPreAuth(){this.log(`[${this.type}][onPreAuth]`),this.threeDsProcessor&&(An(),this.threeDsProcessor.onPreAuth(this.onInitAuthSuccess,this.onError),window.addEventListener("message",this.internalMessageHandler))}onAuth(t,n){var r;this.log(`[${this.type}][onAuth]`,{threeDSAuthURL:this.threeDSAuthURL,threeDSRequestorTransID:this.threeDSRequestorTransID,threeDSServerTransID:this.threeDSServerTransID,isMethodPerformed:t}),(r=this.threeDsProcessor)==null||r.onAuth(this.threeDSAuthURL,this.threeDSRequestorTransID,this.threeDSServerTransID,t,"",this.onDoAuthSuccess,this.onError)}onPostAuth(){var t;this.log(`[${this.type}][onPostAuth]`,{threeDSServerTransID:this.threeDSServerTransID}),(t=this.threeDsProcessor)==null||t.onPostAuth({threeDSServerTransID:this.threeDSServerTransID},this.onSuccess,this.onError)}setThreeDsProcessor(t){this.log(`[${this.type}][setThreeDsProcessor]`),this.threeDsProcessor=t}messageHandler(t){var n,r;if(!(!((n=t==null?void 0:t.data)!=null&&n.status)||((r=t==null?void 0:t.data)==null?void 0:r.status)===ya)){if(t.data.status===Wf){t.stopPropagation(),this.invocationComplete(t);return}t.data.status===zf&&(t.stopPropagation(),this.challengeComplete(t))}}invocationComplete(t){this.log(`[${this.type}]: 3Ds Method invocation complete`),this.onAuth(!0,"")}challengeComplete(t){this.log(`[${this.type}]: 3Ds Challenge complete`,t.data),this.closeChallenge();const n=JSON.parse(window.atob(t.data.cres));this.log(`[${this.type}]: cresData`,n),["Y","A"].includes(n.transStatus)?this.onPostAuth():["N","U","R"].includes(n.transStatus)&&(this.log(`[${this.type}]: Failed 3DS Challenge`,t.data),this.onError(400,"Failed 3DS Challenge"))}doChallenge(t,n){this.log(`[${this.type}][doChallenge]`),Ne();const{destroy:r}=nt({el:document.body,component:cC,props:{threeDSServerTransID:this.threeDSServerTransID,acsTransID:n,formAction:t},on:{close:()=>{var s;r(),this.threeDSDestroy=()=>{},(s=this.threeDsProcessor)==null||s.onError({error:"Challenge cancelled"})}}});this.threeDSDestroy=r}closeChallenge(){var t;(t=this.threeDSDestroy)==null||t.call(this),window.removeEventListener("message",this.internalMessageHandler)}threeDsMethodInvoke(t,n){this.log(`[${this.type}][threeDsMethodInvoke]`,{threeDSServerTransID:t,threeDSMethodURL:n});const r={threeDSServerTransID:t,threeDSMethodNotificationURL:this.options.apiUrl+"/3ds/method_invocation"},s=encodeURI(window.btoa(JSON.stringify(r)).replace(/=*$/,""));new ma().invoke(n,"POST",{threeDSMethodData:s})}}const lC=Object.freeze(Object.defineProperty({__proto__:null,DefaultThreeDsProvider:vo,THREE_DS_CHALLENGE_COMPLETE:zf,THREE_DS_METHOD_INVOCATION_COMPLETE:Wf},Symbol.toStringTag,{value:"Module"})),uC={class:"mask"},dC={class:"wrapper"},hC=["src"],fC=Oe({__name:"GPayments",props:{url:null,width:null,height:null},setup(e){const t=e;function n(){return{width:`${t.width||650}px`,height:`${t.height||400}px`}}return(r,s)=>(ee(),ae("div",uC,[x("div",dC,[x("div",{class:"container",style:_t([n(),{padding:"0",margin:"0"}])},[x("iframe",{src:t.url,style:_t(n())},null,12,hC)],4)])]))}}),SD="",bD="",pC=$e(fC,[["__scopeId","data-v-9b0ef3a8"]]);class Kf extends vo{constructor(){super(...arguments);y(this,"type","gpayments");y(this,"onDoAuthSuccess",(n,r)=>{const s=JSON.parse(r);if(this.log(`[${this.type}][onDoAuthSuccess]`,s),!s.transStatus){this.onError(n,"No transStatus specified");return}switch(s.transStatus){case"C":if(!s.acsURL){this.onError(n,"Invalid Challenge Url");return}this.doChallenge(s.acsURL);break;default:this.log(`[${this.type}][threeDsAuth], 3DS challenge not required, tranStatus: ${s.transStatus}`),this.onPostAuth();break}});y(this,"onInitAuthSuccess",(n,r)=>{const s=JSON.parse(r);if(this.log(`[${this.type}][onInitAuthSuccess]`,s),!s.threeDSAuthURL){this.onError(n,"No AuthUrl specified");return}if(this.threeDSRequestorTransID=s.threeDSRequestorTransID,this.threeDSServerTransID=s.threeDSServerTransID,this.threeDSMonitorURL=s.threeDSMonitorURL,this.threeDSAuthURL=s.threeDSAuthURL,s.threeDsServerCallbackUrl){this.initFrame(s.threeDsServerCallbackUrl);return}this.onAuth(!1,"")})}doChallenge(n){this.log(`[${this.type}][doChallenge]`);const{destroy:r}=nt({el:document.body,component:pC,props:{url:n,width:390,height:400},on:{close:()=>{r(),this.threeDSDestroy=()=>{}}}});this.threeDSDestroy=r}challengeComplete(n){this.log(`[${this.type}]: 3Ds Challenge complete`,n.data),this.closeChallenge(),this.onPostAuth()}initFrame(n){this.log(`[${this.type}][init3DSFrame]`,n);const r=document.createElement("iframe");r.src=n,r.style.width="1px",r.style.height="1px",r.style.border="0",document.body.appendChild(r)}}const mC=Object.freeze(Object.defineProperty({__proto__:null,GPaymentsThreeDsProvider:Kf},Symbol.toStringTag,{value:"Module"})),gC=e=>(Ht("data-v-c937c2f5"),e=e(),Vt(),e),yC={class:"mask"},_C={class:"wrapper"},EC={class:"container"},SC=gC(()=>x("div",{id:"NmiThreeDsChallengeIFrame"},null,-1)),bC=Oe({__name:"NmiThreeDsChallenge",emits:["close","submit"],setup(e,{emit:t}){const n=se(!1);function r(s){var i;["NMI_3DS_CHALLENGE_SHOW","NMI_3DS_CHALLENGE_CLOSE"].includes((i=s.data)==null?void 0:i.message)&&(n.value=s.data.message==="NMI_3DS_CHALLENGE_SHOW")}return Ct(()=>{window.addEventListener("message",r)}),rn(()=>{window.removeEventListener("message",r)}),(s,i)=>Tt((ee(),ae("div",yC,[x("div",_C,[x("div",EC,[xe(Oi,{onClick:i[0]||(i[0]=o=>t("close")),id:"3ds-challenge-close"}),SC])])],512)),[[ir,n.value]])}}),ID="",vD="",IC=$e(bC,[["__scopeId","data-v-c937c2f5"]]);class Gf extends vo{constructor(n,r,s){var i;super(n,r,s);y(this,"type","NMI");y(this,"gateway");y(this,"threeDS");y(this,"numAttempts",0);this.initScript(((i=s.clientParameters)==null?void 0:i.PublicKey)||"")}onPreAuth(){if(!this.threeDS&&this.numAttempts<5){this.numAttempts++,this.log(`[${this.type}]: 3DS not ready, retrying in 1s`),setTimeout(()=>this.onPreAuth(),1e3);return}this.startAuth()}onAuth(n,r){}onPostAuth(){}startAuth(){var c,l,d,u,h;this.log(`[${this.type}]: startAuth`);const n=(c=this.threeDsProcessor)==null?void 0:c.getPaymentInfo();if(!n){ne(this.container,"Payment information is missing");return}An();const r=(l=this.threeDsProcessor)==null?void 0:l.getAddressInfo(),s=n.expiryDate.length===4?n.expiryDate[2]+n.expiryDate[3]:"",i=n.expiryDate.length===4?n.expiryDate[0]+n.expiryDate[1]:"",o={cardNumber:n.cardNumber,cardExpMonth:s,cardExpYear:parseInt(i)+2e3,currency:(d=this.threeDsProcessor)==null?void 0:d.getCurrency(),amount:(u=this.threeDsProcessor)==null?void 0:u.getAmount(),email:(h=this.threeDsProcessor)==null?void 0:h.getEmail(),phone:r==null?void 0:r.phoneNumber,city:r==null?void 0:r.city,state:r==null?void 0:r.state,address1:r==null?void 0:r.streetAddress,country:r==null?void 0:r.country,firstName:r==null?void 0:r.firstName,lastName:r==null?void 0:r.lastName,postalCode:r==null?void 0:r.postalCode},a=this.threeDS.createUI(o);a.start("#NmiThreeDsChallengeIFrame"),a.on("challenge",f=>{this.log(`[${this.type}][onChallenge]`,f),Ne(),this.showChallenge()}),a.on("complete",f=>{var p;this.log(`[${this.type}][onComplete]`,f),this.removeChallenge(),(p=this.threeDsProcessor)==null||p.onSuccess({externalThreeDsData:f})}),a.on("failure",f=>{var p;this.log(`[${this.type}][onFailure]`,f),Ne(),this.closeChallenge(),(p=this.threeDsProcessor)==null||p.onError({error:f.message})})}initScript(n){const r=document.createElement("script");r.type="text/javascript",r.src="https://secure.nmi.com/js/v1/Gateway.js",r.onload=()=>{this.initGateway(n),this.initChallenge()},document.head.appendChild(r)}initGateway(n){this.gateway=window.Gateway.create(n),this.threeDS=this.gateway.get3DSecure(),this.gateway.on("error",r=>{var s;this.log(`[${this.type}]: gateway error`,r),(s=this.threeDsProcessor)==null||s.onError({error:r.message})})}initChallenge(){const{destroy:n}=nt({el:document.body,component:IC,on:{close:()=>{var r;this.closeChallenge(),(r=this.threeDsProcessor)==null||r.onError({error:"Challenge cancelled"})}}});this.threeDSDestroy=n}showChallenge(){window.postMessage({message:"NMI_3DS_CHALLENGE_SHOW"},"*")}closeChallenge(){window.postMessage({message:"NMI_3DS_CHALLENGE_CLOSE"},"*")}removeChallenge(){var n;(n=this.threeDSDestroy)==null||n.call(this)}}const vC=Object.freeze(Object.defineProperty({__proto__:null,NmiThreeDsProvider:Gf},Symbol.toStringTag,{value:"Module"})),wC=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),CC=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function TC(){return{acsRenderingType:{acsInterface:"",acsUiTemplate:""},acsTransID:"",authenticationType:"",authenticationValue:"",challengeCancel:"",dsTransID:"",eci:"",interactionCounter:"",messageCategory:"",messageExtension:[],messageType:"",messageVersion:"",threeDSRequestorTransID:"",threeDSServerTransID:"",transStatus:"Y",transStatusReason:""}}const DC=Object.freeze(Object.defineProperty({__proto__:null,getEmptySuccessThreeDsPostAuthResponse:TC},Symbol.toStringTag,{value:"Module"})),PC=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function AC(e,t,n){return new vo(e,t,n)}const kC=Object.freeze(Object.defineProperty({__proto__:null,default:AC},Symbol.toStringTag,{value:"Module"})),NC=e=>(Ht("data-v-82a75009"),e=e(),Vt(),e),MC={class:"mask"},OC={class:"wrapper"},RC={class:"container"},xC=NC(()=>x("iframe",{name:"ThreeDsChallengeIFrame"},null,-1)),LC=["action"],UC=["value"],FC=Oe({__name:"ecentric",props:{threeDSServerTransID:null,acsTransID:null,formAction:null,authenticationValue:null},setup(e){const t=e,n=se(null),r=t.authenticationValue;return Ct(()=>{var s;(s=n.value)==null||s.submit()}),(s,i)=>(ee(),ae("div",MC,[x("div",OC,[x("div",RC,[xe(Oi,{onClick:i[0]||(i[0]=o=>s.emit("close"))}),xC,x("form",{action:t.formAction,target:"ThreeDsChallengeIFrame",method:"post",ref_key:"form",ref:n},[x("input",{type:"hidden",name:"PaReq",value:be(r)},null,8,UC)],8,LC)])])]))}}),wD="",CD="",$C=$e(FC,[["__scopeId","data-v-82a75009"]]);let Oc=null,Yf,jC=null,ke=null,Zf="",Kr="",Xf="",HC,Hs=null,Rc="";function ft(e,...t){Oc&&Oc(e,t)}function VC(){ft("init authentication"),ke==null||ke.onPreAuth(zC,yn),window.addEventListener("message",qf)}function xc(e){ft("Do Authentication for transId",Kr,e),ke==null||ke.onAuth(Xf,Zf,Kr,e,"",KC,yn)}function Jf(){ft("Do Post Authentication for transId",Kr,Rc),ke==null||ke.onPostAuth({threeDSServerTransID:Kr,authenticationValue:Rc},WC,yn)}function BC(e,t,n){const{destroy:r}=nt({el:document.body,component:$C,props:{threeDSServerTransID:Kr,acsTransID:t,formAction:e,authenticationValue:n},on:{close:()=>{r(),Hs=null,ke==null||ke.onError({error:"Challenge cancelled"})}}});Hs=r}function Lc(){Hs==null||Hs(),window.removeEventListener("message",qf)}const yn=(e,t)=>{Lc(),ke==null||ke.onError({error:"3D Secure failed",body:t})},WC=(e,t)=>{Lc();const n=JSON.parse(t);["Y","A"].includes(n.transStatus)?ke==null||ke.onSuccess(n):(ft("3D Secure failed",n),ke==null||ke.onError({error:"3D Secure failed"}))},zC=(e,t)=>{const n=JSON.parse(t);if(ft("[onInitAuthSuccess]",n),Zf=n.threeDSRequestorTransID,Kr=n.threeDSServerTransID,n.threeDSMonitorURL,Xf=n.threeDSAuthURL,n.threeDSMethodURL){GC(n.threeDSServerTransID,n.threeDSMethodURL);return}xc(!1)},KC=(e,t)=>{const n=JSON.parse(t);if(ft("[onDoAuthSuccess]",n),!n.transStatus){yn(e,"No transStatus specified");return}switch(n.transStatus){case"C":if(!n.acsURL){yn(e,"Invalid Challenge Url");return}BC(n.acsURL,n.acsTransID,n.authenticationValue);break;case"N":ft("[threeDsAuth], 3DS Verification failed, transaction denied"),yn(400,"3DS Verification failed, transaction denied");break;case"U":ft("[threeDsAuth], Unable to perform 3DS verification"),yn(400,"Unable to perform 3DS verification");break;case"R":ft("[threeDsAuth], Unable to perform 3DS verification, rejected at issuer"),yn(400,"Unable to perform 3DS verification, rejected at issuer");break;default:ft("[threeDsAuth], 3DS challenge not required, tranStatus: "+n.transStatus),ke==null||ke.onSuccess({threeDSServerTransID:n.threeDSServerTransID,threeDSRequestorTransID:"",acsRenderingType:n.acsRenderingType,acsTransID:n.acsTransID,authenticationType:n.authenticationType,authenticationValue:n.authenticationValue,challengeCancel:"",dsTransID:n.dsTransID,eci:n.eci,interactionCounter:"",messageCategory:"",messageExtension:n.messageExtension,messageType:n.messageType,messageVersion:n.messageVersion,transStatus:n.transStatus,transStatusReason:n.transStatusReason});break}};function GC(e,t){ft("[threeDsMethodInvoke]",{threeDSServerTransID:e,threeDSMethodURL:t});const n={threeDSServerTransID:e,threeDSMethodNotificationURL:Yf+"/3ds/method_invocation"},r=encodeURI(window.btoa(JSON.stringify(n)).replace(/=*$/,""));new ma().invoke(t,"POST",{threeDSMethodData:r})}function qf(e){var t,n;if(!(!((t=e==null?void 0:e.data)!=null&&t.status)||((n=e==null?void 0:e.data)==null?void 0:n.status)===ya)){if(e.data.status==="3ds_method_invocation_complete"){ft("3Ds Method invocation complete"),e.stopPropagation(),xc(!0);return}e.data.status==="3ds_challenge_complete"&&(ft("3Ds Challenge complete",e.data),e.stopPropagation(),Lc(),ft("cresData",e.data.cres),e.data.cres?(Rc=e.data.cres,Jf()):(ft("Failed 3DS Challenge",e.data),yn(400,"Failed 3DS Challenge")))}}function YC(e,t,n){return Oc=e,jC=n.environment,HC=t||document.body,Yf=n.apiUrl,{onPreAuth:VC,onAuth:xc,onPostAuth:Jf,setThreeDsProcessor:r=>{ke=r}}}const ZC=Object.freeze(Object.defineProperty({__proto__:null,default:YC},Symbol.toStringTag,{value:"Module"}));function XC(e,t,n){return new Kf(e,t,n)}const JC=Object.freeze(Object.defineProperty({__proto__:null,default:XC},Symbol.toStringTag,{value:"Module"}));function qC(e,t,n){return new Gf(e,t,n)}const QC=Object.freeze(Object.defineProperty({__proto__:null,default:qC},Symbol.toStringTag,{value:"Module"}));return G1});
|