diff --git a/app/PaymentDrivers/CheckoutCom/CreditCard.php b/app/PaymentDrivers/CheckoutCom/CreditCard.php index 516b19cfda..1b9095c2cd 100644 --- a/app/PaymentDrivers/CheckoutCom/CreditCard.php +++ b/app/PaymentDrivers/CheckoutCom/CreditCard.php @@ -141,7 +141,7 @@ class CreditCard implements MethodInterface, LivewireMethodInterface } } - private function paymentData(array $data): array + public function paymentData(array $data): array { $data['gateway'] = $this->checkout; $data['company_gateway'] = $this->checkout->company_gateway; diff --git a/app/PaymentDrivers/PayPalExpressPaymentDriver.php b/app/PaymentDrivers/PayPalExpressPaymentDriver.php index ea3cdc8c8b..f4c8799928 100644 --- a/app/PaymentDrivers/PayPalExpressPaymentDriver.php +++ b/app/PaymentDrivers/PayPalExpressPaymentDriver.php @@ -97,7 +97,7 @@ class PayPalExpressPaymentDriver extends BaseDriver ->send(); if ($response->isRedirect()) { - return $response->redirect(); + return redirect($response->getRedirectUrl()); } // $this->sendFailureMail($response->getMessage() ?: ''); @@ -246,4 +246,16 @@ class PayPalExpressPaymentDriver extends BaseDriver return 0; } + + public function livewirePaymentView(array $data): string + { + $this->processPaymentView($data); + + return ''; // Gateway is offsite. + } + + public function processPaymentViewData(array $data): array + { + return $data; + } } diff --git a/app/PaymentDrivers/PayPalPPCPPaymentDriver.php b/app/PaymentDrivers/PayPalPPCPPaymentDriver.php index 14fd0ace2d..2223519ef3 100644 --- a/app/PaymentDrivers/PayPalPPCPPaymentDriver.php +++ b/app/PaymentDrivers/PayPalPPCPPaymentDriver.php @@ -85,30 +85,13 @@ class PayPalPPCPPaymentDriver extends PayPalBasePaymentDriver */ public function processPaymentView($data) { - - $this->init()->checkPaymentsReceivable(); - - $data['gateway'] = $this; - $this->payment_hash->data = array_merge((array) $this->payment_hash->data, ['amount' => $data['total']['amount_with_fee']]); - $this->payment_hash->save(); - - $data['client_id'] = config('ninja.paypal.client_id'); - $data['token'] = $this->getClientToken(); - $data['order_id'] = $this->createOrder($data); - $data['funding_source'] = $this->paypal_payment_method; - $data['gateway_type_id'] = $this->gateway_type_id; - $data['merchantId'] = $this->company_gateway->getConfigField('merchantId'); - $data['currency'] = $this->client->currency()->code; - $data['guid'] = $this->risk_guid; - $data['identifier'] = "s:INN_".$this->company_gateway->getConfigField('merchantId')."_CHCK"; - $data['pp_client_reference'] = $this->getClientHash(); + $data = $this->processPaymentViewData($data); if($this->gateway_type_id == 29) { return render('gateways.paypal.ppcp.card', $data); } else { return render('gateways.paypal.ppcp.pay', $data); } - } /** @@ -453,4 +436,34 @@ class PayPalPPCPPaymentDriver extends PayPalBasePaymentDriver } + public function processPaymentViewData(array $data): array + { + $this->init()->checkPaymentsReceivable(); + + $data['gateway'] = $this; + $this->payment_hash->data = array_merge((array) $this->payment_hash->data, ['amount' => $data['total']['amount_with_fee']]); + $this->payment_hash->save(); + + $data['client_id'] = config('ninja.paypal.client_id'); + $data['token'] = $this->getClientToken(); + $data['order_id'] = $this->createOrder($data); + $data['funding_source'] = $this->paypal_payment_method; + $data['gateway_type_id'] = $this->gateway_type_id; + $data['merchantId'] = $this->company_gateway->getConfigField('merchantId'); + $data['currency'] = $this->client->currency()->code; + $data['guid'] = $this->risk_guid; + $data['identifier'] = "s:INN_".$this->company_gateway->getConfigField('merchantId')."_CHCK"; + $data['pp_client_reference'] = $this->getClientHash(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + if ($this->gateway_type_id == 29) { + return 'gateways.paypal.ppcp.card_livewire'; + } + + return 'gateways.paypal.ppcp.pay_livewire'; + } } diff --git a/app/PaymentDrivers/PayPalRestPaymentDriver.php b/app/PaymentDrivers/PayPalRestPaymentDriver.php index d6e8dbadcf..e8ff1330aa 100644 --- a/app/PaymentDrivers/PayPalRestPaymentDriver.php +++ b/app/PaymentDrivers/PayPalRestPaymentDriver.php @@ -31,30 +31,13 @@ class PayPalRestPaymentDriver extends PayPalBasePaymentDriver public function processPaymentView($data) { - - $this->init(); - - $data['gateway'] = $this; - - $this->payment_hash->data = array_merge((array) $this->payment_hash->data, ['amount' => $data['total']['amount_with_fee']]); - $this->payment_hash->save(); - - $data['client_id'] = $this->company_gateway->getConfigField('clientId'); - $data['token'] = $this->getClientToken(); - $data['order_id'] = $this->createOrder($data); - $data['funding_source'] = $this->paypal_payment_method; - $data['gateway_type_id'] = $this->gateway_type_id; - $data['currency'] = $this->client->currency()->code; - $data['guid'] = $this->risk_guid; - $data['identifier'] = "s:INN_ACDC_CHCK"; - $data['pp_client_reference'] = $this->getClientHash(); + $data = $this->processPaymentViewData($data); if($this->gateway_type_id == 29) { return render('gateways.paypal.ppcp.card', $data); } else { return render('gateways.paypal.pay', $data); } - } /** @@ -407,4 +390,35 @@ class PayPalRestPaymentDriver extends PayPalBasePaymentDriver } + + public function processPaymentViewData(array $data): array + { + $this->init(); + + $data['gateway'] = $this; + + $this->payment_hash->data = array_merge((array) $this->payment_hash->data, ['amount' => $data['total']['amount_with_fee']]); + $this->payment_hash->save(); + + $data['client_id'] = $this->company_gateway->getConfigField('clientId'); + $data['token'] = $this->getClientToken(); + $data['order_id'] = $this->createOrder($data); + $data['funding_source'] = $this->paypal_payment_method; + $data['gateway_type_id'] = $this->gateway_type_id; + $data['currency'] = $this->client->currency()->code; + $data['guid'] = $this->risk_guid; + $data['identifier'] = "s:INN_ACDC_CHCK"; + $data['pp_client_reference'] = $this->getClientHash(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + if ($this->gateway_type_id == 29) { + return 'gateways.paypal.ppcp.card_livewire'; + } + + return 'gateways.paypal.pay_livewire'; + } } diff --git a/public/build/assets/app-234e3402.js b/public/build/assets/app-234e3402.js new file mode 100644 index 0000000000..987442a687 --- /dev/null +++ b/public/build/assets/app-234e3402.js @@ -0,0 +1,109 @@ +import{A as Sl}from"./index-08e160a7.js";import{c as zt,g as El}from"./_commonjsHelpers-725317a4.js";var Ol={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[624,626],[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[622019,622999],[62207,62209],[622126,622925],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292,810,[8110,8131],[8132,8151],[8152,8163],[8164,8171]],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,504174],[504176,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}},hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,63737423,63743358,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}}},Cl=Ol,ni={},Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.clone=void 0;function Al(e){return e?JSON.parse(JSON.stringify(e)):null}Sn.clone=Al;var ii={};Object.defineProperty(ii,"__esModule",{value:!0});ii.matches=void 0;function Tl(e,r,n){var a=String(r).length,s=e.substr(0,a),l=parseInt(s,10);return r=parseInt(String(r).substr(0,s.length),10),n=parseInt(String(n).substr(0,s.length),10),l>=r&&l<=n}function Pl(e,r){return r=String(r),r.substring(0,e.length)===e.substring(0,r.length)}function Rl(e,r){return Array.isArray(r)?Tl(e,r[0],r[1]):Pl(e,r)}ii.matches=Rl;Object.defineProperty(ni,"__esModule",{value:!0});ni.addMatchingCardsToResults=void 0;var Ml=Sn,kl=ii;function Nl(e,r,n){var a,s;for(a=0;a=s&&(v.matchStrength=s),n.push(v);break}}}ni.addMatchingCardsToResults=Nl;var ai={};Object.defineProperty(ai,"__esModule",{value:!0});ai.isValidInputType=void 0;function Ll(e){return typeof e=="string"||e instanceof String}ai.isValidInputType=Ll;var oi={};Object.defineProperty(oi,"__esModule",{value:!0});oi.findBestMatch=void 0;function jl(e){var r=e.filter(function(n){return n.matchStrength}).length;return r>0&&r===e.length}function Il(e){return jl(e)?e.reduce(function(r,n){return!r||Number(r.matchStrength)Hl?vn(!1,!1):Ul.test(e)?vn(!1,!0):vn(!0,!0)}si.cardholderName=ql;var li={};function Vl(e){for(var r=0,n=!1,a=e.length-1,s;a>=0;)s=parseInt(e.charAt(a),10),n&&(s*=2,s>9&&(s=s%10+1)),n=!n,r+=s,a--;return r%10===0}var zl=Vl;Object.defineProperty(li,"__esModule",{value:!0});li.cardNumber=void 0;var Wl=zl,ao=Uo;function wr(e,r,n){return{card:e,isPotentiallyValid:r,isValid:n}}function Kl(e,r){r===void 0&&(r={});var n,a,s;if(typeof e!="string"&&typeof e!="number")return wr(null,!1,!1);var l=String(e).replace(/-|\s/g,"");if(!/^\d*$/.test(l))return wr(null,!1,!1);var v=ao(l);if(v.length===0)return wr(null,!1,!1);if(v.length!==1)return wr(null,!0,!1);var m=v[0];if(r.maxLength&&l.length>r.maxLength)return wr(m,!1,!1);m.type===ao.types.UNIONPAY&&r.luhnValidateUnionPay!==!0?a=!0:a=Wl(l),s=Math.max.apply(null,m.lengths),r.maxLength&&(s=Math.min(r.maxLength,s));for(var P=0;P4)return ir(!1,!1);var m=parseInt(e,10),P=Number(String(s).substr(2,2)),U=!1;if(a===2){if(String(s).substr(0,2)===e)return ir(!1,!0);n=P===m,U=m>=P&&m<=P+r}else a===4&&(n=s===m,U=m>=s&&m<=s+r);return ir(U,U,n)}Xr.expirationYear=Gl;var fi={};Object.defineProperty(fi,"__esModule",{value:!0});fi.isArray=void 0;fi.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};Object.defineProperty(ci,"__esModule",{value:!0});ci.parseDate=void 0;var Yl=Xr,Xl=fi;function Ql(e){var r=Number(e[0]),n;return r===0?2:r>1||r===1&&Number(e[1])>2?1:r===1?(n=e.substr(1),Yl.expirationYear(n).isPotentiallyValid?1:2):e.length===5?1:e.length>5?2:1}function Zl(e){var r;if(/^\d{4}-\d{1,2}$/.test(e)?r=e.split("-").reverse():/\//.test(e)?r=e.split(/\s*\/\s*/g):/\s/.test(e)&&(r=e.split(/ +/g)),Xl.isArray(r))return{month:r[0]||"",year:r.slice(1).join()};var n=Ql(e),a=e.substr(0,n);return{month:a,year:e.substr(a.length)}}ci.parseDate=Zl;var On={};Object.defineProperty(On,"__esModule",{value:!0});On.expirationMonth=void 0;function yn(e,r,n){return{isValid:e,isPotentiallyValid:r,isValidForThisYear:n||!1}}function eu(e){var r=new Date().getMonth()+1;if(typeof e!="string")return yn(!1,!1);if(e.replace(/\s/g,"")===""||e==="0")return yn(!1,!0);if(!/^\d*$/.test(e))return yn(!1,!1);var n=parseInt(e,10);if(isNaN(Number(e)))return yn(!1,!1);var a=n>0&&n<13;return yn(a,a,a&&n>=r)}On.expirationMonth=eu;var ra=zt&&zt.__assign||function(){return ra=Object.assign||function(e){for(var r,n=1,a=arguments.length;nr?e[n]:r;return r}function Hr(e,r){return{isValid:e,isPotentiallyValid:r}}function su(e,r){return r===void 0&&(r=Ho),r=r instanceof Array?r:[r],typeof e!="string"||!/^\d*$/.test(e)?Hr(!1,!1):au(r,e.length)?Hr(!0,!0):e.lengthou(r)?Hr(!1,!1):Hr(!0,!0)}di.cvv=su;var pi={};Object.defineProperty(pi,"__esModule",{value:!0});pi.postalCode=void 0;var lu=3;function Ji(e,r){return{isValid:e,isPotentiallyValid:r}}function uu(e,r){r===void 0&&(r={});var n=r.minLength||lu;return typeof e!="string"?Ji(!1,!1):e.lengthfunction(){return r||(0,e[Vo(e)[0]])((r={exports:{}}).exports,r),r.exports},Tu=(e,r,n,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of Vo(r))!Au.call(e,s)&&s!==n&&qo(e,s,{get:()=>r[s],enumerable:!(a=Ou(r,s))||a.enumerable});return e},tt=(e,r,n)=>(n=e!=null?Eu(Cu(e)):{},Tu(r||!e||!e.__esModule?qo(n,"default",{value:e,enumerable:!0}):n,e)),Ot=Zt({"../alpine/packages/alpinejs/dist/module.cjs.js"(e,r){var n=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,v=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,P=(t,i)=>function(){return i||(0,t[l(t)[0]])((i={exports:{}}).exports,i),i.exports},U=(t,i)=>{for(var o in i)a(t,o,{get:i[o],enumerable:!0})},ne=(t,i,o,c)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of l(i))!m.call(t,d)&&d!==o&&a(t,d,{get:()=>i[d],enumerable:!(c=s(i,d))||c.enumerable});return t},ie=(t,i,o)=>(o=t!=null?n(v(t)):{},ne(i||!t||!t.__esModule?a(o,"default",{value:t,enumerable:!0}):o,t)),K=t=>ne(a({},"__esModule",{value:!0}),t),Y=P({"node_modules/@vue/shared/dist/shared.cjs.js"(t){Object.defineProperty(t,"__esModule",{value:!0});function i(b,W){const ee=Object.create(null),fe=b.split(",");for(let qe=0;qe!!ee[qe.toLowerCase()]:qe=>!!ee[qe]}var o={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"HYDRATE_EVENTS",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},c={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},d="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",p=i(d),g=2;function x(b,W=0,ee=b.length){let fe=b.split(/(\r?\n)/);const qe=fe.filter((xt,dt)=>dt%2===1);fe=fe.filter((xt,dt)=>dt%2===0);let et=0;const wt=[];for(let xt=0;xt=W){for(let dt=xt-g;dt<=xt+g||ee>et;dt++){if(dt<0||dt>=fe.length)continue;const gn=dt+1;wt.push(`${gn}${" ".repeat(Math.max(3-String(gn).length,0))}| ${fe[dt]}`);const Br=fe[dt].length,Zn=qe[dt]&&qe[dt].length||0;if(dt===xt){const Ur=W-(et-(Br+Zn)),Wi=Math.max(1,ee>et?Br-Ur:ee-W);wt.push(" | "+" ".repeat(Ur)+"^".repeat(Wi))}else if(dt>xt){if(ee>et){const Ur=Math.max(Math.min(ee-et,Br),1);wt.push(" | "+"^".repeat(Ur))}et+=Br+Zn}}break}return wt.join(` +`)}var M="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Z=i(M),Me=i(M+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),Qe=/[>/="'\u0009\u000a\u000c\u0020]/,De={};function Je(b){if(De.hasOwnProperty(b))return De[b];const W=Qe.test(b);return W&&console.error(`unsafe attribute name: ${b}`),De[b]=!W}var Tt={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},Ut=i("animation-iteration-count,border-image-outset,border-image-slice,border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-miterlimit,stroke-opacity,stroke-width"),we=i("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap");function Ue(b){if(Dt(b)){const W={};for(let ee=0;ee{if(ee){const fe=ee.split(He);fe.length>1&&(W[fe[0].trim()]=fe[1].trim())}}),W}function It(b){let W="";if(!b)return W;for(const ee in b){const fe=b[ee],qe=ee.startsWith("--")?ee:Xn(ee);(vr(fe)||typeof fe=="number"&&Ut(qe))&&(W+=`${qe}:${fe};`)}return W}function Ht(b){let W="";if(vr(b))W=b;else if(Dt(b))for(let ee=0;ee]/;function Ii(b){const W=""+b,ee=ji.exec(W);if(!ee)return W;let fe="",qe,et,wt=0;for(et=ee.index;et||--!>|Mr(ee,W))}var Bn=b=>b==null?"":qt(b)?JSON.stringify(b,Fi,2):String(b),Fi=(b,W)=>mr(W)?{[`Map(${W.size})`]:[...W.entries()].reduce((ee,[fe,qe])=>(ee[`${fe} =>`]=qe,ee),{})}:$t(W)?{[`Set(${W.size})`]:[...W.values()]}:qt(W)&&!Dt(W)&&!Wn(W)?String(W):W,Bi=["bigInt","optionalChaining","nullishCoalescingOperator"],un=Object.freeze({}),cn=Object.freeze([]),fn=()=>{},kr=()=>!1,Nr=/^on[^a-z]/,Lr=b=>Nr.test(b),jr=b=>b.startsWith("onUpdate:"),Un=Object.assign,Hn=(b,W)=>{const ee=b.indexOf(W);ee>-1&&b.splice(ee,1)},qn=Object.prototype.hasOwnProperty,Vn=(b,W)=>qn.call(b,W),Dt=Array.isArray,mr=b=>yr(b)==="[object Map]",$t=b=>yr(b)==="[object Set]",dn=b=>b instanceof Date,pn=b=>typeof b=="function",vr=b=>typeof b=="string",Ui=b=>typeof b=="symbol",qt=b=>b!==null&&typeof b=="object",Ir=b=>qt(b)&&pn(b.then)&&pn(b.catch),zn=Object.prototype.toString,yr=b=>zn.call(b),Hi=b=>yr(b).slice(8,-1),Wn=b=>yr(b)==="[object Object]",Kn=b=>vr(b)&&b!=="NaN"&&b[0]!=="-"&&""+parseInt(b,10)===b,Jn=i(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),br=b=>{const W=Object.create(null);return ee=>W[ee]||(W[ee]=b(ee))},Gn=/-(\w)/g,Yn=br(b=>b.replace(Gn,(W,ee)=>ee?ee.toUpperCase():"")),qi=/\B([A-Z])/g,Xn=br(b=>b.replace(qi,"-$1").toLowerCase()),_r=br(b=>b.charAt(0).toUpperCase()+b.slice(1)),Vi=br(b=>b?`on${_r(b)}`:""),hn=(b,W)=>b!==W&&(b===b||W===W),zi=(b,W)=>{for(let ee=0;ee{Object.defineProperty(b,W,{configurable:!0,enumerable:!1,value:ee})},$r=b=>{const W=parseFloat(b);return isNaN(W)?b:W},Fr,Qn=()=>Fr||(Fr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});t.EMPTY_ARR=cn,t.EMPTY_OBJ=un,t.NO=kr,t.NOOP=fn,t.PatchFlagNames=o,t.babelParserDefaultPlugins=Bi,t.camelize=Yn,t.capitalize=_r,t.def=Dr,t.escapeHtml=Ii,t.escapeHtmlComment=Di,t.extend=Un,t.generateCodeFrame=x,t.getGlobalThis=Qn,t.hasChanged=hn,t.hasOwn=Vn,t.hyphenate=Xn,t.invokeArrayFns=zi,t.isArray=Dt,t.isBooleanAttr=Me,t.isDate=dn,t.isFunction=pn,t.isGloballyWhitelisted=p,t.isHTMLTag=Pr,t.isIntegerKey=Kn,t.isKnownAttr=we,t.isMap=mr,t.isModelListener=jr,t.isNoUnitNumericStyleProp=Ut,t.isObject=qt,t.isOn=Lr,t.isPlainObject=Wn,t.isPromise=Ir,t.isReservedProp=Jn,t.isSSRSafeAttrName=Je,t.isSVGTag=Li,t.isSet=$t,t.isSpecialBooleanAttr=Z,t.isString=vr,t.isSymbol=Ui,t.isVoidTag=Rr,t.looseEqual=Mr,t.looseIndexOf=Fn,t.makeMap=i,t.normalizeClass=Ht,t.normalizeStyle=Ue,t.objectToString=zn,t.parseStringStyle=_t,t.propsToAttrMap=Tt,t.remove=Hn,t.slotFlagsText=c,t.stringifyStyle=It,t.toDisplayString=Bn,t.toHandlerKey=Vi,t.toNumber=$r,t.toRawType=Hi,t.toTypeString=yr}}),O=P({"node_modules/@vue/shared/index.js"(t,i){i.exports=Y()}}),y=P({"node_modules/@vue/reactivity/dist/reactivity.cjs.js"(t){Object.defineProperty(t,"__esModule",{value:!0});var i=O(),o=new WeakMap,c=[],d,p=Symbol("iterate"),g=Symbol("Map key iterate");function x(u){return u&&u._isEffect===!0}function M(u,A=i.EMPTY_OBJ){x(u)&&(u=u.raw);const N=Qe(u,A);return A.lazy||N(),N}function Z(u){u.active&&(De(u),u.options.onStop&&u.options.onStop(),u.active=!1)}var Me=0;function Qe(u,A){const N=function(){if(!N.active)return u();if(!c.includes(N)){De(N);try{return we(),c.push(N),d=N,u()}finally{c.pop(),Ue(),d=c[c.length-1]}}};return N.id=Me++,N.allowRecurse=!!A.allowRecurse,N._isEffect=!0,N.active=!0,N.raw=u,N.deps=[],N.options=A,N}function De(u){const{deps:A}=u;if(A.length){for(let N=0;N{vt&&vt.forEach(Ft=>{(Ft!==d||Ft.allowRecurse)&&nt.add(Ft)})};if(A==="clear")Le.forEach(St);else if(N==="length"&&i.isArray(u))Le.forEach((vt,Ft)=>{(Ft==="length"||Ft>=oe)&&St(vt)});else switch(N!==void 0&&St(Le.get(N)),A){case"add":i.isArray(u)?i.isIntegerKey(N)&&St(Le.get("length")):(St(Le.get(p)),i.isMap(u)&&St(Le.get(g)));break;case"delete":i.isArray(u)||(St(Le.get(p)),i.isMap(u)&&St(Le.get(g)));break;case"set":i.isMap(u)&&St(Le.get(p));break}const mn=vt=>{vt.options.onTrigger&&vt.options.onTrigger({effect:vt,target:u,key:N,type:A,newValue:oe,oldValue:J,oldTarget:ge}),vt.options.scheduler?vt.options.scheduler(vt):vt()};nt.forEach(mn)}var _t=i.makeMap("__proto__,__v_isRef,__isVue"),It=new Set(Object.getOwnPropertyNames(Symbol).map(u=>Symbol[u]).filter(i.isSymbol)),Ht=Rr(),Tr=Rr(!1,!0),sn=Rr(!0),ln=Rr(!0,!0),Pr=Li();function Li(){const u={};return["includes","indexOf","lastIndexOf"].forEach(A=>{u[A]=function(...N){const oe=b(this);for(let ge=0,Le=this.length;ge{u[A]=function(...N){Ut();const oe=b(this)[A].apply(this,N);return Ue(),oe}}),u}function Rr(u=!1,A=!1){return function(oe,J,ge){if(J==="__v_isReactive")return!u;if(J==="__v_isReadonly")return u;if(J==="__v_raw"&&ge===(u?A?Yn:Gn:A?br:Jn).get(oe))return oe;const Le=i.isArray(oe);if(!u&&Le&&i.hasOwn(Pr,J))return Reflect.get(Pr,J,ge);const nt=Reflect.get(oe,J,ge);return(i.isSymbol(J)?It.has(J):_t(J))||(u||Ne(oe,"get",J),A)?nt:fe(nt)?!Le||!i.isIntegerKey(J)?nt.value:nt:i.isObject(nt)?u?hn(nt):_r(nt):nt}}var ji=$n(),Ii=$n(!0);function $n(u=!1){return function(N,oe,J,ge){let Le=N[oe];if(!u&&(J=b(J),Le=b(Le),!i.isArray(N)&&fe(Le)&&!fe(J)))return Le.value=J,!0;const nt=i.isArray(N)&&i.isIntegerKey(oe)?Number(oe)i.isObject(u)?_r(u):u,cn=u=>i.isObject(u)?hn(u):u,fn=u=>u,kr=u=>Reflect.getPrototypeOf(u);function Nr(u,A,N=!1,oe=!1){u=u.__v_raw;const J=b(u),ge=b(A);A!==ge&&!N&&Ne(J,"get",A),!N&&Ne(J,"get",ge);const{has:Le}=kr(J),nt=oe?fn:N?cn:un;if(Le.call(J,A))return nt(u.get(A));if(Le.call(J,ge))return nt(u.get(ge));u!==J&&u.get(A)}function Lr(u,A=!1){const N=this.__v_raw,oe=b(N),J=b(u);return u!==J&&!A&&Ne(oe,"has",u),!A&&Ne(oe,"has",J),u===J?N.has(u):N.has(u)||N.has(J)}function jr(u,A=!1){return u=u.__v_raw,!A&&Ne(b(u),"iterate",p),Reflect.get(u,"size",u)}function Un(u){u=b(u);const A=b(this);return kr(A).has.call(A,u)||(A.add(u),He(A,"add",u,u)),this}function Hn(u,A){A=b(A);const N=b(this),{has:oe,get:J}=kr(N);let ge=oe.call(N,u);ge?Kn(N,oe,u):(u=b(u),ge=oe.call(N,u));const Le=J.call(N,u);return N.set(u,A),ge?i.hasChanged(A,Le)&&He(N,"set",u,A,Le):He(N,"add",u,A),this}function qn(u){const A=b(this),{has:N,get:oe}=kr(A);let J=N.call(A,u);J?Kn(A,N,u):(u=b(u),J=N.call(A,u));const ge=oe?oe.call(A,u):void 0,Le=A.delete(u);return J&&He(A,"delete",u,void 0,ge),Le}function Vn(){const u=b(this),A=u.size!==0,N=i.isMap(u)?new Map(u):new Set(u),oe=u.clear();return A&&He(u,"clear",void 0,void 0,N),oe}function Dt(u,A){return function(oe,J){const ge=this,Le=ge.__v_raw,nt=b(Le),St=A?fn:u?cn:un;return!u&&Ne(nt,"iterate",p),Le.forEach((mn,vt)=>oe.call(J,St(mn),St(vt),ge))}}function mr(u,A,N){return function(...oe){const J=this.__v_raw,ge=b(J),Le=i.isMap(ge),nt=u==="entries"||u===Symbol.iterator&&Le,St=u==="keys"&&Le,mn=J[u](...oe),vt=N?fn:A?cn:un;return!A&&Ne(ge,"iterate",St?g:p),{next(){const{value:Ft,done:Ki}=mn.next();return Ki?{value:Ft,done:Ki}:{value:nt?[vt(Ft[0]),vt(Ft[1])]:vt(Ft),done:Ki}},[Symbol.iterator](){return this}}}}function $t(u){return function(...A){{const N=A[0]?`on key "${A[0]}" `:"";console.warn(`${i.capitalize(u)} operation ${N}failed: target is readonly.`,b(this))}return u==="delete"?!1:this}}function dn(){const u={get(ge){return Nr(this,ge)},get size(){return jr(this)},has:Lr,add:Un,set:Hn,delete:qn,clear:Vn,forEach:Dt(!1,!1)},A={get(ge){return Nr(this,ge,!1,!0)},get size(){return jr(this)},has:Lr,add:Un,set:Hn,delete:qn,clear:Vn,forEach:Dt(!1,!0)},N={get(ge){return Nr(this,ge,!0)},get size(){return jr(this,!0)},has(ge){return Lr.call(this,ge,!0)},add:$t("add"),set:$t("set"),delete:$t("delete"),clear:$t("clear"),forEach:Dt(!0,!1)},oe={get(ge){return Nr(this,ge,!0,!0)},get size(){return jr(this,!0)},has(ge){return Lr.call(this,ge,!0)},add:$t("add"),set:$t("set"),delete:$t("delete"),clear:$t("clear"),forEach:Dt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(ge=>{u[ge]=mr(ge,!1,!1),N[ge]=mr(ge,!0,!1),A[ge]=mr(ge,!1,!0),oe[ge]=mr(ge,!0,!0)}),[u,N,A,oe]}var[pn,vr,Ui,qt]=dn();function Ir(u,A){const N=A?u?qt:Ui:u?vr:pn;return(oe,J,ge)=>J==="__v_isReactive"?!u:J==="__v_isReadonly"?u:J==="__v_raw"?oe:Reflect.get(i.hasOwn(N,J)&&J in oe?N:oe,J,ge)}var zn={get:Ir(!1,!1)},yr={get:Ir(!1,!0)},Hi={get:Ir(!0,!1)},Wn={get:Ir(!0,!0)};function Kn(u,A,N){const oe=b(N);if(oe!==N&&A.call(u,oe)){const J=i.toRawType(u);console.warn(`Reactive ${J} contains both the raw and reactive versions of the same object${J==="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.`)}}var Jn=new WeakMap,br=new WeakMap,Gn=new WeakMap,Yn=new WeakMap;function qi(u){switch(u){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Xn(u){return u.__v_skip||!Object.isExtensible(u)?0:qi(i.toRawType(u))}function _r(u){return u&&u.__v_isReadonly?u:Dr(u,!1,Fn,zn,Jn)}function Vi(u){return Dr(u,!1,Fi,yr,br)}function hn(u){return Dr(u,!0,Bn,Hi,Gn)}function zi(u){return Dr(u,!0,Bi,Wn,Yn)}function Dr(u,A,N,oe,J){if(!i.isObject(u))return console.warn(`value cannot be made reactive: ${String(u)}`),u;if(u.__v_raw&&!(A&&u.__v_isReactive))return u;const ge=J.get(u);if(ge)return ge;const Le=Xn(u);if(Le===0)return u;const nt=new Proxy(u,Le===2?oe:N);return J.set(u,nt),nt}function $r(u){return Fr(u)?$r(u.__v_raw):!!(u&&u.__v_isReactive)}function Fr(u){return!!(u&&u.__v_isReadonly)}function Qn(u){return $r(u)||Fr(u)}function b(u){return u&&b(u.__v_raw)||u}function W(u){return i.def(u,"__v_skip",!0),u}var ee=u=>i.isObject(u)?_r(u):u;function fe(u){return!!(u&&u.__v_isRef===!0)}function qe(u){return xt(u)}function et(u){return xt(u,!0)}var wt=class{constructor(u,A=!1){this._shallow=A,this.__v_isRef=!0,this._rawValue=A?u:b(u),this._value=A?u:ee(u)}get value(){return Ne(b(this),"get","value"),this._value}set value(u){u=this._shallow?u:b(u),i.hasChanged(u,this._rawValue)&&(this._rawValue=u,this._value=this._shallow?u:ee(u),He(b(this),"set","value",u))}};function xt(u,A=!1){return fe(u)?u:new wt(u,A)}function dt(u){He(b(u),"set","value",u.value)}function gn(u){return fe(u)?u.value:u}var Br={get:(u,A,N)=>gn(Reflect.get(u,A,N)),set:(u,A,N,oe)=>{const J=u[A];return fe(J)&&!fe(N)?(J.value=N,!0):Reflect.set(u,A,N,oe)}};function Zn(u){return $r(u)?u:new Proxy(u,Br)}var Ur=class{constructor(u){this.__v_isRef=!0;const{get:A,set:N}=u(()=>Ne(this,"get","value"),()=>He(this,"set","value"));this._get=A,this._set=N}get value(){return this._get()}set value(u){this._set(u)}};function Wi(u){return new Ur(u)}function bl(u){Qn(u)||console.warn("toRefs() expects a reactive object but received a plain one.");const A=i.isArray(u)?new Array(u.length):{};for(const N in u)A[N]=io(u,N);return A}var _l=class{constructor(u,A){this._object=u,this._key=A,this.__v_isRef=!0}get value(){return this._object[this._key]}set value(u){this._object[this._key]=u}};function io(u,A){return fe(u[A])?u[A]:new _l(u,A)}var wl=class{constructor(u,A,N){this._setter=A,this._dirty=!0,this.__v_isRef=!0,this.effect=M(u,{lazy:!0,scheduler:()=>{this._dirty||(this._dirty=!0,He(b(this),"set","value"))}}),this.__v_isReadonly=N}get value(){const u=b(this);return u._dirty&&(u._value=this.effect(),u._dirty=!1),Ne(u,"get","value"),u._value}set value(u){this._setter(u)}};function xl(u){let A,N;return i.isFunction(u)?(A=u,N=()=>{console.warn("Write operation failed: computed value is readonly")}):(A=u.get,N=u.set),new wl(A,N,i.isFunction(u)||!u.set)}t.ITERATE_KEY=p,t.computed=xl,t.customRef=Wi,t.effect=M,t.enableTracking=we,t.isProxy=Qn,t.isReactive=$r,t.isReadonly=Fr,t.isRef=fe,t.markRaw=W,t.pauseTracking=Ut,t.proxyRefs=Zn,t.reactive=_r,t.readonly=hn,t.ref=qe,t.resetTracking=Ue,t.shallowReactive=Vi,t.shallowReadonly=zi,t.shallowRef=et,t.stop=Z,t.toRaw=b,t.toRef=io,t.toRefs=bl,t.track=Ne,t.trigger=He,t.triggerRef=dt,t.unref=gn}}),_=P({"node_modules/@vue/reactivity/index.js"(t,i){i.exports=y()}}),S={};U(S,{Alpine:()=>no,default:()=>yl}),r.exports=K(S);var T=!1,j=!1,H=[],Ce=-1;function D(t){C(t)}function C(t){H.includes(t)||H.push(t),re()}function L(t){let i=H.indexOf(t);i!==-1&&i>Ce&&H.splice(i,1)}function re(){!j&&!T&&(T=!0,queueMicrotask(ye))}function ye(){T=!1,j=!0;for(let t=0;tt.effect(i,{scheduler:o=>{Ye?D(o):o()}}),Ge=t.raw}function ht(t){X=t}function yt(t){let i=()=>{};return[c=>{let d=X(c);return t._x_effects||(t._x_effects=new Set,t._x_runEffects=()=>{t._x_effects.forEach(p=>p())}),t._x_effects.add(d),i=()=>{d!==void 0&&(t._x_effects.delete(d),Te(d))},d},()=>{i()}]}function Ct(t,i){let o=!0,c,d=X(()=>{let p=t();JSON.stringify(p),o?c=p:queueMicrotask(()=>{i(p,c),c=p}),o=!1});return()=>Te(d)}var Ee=[],be=[],Oe=[];function xe(t){Oe.push(t)}function de(t,i){typeof i=="function"?(t._x_cleanups||(t._x_cleanups=[]),t._x_cleanups.push(i)):(i=t,be.push(i))}function Q(t){Ee.push(t)}function Ve(t,i,o){t._x_attributeCleanups||(t._x_attributeCleanups={}),t._x_attributeCleanups[i]||(t._x_attributeCleanups[i]=[]),t._x_attributeCleanups[i].push(o)}function z(t,i){t._x_attributeCleanups&&Object.entries(t._x_attributeCleanups).forEach(([o,c])=>{(i===void 0||i.includes(o))&&(c.forEach(d=>d()),delete t._x_attributeCleanups[o])})}function ae(t){if(t._x_cleanups)for(;t._x_cleanups.length;)t._x_cleanups.pop()()}var ve=new MutationObserver(We),$e=!1;function me(){ve.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),$e=!0}function ue(){Ze(),ve.disconnect(),$e=!1}var ut=[];function Ze(){let t=ve.takeRecords();ut.push(()=>t.length>0&&We(t));let i=ut.length;queueMicrotask(()=>{if(ut.length===i)for(;ut.length>0;)ut.shift()()})}function te(t){if(!$e)return t();ue();let i=t();return me(),i}var k=!1,I=[];function he(){k=!0}function V(){k=!1,We(I),I=[]}function We(t){if(k){I=I.concat(t);return}let i=new Set,o=new Set,c=new Map,d=new Map;for(let p=0;pg.nodeType===1&&i.add(g)),t[p].removedNodes.forEach(g=>g.nodeType===1&&o.add(g))),t[p].type==="attributes")){let g=t[p].target,x=t[p].attributeName,M=t[p].oldValue,Z=()=>{c.has(g)||c.set(g,[]),c.get(g).push({name:x,value:g.getAttribute(x)})},Me=()=>{d.has(g)||d.set(g,[]),d.get(g).push(x)};g.hasAttribute(x)&&M===null?Z():g.hasAttribute(x)?(Me(),Z()):Me()}d.forEach((p,g)=>{z(g,p)}),c.forEach((p,g)=>{Ee.forEach(x=>x(g,p))});for(let p of o)i.has(p)||be.forEach(g=>g(p));i.forEach(p=>{p._x_ignoreSelf=!0,p._x_ignore=!0});for(let p of i)o.has(p)||p.isConnected&&(delete p._x_ignoreSelf,delete p._x_ignore,Oe.forEach(g=>g(p)),p._x_ignore=!0,p._x_ignoreSelf=!0);i.forEach(p=>{delete p._x_ignoreSelf,delete p._x_ignore}),i=null,o=null,c=null,d=null}function pe(t){return ce(q(t))}function $(t,i,o){return t._x_dataStack=[i,...q(o||t)],()=>{t._x_dataStack=t._x_dataStack.filter(c=>c!==i)}}function q(t){return t._x_dataStack?t._x_dataStack:typeof ShadowRoot=="function"&&t instanceof ShadowRoot?q(t.host):t.parentNode?q(t.parentNode):[]}function ce(t){return new Proxy({objects:t},Be)}var Be={ownKeys({objects:t}){return Array.from(new Set(t.flatMap(i=>Object.keys(i))))},has({objects:t},i){return i==Symbol.unscopables?!1:t.some(o=>Object.prototype.hasOwnProperty.call(o,i)||Reflect.has(o,i))},get({objects:t},i,o){return i=="toJSON"?Ae:Reflect.get(t.find(c=>Reflect.has(c,i))||{},i,o)},set({objects:t},i,o,c){const d=t.find(g=>Object.prototype.hasOwnProperty.call(g,i))||t[t.length-1],p=Object.getOwnPropertyDescriptor(d,i);return p!=null&&p.set&&(p!=null&&p.get)?p.set.call(c,o)||!0:Reflect.set(d,i,o)}};function Ae(){return Reflect.ownKeys(this).reduce((i,o)=>(i[o]=Reflect.get(this,o),i),{})}function ot(t){let i=c=>typeof c=="object"&&!Array.isArray(c)&&c!==null,o=(c,d="")=>{Object.entries(Object.getOwnPropertyDescriptors(c)).forEach(([p,{value:g,enumerable:x}])=>{if(x===!1||g===void 0||typeof g=="object"&&g!==null&&g.__v_skip)return;let M=d===""?p:`${d}.${p}`;typeof g=="object"&&g!==null&&g._x_interceptor?c[p]=g.initialize(t,M,p):i(g)&&g!==c&&!(g instanceof Element)&&o(g,M)})};return o(t)}function it(t,i=()=>{}){let o={initialValue:void 0,_x_interceptor:!0,initialize(c,d,p){return t(this.initialValue,()=>Rt(c,d),g=>Lt(c,d,g),d,p)}};return i(o),c=>{if(typeof c=="object"&&c!==null&&c._x_interceptor){let d=o.initialize.bind(o);o.initialize=(p,g,x)=>{let M=c.initialize(p,g,x);return o.initialValue=M,d(p,g,x)}}else o.initialValue=c;return o}}function Rt(t,i){return i.split(".").reduce((o,c)=>o[c],t)}function Lt(t,i,o){if(typeof i=="string"&&(i=i.split(".")),i.length===1)t[i[0]]=o;else{if(i.length===0)throw error;return t[i[0]]||(t[i[0]]={}),Lt(t[i[0]],i.slice(1),o)}}var lr={};function At(t,i){lr[t]=i}function Wt(t,i){return Object.entries(lr).forEach(([o,c])=>{let d=null;function p(){if(d)return d;{let[g,x]=G(i);return d={interceptor:it,...g},de(i,x),d}}Object.defineProperty(t,`$${o}`,{get(){return c(i,p())},enumerable:!1})}),t}function ur(t,i,o,...c){try{return o(...c)}catch(d){er(d,t,i)}}function er(t,i,o=void 0){t=Object.assign(t??{message:"No error message given."},{el:i,expression:o}),console.warn(`Alpine Expression Error: ${t.message} + +${o?'Expression: "'+o+`" + +`:""}`,i),setTimeout(()=>{throw t},0)}var cr=!0;function An(t){let i=cr;cr=!1;let o=t();return cr=i,o}function Kt(t,i,o={}){let c;return bt(t,i)(d=>c=d,o),c}function bt(...t){return Tn(...t)}var Tn=Qr;function Pn(t){Tn=t}function Qr(t,i){let o={};Wt(o,t);let c=[o,...q(t)],d=typeof i=="function"?yi(c,i):_i(c,i,t);return ur.bind(null,t,i,d)}function yi(t,i){return(o=()=>{},{scope:c={},params:d=[]}={})=>{let p=i.apply(ce([c,...t]),d);Cr(o,p)}}var Zr={};function bi(t,i){if(Zr[t])return Zr[t];let o=Object.getPrototypeOf(async function(){}).constructor,c=/^[\n\s]*if.*\(.*\)/.test(t.trim())||/^(let|const)\s/.test(t.trim())?`(async()=>{ ${t} })()`:t,p=(()=>{try{let g=new o(["__self","scope"],`with (scope) { __self.result = ${c} }; __self.finished = true; return __self.result;`);return Object.defineProperty(g,"name",{value:`[Alpine] ${t}`}),g}catch(g){return er(g,i,t),Promise.resolve()}})();return Zr[t]=p,p}function _i(t,i,o){let c=bi(i,o);return(d=()=>{},{scope:p={},params:g=[]}={})=>{c.result=void 0,c.finished=!1;let x=ce([p,...t]);if(typeof c=="function"){let M=c(c,x).catch(Z=>er(Z,o,i));c.finished?(Cr(d,c.result,x,g,o),c.result=void 0):M.then(Z=>{Cr(d,Z,x,g,o)}).catch(Z=>er(Z,o,i)).finally(()=>c.result=void 0)}}}function Cr(t,i,o,c,d){if(cr&&typeof i=="function"){let p=i.apply(o,c);p instanceof Promise?p.then(g=>Cr(t,g,o,c)).catch(g=>er(g,d,i)):t(p)}else typeof i=="object"&&i instanceof Promise?i.then(p=>t(p)):t(i)}var en="x-";function Jt(t=""){return en+t}function Rn(t){en=t}var fr={};function st(t,i){return fr[t]=i,{before(o){if(!fr[o]){console.warn(String.raw`Cannot find directive \`${o}\`. \`${t}\` will use the default order of execution`);return}const c=Ke.indexOf(o);Ke.splice(c>=0?c:Ke.indexOf("DEFAULT"),0,t)}}}function f(t){return Object.keys(fr).includes(t)}function h(t,i,o){if(i=Array.from(i),t._x_virtualDirectives){let p=Object.entries(t._x_virtualDirectives).map(([x,M])=>({name:x,value:M})),g=w(p);p=p.map(x=>g.find(M=>M.name===x.name)?{name:`x-bind:${x.name}`,value:`"${x.value}"`}:x),i=i.concat(p)}let c={};return i.map(Pe((p,g)=>c[p]=g)).filter(Re).map(rt(c,o)).sort(ct).map(p=>se(t,p))}function w(t){return Array.from(t).map(Pe()).filter(i=>!Re(i))}var E=!1,R=new Map,F=Symbol();function B(t){E=!0;let i=Symbol();F=i,R.set(i,[]);let o=()=>{for(;R.get(i).length;)R.get(i).shift()();R.delete(i)},c=()=>{E=!1,o()};t(o),c()}function G(t){let i=[],o=x=>i.push(x),[c,d]=yt(t);return i.push(d),[{Alpine:on,effect:c,cleanup:o,evaluateLater:bt.bind(bt,t),evaluate:Kt.bind(Kt,t)},()=>i.forEach(x=>x())]}function se(t,i){let o=()=>{},c=fr[i.type]||o,[d,p]=G(t);Ve(t,i.original,p);let g=()=>{t._x_ignore||t._x_ignoreSelf||(c.inline&&c.inline(t,i,d),c=c.bind(c,t,i,d),E?R.get(F).push(c):c())};return g.runCleanups=p,g}var le=(t,i)=>({name:o,value:c})=>(o.startsWith(t)&&(o=o.replace(t,i)),{name:o,value:c}),ke=t=>t;function Pe(t=()=>{}){return({name:i,value:o})=>{let{name:c,value:d}=Fe.reduce((p,g)=>g(p),{name:i,value:o});return c!==i&&t(c,i),{name:c,value:d}}}var Fe=[];function _e(t){Fe.push(t)}function Re({name:t}){return je().test(t)}var je=()=>new RegExp(`^${en}([^:^.]+)\\b`);function rt(t,i){return({name:o,value:c})=>{let d=o.match(je()),p=o.match(/:([a-zA-Z0-9\-_:]+)/),g=o.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],x=i||t[o]||o;return{type:d?d[1]:null,value:p?p[1]:null,modifiers:g.map(M=>M.replace(".","")),expression:c,original:x}}}var Ie="DEFAULT",Ke=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",Ie,"teleport"];function ct(t,i){let o=Ke.indexOf(t.type)===-1?Ie:t.type,c=Ke.indexOf(i.type)===-1?Ie:i.type;return Ke.indexOf(o)-Ke.indexOf(c)}function mt(t,i,o={}){t.dispatchEvent(new CustomEvent(i,{detail:o,bubbles:!0,composed:!0,cancelable:!0}))}function Xe(t,i){if(typeof ShadowRoot=="function"&&t instanceof ShadowRoot){Array.from(t.children).forEach(d=>Xe(d,i));return}let o=!1;if(i(t,()=>o=!0),o)return;let c=t.firstElementChild;for(;c;)Xe(c,i),c=c.nextElementSibling}function ft(t,...i){console.warn(`Alpine Warning: ${t}`,...i)}var dr=!1;function pr(){dr&&ft("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),dr=!0,document.body||ft("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's ` + + +@assets + + +@endassets + +@script + +@endscript \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/paypal/ppcp/card_livewire.blade.php b/resources/views/portal/ninja2020/gateways/paypal/ppcp/card_livewire.blade.php new file mode 100644 index 0000000000..d776c896be --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/paypal/ppcp/card_livewire.blade.php @@ -0,0 +1,378 @@ +@php + $gateway_instance = $gateway instanceof \App\Models\CompanyGateway ? $gateway : $gateway->company_gateway; + $token_billing_string = 'true'; + + if($gateway_instance->token_billing == 'off' || $gateway_instance->token_billing == 'optin'){ + $token_billing_string = 'false'; + } + + if (isset($pre_payment) && $pre_payment == '1' && isset($is_recurring) && $is_recurring == '1') { + $token_billing_string = 'true'; + } +@endphp + +
+ + + +
+ @csrf + + + + + + + +
+ + @include('portal.ninja2020.gateways.includes.payment_details') + + + +
+ + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if (count($tokens) > 0) + @foreach ($tokens as $token) + + @endforeach + @endisset + + + + @endcomponent + +
+ +
+
+
+
+
+
+ + @include('portal.ninja2020.gateways.includes.save_card') + @include('portal.ninja2020.gateways.includes.pay_now', ['id' => 'pay-now']) +
+ + @include('portal.ninja2020.gateways.includes.pay_now', ['id' => 'pay-now-token']) + + +
+ +@assets + + +@if(isset($merchantId)) + +@else + +@endif + +@endassets + +@script + +@endscript + +@script + +@endscript \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/paypal/ppcp/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/paypal/ppcp/pay_livewire.blade.php new file mode 100644 index 0000000000..57e2f2c213 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/paypal/ppcp/pay_livewire.blade.php @@ -0,0 +1,117 @@ +
+ +
+ @csrf + + + + + +
+ + + +
+ + +
+ +@assets + + +@endassets + +@script + +@endscript \ No newline at end of file