From 0e8da70f77d32904581a9024665cec38c837f090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Sat, 24 Aug 2024 00:18:21 +0200 Subject: [PATCH] Apply Livewire patch to load assets async (#85) * apply livewire local patch * assets build * remove manual chunking * assets build --- .../{app-234e3402.js => app-c51a8745.js} | 2 +- .../authorize-credit-card-payment-bd9c9d4d.js | 20 - .../authorize-credit-card-payment-f92567bc.js | 9 + ...1.js => authorize-stripe-acss-f6bd46c1.js} | 2 +- ...b.js => braintree-credit-card-60bd8878.js} | 2 +- ...71d092.js => braintree-paypal-16e2f577.js} | 2 +- ...93.js => checkout-credit-card-eba516f2.js} | 2 +- ...9ea034.js => eway-credit-card-0119725d.js} | 2 +- ...1a883.js => forte-ach-payment-546428ee.js} | 2 +- ... => forte-credit-card-payment-3ff75b59.js} | 4 +- ...dd68.js => mollie-credit-card-d81afbd4.js} | 2 +- ...84.js => paytrace-credit-card-7f87b811.js} | 2 +- ...o-d613afa9.js => razorpay-aio-f8e8c7f0.js} | 2 +- public/build/assets/simple-card-4314d842.js | 4 + ...d702.js => square-credit-card-2fc5c3fa.js} | 2 +- ...0bf320bd.js => stripe-ach-pay-22d14901.js} | 2 +- ...ss-dd3e9f85.js => stripe-acss-1184fda8.js} | 2 +- ...-4a3641d0.js => stripe-alipay-1457b63d.js} | 2 +- ...cs-7ec06b1d.js => stripe-bacs-c9a61b93.js} | 2 +- ...0a43b.js => stripe-bancontact-4a0d7a40.js} | 2 +- ...c7.js => stripe-bank-transfer-4ab58b35.js} | 2 +- ...cs-d51dcef6.js => stripe-becs-483b1b23.js} | 2 +- ...63a43.js => stripe-browserpay-c23582f0.js} | 2 +- ...7cd3.js => stripe-credit-card-5487be17.js} | 2 +- ...eps-d5e8f1b5.js => stripe-eps-0c461508.js} | 2 +- ...fpx-e978b36a.js => stripe-fpx-c82fd7dc.js} | 2 +- ...f7afcb25.js => stripe-giropay-aedb4a64.js} | 2 +- ...l-3e3b3e7b.js => stripe-ideal-95836518.js} | 2 +- ...-87356b3c.js => stripe-klarna-93dcc6f1.js} | 2 +- ...af471.js => stripe-przelewy24-5db060c5.js} | 2 +- ...pa-ac6623b2.js => stripe-sepa-9ab85221.js} | 2 +- ...-ac0f4ccf.js => stripe-sofort-fbef42bb.js} | 2 +- public/build/assets/wait-8f4ae121.js | 9 + public/build/manifest.json | 129 +- resources/js/app.js | 2 +- resources/js/livewire_temp.esm.js | 10787 ++++++++++++++++ 36 files changed, 10912 insertions(+), 108 deletions(-) rename public/build/assets/{app-234e3402.js => app-c51a8745.js} (94%) delete mode 100644 public/build/assets/authorize-credit-card-payment-bd9c9d4d.js create mode 100644 public/build/assets/authorize-credit-card-payment-f92567bc.js rename public/build/assets/{authorize-stripe-acss-6fe37711.js => authorize-stripe-acss-f6bd46c1.js} (95%) rename public/build/assets/{braintree-credit-card-c80deaab.js => braintree-credit-card-60bd8878.js} (97%) rename public/build/assets/{braintree-paypal-cf71d092.js => braintree-paypal-16e2f577.js} (97%) rename public/build/assets/{checkout-credit-card-5435b293.js => checkout-credit-card-eba516f2.js} (97%) rename public/build/assets/{eway-credit-card-319ea034.js => eway-credit-card-0119725d.js} (99%) rename public/build/assets/{forte-ach-payment-f051a883.js => forte-ach-payment-546428ee.js} (94%) rename public/build/assets/{forte-credit-card-payment-5485d5f0.js => forte-credit-card-payment-3ff75b59.js} (83%) rename public/build/assets/{mollie-credit-card-e1abdd68.js => mollie-credit-card-d81afbd4.js} (97%) rename public/build/assets/{paytrace-credit-card-f4dfde84.js => paytrace-credit-card-7f87b811.js} (98%) rename public/build/assets/{razorpay-aio-d613afa9.js => razorpay-aio-f8e8c7f0.js} (92%) create mode 100644 public/build/assets/simple-card-4314d842.js rename public/build/assets/{square-credit-card-83a3d702.js => square-credit-card-2fc5c3fa.js} (98%) rename public/build/assets/{stripe-ach-pay-0bf320bd.js => stripe-ach-pay-22d14901.js} (98%) rename public/build/assets/{stripe-acss-dd3e9f85.js => stripe-acss-1184fda8.js} (96%) rename public/build/assets/{stripe-alipay-4a3641d0.js => stripe-alipay-1457b63d.js} (97%) rename public/build/assets/{stripe-bacs-7ec06b1d.js => stripe-bacs-c9a61b93.js} (97%) rename public/build/assets/{stripe-bancontact-93a0a43b.js => stripe-bancontact-4a0d7a40.js} (93%) rename public/build/assets/{stripe-bank-transfer-c3e1a9c7.js => stripe-bank-transfer-4ab58b35.js} (95%) rename public/build/assets/{stripe-becs-d51dcef6.js => stripe-becs-483b1b23.js} (96%) rename public/build/assets/{stripe-browserpay-81063a43.js => stripe-browserpay-c23582f0.js} (97%) rename public/build/assets/{stripe-credit-card-843d7cd3.js => stripe-credit-card-5487be17.js} (98%) rename public/build/assets/{stripe-eps-d5e8f1b5.js => stripe-eps-0c461508.js} (97%) rename public/build/assets/{stripe-fpx-e978b36a.js => stripe-fpx-c82fd7dc.js} (97%) rename public/build/assets/{stripe-giropay-f7afcb25.js => stripe-giropay-aedb4a64.js} (97%) rename public/build/assets/{stripe-ideal-3e3b3e7b.js => stripe-ideal-95836518.js} (97%) rename public/build/assets/{stripe-klarna-87356b3c.js => stripe-klarna-93dcc6f1.js} (98%) rename public/build/assets/{stripe-przelewy24-a6eaf471.js => stripe-przelewy24-5db060c5.js} (98%) rename public/build/assets/{stripe-sepa-ac6623b2.js => stripe-sepa-9ab85221.js} (97%) rename public/build/assets/{stripe-sofort-ac0f4ccf.js => stripe-sofort-fbef42bb.js} (96%) create mode 100644 public/build/assets/wait-8f4ae121.js create mode 100644 resources/js/livewire_temp.esm.js diff --git a/public/build/assets/app-234e3402.js b/public/build/assets/app-c51a8745.js similarity index 94% rename from public/build/assets/app-234e3402.js rename to public/build/assets/app-c51a8745.js index 987442a68737..2e31584073a8 100644 --- a/public/build/assets/app-234e3402.js +++ b/public/build/assets/app-c51a8745.js @@ -83,7 +83,7 @@ Would you like to refresh the page?`)&&window.location.reload()}function tc(e){Q 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } - `;let r=$u();r&&(e.nonce=r),document.head.appendChild(e)}var ea=[],ls=["data-csrf","aria-hidden"];function Oo(e,r){let n=new DOMParser().parseFromString(e,"text/html"),a=document.adoptNode(n.body),s=document.adoptNode(n.head);ea=ea.concat(Array.from(document.body.querySelectorAll("script")).map(m=>ds(ps(m.outerHTML,ls))));let l=()=>{};Uc(s).finally(()=>{l()}),Bc(a,ea);let v=document.body;document.body.replaceWith(a),Alpine.destroyTree(v),r(m=>l=m)}function Bc(e,r){e.querySelectorAll("script").forEach(n=>{if(n.hasAttribute("data-navigate-once")){let a=ds(ps(n.outerHTML,ls));if(r.includes(a))return}n.replaceWith(us(n))})}function Uc(e){let r=Array.from(document.head.children),n=r.map(l=>l.outerHTML),a=document.createDocumentFragment(),s=[];for(let l of Array.from(e.children))if(Ao(l))if(n.includes(l.outerHTML))a.appendChild(l);else if(cs(l)&&qc(l,r)&&setTimeout(()=>window.location.reload()),fs(l))try{s.push(Hc(us(l)))}catch{}else document.head.appendChild(l);for(let l of Array.from(document.head.children))Ao(l)||l.remove();for(let l of Array.from(e.children))document.head.appendChild(l);return Promise.all(s)}async function Hc(e){return new Promise((r,n)=>{e.src?(e.onload=()=>r(),e.onerror=()=>n()):r(),document.head.appendChild(e)})}function us(e){let r=document.createElement("script");r.textContent=e.textContent,r.async=e.async;for(let n of e.attributes)r.setAttribute(n.name,n.value);return r}function cs(e){return e.hasAttribute("data-navigate-track")}function qc(e,r){let[n,a]=Co(e);return r.some(s=>{if(!cs(s))return!1;let[l,v]=Co(s);if(l===n&&a!==v)return!0})}function Co(e){return(fs(e)?e.src:e.href).split("?")}function Ao(e){return e.tagName.toLowerCase()==="link"&&e.getAttribute("rel").toLowerCase()==="stylesheet"||e.tagName.toLowerCase()==="style"||e.tagName.toLowerCase()==="script"}function fs(e){return e.tagName.toLowerCase()==="script"}function ds(e){return e.split("").reduce((r,n)=>(r=(r<<5)-r+n.charCodeAt(0),r&r),0)}function ps(e,r){let n=e;return r.forEach(a=>{const s=new RegExp(`${a}="[^"]*"|${a}='[^']*'`,"g");n=n.replace(s,"")}),n=n.replaceAll(" ",""),n.trim()}var ta=!0;function Vc(e){e.navigate=n=>{let a=Yr(n);Yt("alpine:navigate",{url:a,history:!1,cached:!1})||r(a)},e.navigate.disableProgressBar=()=>{ta=!1},e.addInitSelector(()=>`[${e.prefixed("navigate")}]`),e.directive("navigate",(n,{modifiers:a})=>{a.includes("hover")&&Mc(n,60,()=>{let l=go(n);mo(l,(v,m)=>{vo(v,l,m)})}),Rc(n,l=>{let v=go(n);mo(v,(m,P)=>{vo(m,v,P)}),l(()=>{Yt("alpine:navigate",{url:v,history:!1,cached:!1})||r(v)})})});function r(n,a=!0){ta&&Ic(),zc(n,(s,l)=>{Yt("alpine:navigating"),wo(),ta&&Dc(),Wc(),Oc(),To(e,v=>{So(m=>{yo(m)}),a?Tc(s,l):as(l,s),Oo(s,m=>{bo(document.body),Eo((P,U)=>{_o(P)}),xo(),m(()=>{v(()=>{setTimeout(()=>{}),Po(e),Yt("alpine:navigated")})})})})})}Ac(n=>{n(a=>{let s=Yr(a);if(Yt("alpine:navigate",{url:s,history:!0,cached:!1}))return;r(s,!1)})},(n,a,s,l)=>{let v=Yr(a);Yt("alpine:navigate",{url:v,history:!0,cached:!0})||(wo(),Yt("alpine:navigating"),Cc(s,l),To(e,P=>{So(U=>{yo(U)}),Oo(n,()=>{$c(),bo(document.body),Eo((U,ne)=>{_o(U)}),xo(),P(()=>{Po(e),Yt("alpine:navigated")})})}))}),setTimeout(()=>{Yt("alpine:navigated")})}function zc(e,r){Nc(e,r,()=>{kc(e,r)})}function To(e,r){e.stopObservingMutations(),r(n=>{e.startObservingMutations(),queueMicrotask(()=>{n()})})}function Yt(e,r){let n=new CustomEvent(e,{cancelable:!0,bubbles:!0,detail:r});return document.dispatchEvent(n),n.defaultPrevented}function Po(e){e.initTree(document.body,void 0,(r,n)=>{r._x_wasPersisted&&n()})}function Wc(){let e=function(r,n){Alpine.walk(r,(a,s)=>{jc(a)&&s(),Lc(a)?s():n(a,s)})};Alpine.destroyTree(document.body,e)}function Kc(e){e.magic("queryString",(r,{interceptor:n})=>{let a,s=!1,l=!1;return n((v,m,P,U,ne)=>{let ie=a||U,{initial:K,replace:Y,push:O,pop:y}=ua(ie,v,s);return P(K),l?(e.effect(()=>O(m())),y(async _=>{P(_),await(()=>Promise.resolve())()})):e.effect(()=>Y(m())),K},v=>{v.alwaysShow=()=>(s=!0,v),v.usePush=()=>(l=!0,v),v.as=m=>(a=m,v)})}),e.history={track:ua}}function ua(e,r,n=!1,a=null){let{has:s,get:l,set:v,remove:m}=Gc(),P=new URL(window.location.href),U=s(P,e),ne=U?l(P,e):r,ie=JSON.stringify(ne),K=[!1,null,void 0].includes(a)?r:JSON.stringify(a),Y=S=>JSON.stringify(S)===ie,O=S=>JSON.stringify(S)===K;n&&(P=v(P,e,ne)),Ro(P,e,{value:ne});let y=!1,_=(S,T)=>{if(y)return;let j=new URL(window.location.href);!n&&!U&&Y(T)||T===void 0||!n&&O(T)?j=m(j,e):j=v(j,e,T),S(j,e,{value:T})};return{initial:ne,replace(S){_(Ro,S)},push(S){_(Jc,S)},pop(S){let T=j=>{!j.state||!j.state.alpine||Object.entries(j.state.alpine).forEach(([H,{value:Ce}])=>{if(H!==e)return;y=!0;let D=S(Ce);D instanceof Promise?D.finally(()=>y=!1):y=!1})};return window.addEventListener("popstate",T),()=>window.removeEventListener("popstate",T)}}}function Ro(e,r,n){let a=window.history.state||{};a.alpine||(a.alpine={}),a.alpine[r]=Sa(n),window.history.replaceState(a,"",e.toString())}function Jc(e,r,n){let a=window.history.state||{};a.alpine||(a.alpine={}),a={alpine:{...a.alpine,[r]:Sa(n)}},window.history.pushState(a,"",e.toString())}function Sa(e){if(e!==void 0)return JSON.parse(JSON.stringify(e))}function Gc(){return{has(e,r){let n=e.search;if(!n)return!1;let a=ei(n);return Object.keys(a).includes(r)},get(e,r){let n=e.search;return n?ei(n)[r]:!1},set(e,r,n){let a=ei(e.search);return a[r]=hs(Sa(n)),e.search=Mo(a),e},remove(e,r){let n=ei(e.search);return delete n[r],e.search=Mo(n),e}}}function hs(e){if(!va(e))return e;for(let r in e)e[r]===null?delete e[r]:e[r]=hs(e[r]);return e}function Mo(e){let r=s=>typeof s=="object"&&s!==null,n=(s,l={},v="")=>(Object.entries(s).forEach(([m,P])=>{let U=v===""?m:`${v}[${m}]`;P===null?l[U]="":r(P)?l={...l,...n(P,l,U)}:l[U]=encodeURIComponent(P).replaceAll("%20","+").replaceAll("%2C",",")}),l),a=n(e);return Object.entries(a).map(([s,l])=>`${s}=${l}`).join("&")}function ei(e){if(e=e.replace("?",""),e==="")return{};let r=(s,l,v)=>{let[m,P,...U]=s.split(".");if(!P)return v[s]=l;v[m]===void 0&&(v[m]=isNaN(P)?{}:[]),r([P,...U].join("."),l,v[m])},n=e.split("&").map(s=>s.split("=")),a=Object.create(null);return n.forEach(([s,l])=>{if(!(typeof l>"u"))if(l=decodeURIComponent(l.replaceAll("+","%20")),!s.includes("["))a[s]=l;else{let v=s.replaceAll("[",".").replaceAll("]","");r(v,l,a)}}),a}var Yc=tt(ju()),Xc=tt(Iu()),Et=tt(Ot());function Qc(){setTimeout(()=>Zc()),Gi(document,"livewire:init"),Gi(document,"livewire:initializing"),Et.default.plugin(Yc.default),Et.default.plugin(Kc),Et.default.plugin(Sc.default),Et.default.plugin(_c.default),Et.default.plugin(Ec.default),Et.default.plugin(wc.default),Et.default.plugin(xc.default),Et.default.plugin(Vc),Et.default.plugin(Xc.default),Et.default.addRootSelector(()=>"[wire\\:id]"),Et.default.onAttributesAdded((e,r)=>{if(!Array.from(r).some(a=>_n(a.name)))return;let n=or(e,!1);n&&r.forEach(a=>{if(!_n(a.name))return;let s=aa(e,a.name);lt("directive.init",{el:e,component:n,directive:s,cleanup:l=>{Et.default.onAttributeRemoved(e,s.raw,l)}})})}),Et.default.interceptInit(Et.default.skipDuringClone(e=>{if(!Array.from(e.attributes).some(n=>_n(n.name)))return;if(e.hasAttribute("wire:id")){let n=sc(e);Et.default.onAttributeRemoved(e,"wire:id",()=>{lc(n.id)})}let r=or(e,!1);r&&(lt("element.init",{el:e,component:r}),Array.from(e.getAttributeNames()).filter(a=>_n(a)).map(a=>aa(e,a)).forEach(a=>{lt("directive.init",{el:e,component:r,directive:a,cleanup:s=>{Et.default.onAttributeRemoved(e,a.raw,s)}})}))})),Et.default.start(),setTimeout(()=>window.Livewire.initialRenderIsFinished=!0),Gi(document,"livewire:initialized")}function Zc(){let e=document.querySelector("script[data-update-uri][data-csrf]");if(!e)return;let r=e.closest("[wire\\:id]");r&&console.warn("Livewire: missing closing tags found. Ensure your template elements contain matching closing tags.",r)}var Ea=tt(Ot());ze("effect",({component:e,effects:r})=>{ef(e,r.listeners||[])});function ef(e,r){r.forEach(n=>{let a=s=>{s.__livewire&&s.__livewire.receivedBy.push(e),e.$wire.call("__dispatch",n,s.detail||{})};window.addEventListener(n,a),e.addCleanup(()=>window.removeEventListener(n,a)),e.el.addEventListener(n,s=>{s.__livewire&&(s.bubbles||(s.__livewire&&s.__livewire.receivedBy.push(e.id),e.$wire.call("__dispatch",n,s.detail||{})))})})}var ko=tt(Ot()),Vr=new WeakMap,ri=new Set;ze("payload.intercept",async({assets:e})=>{if(e)for(let[r,n]of Object.entries(e))await nf(r,async()=>{await af(n)})});ze("component.init",({component:e})=>{let r=e.snapshot.memo.assets;r&&r.forEach(n=>{ri.has(n)||ri.add(n)})});ze("effect",({component:e,effects:r})=>{let n=r.scripts;n&&Object.entries(n).forEach(([a,s])=>{tf(e,a,()=>{let l=rf(s);ko.default.dontAutoEvaluateFunctions(()=>{ko.default.evaluate(e.el,l,{$wire:e.$wire})})})})});function tf(e,r,n){if(Vr.has(e)&&Vr.get(e).includes(r))return;n(),Vr.has(e)||Vr.set(e,[]);let a=Vr.get(e);a.push(r),Vr.set(e,a)}function rf(e){let n=/]*>([\s\S]*?)<\/script>/gm.exec(e);return n&&n[1]?n[1].trim():""}async function nf(e,r){ri.has(e)||(await r(),ri.add(e))}async function af(e){let r=new DOMParser().parseFromString(e,"text/html"),n=document.adoptNode(r.head);for(let a of n.children)try{await of(a)}catch{}}async function of(e){return new Promise((r,n)=>{if(sf(e)){let a=lf(e);a.src?(a.onload=()=>r(),a.onerror=()=>n()):r(),document.head.appendChild(a)}else document.head.appendChild(e),r()})}function sf(e){return e.tagName.toLowerCase()==="script"}function lf(e){let r=document.createElement("script");r.textContent=e.textContent,r.async=e.async;for(let n of e.attributes)r.setAttribute(n.name,n.value);return r}var No=tt(Ot());ze("effect",({component:e,effects:r})=>{let n=r.js,a=r.xjs;n&&Object.entries(n).forEach(([s,l])=>{ac(e,s,()=>{No.default.evaluate(e.el,l)})}),a&&a.forEach(s=>{No.default.evaluate(e.el,s)})});var uf=tt(Ot());function cf(e,r,n){let a=r.parentElement?r.parentElement.tagName.toLowerCase():"div",s=document.createElement(a);s.innerHTML=n;let l;try{l=or(r.parentElement)}catch{}l&&(s.__livewire=l);let v=s.firstElementChild;v.__livewire=e,lt("morph",{el:r,toEl:v,component:e}),uf.default.morph(r,v,{updating:(m,P,U,ne)=>{if(!zr(m)){if(lt("morph.updating",{el:m,toEl:P,component:e,skip:ne,childrenOnly:U}),m.__livewire_replace===!0&&(m.innerHTML=P.innerHTML),m.__livewire_replace_self===!0)return m.outerHTML=P.outerHTML,ne();if(m.__livewire_ignore===!0||(m.__livewire_ignore_self===!0&&U(),Lo(m)&&m.getAttribute("wire:id")!==e.id))return ne();Lo(m)&&(P.__livewire=e)}},updated:m=>{zr(m)||lt("morph.updated",{el:m,component:e})},removing:(m,P)=>{zr(m)||lt("morph.removing",{el:m,component:e,skip:P})},removed:m=>{zr(m)||lt("morph.removed",{el:m,component:e})},adding:m=>{lt("morph.adding",{el:m,component:e})},added:m=>{zr(m)||(or(m).id,lt("morph.added",{el:m}))},key:m=>{if(!zr(m))return m.hasAttribute("wire:key")?m.getAttribute("wire:key"):m.hasAttribute("wire:id")?m.getAttribute("wire:id"):m.id},lookahead:!1})}function zr(e){return typeof e.hasAttribute!="function"}function Lo(e){return e.hasAttribute("wire:id")}ze("effect",({component:e,effects:r})=>{let n=r.html;n&&queueMicrotask(()=>{queueMicrotask(()=>{cf(e,e.el,n)})})});ze("effect",({component:e,effects:r})=>{ff(e,r.dispatches||[])});function ff(e,r){r.forEach(({name:n,params:a={},self:s=!1,to:l})=>{s?Jr(e,n,a):l?_a(l,n,a):is(e,n,a)})}var df=tt(Ot()),ca=new Du;ze("directive.init",({el:e,directive:r,cleanup:n,component:a})=>setTimeout(()=>{r.value==="submit"&&e.addEventListener("submit",()=>{let s=r.expression.startsWith("$parent")?a.parent.id:a.id,l=pf(e);ca.add(s,l)})}));ze("commit",({component:e,respond:r})=>{r(()=>{ca.each(e.id,n=>n()),ca.remove(e.id)})});function pf(e){let r=[];return df.default.walk(e,(n,a)=>{if(e.contains(n)){if(n.hasAttribute("wire:ignore"))return a();hf(n)?r.push(mf(n)):gf(n)&&r.push(vf(n))}}),()=>{for(;r.length>0;)r.shift()()}}function hf(e){let r=e.tagName.toLowerCase();return r==="select"||r==="button"&&e.type==="submit"||r==="input"&&(e.type==="checkbox"||e.type==="radio")}function gf(e){return["input","textarea"].includes(e.tagName.toLowerCase())}function mf(e){let r=e.disabled?()=>{}:()=>e.disabled=!1;return e.disabled=!0,r}function vf(e){let r=e.readOnly?()=>{}:()=>e.readOnly=!1;return e.readOnly=!0,r}ze("commit.pooling",({commits:e})=>{e.forEach(r=>{let n=r.component;gs(n,a=>{a.$wire.$commit()})})});ze("commit.pooled",({pools:e})=>{yf(e).forEach(n=>{let a=n.component;gs(a,s=>{bf(e,a,s)})})});function yf(e){let r=[];return e.forEach(n=>{n.commits.forEach(a=>{r.push(a)})}),r}function bf(e,r,n){let a=jo(e,r),s=jo(e,n),l=s.findCommitByComponent(n);s.delete(l),a.add(l),e.forEach(v=>{v.empty()&&e.delete(v)})}function jo(e,r){for(let[n,a]of e.entries())if(a.hasCommitFor(r))return a}function gs(e,r){ms(e,n=>{(_f(n)||wf(n))&&r(n)})}function _f(e){return!!e.snapshot.memo.props}function wf(e){return!!e.snapshot.memo.bindings}function ms(e,r){e.children.forEach(n=>{r(n),ms(n,r)})}ze("commit",({succeed:e})=>{e(({effects:r})=>{let n=r.download;if(!n)return;let a=window.webkitURL||window.URL,s=a.createObjectURL(xf(n.content,n.contentType)),l=document.createElement("a");l.style.display="none",l.href=s,l.download=n.name,document.body.appendChild(l),l.click(),setTimeout(function(){a.revokeObjectURL(s)},0)})});function xf(e,r="",n=512){const a=atob(e),s=[];r===null&&(r="");for(let l=0;l{let r=e.snapshot.memo;r.lazyLoaded!==void 0&&(da.add(e),r.lazyIsolated!==void 0&&r.lazyIsolated===!1&&fa.add(e))});ze("commit.pooling",({commits:e})=>{e.forEach(r=>{da.has(r.component)&&(fa.has(r.component)?(r.isolate=!1,fa.delete(r.component)):r.isolate=!0,da.delete(r.component))})});var Io=tt(Ot());ze("effect",({component:e,effects:r,cleanup:n})=>{let a=r.url;a&&Object.entries(a).forEach(([s,l])=>{let{name:v,as:m,use:P,alwaysShow:U,except:ne}=Sf(s,l);m||(m=v);let ie=[!1,null,void 0].includes(ne)?Xt(e.ephemeral,v):ne,{replace:K,push:Y,pop:O}=ua(m,ie,U,ne);if(P==="replace"){let y=Io.default.effect(()=>{K(Xt(e.reactive,v))});n(()=>Io.default.release(y))}else if(P==="push"){let y=ze("commit",({component:S,succeed:T})=>{if(e!==S)return;let j=Xt(e.canonical,v);T(()=>{let H=Xt(e.canonical,v);JSON.stringify(j)!==JSON.stringify(H)&&Y(H)})}),_=O(async S=>{await e.$wire.set(v,S),document.querySelectorAll("input").forEach(T=>{T._x_forceModelUpdate&&T._x_forceModelUpdate(T._x_model.get())})});n(()=>{y(),_()})}})});function Sf(e,r){let n={use:"replace",alwaysShow:!1};return typeof r=="string"?{...n,name:r,as:r}:{...{...n,name:e,as:e},...r}}ze("request",({options:e})=>{window.Echo&&(e.headers["X-Socket-ID"]=window.Echo.socketId())});ze("effect",({component:e,effects:r})=>{(r.listeners||[]).forEach(a=>{if(a.startsWith("echo")){if(typeof window.Echo>"u"){console.warn("Laravel Echo cannot be found");return}let s=a.split(/(echo:|echo-)|:|,/);s[1]=="echo:"&&s.splice(2,0,"channel",void 0),s[2]=="notification"&&s.push(void 0,void 0);let[l,v,m,P,U,ne,ie]=s;if(["channel","private","encryptedPrivate"].includes(m)){let K=Y=>Jr(e,a,[Y]);window.Echo[m](U).listen(ie,K),e.addCleanup(()=>{window.Echo[m](U).stopListening(ie,K)})}else if(m=="presence")if(["here","joining","leaving"].includes(ie))window.Echo.join(U)[ie](K=>{Jr(e,a,[K])});else{let K=Y=>Jr(e,a,[Y]);window.Echo.join(U).listen(ie,K),e.addCleanup(()=>{window.Echo.leaveChannel(U)})}else m=="notification"?window.Echo.private(U).notification(K=>{Jr(e,a,[K])}):console.warn("Echo channel type not yet supported")}})});var vs=new WeakSet;ze("component.init",({component:e})=>{e.snapshot.memo.isolate===!0&&vs.add(e)});ze("commit.pooling",({commits:e})=>{e.forEach(r=>{vs.has(r.component)&&(r.isolate=!0)})});Of()&&Alpine.navigate.disableProgressBar();document.addEventListener("alpine:navigate",e=>Oa("livewire:navigate",e));document.addEventListener("alpine:navigating",e=>Oa("livewire:navigating",e));document.addEventListener("alpine:navigated",e=>Oa("livewire:navigated",e));function Oa(e,r){let n=new CustomEvent(e,{cancelable:!0,bubbles:!0,detail:r.detail});document.dispatchEvent(n),n.defaultPrevented&&r.preventDefault()}function Ef(e,r,n){e.redirectUsingNavigate?Alpine.navigate(r):n()}function Of(){return!!(document.querySelector("[data-no-progress-bar]")||window.livewireScriptConfig&&window.livewireScriptConfig.progressBar===!1)}ze("effect",({effects:e})=>{if(!e.redirect)return;let r=e.redirect;Ef(e,r,()=>{window.location.href=r})});var Do=tt(Ot());ze("morph.added",({el:e})=>{e.__addedByMorph=!0});Nt("transition",({el:e,directive:r,component:n,cleanup:a})=>{let s=Do.default.reactive({state:!e.__addedByMorph});Do.default.bind(e,{[r.rawName.replace("wire:","x-")]:"","x-show"(){return s.state}}),e.__addedByMorph&&setTimeout(()=>s.state=!0);let l=[];l.push(ze("morph.removing",({el:v,skip:m})=>{m(),v.addEventListener("transitionend",()=>{v.remove()}),s.state=!1,l.push(ze("morph",({component:P})=>{P===n&&(v.remove(),l.forEach(U=>U()))}))})),a(()=>l.forEach(v=>v()))});var Cf=new zo;function Af(e,r){Cf.each(e,n=>{n.callback(),n.callback=()=>{}}),r()}var $o=tt(Ot());ze("directive.init",({el:e,directive:r,cleanup:n,component:a})=>{if(["snapshot","effects","model","init","loading","poll","ignore","id","data","key","target","dirty"].includes(r.value)||vc(r.value))return;let s=r.rawName.replace("wire:","x-on:");r.value==="submit"&&!r.modifiers.includes("prevent")&&(s=s+".prevent");let l=$o.default.bind(e,{[s](v){let m=()=>{Af(a,()=>{$o.default.evaluate(e,"$wire."+r.expression,{scope:{$event:v}})})};e.__livewire_confirm?e.__livewire_confirm(()=>{m()},()=>{v.stopImmediatePropagation()}):m()}});n(l)});var Gr=tt(Ot());Gr.default.addInitSelector(()=>"[wire\\:navigate]");Gr.default.addInitSelector(()=>"[wire\\:navigate\\.hover]");Gr.default.interceptInit(Gr.default.skipDuringClone(e=>{e.hasAttribute("wire:navigate")?Gr.default.bind(e,{"x-navigate":!0}):e.hasAttribute("wire:navigate.hover")&&Gr.default.bind(e,{"x-navigate.hover":!0})}));document.addEventListener("alpine:navigating",()=>{Livewire.all().forEach(e=>{e.inscribeSnapshotAndEffectsOnElement()})});Nt("confirm",({el:e,directive:r})=>{let n=r.expression,a=r.modifiers.includes("prompt");n=n.replaceAll("\\n",` + `;let r=$u();r&&(e.nonce=r),document.head.appendChild(e)}var ea=[],ls=["data-csrf","aria-hidden"];function Oo(e,r){let n=new DOMParser().parseFromString(e,"text/html"),a=document.adoptNode(n.body),s=document.adoptNode(n.head);ea=ea.concat(Array.from(document.body.querySelectorAll("script")).map(m=>ds(ps(m.outerHTML,ls))));let l=()=>{};Uc(s).finally(()=>{l()}),Bc(a,ea);let v=document.body;document.body.replaceWith(a),Alpine.destroyTree(v),r(m=>l=m)}function Bc(e,r){e.querySelectorAll("script").forEach(n=>{if(n.hasAttribute("data-navigate-once")){let a=ds(ps(n.outerHTML,ls));if(r.includes(a))return}n.replaceWith(us(n))})}function Uc(e){let r=Array.from(document.head.children),n=r.map(l=>l.outerHTML),a=document.createDocumentFragment(),s=[];for(let l of Array.from(e.children))if(Ao(l))if(n.includes(l.outerHTML))a.appendChild(l);else if(cs(l)&&qc(l,r)&&setTimeout(()=>window.location.reload()),fs(l))try{s.push(Hc(us(l)))}catch{}else document.head.appendChild(l);for(let l of Array.from(document.head.children))Ao(l)||l.remove();for(let l of Array.from(e.children))document.head.appendChild(l);return Promise.all(s)}async function Hc(e){return new Promise((r,n)=>{e.src?(e.onload=()=>r(),e.onerror=()=>n()):r(),document.head.appendChild(e)})}function us(e){let r=document.createElement("script");r.textContent=e.textContent,r.async=e.async;for(let n of e.attributes)r.setAttribute(n.name,n.value);return r}function cs(e){return e.hasAttribute("data-navigate-track")}function qc(e,r){let[n,a]=Co(e);return r.some(s=>{if(!cs(s))return!1;let[l,v]=Co(s);if(l===n&&a!==v)return!0})}function Co(e){return(fs(e)?e.src:e.href).split("?")}function Ao(e){return e.tagName.toLowerCase()==="link"&&e.getAttribute("rel").toLowerCase()==="stylesheet"||e.tagName.toLowerCase()==="style"||e.tagName.toLowerCase()==="script"}function fs(e){return e.tagName.toLowerCase()==="script"}function ds(e){return e.split("").reduce((r,n)=>(r=(r<<5)-r+n.charCodeAt(0),r&r),0)}function ps(e,r){let n=e;return r.forEach(a=>{const s=new RegExp(`${a}="[^"]*"|${a}='[^']*'`,"g");n=n.replace(s,"")}),n=n.replaceAll(" ",""),n.trim()}var ta=!0;function Vc(e){e.navigate=n=>{let a=Yr(n);Yt("alpine:navigate",{url:a,history:!1,cached:!1})||r(a)},e.navigate.disableProgressBar=()=>{ta=!1},e.addInitSelector(()=>`[${e.prefixed("navigate")}]`),e.directive("navigate",(n,{modifiers:a})=>{a.includes("hover")&&Mc(n,60,()=>{let l=go(n);mo(l,(v,m)=>{vo(v,l,m)})}),Rc(n,l=>{let v=go(n);mo(v,(m,P)=>{vo(m,v,P)}),l(()=>{Yt("alpine:navigate",{url:v,history:!1,cached:!1})||r(v)})})});function r(n,a=!0){ta&&Ic(),zc(n,(s,l)=>{Yt("alpine:navigating"),wo(),ta&&Dc(),Wc(),Oc(),To(e,v=>{So(m=>{yo(m)}),a?Tc(s,l):as(l,s),Oo(s,m=>{bo(document.body),Eo((P,U)=>{_o(P)}),xo(),m(()=>{v(()=>{setTimeout(()=>{}),Po(e),Yt("alpine:navigated")})})})})})}Ac(n=>{n(a=>{let s=Yr(a);if(Yt("alpine:navigate",{url:s,history:!0,cached:!1}))return;r(s,!1)})},(n,a,s,l)=>{let v=Yr(a);Yt("alpine:navigate",{url:v,history:!0,cached:!0})||(wo(),Yt("alpine:navigating"),Cc(s,l),To(e,P=>{So(U=>{yo(U)}),Oo(n,()=>{$c(),bo(document.body),Eo((U,ne)=>{_o(U)}),xo(),P(()=>{Po(e),Yt("alpine:navigated")})})}))}),setTimeout(()=>{Yt("alpine:navigated")})}function zc(e,r){Nc(e,r,()=>{kc(e,r)})}function To(e,r){e.stopObservingMutations(),r(n=>{e.startObservingMutations(),queueMicrotask(()=>{n()})})}function Yt(e,r){let n=new CustomEvent(e,{cancelable:!0,bubbles:!0,detail:r});return document.dispatchEvent(n),n.defaultPrevented}function Po(e){e.initTree(document.body,void 0,(r,n)=>{r._x_wasPersisted&&n()})}function Wc(){let e=function(r,n){Alpine.walk(r,(a,s)=>{jc(a)&&s(),Lc(a)?s():n(a,s)})};Alpine.destroyTree(document.body,e)}function Kc(e){e.magic("queryString",(r,{interceptor:n})=>{let a,s=!1,l=!1;return n((v,m,P,U,ne)=>{let ie=a||U,{initial:K,replace:Y,push:O,pop:y}=ua(ie,v,s);return P(K),l?(e.effect(()=>O(m())),y(async _=>{P(_),await(()=>Promise.resolve())()})):e.effect(()=>Y(m())),K},v=>{v.alwaysShow=()=>(s=!0,v),v.usePush=()=>(l=!0,v),v.as=m=>(a=m,v)})}),e.history={track:ua}}function ua(e,r,n=!1,a=null){let{has:s,get:l,set:v,remove:m}=Gc(),P=new URL(window.location.href),U=s(P,e),ne=U?l(P,e):r,ie=JSON.stringify(ne),K=[!1,null,void 0].includes(a)?r:JSON.stringify(a),Y=S=>JSON.stringify(S)===ie,O=S=>JSON.stringify(S)===K;n&&(P=v(P,e,ne)),Ro(P,e,{value:ne});let y=!1,_=(S,T)=>{if(y)return;let j=new URL(window.location.href);!n&&!U&&Y(T)||T===void 0||!n&&O(T)?j=m(j,e):j=v(j,e,T),S(j,e,{value:T})};return{initial:ne,replace(S){_(Ro,S)},push(S){_(Jc,S)},pop(S){let T=j=>{!j.state||!j.state.alpine||Object.entries(j.state.alpine).forEach(([H,{value:Ce}])=>{if(H!==e)return;y=!0;let D=S(Ce);D instanceof Promise?D.finally(()=>y=!1):y=!1})};return window.addEventListener("popstate",T),()=>window.removeEventListener("popstate",T)}}}function Ro(e,r,n){let a=window.history.state||{};a.alpine||(a.alpine={}),a.alpine[r]=Sa(n),window.history.replaceState(a,"",e.toString())}function Jc(e,r,n){let a=window.history.state||{};a.alpine||(a.alpine={}),a={alpine:{...a.alpine,[r]:Sa(n)}},window.history.pushState(a,"",e.toString())}function Sa(e){if(e!==void 0)return JSON.parse(JSON.stringify(e))}function Gc(){return{has(e,r){let n=e.search;if(!n)return!1;let a=ei(n);return Object.keys(a).includes(r)},get(e,r){let n=e.search;return n?ei(n)[r]:!1},set(e,r,n){let a=ei(e.search);return a[r]=hs(Sa(n)),e.search=Mo(a),e},remove(e,r){let n=ei(e.search);return delete n[r],e.search=Mo(n),e}}}function hs(e){if(!va(e))return e;for(let r in e)e[r]===null?delete e[r]:e[r]=hs(e[r]);return e}function Mo(e){let r=s=>typeof s=="object"&&s!==null,n=(s,l={},v="")=>(Object.entries(s).forEach(([m,P])=>{let U=v===""?m:`${v}[${m}]`;P===null?l[U]="":r(P)?l={...l,...n(P,l,U)}:l[U]=encodeURIComponent(P).replaceAll("%20","+").replaceAll("%2C",",")}),l),a=n(e);return Object.entries(a).map(([s,l])=>`${s}=${l}`).join("&")}function ei(e){if(e=e.replace("?",""),e==="")return{};let r=(s,l,v)=>{let[m,P,...U]=s.split(".");if(!P)return v[s]=l;v[m]===void 0&&(v[m]=isNaN(P)?{}:[]),r([P,...U].join("."),l,v[m])},n=e.split("&").map(s=>s.split("=")),a=Object.create(null);return n.forEach(([s,l])=>{if(!(typeof l>"u"))if(l=decodeURIComponent(l.replaceAll("+","%20")),!s.includes("["))a[s]=l;else{let v=s.replaceAll("[",".").replaceAll("]","");r(v,l,a)}}),a}var Yc=tt(ju()),Xc=tt(Iu()),Et=tt(Ot());function Qc(){setTimeout(()=>Zc()),Gi(document,"livewire:init"),Gi(document,"livewire:initializing"),Et.default.plugin(Yc.default),Et.default.plugin(Kc),Et.default.plugin(Sc.default),Et.default.plugin(_c.default),Et.default.plugin(Ec.default),Et.default.plugin(wc.default),Et.default.plugin(xc.default),Et.default.plugin(Vc),Et.default.plugin(Xc.default),Et.default.addRootSelector(()=>"[wire\\:id]"),Et.default.onAttributesAdded((e,r)=>{if(!Array.from(r).some(a=>_n(a.name)))return;let n=or(e,!1);n&&r.forEach(a=>{if(!_n(a.name))return;let s=aa(e,a.name);lt("directive.init",{el:e,component:n,directive:s,cleanup:l=>{Et.default.onAttributeRemoved(e,s.raw,l)}})})}),Et.default.interceptInit(Et.default.skipDuringClone(e=>{if(!Array.from(e.attributes).some(n=>_n(n.name)))return;if(e.hasAttribute("wire:id")){let n=sc(e);Et.default.onAttributeRemoved(e,"wire:id",()=>{lc(n.id)})}let r=or(e,!1);r&&(lt("element.init",{el:e,component:r}),Array.from(e.getAttributeNames()).filter(a=>_n(a)).map(a=>aa(e,a)).forEach(a=>{lt("directive.init",{el:e,component:r,directive:a,cleanup:s=>{Et.default.onAttributeRemoved(e,a.raw,s)}})}))})),Et.default.start(),setTimeout(()=>window.Livewire.initialRenderIsFinished=!0),Gi(document,"livewire:initialized")}function Zc(){let e=document.querySelector("script[data-update-uri][data-csrf]");if(!e)return;let r=e.closest("[wire\\:id]");r&&console.warn("Livewire: missing closing tags found. Ensure your template elements contain matching closing tags.",r)}var Ea=tt(Ot());ze("effect",({component:e,effects:r})=>{ef(e,r.listeners||[])});function ef(e,r){r.forEach(n=>{let a=s=>{s.__livewire&&s.__livewire.receivedBy.push(e),e.$wire.call("__dispatch",n,s.detail||{})};window.addEventListener(n,a),e.addCleanup(()=>window.removeEventListener(n,a)),e.el.addEventListener(n,s=>{s.__livewire&&(s.bubbles||(s.__livewire&&s.__livewire.receivedBy.push(e.id),e.$wire.call("__dispatch",n,s.detail||{})))})})}var ko=tt(Ot()),Vr=new WeakMap,ri=new Set;ze("payload.intercept",async({assets:e})=>{if(e)for(let[r,n]of Object.entries(e))await nf(r,async()=>{await af(n)})});ze("component.init",({component:e})=>{let r=e.snapshot.memo.assets;r&&r.forEach(n=>{ri.has(n)||ri.add(n)})});ze("effect",({component:e,effects:r})=>{let n=r.scripts;n&&Object.entries(n).forEach(([a,s])=>{tf(e,a,()=>{let l=rf(s);ko.default.dontAutoEvaluateFunctions(()=>{ko.default.evaluate(e.el,l,{$wire:e.$wire})})})})});function tf(e,r,n){if(Vr.has(e)&&Vr.get(e).includes(r))return;n(),Vr.has(e)||Vr.set(e,[]);let a=Vr.get(e);a.push(r),Vr.set(e,a)}function rf(e){let n=/]*>([\s\S]*?)<\/script>/gm.exec(e);return n&&n[1]?n[1].trim():""}async function nf(e,r){ri.has(e)||(await r(),ri.add(e))}async function af(e){let r=new DOMParser().parseFromString(e,"text/html"),n=document.adoptNode(r.head);Array.from(n.children).map(a=>of(a))}async function of(e){return new Promise((r,n)=>{if(sf(e)){let a=lf(e);a.src?(a.onload=()=>r(),a.onerror=()=>n()):r(),document.head.appendChild(a)}else document.head.appendChild(e),r()})}function sf(e){return e.tagName.toLowerCase()==="script"}function lf(e){let r=document.createElement("script");r.textContent=e.textContent,r.async=e.async;for(let n of e.attributes)r.setAttribute(n.name,n.value);return r}var No=tt(Ot());ze("effect",({component:e,effects:r})=>{let n=r.js,a=r.xjs;n&&Object.entries(n).forEach(([s,l])=>{ac(e,s,()=>{No.default.evaluate(e.el,l)})}),a&&a.forEach(s=>{No.default.evaluate(e.el,s)})});var uf=tt(Ot());function cf(e,r,n){let a=r.parentElement?r.parentElement.tagName.toLowerCase():"div",s=document.createElement(a);s.innerHTML=n;let l;try{l=or(r.parentElement)}catch{}l&&(s.__livewire=l);let v=s.firstElementChild;v.__livewire=e,lt("morph",{el:r,toEl:v,component:e}),uf.default.morph(r,v,{updating:(m,P,U,ne)=>{if(!zr(m)){if(lt("morph.updating",{el:m,toEl:P,component:e,skip:ne,childrenOnly:U}),m.__livewire_replace===!0&&(m.innerHTML=P.innerHTML),m.__livewire_replace_self===!0)return m.outerHTML=P.outerHTML,ne();if(m.__livewire_ignore===!0||(m.__livewire_ignore_self===!0&&U(),Lo(m)&&m.getAttribute("wire:id")!==e.id))return ne();Lo(m)&&(P.__livewire=e)}},updated:m=>{zr(m)||lt("morph.updated",{el:m,component:e})},removing:(m,P)=>{zr(m)||lt("morph.removing",{el:m,component:e,skip:P})},removed:m=>{zr(m)||lt("morph.removed",{el:m,component:e})},adding:m=>{lt("morph.adding",{el:m,component:e})},added:m=>{zr(m)||(or(m).id,lt("morph.added",{el:m}))},key:m=>{if(!zr(m))return m.hasAttribute("wire:key")?m.getAttribute("wire:key"):m.hasAttribute("wire:id")?m.getAttribute("wire:id"):m.id},lookahead:!1})}function zr(e){return typeof e.hasAttribute!="function"}function Lo(e){return e.hasAttribute("wire:id")}ze("effect",({component:e,effects:r})=>{let n=r.html;n&&queueMicrotask(()=>{queueMicrotask(()=>{cf(e,e.el,n)})})});ze("effect",({component:e,effects:r})=>{ff(e,r.dispatches||[])});function ff(e,r){r.forEach(({name:n,params:a={},self:s=!1,to:l})=>{s?Jr(e,n,a):l?_a(l,n,a):is(e,n,a)})}var df=tt(Ot()),ca=new Du;ze("directive.init",({el:e,directive:r,cleanup:n,component:a})=>setTimeout(()=>{r.value==="submit"&&e.addEventListener("submit",()=>{let s=r.expression.startsWith("$parent")?a.parent.id:a.id,l=pf(e);ca.add(s,l)})}));ze("commit",({component:e,respond:r})=>{r(()=>{ca.each(e.id,n=>n()),ca.remove(e.id)})});function pf(e){let r=[];return df.default.walk(e,(n,a)=>{if(e.contains(n)){if(n.hasAttribute("wire:ignore"))return a();hf(n)?r.push(mf(n)):gf(n)&&r.push(vf(n))}}),()=>{for(;r.length>0;)r.shift()()}}function hf(e){let r=e.tagName.toLowerCase();return r==="select"||r==="button"&&e.type==="submit"||r==="input"&&(e.type==="checkbox"||e.type==="radio")}function gf(e){return["input","textarea"].includes(e.tagName.toLowerCase())}function mf(e){let r=e.disabled?()=>{}:()=>e.disabled=!1;return e.disabled=!0,r}function vf(e){let r=e.readOnly?()=>{}:()=>e.readOnly=!1;return e.readOnly=!0,r}ze("commit.pooling",({commits:e})=>{e.forEach(r=>{let n=r.component;gs(n,a=>{a.$wire.$commit()})})});ze("commit.pooled",({pools:e})=>{yf(e).forEach(n=>{let a=n.component;gs(a,s=>{bf(e,a,s)})})});function yf(e){let r=[];return e.forEach(n=>{n.commits.forEach(a=>{r.push(a)})}),r}function bf(e,r,n){let a=jo(e,r),s=jo(e,n),l=s.findCommitByComponent(n);s.delete(l),a.add(l),e.forEach(v=>{v.empty()&&e.delete(v)})}function jo(e,r){for(let[n,a]of e.entries())if(a.hasCommitFor(r))return a}function gs(e,r){ms(e,n=>{(_f(n)||wf(n))&&r(n)})}function _f(e){return!!e.snapshot.memo.props}function wf(e){return!!e.snapshot.memo.bindings}function ms(e,r){e.children.forEach(n=>{r(n),ms(n,r)})}ze("commit",({succeed:e})=>{e(({effects:r})=>{let n=r.download;if(!n)return;let a=window.webkitURL||window.URL,s=a.createObjectURL(xf(n.content,n.contentType)),l=document.createElement("a");l.style.display="none",l.href=s,l.download=n.name,document.body.appendChild(l),l.click(),setTimeout(function(){a.revokeObjectURL(s)},0)})});function xf(e,r="",n=512){const a=atob(e),s=[];r===null&&(r="");for(let l=0;l{let r=e.snapshot.memo;r.lazyLoaded!==void 0&&(da.add(e),r.lazyIsolated!==void 0&&r.lazyIsolated===!1&&fa.add(e))});ze("commit.pooling",({commits:e})=>{e.forEach(r=>{da.has(r.component)&&(fa.has(r.component)?(r.isolate=!1,fa.delete(r.component)):r.isolate=!0,da.delete(r.component))})});var Io=tt(Ot());ze("effect",({component:e,effects:r,cleanup:n})=>{let a=r.url;a&&Object.entries(a).forEach(([s,l])=>{let{name:v,as:m,use:P,alwaysShow:U,except:ne}=Sf(s,l);m||(m=v);let ie=[!1,null,void 0].includes(ne)?Xt(e.ephemeral,v):ne,{replace:K,push:Y,pop:O}=ua(m,ie,U,ne);if(P==="replace"){let y=Io.default.effect(()=>{K(Xt(e.reactive,v))});n(()=>Io.default.release(y))}else if(P==="push"){let y=ze("commit",({component:S,succeed:T})=>{if(e!==S)return;let j=Xt(e.canonical,v);T(()=>{let H=Xt(e.canonical,v);JSON.stringify(j)!==JSON.stringify(H)&&Y(H)})}),_=O(async S=>{await e.$wire.set(v,S),document.querySelectorAll("input").forEach(T=>{T._x_forceModelUpdate&&T._x_forceModelUpdate(T._x_model.get())})});n(()=>{y(),_()})}})});function Sf(e,r){let n={use:"replace",alwaysShow:!1};return typeof r=="string"?{...n,name:r,as:r}:{...{...n,name:e,as:e},...r}}ze("request",({options:e})=>{window.Echo&&(e.headers["X-Socket-ID"]=window.Echo.socketId())});ze("effect",({component:e,effects:r})=>{(r.listeners||[]).forEach(a=>{if(a.startsWith("echo")){if(typeof window.Echo>"u"){console.warn("Laravel Echo cannot be found");return}let s=a.split(/(echo:|echo-)|:|,/);s[1]=="echo:"&&s.splice(2,0,"channel",void 0),s[2]=="notification"&&s.push(void 0,void 0);let[l,v,m,P,U,ne,ie]=s;if(["channel","private","encryptedPrivate"].includes(m)){let K=Y=>Jr(e,a,[Y]);window.Echo[m](U).listen(ie,K),e.addCleanup(()=>{window.Echo[m](U).stopListening(ie,K)})}else if(m=="presence")if(["here","joining","leaving"].includes(ie))window.Echo.join(U)[ie](K=>{Jr(e,a,[K])});else{let K=Y=>Jr(e,a,[Y]);window.Echo.join(U).listen(ie,K),e.addCleanup(()=>{window.Echo.leaveChannel(U)})}else m=="notification"?window.Echo.private(U).notification(K=>{Jr(e,a,[K])}):console.warn("Echo channel type not yet supported")}})});var vs=new WeakSet;ze("component.init",({component:e})=>{e.snapshot.memo.isolate===!0&&vs.add(e)});ze("commit.pooling",({commits:e})=>{e.forEach(r=>{vs.has(r.component)&&(r.isolate=!0)})});Of()&&Alpine.navigate.disableProgressBar();document.addEventListener("alpine:navigate",e=>Oa("livewire:navigate",e));document.addEventListener("alpine:navigating",e=>Oa("livewire:navigating",e));document.addEventListener("alpine:navigated",e=>Oa("livewire:navigated",e));function Oa(e,r){let n=new CustomEvent(e,{cancelable:!0,bubbles:!0,detail:r.detail});document.dispatchEvent(n),n.defaultPrevented&&r.preventDefault()}function Ef(e,r,n){e.redirectUsingNavigate?Alpine.navigate(r):n()}function Of(){return!!(document.querySelector("[data-no-progress-bar]")||window.livewireScriptConfig&&window.livewireScriptConfig.progressBar===!1)}ze("effect",({effects:e})=>{if(!e.redirect)return;let r=e.redirect;Ef(e,r,()=>{window.location.href=r})});var Do=tt(Ot());ze("morph.added",({el:e})=>{e.__addedByMorph=!0});Nt("transition",({el:e,directive:r,component:n,cleanup:a})=>{let s=Do.default.reactive({state:!e.__addedByMorph});Do.default.bind(e,{[r.rawName.replace("wire:","x-")]:"","x-show"(){return s.state}}),e.__addedByMorph&&setTimeout(()=>s.state=!0);let l=[];l.push(ze("morph.removing",({el:v,skip:m})=>{m(),v.addEventListener("transitionend",()=>{v.remove()}),s.state=!1,l.push(ze("morph",({component:P})=>{P===n&&(v.remove(),l.forEach(U=>U()))}))})),a(()=>l.forEach(v=>v()))});var Cf=new zo;function Af(e,r){Cf.each(e,n=>{n.callback(),n.callback=()=>{}}),r()}var $o=tt(Ot());ze("directive.init",({el:e,directive:r,cleanup:n,component:a})=>{if(["snapshot","effects","model","init","loading","poll","ignore","id","data","key","target","dirty"].includes(r.value)||vc(r.value))return;let s=r.rawName.replace("wire:","x-on:");r.value==="submit"&&!r.modifiers.includes("prevent")&&(s=s+".prevent");let l=$o.default.bind(e,{[s](v){let m=()=>{Af(a,()=>{$o.default.evaluate(e,"$wire."+r.expression,{scope:{$event:v}})})};e.__livewire_confirm?e.__livewire_confirm(()=>{m()},()=>{v.stopImmediatePropagation()}):m()}});n(l)});var Gr=tt(Ot());Gr.default.addInitSelector(()=>"[wire\\:navigate]");Gr.default.addInitSelector(()=>"[wire\\:navigate\\.hover]");Gr.default.interceptInit(Gr.default.skipDuringClone(e=>{e.hasAttribute("wire:navigate")?Gr.default.bind(e,{"x-navigate":!0}):e.hasAttribute("wire:navigate.hover")&&Gr.default.bind(e,{"x-navigate.hover":!0})}));document.addEventListener("alpine:navigating",()=>{Livewire.all().forEach(e=>{e.inscribeSnapshotAndEffectsOnElement()})});Nt("confirm",({el:e,directive:r})=>{let n=r.expression,a=r.modifiers.includes("prompt");n=n.replaceAll("\\n",` `),n===""&&(n="Are you sure?"),e.__livewire_confirm=(s,l)=>{if(a){let[v,m]=n.split("|");m?prompt(v)===m?s():l():console.warn("Livewire: Must provide expectation with wire:confirm.prompt")}else confirm(n)?s():l()}});function Or(e,r,n,a=null){if(n=r.modifiers.includes("remove")?!n:n,r.modifiers.includes("class")){let s=r.expression.split(" ").filter(String);n?e.classList.add(...s):e.classList.remove(...s)}else if(r.modifiers.includes("attr"))n?e.setAttribute(r.expression,!0):e.removeAttribute(r.expression);else{let s=a??window.getComputedStyle(e,null).getPropertyValue("display"),l=["inline","block","table","flex","grid","inline-flex"].filter(v=>r.modifiers.includes(v))[0]||"inline-block";l=r.modifiers.includes("remove")&&!n?s:l,e.style.display=n?l:"none"}}var pa=new Set,ha=new Set;window.addEventListener("offline",()=>pa.forEach(e=>e()));window.addEventListener("online",()=>ha.forEach(e=>e()));Nt("offline",({el:e,directive:r,cleanup:n})=>{let a=()=>Or(e,r,!0),s=()=>Or(e,r,!1);pa.add(a),ha.add(s),n(()=>{pa.delete(a),ha.delete(s)})});Nt("loading",({el:e,directive:r,component:n,cleanup:a})=>{let{targets:s,inverted:l}=kf(e),[v,m]=Tf(r),P=Pf(n,s,l,[()=>v(()=>Or(e,r,!0)),()=>m(()=>Or(e,r,!1))]),U=Rf(n,s,[()=>v(()=>Or(e,r,!0)),()=>m(()=>Or(e,r,!1))]);a(()=>{P(),U()})});function Tf(e){if(!e.modifiers.includes("delay")||e.modifiers.includes("none"))return[l=>l(),l=>l()];let r=200,n={shortest:50,shorter:100,short:150,default:200,long:300,longer:500,longest:1e3};Object.keys(n).some(l=>{if(e.modifiers.includes(l))return r=n[l],!0});let a,s=!1;return[l=>{a=setTimeout(()=>{l(),s=!0},r)},async l=>{s?(await l(),s=!1):clearTimeout(a)}]}function Pf(e,r,n,[a,s]){return ze("commit",({component:l,commit:v,respond:m})=>{l===e&&(r.length>0&&Mf(v,r)===n||(a(),m(()=>{s()})))})}function Rf(e,r,[n,a]){let s=P=>{let{id:U,property:ne}=P.detail;return U!==e.id||r.length>0&&!r.map(ie=>ie.target).includes(ne)},l=Yi(window,"livewire-upload-start",P=>{s(P)||n()}),v=Yi(window,"livewire-upload-finish",P=>{s(P)||a()}),m=Yi(window,"livewire-upload-error",P=>{s(P)||a()});return()=>{l(),v(),m()}}function Mf(e,r){let{updates:n,calls:a}=e;return r.some(({target:s,params:l})=>{if(l)return a.some(({method:m,params:P})=>s===m&&l===ys(JSON.stringify(P)));if(Object.keys(n).some(m=>m.includes(".")&&m.split(".")[0]===s?!0:m===s)||a.map(m=>m.method).includes(s))return!0})}function kf(e){let r=wa(e),n=[],a=!1;if(r.has("target")){let s=r.get("target"),l=s.expression;s.modifiers.includes("except")&&(a=!0),l.includes("(")&&l.includes(")")?n.push({target:s.method,params:ys(JSON.stringify(s.params))}):l.includes(",")?l.split(",").map(v=>v.trim()).forEach(v=>{n.push({target:v})}):n.push({target:l})}else{let s=["init","dirty","offline","target","loading","poll","ignore","key","id"];r.all().filter(l=>!s.includes(l.value)).map(l=>l.expression.split("(")[0]).forEach(l=>n.push({target:l}))}return{targets:n,inverted:a}}function ys(e){return btoa(encodeURIComponent(e))}Nt("stream",({el:e,directive:r,cleanup:n})=>{let{expression:a,modifiers:s}=r,l=ze("stream",({name:v,content:m,replace:P})=>{v===a&&(s.includes("replace")||P?e.innerHTML=m:e.innerHTML=e.innerHTML+m)});n(l)});ze("request",({respond:e})=>{e(r=>{let n=r.response;n.headers.has("X-Livewire-Stream")&&(r.response={ok:!0,redirected:!1,status:200,async text(){let a=await Nf(n,s=>{lt("stream",s)});return Jo(a)&&(this.ok=!1),a}})})});async function Nf(e,r){let n=e.body.getReader(),a="";for(;;){let{done:s,value:l}=await n.read(),m=new TextDecoder().decode(l),[P,U]=Lf(a+m);if(P.forEach(ne=>{r(ne)}),a=U,s)return a}}function Lf(e){let r=/({"stream":true.*?"endStream":true})/g,n=e.match(r),a=[];if(n)for(let l=0;l{r.modifiers.includes("self")?e.__livewire_replace_self=!0:e.__livewire_replace=!0});Nt("ignore",({el:e,directive:r})=>{r.modifiers.includes("self")?e.__livewire_ignore_self=!0:e.__livewire_ignore=!0});var bs=new zo;ze("commit",({component:e,respond:r})=>{r(()=>{setTimeout(()=>{bs.each(e,n=>n(!1))})})});Nt("dirty",({el:e,directive:r,component:n})=>{let a=jf(e);Alpine.reactive({state:!1});let s=!1,l=e.style.display,v=m=>{Or(e,r,m,l),s=m};bs.add(n,v),Alpine.effect(()=>{let m=!1;if(a.length===0)m=JSON.stringify(n.canonical)!==JSON.stringify(n.reactive);else for(let P=0;Pa.trim()))),n}var If=tt(Ot());Nt("model",({el:e,directive:r,component:n,cleanup:a})=>{let{expression:s,modifiers:l}=r;if(!s)return console.warn("Livewire: [wire:model] is missing a value.",e);if(_s(n,s))return console.warn('Livewire: [wire:model="'+s+'"] property does not exist on component: ['+n.name+"]",e);if(e.type&&e.type.toLowerCase()==="file")return Uu(e,s,n,a);let v=l.includes("live"),m=l.includes("lazy")||l.includes("change"),P=l.includes("blur"),U=l.includes("debounce"),ne=s.startsWith("$parent")?()=>n.$wire.$parent.$commit():()=>n.$wire.$commit(),ie=$f(e)&&!U&&v?Ff(ne,150):ne;If.default.bind(e,{"@change"(){m&&ne()},"@blur"(){P&&ne()},["x-model"+Df(l)](){return{get(){return Xt(n.$wire,s)},set(K){hi(n.$wire,s,K),v&&!m&&!P&&ie()}}}})});function Df(e){return e=e.filter(r=>!["lazy","defer"].includes(r)),e.length===0?"":"."+e.join(".")}function $f(e){return["INPUT","TEXTAREA"].includes(e.tagName.toUpperCase())&&!["checkbox","radio"].includes(e.type)}function _s(e,r){if(r.startsWith("$parent")){let a=or(e.el.parentElement,!1);return a?_s(a,r.split("$parent.")[1]):!0}let n=r.split(".")[0];return!Object.keys(e.canonical).includes(n)}function Ff(e,r){var n;return function(){var a=this,s=arguments,l=function(){n=null,e.apply(a,s)};clearTimeout(n),n=setTimeout(l,r)}}var Bf=tt(Ot());Nt("init",({el:e,directive:r})=>{let n=r.expression??"$refresh";Bf.default.evaluate(e,`$wire.${n}`)});var Uf=tt(Ot());Nt("poll",({el:e,directive:r})=>{let n=Qf(r.modifiers,2e3),{start:a,pauseWhile:s,throttleWhile:l,stopWhen:v}=qf(()=>{Hf(e,r)},n);a(),l(()=>Wf()&&Jf(r)),s(()=>Gf(r)&&Yf(e)),s(()=>Kf(e)),s(()=>zf()),v(()=>Xf(e))});function Hf(e,r){Uf.default.evaluate(e,r.expression?"$wire."+r.expression:"$wire.$commit()")}function qf(e,r=2e3){let n=[],a=[],s=[];return{start(){let l=Vf(r,()=>{if(s.some(v=>v()))return l();n.some(v=>v())||a.some(v=>v())&&Math.random()<.95||e()})},pauseWhile(l){n.push(l)},throttleWhile(l){a.push(l)},stopWhen(l){s.push(l)}}}var Sr=[];function Vf(e,r){if(!Sr[e]){let n={timer:setInterval(()=>n.callbacks.forEach(a=>a()),e),callbacks:new Set};Sr[e]=n}return Sr[e].callbacks.add(r),()=>{Sr[e].callbacks.delete(r),Sr[e].callbacks.size===0&&(clearInterval(Sr[e].timer),delete Sr[e])}}var Ca=!1;window.addEventListener("offline",()=>Ca=!0);window.addEventListener("online",()=>Ca=!1);function zf(){return Ca}var ws=!1;document.addEventListener("visibilitychange",()=>{ws=document.hidden},!1);function Wf(){return ws}function Kf(e){return!wa(e).has("poll")}function Jf(e){return!e.modifiers.includes("keep-alive")}function Gf(e){return e.modifiers.includes("visible")}function Yf(e){let r=e.getBoundingClientRect();return!(r.top<(window.innerHeight||document.documentElement.clientHeight)&&r.left<(window.innerWidth||document.documentElement.clientWidth)&&r.bottom>0&&r.right>0)}function Xf(e){return e.isConnected===!1}function Qf(e,r){let n,a=e.find(l=>l.match(/([0-9]+)ms/)),s=e.find(l=>l.match(/([0-9]+)s/));return a?n=Number(a.replace("ms","")):s&&(n=Number(s.replace("s",""))*1e3),n||r}var Aa={directive:Nt,dispatchTo:_a,start:Qc,first:dc,find:fc,getByName:cc,all:pc,hook:ze,trigger:lt,triggerAsync:Yo,dispatch:hc,on:mc,get navigate(){return Ea.default.navigate}},Ta=e=>console.warn(`Detected multiple instances of ${e} running`);window.Livewire&&Ta("Livewire");window.Alpine&&Ta("Alpine");window.Livewire=Aa;window.Alpine=Ea.default;window.livewireScriptConfig===void 0&&(window.Alpine.__fromLivewire=!0,document.addEventListener("DOMContentLoaded",()=>{window.Alpine.__fromLivewire===void 0&&Ta("Alpine"),Aa.start()}));Ea.default;/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress * @license MIT *//*! Bundled license information: diff --git a/public/build/assets/authorize-credit-card-payment-bd9c9d4d.js b/public/build/assets/authorize-credit-card-payment-bd9c9d4d.js deleted file mode 100644 index 44e69ff24255..000000000000 --- a/public/build/assets/authorize-credit-card-payment-bd9c9d4d.js +++ /dev/null @@ -1,20 +0,0 @@ -var G=Object.defineProperty;var J=(t,e,n)=>e in t?G(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var T=(t,e,n)=>(J(t,typeof e!="symbol"?e+"":e,n),n);var q=t=>{throw TypeError(t)},Q=(t,e,n)=>e.has(t)||q("Cannot "+n),ee=(t,e,n)=>e.has(t)?q("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),te=(t,e,n)=>(Q(t,e,"access private method"),n);const B={mask:/^.*$/,preprocessors:[],postprocessors:[],plugins:[],overwriteMode:"shift"};class ne{constructor(){this.now=null,this.past=[],this.future=[]}undo(){const e=this.past.pop();e&&this.now&&(this.future.push(this.now),this.updateElement(e,"historyUndo"))}redo(){const e=this.future.pop();e&&this.now&&(this.past.push(this.now),this.updateElement(e,"historyRedo"))}updateHistory(e){if(!this.now){this.now=e;return}const n=this.now.value!==e.value,a=this.now.selection.some((s,r)=>s!==e.selection[r]);!n&&!a||(n&&(this.past.push(this.now),this.future=[]),this.now=e)}updateElement(e,n){this.now=e,this.updateElementState(e,{inputType:n,data:null})}}function ae(t,...e){return e.every(({value:n})=>n===t.value)}function se(t,...e){return e.every(({value:n,selection:a})=>n===t.value&&a[0]===t.selection[0]&&a[1]===t.selection[1])}function re({value:t,selection:e},n,a){const[s,r]=e,i=typeof a=="function"?a({value:t,selection:e}):a;return{value:t,selection:i==="replace"?[s,s+n.length]:[s,r]}}function I(t){return typeof t=="string"}function O(t,e,n,a){let s="";for(let r=e.length;r{const s=e[a];return I(s)?n===s:n.match(s)}):e.test(t)}function ie(t,e,n){let a=null,s=null;const r=Array.from(t.value).reduce((l,o,c)=>{const u=O(e,l,o,n),d=l+u,h=e[d.length];return I(h)?d+h:o.match(h)?(a===null&&c>=t.selection[0]&&(a=d.length),s===null&&c>=t.selection[1]&&(s=d.length),d+o):d},""),i=O(e,r,"",n);return{value:H(r+i,e)?r+i:r,selection:[a??r.length,s??r.length]}}function le({value:t,selection:e},n){const[a,s]=e;let r=a,i=s;return{value:Array.from(t).reduce((l,o,c)=>{const u=l+o;return a===c&&(r=l.length),s===c&&(i=l.length),u.match(n)?u:l},""),selection:[r,i]}}function A(t,e,n=null){if(H(t.value,e))return t;const{value:a,selection:s}=Array.isArray(e)?ie(t,e,n):le(t,e);return{selection:s,value:Array.isArray(e)?a.slice(0,e.length):a}}function R(t,e){if(!Array.isArray(e))return t;const[n,a]=t.selection,s=[],r=Array.from(t.value).reduce((i,l,o)=>{const c=e[o];return o===n&&s.push(i.length),o===a&&s.push(i.length),I(c)&&c===l?i:i+l},"");return s.length<2&&s.push(...new Array(2-s.length).fill(r.length)),{value:r,selection:[s[0],s[1]]}}class D{constructor(e,n){this.initialElementState=e,this.maskOptions=n,this.value="",this.selection=[0,0];const{value:a,selection:s}=A(this.initialElementState,this.getMaskExpression(this.initialElementState));this.value=a,this.selection=s}addCharacters([e,n],a){const{value:s}=this,r=this.getMaskExpression({value:s.slice(0,e)+a+s.slice(n),selection:[e+a.length,e+a.length]}),i={value:s,selection:[e,n]},l=R(i,r),[o,c]=re(l,a,this.maskOptions.overwriteMode).selection,u=l.value.slice(0,o)+a,d=u.length,h=A({value:u+l.value.slice(c),selection:[d,d]},r,i);if(s.slice(0,o)===A({value:u,selection:[d,d]},r,i).value||se(this,h))throw new Error("Invalid mask value");this.value=h.value,this.selection=h.selection}deleteCharacters([e,n]){if(e===n||!n)return;const{value:a}=this,s=this.getMaskExpression({value:a.slice(0,e)+a.slice(n),selection:[e,e]}),r={value:a,selection:[e,n]},i=R(r,s),[l,o]=i.selection,c=i.value.slice(0,l)+i.value.slice(o),u=A({value:c,selection:[l,l]},s,r);this.value=u.value,this.selection=u.selection}getMaskExpression(e){const{mask:n}=this.maskOptions;return typeof n=="function"?n(e):n}}class oe{constructor(e){this.element=e,this.listeners=[]}listen(e,n,a){const s=n;this.element.addEventListener(e,s,a),this.listeners.push(()=>this.element.removeEventListener(e,s))}destroy(){this.listeners.forEach(e=>e())}}const g={CTRL:1,ALT:2,SHIFT:4,META:8},w={Y:89,Z:90};function b(t,e,n){return t.ctrlKey===!!(e&g.CTRL)&&t.altKey===!!(e&g.ALT)&&t.shiftKey===!!(e&g.SHIFT)&&t.metaKey===!!(e&g.META)&&t.keyCode===n}function ce(t){return b(t,g.CTRL,w.Y)||b(t,g.CTRL|g.SHIFT,w.Z)||b(t,g.META|g.SHIFT,w.Z)}function ue(t){return b(t,g.CTRL,w.Z)||b(t,g.META,w.Z)}function de({value:t,selection:e},n){const[a,s]=e;if(a!==s)return[a,s];const r=n?t.slice(a).indexOf(` -`)+1||t.length:t.slice(0,s).lastIndexOf(` -`)+1;return[n?a:r,n?r:s]}function he({value:t,selection:e},n){const[a,s]=e;return a!==s?[a,s]:(n?[a,s+1]:[a-1,s]).map(r=>Math.min(Math.max(r,0),t.length))}const me=/\s+$/g,pe=/^\s+/g,j=/\s/;function ve({value:t,selection:e},n){const[a,s]=e;if(a!==s)return[a,s];if(n){const o=t.slice(a),[c]=o.match(pe)||[""],u=o.trimStart().search(j);return[a,u!==-1?a+c.length+u:t.length]}const r=t.slice(0,s),[i]=r.match(me)||[""],l=r.trimEnd().split("").reverse().findIndex(o=>o.match(j));return[l!==-1?s-i.length-l:0,s]}function k(t=[]){return(e,...n)=>t.reduce((a,s)=>Object.assign(Object.assign({},a),s(a,...n)),e)}function ge(t,e){const n=Object.assign(Object.assign({},B),e),a=k(n.preprocessors),s=k(n.postprocessors),r=typeof t=="string"?{value:t,selection:[0,0]}:t,{elementState:i}=a({elementState:r,data:""},"validation"),l=new D(i,n),{value:o,selection:c}=s(l,r);return typeof t=="string"?o:{value:o,selection:c}}class M extends ne{constructor(e,n){super(),this.element=e,this.maskitoOptions=n,this.isTextArea=this.element.nodeName==="TEXTAREA",this.eventListener=new oe(this.element),this.options=Object.assign(Object.assign({},B),this.maskitoOptions),this.preprocessor=k(this.options.preprocessors),this.postprocessor=k(this.options.postprocessors),this.teardowns=this.options.plugins.map(a=>a(this.element,this.options)),this.updateHistory(this.elementState),this.eventListener.listen("keydown",a=>{if(ce(a))return a.preventDefault(),this.redo();if(ue(a))return a.preventDefault(),this.undo()}),this.eventListener.listen("beforeinput",a=>{var s;const r=a.inputType.includes("Forward");switch(this.updateHistory(this.elementState),a.inputType){case"historyUndo":return a.preventDefault(),this.undo();case"historyRedo":return a.preventDefault(),this.redo();case"deleteByCut":case"deleteContentBackward":case"deleteContentForward":return this.handleDelete({event:a,isForward:r,selection:he(this.elementState,r)});case"deleteWordForward":case"deleteWordBackward":return this.handleDelete({event:a,isForward:r,selection:ve(this.elementState,r),force:!0});case"deleteSoftLineBackward":case"deleteSoftLineForward":case"deleteHardLineBackward":case"deleteHardLineForward":return this.handleDelete({event:a,isForward:r,selection:de(this.elementState,r),force:!0});case"insertCompositionText":return;case"insertReplacementText":return;case"insertLineBreak":case"insertParagraph":return this.handleEnter(a);case"insertFromPaste":case"insertText":case"insertFromDrop":default:return this.handleInsert(a,a.data||((s=a.dataTransfer)===null||s===void 0?void 0:s.getData("text/plain"))||"")}}),this.eventListener.listen("input",({inputType:a})=>{a!=="insertCompositionText"&&(this.ensureValueFitsMask(),this.updateHistory(this.elementState))}),this.eventListener.listen("compositionend",()=>{this.ensureValueFitsMask(),this.updateHistory(this.elementState)})}get elementState(){const{value:e,selectionStart:n,selectionEnd:a}=this.element;return{value:e,selection:[n||0,a||0]}}get maxLength(){const{maxLength:e}=this.element;return e===-1?1/0:e}destroy(){this.eventListener.destroy(),this.teardowns.forEach(e=>e==null?void 0:e())}updateElementState({value:e,selection:n},a={inputType:"insertText",data:null}){const s=this.elementState.value;this.updateValue(e),this.updateSelectionRange(n),s!==e&&this.dispatchInputEvent(a)}updateSelectionRange([e,n]){var a;const{element:s}=this;s.matches(":focus")&&(s.selectionStart!==e||s.selectionEnd!==n)&&((a=s.setSelectionRange)===null||a===void 0||a.call(s,e,n))}updateValue(e){this.element.value=e}ensureValueFitsMask(){this.updateElementState(ge(this.elementState,this.options))}dispatchInputEvent(e={inputType:"insertText",data:null}){globalThis.InputEvent&&this.element.dispatchEvent(new InputEvent("input",Object.assign(Object.assign({},e),{bubbles:!0,cancelable:!1})))}handleDelete({event:e,selection:n,isForward:a,force:s=!1}){const r={value:this.elementState.value,selection:n},[i,l]=r.selection,{elementState:o}=this.preprocessor({elementState:r,data:""},a?"deleteForward":"deleteBackward"),c=new D(o,this.options),[u,d]=o.selection;c.deleteCharacters([u,d]);const h=this.postprocessor(c,r);if(!(r.value.slice(0,i)+r.value.slice(l)===h.value&&!s&&!this.element.isContentEditable)){if(e.preventDefault(),ae(r,o,c,h))return this.updateSelectionRange(a?[d,d]:[u,u]);this.updateElementState(h,{inputType:e.inputType,data:null}),this.updateHistory(h)}}handleInsert(e,n){const a=this.elementState,{elementState:s,data:r=n}=this.preprocessor({data:n,elementState:a},"insert"),i=new D(s,this.options);try{i.addCharacters(s.selection,r)}catch{return e.preventDefault()}const[l,o]=s.selection,c=a.value.slice(0,l)+n+a.value.slice(o),u=this.postprocessor(i,a);if(u.value.length>this.maxLength)return e.preventDefault();(c!==u.value||this.element.isContentEditable)&&(e.preventDefault(),this.updateElementState(u,{data:n,inputType:e.inputType}),this.updateHistory(u))}handleEnter(e){(this.isTextArea||this.element.isContentEditable)&&this.handleInsert(e,` -`)}}function fe(t,e,n){const a=Math.min(Number(n),Math.max(Number(e),Number(t)));return t instanceof Date?new Date(a):a}function ye(t){return t.replaceAll(/\W/g,"").length}const V=t=>{var e,n,a;return{day:((e=t.match(/d/g))===null||e===void 0?void 0:e.length)||0,month:((n=t.match(/m/g))===null||n===void 0?void 0:n.length)||0,year:((a=t.match(/y/g))===null||a===void 0?void 0:a.length)||0}};function Se(t){return{day:String(t.getDate()).padStart(2,"0"),month:String(t.getMonth()+1).padStart(2,"0"),year:String(t.getFullYear()).padStart(4,"0"),hours:String(t.getHours()).padStart(2,"0"),minutes:String(t.getMinutes()).padStart(2,"0"),seconds:String(t.getSeconds()).padStart(2,"0"),milliseconds:String(t.getMilliseconds()).padStart(3,"0")}}function we(t,e){return t.length!n.match(/^0+$/))}function W(t,e,n){const a=ye(e);return t.replace(n,"").match(new RegExp(`(\\D*\\d[^\\d\\s]*){1,${a}}`,"g"))||[]}function C(t,e){const n=e.replaceAll(/[^dmy]/g,""),a=t.replaceAll(/\D+/g,""),s={day:a.slice(n.indexOf("d"),n.lastIndexOf("d")+1),month:a.slice(n.indexOf("m"),n.lastIndexOf("m")+1),year:a.slice(n.indexOf("y"),n.lastIndexOf("y")+1)};return Object.fromEntries(Object.entries(s).filter(([r,i])=>!!i).sort(([r],[i])=>e.toLowerCase().indexOf(r[0])>e.toLowerCase().indexOf(i[0])?1:-1))}function be(t,e){var n,a,s,r,i,l,o;const c=((n=t.year)===null||n===void 0?void 0:n.length)===2?`20${t.year}`:t.year,u=new Date(Number(c??"0"),Number((a=t.month)!==null&&a!==void 0?a:"1")-1,Number((s=t.day)!==null&&s!==void 0?s:"1"),Number((r=void 0)!==null&&r!==void 0?r:"0"),Number((i=void 0)!==null&&i!==void 0?i:"0"),Number((l=void 0)!==null&&l!==void 0?l:"0"),Number((o=void 0)!==null&&o!==void 0?o:"0"));return u.setFullYear(Number(c??"0")),u}const z=", ";function E({day:t,month:e,year:n,hours:a,minutes:s,seconds:r,milliseconds:i},{dateMode:l,dateTimeSeparator:o=z,timeMode:c}){var u;const d=((u=l.match(/y/g))===null||u===void 0?void 0:u.length)===2?n==null?void 0:n.slice(-2):n;return(l+(c?o+c:"")).replaceAll(/d+/g,t??"").replaceAll(/m+/g,e??"").replaceAll(/y+/g,d??"").replaceAll(/H+/g,a??"").replaceAll("MSS",i??"").replaceAll(/M+/g,s??"").replaceAll(/S+/g,r??"").replaceAll(/^\D+/g,"").replaceAll(/\D+$/g,"")}const K={day:31,month:12,year:9999},Ee=new Date("0001-01-01"),xe=new Date("9999-12-31"),Te=[":","."];function Ae({dateString:t,dateModeTemplate:e,dateSegmentsSeparator:n,offset:a,selection:[s,r]}){const i=C(t,e),l=Object.entries(i),o={};for(const[d,h]of l){const p=E(o,{dateMode:e}),S=K[d],f=p.length&&n.length,v=a+p.length+f+V(e)[d],y=v>=s&&v===r;if(y&&Number(h)>Number(S))return{validatedDateString:"",updatedSelection:[s,r]};if(y&&Number(h)<1)return{validatedDateString:"",updatedSelection:[s,r]};o[d]=h}const c=E(o,{dateMode:e}),u=c.length-t.length;return{validatedDateString:c,updatedSelection:[s+u,r+u]}}const Z=/[\\^$.*+?()[\]{}|]/g,ke=new RegExp(Z.source);function P(t){return t&&ke.test(t)?t.replaceAll(Z,"\\$&"):t}function L(t,e,n=0){return Number(t.padEnd(e.length,"0"))<=Number(e)?{validatedSegmentValue:t,prefixedZeroesCount:n}:t.endsWith("0")?L(`0${t.slice(0,e.length-1)}`,e,n+1):L(`${t.slice(0,e.length-1)}0`,e,n)}function F(t){return t.replaceAll(/[0-9]/g,e=>String.fromCharCode(e.charCodeAt(0)-65248))}function Ie({dateModeTemplate:t,dateSegmentSeparator:e,splitFn:n,uniteFn:a}){return({value:s,selection:r})=>{var i;const[l,o]=r,{dateStrings:c,restPart:u=""}=n(s),d=[];let h=0;c.forEach(S=>{const f=C(S,t),v=Object.entries(f).reduce((y,[x,_])=>{const{validatedSegmentValue:U,prefixedZeroesCount:X}=L(_,`${K[x]}`);return h+=X,Object.assign(Object.assign({},y),{[x]:U})},{});d.push(E(v,{dateMode:t}))});const p=a(d,s)+(!((i=c[c.length-1])===null||i===void 0)&&i.endsWith(e)?e:"")+u;return h&&p.slice(o+h,o+h+e.length)===e&&(h+=e.length),{selection:[l+h,o+h],value:p}}}function Me(){return({elementState:t,data:e})=>{const{value:n,selection:a}=t;return{elementState:{selection:a,value:F(n)},data:F(e)}}}function De(t,e){const n=V(e);return Object.fromEntries(Object.entries(t).map(([a,s])=>{const r=n[a];return[a,s.length===r&&s.match(/^0+$/)?"1".padStart(r,"0"):s]}))}function Le({dateModeTemplate:t,min:e=Ee,max:n=xe,rangeSeparator:a="",dateSegmentSeparator:s="."}){return({value:r,selection:i})=>{const l=a&&r.endsWith(a),o=W(r,t,a);let c="";for(const u of o){c+=c?a:"";const d=C(u,t);if(!we(u,t)){const S=De(d,t),f=E(S,{dateMode:t}),v=u.endsWith(s)?s:"";c+=f+v;continue}const h=be(d),p=fe(h,e,n);c+=E(Se(p),{dateMode:t})}return{selection:i,value:c+(l?a:"")}}}function $e({dateModeTemplate:t,dateSegmentsSeparator:e,rangeSeparator:n="",dateTimeSeparator:a=z}){return({elementState:s,data:r})=>{const i=n?new RegExp(`${n}|-`):a,l=r.split(i),o=r.includes(a)?[l[0]]:l;if(o.every(c=>c.trim().split(/\D/).filter(Boolean).length===t.split(e).length)){const c=o.map(u=>Be(u,t,e)).join(n);return{elementState:s,data:`${c}${r.includes(a)&&a+l[1]||""}`}}return{elementState:s,data:r}}}function Be(t,e,n){const a=t.split(/\D/).filter(Boolean),s=e.split(n);return a.map((r,i)=>i===s.length-1?r:r.padStart(s[i].length,"0")).join(n)}function Ce({dateModeTemplate:t,dateSegmentsSeparator:e,rangeSeparator:n=""}){return({elementState:a,data:s})=>{const{value:r,selection:i}=a;if(s===e)return{elementState:a,data:i[0]===r.length?s:""};const l=s.replaceAll(new RegExp(`[^\\d${P(e)}${n}]`,"g"),"");if(!l)return{elementState:a,data:""};const[o,c]=i;let u=c+s.length;const d=r.slice(0,o)+l+r.slice(u),h=W(d,t,n);let p="";const S=!!n&&d.includes(n);for(const v of h){const{validatedDateString:y,updatedSelection:x}=Ae({dateString:v,dateModeTemplate:t,dateSegmentsSeparator:e,offset:p.length,selection:[o,u]});if(v&&!y)return{elementState:a,data:""};u=x[1],p+=S&&!p?y+n:y}const f=p.slice(o,u);return{elementState:{selection:i,value:p.slice(0,o)+f.split(e).map(v=>"0".repeat(v.length)).join(e)+p.slice(u)},data:f}}}function Oe(){return({elementState:t},e)=>{const{value:n,selection:a}=t;if(!n||Re(n,a))return{elementState:t};const[s,r]=a,i=n.slice(s,r).replaceAll(/\d/g,"0"),l=n.slice(0,s)+i+n.slice(r);return e==="validation"||e==="insert"&&s===r?{elementState:{selection:a,value:l}}:{elementState:{selection:e==="deleteBackward"||e==="insert"?[s,s]:[r,r],value:l}}}}function Re(t,[e,n]){return n===t.length}function je({mode:t,separator:e=".",max:n,min:a}){const s=t.split("/").join(e);return Object.assign(Object.assign({},B),{mask:Array.from(s).map(r=>e.includes(r)?r:/\d/),overwriteMode:"replace",preprocessors:[Me(),Oe(),$e({dateModeTemplate:s,dateSegmentsSeparator:e}),Ce({dateModeTemplate:s,dateSegmentsSeparator:e})],postprocessors:[Ie({dateModeTemplate:s,dateSegmentSeparator:e,splitFn:r=>({dateStrings:[r]}),uniteFn:([r])=>r}),Le({min:a,max:n,dateModeTemplate:s,dateSegmentSeparator:e})]})}new RegExp(`[${Te.map(P).join("")}]$`);const Fe=/^(?:\d{4}[ -]?){0,3}\d{0,4}$/,m={visa:{final:/^4(?:\d{3}[- ]?){3}\d{3,4}$/,start:/^4/,length:/^4\d{0,15}$/},mastercard:{final:/^5[1-5]\d{3}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}$/,start:/^5[1-5]/,length:/^5[1-5]\d{0,15}$/},amex:{final:/^3[47]\d{2}[- ]?\d{6}[- ]?\d{5}$/,start:/^3[47]/,length:/^3[47]\d{0,15}$/},discover:{final:/^(6011|65|64[4-9])\d{4}[- ]?\d{4}[- ]?\d{4}$/,start:/^(6011|65|64[4-9])/,length:/^(6011|65|64[4-9])\d{0,15}$/},diners:{final:/^(30[0-5]|36|38|39)\d{4}[- ]?\d{4}[- ]?\d{4}$/,start:/^(30[0-5]|36|38|39)/,length:/^(30[0-5]|36|38|39)\d{0,14}$/},jcb:{final:/^(2131|1800|35[0-9]{3})\d{4}[- ]?\d{4}[- ]?\d{4}$/,start:/^(2131|1800|35[0-9]{3})/,length:/^(2131|1800|35[0-9]{3})\d{0,15}$/}};var $,Y;class Ne{constructor(e){ee(this,$),this.options=e}mount(){return this.number=this.options.fields.card.number instanceof HTMLInputElement?this.options.fields.card.number:document.querySelector(this.options.fields.card.number),this.date=this.options.fields.card.date instanceof HTMLInputElement?this.options.fields.card.date:document.querySelector(this.options.fields.card.date),this.cvv=this.options.fields.card.cvv instanceof HTMLInputElement?this.options.fields.card.cvv:document.querySelector(this.options.fields.card.cvv),te(this,$,Y).call(this),this}check(){const e=m.visa.final.test(this.number.value)||m.mastercard.final.test(this.number.value)||m.amex.final.test(this.number.value)||m.discover.final.test(this.number.value)||m.diners.final.test(this.number.value)||m.jcb.final.test(this.number.value),n=new RegExp("^(0[1-9]|1[0-2])/(?:\\d{2})$").test(this.date.value),a=new RegExp("^\\d{3}$").test(this.cvv.value);return{valid:e&&n&&a,number:{valid:e,value:this.number.value},date:{valid:n,value:this.date.value},cvv:{valid:a,value:this.cvv.value}}}type(){return m.visa.start.test(this.number.value)?"visa":m.mastercard.start.test(this.number.value)?"mastercard":m.amex.start.test(this.number.value)?"amex":m.discover.start.test(this.number.value)?"discover":m.diners.start.test(this.number.value)?"diners":m.jcb.start.test(this.number.value)?"jcb":"unknown"}value(e){if(e==="number")return this.number.value;if(e==="date")return this.date.value;if(e==="year"){const[,n]=this.date.value.split("/");return n}if(e==="month"){const[n]=this.date.value.split("/");return n}return e==="cvv"?this.cvv.value:null}}$=new WeakSet,Y=function(){new M(this.number,{mask:t=>m.visa.start.test(t.value)?new RegExp(m.visa.length):m.mastercard.start.test(t.value)?new RegExp(m.mastercard.length):m.amex.start.test(t.value)?new RegExp(m.amex.length):m.discover.start.test(t.value)?new RegExp(m.discover.length):m.diners.start.test(t.value)?new RegExp(m.diners.length):m.jcb.start.test(t.value)?new RegExp(m.jcb.length):new RegExp(Fe)}),new M(this.date,je({mode:"mm/yy",separator:"/"})),new M(this.cvv,{mask:[/\d/,/\d/,/\d/]})};/** - * Invoice Ninja (https://invoiceninja.com). - * - * @link https://github.com/invoiceninja/invoiceninja source repository - * - * @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com) - * - * @license https://www.elastic.co/licensing/elastic-license - */function qe(...t){return new Promise(e=>{if(!t.length){e([]);return}const n=t.map(s=>document.querySelector(s)).filter(Boolean);if(n.length===t.length){e(n);return}const a=new MutationObserver(()=>{const s=t.map(r=>document.querySelector(r)).filter(Boolean);s.length===t.length&&(a.disconnect(),e(s))});a.observe(document.body,{childList:!0,subtree:!0})})}function He(){const t=document.querySelector('meta[name="instant-payment"]');return!!(t&&t instanceof HTMLMetaElement&&t.content==="yes")}/** - * Invoice Ninja (https://invoiceninja.com) - * - * @link https://github.com/invoiceninja/invoiceninja source repository - * - * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) - * - * @license https://www.elastic.co/licensing/elastic-license - */class Ve{constructor(e,n){T(this,"handleAuthorization",()=>{var r,i,l,o;if(this.cvvRequired=="1"&&document.getElementById("cvv").value.length<3){const c=document.getElementById("errors");c&&(c.innerText="CVV is required",c.style.display="block"),document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden");return}var e={};e.clientKey=this.publicKey,e.apiLoginID=this.loginId;var n={};n.cardNumber=(r=this.sc.value("number"))==null?void 0:r.replace(/[^\d]/g,""),n.month=(i=this.sc.value("month"))==null?void 0:i.replace(/[^\d]/g,""),n.year=`20${(l=this.sc.value("year"))==null?void 0:l.replace(/[^\d]/g,"")}`,n.cardCode=(o=this.sc.value("cvv"))==null?void 0:o.replace(/[^\d]/g,"");var a={};return a.authData=e,a.cardData=n,document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),Accept.dispatchData(a,this.responseHandler),!1});T(this,"responseHandler",e=>{if(e.messages.resultCode==="Error"){var n=0;const a=document.getElementById("errors");a&&(a.innerText=`${e.messages.message[n].code}: ${e.messages.message[n].text}`,a.style.display="block"),document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}else if(e.messages.resultCode==="Ok"){document.getElementById("dataDescriptor").value=e.opaqueData.dataDescriptor,document.getElementById("dataValue").value=e.opaqueData.dataValue;let a=document.querySelector("input[name=token-billing-checkbox]:checked");a&&(document.getElementById("store_card").value=a.value),document.getElementById("server_response").submit()}return!1});T(this,"handle",()=>{Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(a=>a.addEventListener("click",s=>{document.getElementById("save-card--container").style.display="none",document.getElementById("authorize--credit-card-container").style.display="none",document.getElementById("token").value=s.target.dataset.token}));let e=document.getElementById("toggle-payment-with-credit-card");e&&e.addEventListener("click",()=>{document.getElementById("save-card--container").style.display="grid",document.getElementById("authorize--credit-card-container").style.display="flex",document.getElementById("token").value=null});let n=document.getElementById("pay-now");return n&&n.addEventListener("click",a=>{let s=document.getElementById("token");s.value?this.handlePayNowAction(s.value):this.handleAuthorization()}),this});this.publicKey=e,this.loginId=n,this.cardHolderName=document.getElementById("cardholder_name"),this.sc=new Ne({fields:{card:{number:"#number",date:"#date",cvv:"#cvv"}}}),this.sc.mount(),this.cvvRequired=document.querySelector('meta[name="authnet-require-cvv"]').content}handlePayNowAction(e){document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),document.getElementById("token").value=e,document.getElementById("server_response").submit()}}function N(){const t=document.querySelector('meta[name="authorize-public-key"]').content,e=document.querySelector('meta[name="authorize-login-id"]').content;new Ve(t,e).handle()}He()?N():qe("#authorize-net-credit-card-payment").then(()=>N());export{Ne as $,He as i,qe as w}; diff --git a/public/build/assets/authorize-credit-card-payment-f92567bc.js b/public/build/assets/authorize-credit-card-payment-f92567bc.js new file mode 100644 index 000000000000..9b0c7ddb88dd --- /dev/null +++ b/public/build/assets/authorize-credit-card-payment-f92567bc.js @@ -0,0 +1,9 @@ +var m=Object.defineProperty;var y=(n,e,t)=>e in n?m(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var o=(n,e,t)=>(y(n,typeof e!="symbol"?e+"":e,t),t);import{$ as h}from"./simple-card-4314d842.js";import{i as g,w as p}from"./wait-8f4ae121.js";/** + * Invoice Ninja (https://invoiceninja.com) + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */class v{constructor(e,t){o(this,"handleAuthorization",()=>{var c,l,s,i;if(this.cvvRequired=="1"&&document.getElementById("cvv").value.length<3){const r=document.getElementById("errors");r&&(r.innerText="CVV is required",r.style.display="block"),document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden");return}var e={};e.clientKey=this.publicKey,e.apiLoginID=this.loginId;var t={};t.cardNumber=(c=this.sc.value("number"))==null?void 0:c.replace(/[^\d]/g,""),t.month=(l=this.sc.value("month"))==null?void 0:l.replace(/[^\d]/g,""),t.year=`20${(s=this.sc.value("year"))==null?void 0:s.replace(/[^\d]/g,"")}`,t.cardCode=(i=this.sc.value("cvv"))==null?void 0:i.replace(/[^\d]/g,"");var a={};return a.authData=e,a.cardData=t,document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),Accept.dispatchData(a,this.responseHandler),!1});o(this,"responseHandler",e=>{if(e.messages.resultCode==="Error"){var t=0;const a=document.getElementById("errors");a&&(a.innerText=`${e.messages.message[t].code}: ${e.messages.message[t].text}`,a.style.display="block"),document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}else if(e.messages.resultCode==="Ok"){document.getElementById("dataDescriptor").value=e.opaqueData.dataDescriptor,document.getElementById("dataValue").value=e.opaqueData.dataValue;let a=document.querySelector("input[name=token-billing-checkbox]:checked");a&&(document.getElementById("store_card").value=a.value),document.getElementById("server_response").submit()}return!1});o(this,"handle",()=>{Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(a=>a.addEventListener("click",d=>{document.getElementById("save-card--container").style.display="none",document.getElementById("authorize--credit-card-container").style.display="none",document.getElementById("token").value=d.target.dataset.token}));let e=document.getElementById("toggle-payment-with-credit-card");e&&e.addEventListener("click",()=>{document.getElementById("save-card--container").style.display="grid",document.getElementById("authorize--credit-card-container").style.display="flex",document.getElementById("token").value=null});let t=document.getElementById("pay-now");return t&&t.addEventListener("click",a=>{let d=document.getElementById("token");d.value?this.handlePayNowAction(d.value):this.handleAuthorization()}),this});this.publicKey=e,this.loginId=t,this.cardHolderName=document.getElementById("cardholder_name"),this.sc=new h({fields:{card:{number:"#number",date:"#date",cvv:"#cvv"}}}),this.sc.mount(),this.cvvRequired=document.querySelector('meta[name="authnet-require-cvv"]').content}handlePayNowAction(e){document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),document.getElementById("token").value=e,document.getElementById("server_response").submit()}}function u(){const n=document.querySelector('meta[name="authorize-public-key"]').content,e=document.querySelector('meta[name="authorize-login-id"]').content;new v(n,e).handle()}g()?u():p("#authorize-net-credit-card-payment").then(()=>u()); diff --git a/public/build/assets/authorize-stripe-acss-6fe37711.js b/public/build/assets/authorize-stripe-acss-f6bd46c1.js similarity index 95% rename from public/build/assets/authorize-stripe-acss-6fe37711.js rename to public/build/assets/authorize-stripe-acss-f6bd46c1.js index 4660302efd3d..34c2126d897c 100644 --- a/public/build/assets/authorize-stripe-acss-6fe37711.js +++ b/public/build/assets/authorize-stripe-acss-f6bd46c1.js @@ -1,4 +1,4 @@ -import{w as y}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{w as y}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/braintree-credit-card-c80deaab.js b/public/build/assets/braintree-credit-card-60bd8878.js similarity index 97% rename from public/build/assets/braintree-credit-card-c80deaab.js rename to public/build/assets/braintree-credit-card-60bd8878.js index 643db7069361..d2c7d7f9820e 100644 --- a/public/build/assets/braintree-credit-card-c80deaab.js +++ b/public/build/assets/braintree-credit-card-60bd8878.js @@ -1,4 +1,4 @@ -import{i as l,w as s}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{i as l,w as s}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/braintree-paypal-cf71d092.js b/public/build/assets/braintree-paypal-16e2f577.js similarity index 97% rename from public/build/assets/braintree-paypal-cf71d092.js rename to public/build/assets/braintree-paypal-16e2f577.js index 454da181ea18..d2a70b6d643e 100644 --- a/public/build/assets/braintree-paypal-cf71d092.js +++ b/public/build/assets/braintree-paypal-16e2f577.js @@ -1,4 +1,4 @@ -import{i as l,w as s}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{i as l,w as s}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/checkout-credit-card-5435b293.js b/public/build/assets/checkout-credit-card-eba516f2.js similarity index 97% rename from public/build/assets/checkout-credit-card-5435b293.js rename to public/build/assets/checkout-credit-card-eba516f2.js index 48f52f88f2db..c11da286bd27 100644 --- a/public/build/assets/checkout-credit-card-5435b293.js +++ b/public/build/assets/checkout-credit-card-eba516f2.js @@ -1,4 +1,4 @@ -import{w as o}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{w as o}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/eway-credit-card-319ea034.js b/public/build/assets/eway-credit-card-0119725d.js similarity index 99% rename from public/build/assets/eway-credit-card-319ea034.js rename to public/build/assets/eway-credit-card-0119725d.js index 89145a43e52a..20131732b21b 100644 --- a/public/build/assets/eway-credit-card-319ea034.js +++ b/public/build/assets/eway-credit-card-0119725d.js @@ -1,4 +1,4 @@ -import{i as d,w as n}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{i as d,w as n}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/forte-ach-payment-f051a883.js b/public/build/assets/forte-ach-payment-546428ee.js similarity index 94% rename from public/build/assets/forte-ach-payment-f051a883.js rename to public/build/assets/forte-ach-payment-546428ee.js index d2e77107618e..d4542c93061e 100644 --- a/public/build/assets/forte-ach-payment-f051a883.js +++ b/public/build/assets/forte-ach-payment-546428ee.js @@ -1,4 +1,4 @@ -var s=Object.defineProperty;var d=(n,e,t)=>e in n?s(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var o=(n,e,t)=>(d(n,typeof e!="symbol"?e+"":e,t),t);import{i,w as u}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var s=Object.defineProperty;var d=(n,e,t)=>e in n?s(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var o=(n,e,t)=>(d(n,typeof e!="symbol"?e+"":e,t),t);import{i,w as u}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/forte-credit-card-payment-5485d5f0.js b/public/build/assets/forte-credit-card-payment-3ff75b59.js similarity index 83% rename from public/build/assets/forte-credit-card-payment-5485d5f0.js rename to public/build/assets/forte-credit-card-payment-3ff75b59.js index 5a1e2dffbd1c..e9f97f15d7a9 100644 --- a/public/build/assets/forte-credit-card-payment-5485d5f0.js +++ b/public/build/assets/forte-credit-card-payment-3ff75b59.js @@ -1,4 +1,4 @@ -var c=Object.defineProperty;var l=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var a=(n,e,t)=>(l(n,typeof e!="symbol"?e+"":e,t),t);import{i as u,w as m,$ as p}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var c=Object.defineProperty;var l=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var a=(n,e,t)=>(l(n,typeof e!="symbol"?e+"":e,t),t);import{i as u,w as m}from"./wait-8f4ae121.js";import{$ as p}from"./simple-card-4314d842.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ var c=Object.defineProperty;var l=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configura * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://opensource.org/licenses/AAL - */class y{constructor(e){a(this,"handleAuthorization",()=>{var r,d,o,s;const e={api_login_id:this.apiLoginId,card_number:(r=this.sc.value("number"))==null?void 0:r.replace(/[^\d]/g,""),expire_year:`20${(d=this.sc.value("year"))==null?void 0:d.replace(/[^\d]/g,"")}`,expire_month:(o=this.sc.value("month"))==null?void 0:o.replace(/[^\d]/g,""),cvv:(s=this.sc.value("cvv"))==null?void 0:s.replace(/[^\d]/g,"")};return document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),forte.createToken(e).success(this.successResponseHandler).error(this.failedResponseHandler),!1});a(this,"successResponseHandler",e=>(document.getElementById("payment_token").value=e.onetime_token,document.getElementById("card_brand").value=e.card_type,document.getElementById("server_response").submit(),!1));a(this,"failedResponseHandler",e=>{var t='
  • '+e.response_description+"
";return document.getElementById("forte_errors").innerHTML=t,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden"),!1});a(this,"handle",()=>{let e=document.getElementById("pay-now");return e&&e.addEventListener("click",t=>{this.handleAuthorization()}),this});this.apiLoginId=e,this.cardHolderName=document.getElementById("cardholder_name"),this.sc=new p({fields:{card:{number:"#number",date:"#date",cvv:"#cvv"}}}),this.sc.mount()}}function i(){const n=document.querySelector('meta[name="forte-api-login-id"]').content;new y(n).handle()}u()?i():m("#forte-credit-card-payment").then(()=>i()); + */class y{constructor(e){a(this,"handleAuthorization",()=>{var r,o,d,s;const e={api_login_id:this.apiLoginId,card_number:(r=this.sc.value("number"))==null?void 0:r.replace(/[^\d]/g,""),expire_year:`20${(o=this.sc.value("year"))==null?void 0:o.replace(/[^\d]/g,"")}`,expire_month:(d=this.sc.value("month"))==null?void 0:d.replace(/[^\d]/g,""),cvv:(s=this.sc.value("cvv"))==null?void 0:s.replace(/[^\d]/g,"")};return document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),forte.createToken(e).success(this.successResponseHandler).error(this.failedResponseHandler),!1});a(this,"successResponseHandler",e=>(document.getElementById("payment_token").value=e.onetime_token,document.getElementById("card_brand").value=e.card_type,document.getElementById("server_response").submit(),!1));a(this,"failedResponseHandler",e=>{var t='
  • '+e.response_description+"
";return document.getElementById("forte_errors").innerHTML=t,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden"),!1});a(this,"handle",()=>{let e=document.getElementById("pay-now");return e&&e.addEventListener("click",t=>{this.handleAuthorization()}),this});this.apiLoginId=e,this.cardHolderName=document.getElementById("cardholder_name"),this.sc=new p({fields:{card:{number:"#number",date:"#date",cvv:"#cvv"}}}),this.sc.mount()}}function i(){const n=document.querySelector('meta[name="forte-api-login-id"]').content;new y(n).handle()}u()?i():m("#forte-credit-card-payment").then(()=>i()); diff --git a/public/build/assets/mollie-credit-card-e1abdd68.js b/public/build/assets/mollie-credit-card-d81afbd4.js similarity index 97% rename from public/build/assets/mollie-credit-card-e1abdd68.js rename to public/build/assets/mollie-credit-card-d81afbd4.js index 5fc7bd1698a4..6ff5a9fa2dfa 100644 --- a/public/build/assets/mollie-credit-card-e1abdd68.js +++ b/public/build/assets/mollie-credit-card-d81afbd4.js @@ -1,4 +1,4 @@ -import{i as d,w as l}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{i as d,w as l}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/paytrace-credit-card-f4dfde84.js b/public/build/assets/paytrace-credit-card-7f87b811.js similarity index 98% rename from public/build/assets/paytrace-credit-card-f4dfde84.js rename to public/build/assets/paytrace-credit-card-7f87b811.js index a208bb8fa87c..32e75644d2d9 100644 --- a/public/build/assets/paytrace-credit-card-f4dfde84.js +++ b/public/build/assets/paytrace-credit-card-7f87b811.js @@ -1,4 +1,4 @@ -import{i as o,w as i}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{i as o,w as i}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/razorpay-aio-d613afa9.js b/public/build/assets/razorpay-aio-f8e8c7f0.js similarity index 92% rename from public/build/assets/razorpay-aio-d613afa9.js rename to public/build/assets/razorpay-aio-f8e8c7f0.js index 393526403f5a..9031d5887707 100644 --- a/public/build/assets/razorpay-aio-d613afa9.js +++ b/public/build/assets/razorpay-aio-f8e8c7f0.js @@ -1,4 +1,4 @@ -import{i,w as d}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{i,w as d}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/simple-card-4314d842.js b/public/build/assets/simple-card-4314d842.js new file mode 100644 index 000000000000..83c9e962a669 --- /dev/null +++ b/public/build/assets/simple-card-4314d842.js @@ -0,0 +1,4 @@ +var H=t=>{throw TypeError(t)},z=(t,e,s)=>e.has(t)||H("Cannot "+s),G=(t,e,s)=>e.has(t)?H("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),J=(t,e,s)=>(z(t,e,"access private method"),s);const j={mask:/^.*$/,preprocessors:[],postprocessors:[],plugins:[],overwriteMode:"shift"};class Q{constructor(){this.now=null,this.past=[],this.future=[]}undo(){const e=this.past.pop();e&&this.now&&(this.future.push(this.now),this.updateElement(e,"historyUndo"))}redo(){const e=this.future.pop();e&&this.now&&(this.past.push(this.now),this.updateElement(e,"historyRedo"))}updateHistory(e){if(!this.now){this.now=e;return}const s=this.now.value!==e.value,n=this.now.selection.some((a,i)=>a!==e.selection[i]);!s&&!n||(s&&(this.past.push(this.now),this.future=[]),this.now=e)}updateElement(e,s){this.now=e,this.updateElementState(e,{inputType:s,data:null})}}function _(t,...e){return e.every(({value:s})=>s===t.value)}function ee(t,...e){return e.every(({value:s,selection:n})=>s===t.value&&n[0]===t.selection[0]&&n[1]===t.selection[1])}function te({value:t,selection:e},s,n){const[a,i]=e,r=typeof n=="function"?n({value:t,selection:e}):n;return{value:t,selection:r==="replace"?[a,a+s.length]:[a,i]}}function A(t){return typeof t=="string"}function C(t,e,s,n){let a="";for(let i=e.length;i{const a=e[n];return A(a)?s===a:s.match(a)}):e.test(t)}function ne(t,e,s){let n=null,a=null;const i=Array.from(t.value).reduce((l,o,c)=>{const u=C(e,l,o,s),d=l+u,h=e[d.length];return A(h)?d+h:o.match(h)?(n===null&&c>=t.selection[0]&&(n=d.length),a===null&&c>=t.selection[1]&&(a=d.length),d+o):d},""),r=C(e,i,"",s);return{value:N(i+r,e)?i+r:i,selection:[n??i.length,a??i.length]}}function se({value:t,selection:e},s){const[n,a]=e;let i=n,r=a;return{value:Array.from(t).reduce((l,o,c)=>{const u=l+o;return n===c&&(i=l.length),a===c&&(r=l.length),u.match(s)?u:l},""),selection:[i,r]}}function T(t,e,s=null){if(N(t.value,e))return t;const{value:n,selection:a}=Array.isArray(e)?ne(t,e,s):se(t,e);return{selection:a,value:Array.isArray(e)?n.slice(0,e.length):n}}function R(t,e){if(!Array.isArray(e))return t;const[s,n]=t.selection,a=[],i=Array.from(t.value).reduce((r,l,o)=>{const c=e[o];return o===s&&a.push(r.length),o===n&&a.push(r.length),A(c)&&c===l?r:r+l},"");return a.length<2&&a.push(...new Array(2-a.length).fill(i.length)),{value:i,selection:[a[0],a[1]]}}class k{constructor(e,s){this.initialElementState=e,this.maskOptions=s,this.value="",this.selection=[0,0];const{value:n,selection:a}=T(this.initialElementState,this.getMaskExpression(this.initialElementState));this.value=n,this.selection=a}addCharacters([e,s],n){const{value:a}=this,i=this.getMaskExpression({value:a.slice(0,e)+n+a.slice(s),selection:[e+n.length,e+n.length]}),r={value:a,selection:[e,s]},l=R(r,i),[o,c]=te(l,n,this.maskOptions.overwriteMode).selection,u=l.value.slice(0,o)+n,d=u.length,h=T({value:u+l.value.slice(c),selection:[d,d]},i,r);if(a.slice(0,o)===T({value:u,selection:[d,d]},i,r).value||ee(this,h))throw new Error("Invalid mask value");this.value=h.value,this.selection=h.selection}deleteCharacters([e,s]){if(e===s||!s)return;const{value:n}=this,a=this.getMaskExpression({value:n.slice(0,e)+n.slice(s),selection:[e,e]}),i={value:n,selection:[e,s]},r=R(i,a),[l,o]=r.selection,c=r.value.slice(0,l)+r.value.slice(o),u=T({value:c,selection:[l,l]},a,i);this.value=u.value,this.selection=u.selection}getMaskExpression(e){const{mask:s}=this.maskOptions;return typeof s=="function"?s(e):s}}class ae{constructor(e){this.element=e,this.listeners=[]}listen(e,s,n){const a=s;this.element.addEventListener(e,a,n),this.listeners.push(()=>this.element.removeEventListener(e,a))}destroy(){this.listeners.forEach(e=>e())}}const g={CTRL:1,ALT:2,SHIFT:4,META:8},b={Y:89,Z:90};function w(t,e,s){return t.ctrlKey===!!(e&g.CTRL)&&t.altKey===!!(e&g.ALT)&&t.shiftKey===!!(e&g.SHIFT)&&t.metaKey===!!(e&g.META)&&t.keyCode===s}function ie(t){return w(t,g.CTRL,b.Y)||w(t,g.CTRL|g.SHIFT,b.Z)||w(t,g.META|g.SHIFT,b.Z)}function re(t){return w(t,g.CTRL,b.Z)||w(t,g.META,b.Z)}function le({value:t,selection:e},s){const[n,a]=e;if(n!==a)return[n,a];const i=s?t.slice(n).indexOf(` +`)+1||t.length:t.slice(0,a).lastIndexOf(` +`)+1;return[s?n:i,s?i:a]}function oe({value:t,selection:e},s){const[n,a]=e;return n!==a?[n,a]:(s?[n,a+1]:[n-1,a]).map(i=>Math.min(Math.max(i,0),t.length))}const ce=/\s+$/g,ue=/^\s+/g,F=/\s/;function de({value:t,selection:e},s){const[n,a]=e;if(n!==a)return[n,a];if(s){const o=t.slice(n),[c]=o.match(ue)||[""],u=o.trimStart().search(F);return[n,u!==-1?n+c.length+u:t.length]}const i=t.slice(0,a),[r]=i.match(ce)||[""],l=i.trimEnd().split("").reverse().findIndex(o=>o.match(F));return[l!==-1?a-r.length-l:0,a]}function M(t=[]){return(e,...s)=>t.reduce((n,a)=>Object.assign(Object.assign({},n),a(n,...s)),e)}function he(t,e){const s=Object.assign(Object.assign({},j),e),n=M(s.preprocessors),a=M(s.postprocessors),i=typeof t=="string"?{value:t,selection:[0,0]}:t,{elementState:r}=n({elementState:i,data:""},"validation"),l=new k(r,s),{value:o,selection:c}=a(l,i);return typeof t=="string"?o:{value:o,selection:c}}class $ extends Q{constructor(e,s){super(),this.element=e,this.maskitoOptions=s,this.isTextArea=this.element.nodeName==="TEXTAREA",this.eventListener=new ae(this.element),this.options=Object.assign(Object.assign({},j),this.maskitoOptions),this.preprocessor=M(this.options.preprocessors),this.postprocessor=M(this.options.postprocessors),this.teardowns=this.options.plugins.map(n=>n(this.element,this.options)),this.updateHistory(this.elementState),this.eventListener.listen("keydown",n=>{if(ie(n))return n.preventDefault(),this.redo();if(re(n))return n.preventDefault(),this.undo()}),this.eventListener.listen("beforeinput",n=>{var a;const i=n.inputType.includes("Forward");switch(this.updateHistory(this.elementState),n.inputType){case"historyUndo":return n.preventDefault(),this.undo();case"historyRedo":return n.preventDefault(),this.redo();case"deleteByCut":case"deleteContentBackward":case"deleteContentForward":return this.handleDelete({event:n,isForward:i,selection:oe(this.elementState,i)});case"deleteWordForward":case"deleteWordBackward":return this.handleDelete({event:n,isForward:i,selection:de(this.elementState,i),force:!0});case"deleteSoftLineBackward":case"deleteSoftLineForward":case"deleteHardLineBackward":case"deleteHardLineForward":return this.handleDelete({event:n,isForward:i,selection:le(this.elementState,i),force:!0});case"insertCompositionText":return;case"insertReplacementText":return;case"insertLineBreak":case"insertParagraph":return this.handleEnter(n);case"insertFromPaste":case"insertText":case"insertFromDrop":default:return this.handleInsert(n,n.data||((a=n.dataTransfer)===null||a===void 0?void 0:a.getData("text/plain"))||"")}}),this.eventListener.listen("input",({inputType:n})=>{n!=="insertCompositionText"&&(this.ensureValueFitsMask(),this.updateHistory(this.elementState))}),this.eventListener.listen("compositionend",()=>{this.ensureValueFitsMask(),this.updateHistory(this.elementState)})}get elementState(){const{value:e,selectionStart:s,selectionEnd:n}=this.element;return{value:e,selection:[s||0,n||0]}}get maxLength(){const{maxLength:e}=this.element;return e===-1?1/0:e}destroy(){this.eventListener.destroy(),this.teardowns.forEach(e=>e==null?void 0:e())}updateElementState({value:e,selection:s},n={inputType:"insertText",data:null}){const a=this.elementState.value;this.updateValue(e),this.updateSelectionRange(s),a!==e&&this.dispatchInputEvent(n)}updateSelectionRange([e,s]){var n;const{element:a}=this;a.matches(":focus")&&(a.selectionStart!==e||a.selectionEnd!==s)&&((n=a.setSelectionRange)===null||n===void 0||n.call(a,e,s))}updateValue(e){this.element.value=e}ensureValueFitsMask(){this.updateElementState(he(this.elementState,this.options))}dispatchInputEvent(e={inputType:"insertText",data:null}){globalThis.InputEvent&&this.element.dispatchEvent(new InputEvent("input",Object.assign(Object.assign({},e),{bubbles:!0,cancelable:!1})))}handleDelete({event:e,selection:s,isForward:n,force:a=!1}){const i={value:this.elementState.value,selection:s},[r,l]=i.selection,{elementState:o}=this.preprocessor({elementState:i,data:""},n?"deleteForward":"deleteBackward"),c=new k(o,this.options),[u,d]=o.selection;c.deleteCharacters([u,d]);const h=this.postprocessor(c,i);if(!(i.value.slice(0,r)+i.value.slice(l)===h.value&&!a&&!this.element.isContentEditable)){if(e.preventDefault(),_(i,o,c,h))return this.updateSelectionRange(n?[d,d]:[u,u]);this.updateElementState(h,{inputType:e.inputType,data:null}),this.updateHistory(h)}}handleInsert(e,s){const n=this.elementState,{elementState:a,data:i=s}=this.preprocessor({data:s,elementState:n},"insert"),r=new k(a,this.options);try{r.addCharacters(a.selection,i)}catch{return e.preventDefault()}const[l,o]=a.selection,c=n.value.slice(0,l)+s+n.value.slice(o),u=this.postprocessor(r,n);if(u.value.length>this.maxLength)return e.preventDefault();(c!==u.value||this.element.isContentEditable)&&(e.preventDefault(),this.updateElementState(u,{data:s,inputType:e.inputType}),this.updateHistory(u))}handleEnter(e){(this.isTextArea||this.element.isContentEditable)&&this.handleInsert(e,` +`)}}function pe(t,e,s){const n=Math.min(Number(s),Math.max(Number(e),Number(t)));return t instanceof Date?new Date(n):n}function me(t){return t.replaceAll(/\W/g,"").length}const B=t=>{var e,s,n;return{day:((e=t.match(/d/g))===null||e===void 0?void 0:e.length)||0,month:((s=t.match(/m/g))===null||s===void 0?void 0:s.length)||0,year:((n=t.match(/y/g))===null||n===void 0?void 0:n.length)||0}};function ve(t){return{day:String(t.getDate()).padStart(2,"0"),month:String(t.getMonth()+1).padStart(2,"0"),year:String(t.getFullYear()).padStart(4,"0"),hours:String(t.getHours()).padStart(2,"0"),minutes:String(t.getMinutes()).padStart(2,"0"),seconds:String(t.getSeconds()).padStart(2,"0"),milliseconds:String(t.getMilliseconds()).padStart(3,"0")}}function ge(t,e){return t.length!s.match(/^0+$/))}function W(t,e,s){const n=me(e);return t.replace(s,"").match(new RegExp(`(\\D*\\d[^\\d\\s]*){1,${n}}`,"g"))||[]}function L(t,e){const s=e.replaceAll(/[^dmy]/g,""),n=t.replaceAll(/\D+/g,""),a={day:n.slice(s.indexOf("d"),s.lastIndexOf("d")+1),month:n.slice(s.indexOf("m"),s.lastIndexOf("m")+1),year:n.slice(s.indexOf("y"),s.lastIndexOf("y")+1)};return Object.fromEntries(Object.entries(a).filter(([i,r])=>!!r).sort(([i],[r])=>e.toLowerCase().indexOf(i[0])>e.toLowerCase().indexOf(r[0])?1:-1))}function fe(t,e){var s,n,a,i,r,l,o;const c=((s=t.year)===null||s===void 0?void 0:s.length)===2?`20${t.year}`:t.year,u=new Date(Number(c??"0"),Number((n=t.month)!==null&&n!==void 0?n:"1")-1,Number((a=t.day)!==null&&a!==void 0?a:"1"),Number((i=void 0)!==null&&i!==void 0?i:"0"),Number((r=void 0)!==null&&r!==void 0?r:"0"),Number((l=void 0)!==null&&l!==void 0?l:"0"),Number((o=void 0)!==null&&o!==void 0?o:"0"));return u.setFullYear(Number(c??"0")),u}const V=", ";function E({day:t,month:e,year:s,hours:n,minutes:a,seconds:i,milliseconds:r},{dateMode:l,dateTimeSeparator:o=V,timeMode:c}){var u;const d=((u=l.match(/y/g))===null||u===void 0?void 0:u.length)===2?s==null?void 0:s.slice(-2):s;return(l+(c?o+c:"")).replaceAll(/d+/g,t??"").replaceAll(/m+/g,e??"").replaceAll(/y+/g,d??"").replaceAll(/H+/g,n??"").replaceAll("MSS",r??"").replaceAll(/M+/g,a??"").replaceAll(/S+/g,i??"").replaceAll(/^\D+/g,"").replaceAll(/\D+$/g,"")}const Z={day:31,month:12,year:9999},Se=new Date("0001-01-01"),ye=new Date("9999-12-31"),be=[":","."];function we({dateString:t,dateModeTemplate:e,dateSegmentsSeparator:s,offset:n,selection:[a,i]}){const r=L(t,e),l=Object.entries(r),o={};for(const[d,h]of l){const m=E(o,{dateMode:e}),y=Z[d],f=m.length&&s.length,v=n+m.length+f+B(e)[d],S=v>=a&&v===i;if(S&&Number(h)>Number(y))return{validatedDateString:"",updatedSelection:[a,i]};if(S&&Number(h)<1)return{validatedDateString:"",updatedSelection:[a,i]};o[d]=h}const c=E(o,{dateMode:e}),u=c.length-t.length;return{validatedDateString:c,updatedSelection:[a+u,i+u]}}const Y=/[\\^$.*+?()[\]{}|]/g,Ee=new RegExp(Y.source);function q(t){return t&&Ee.test(t)?t.replaceAll(Y,"\\$&"):t}function D(t,e,s=0){return Number(t.padEnd(e.length,"0"))<=Number(e)?{validatedSegmentValue:t,prefixedZeroesCount:s}:t.endsWith("0")?D(`0${t.slice(0,e.length-1)}`,e,s+1):D(`${t.slice(0,e.length-1)}0`,e,s)}function I(t){return t.replaceAll(/[0-9]/g,e=>String.fromCharCode(e.charCodeAt(0)-65248))}function xe({dateModeTemplate:t,dateSegmentSeparator:e,splitFn:s,uniteFn:n}){return({value:a,selection:i})=>{var r;const[l,o]=i,{dateStrings:c,restPart:u=""}=s(a),d=[];let h=0;c.forEach(y=>{const f=L(y,t),v=Object.entries(f).reduce((S,[x,P])=>{const{validatedSegmentValue:U,prefixedZeroesCount:X}=D(P,`${Z[x]}`);return h+=X,Object.assign(Object.assign({},S),{[x]:U})},{});d.push(E(v,{dateMode:t}))});const m=n(d,a)+(!((r=c[c.length-1])===null||r===void 0)&&r.endsWith(e)?e:"")+u;return h&&m.slice(o+h,o+h+e.length)===e&&(h+=e.length),{selection:[l+h,o+h],value:m}}}function Te(){return({elementState:t,data:e})=>{const{value:s,selection:n}=t;return{elementState:{selection:n,value:I(s)},data:I(e)}}}function Me(t,e){const s=B(e);return Object.fromEntries(Object.entries(t).map(([n,a])=>{const i=s[n];return[n,a.length===i&&a.match(/^0+$/)?"1".padStart(i,"0"):a]}))}function Ae({dateModeTemplate:t,min:e=Se,max:s=ye,rangeSeparator:n="",dateSegmentSeparator:a="."}){return({value:i,selection:r})=>{const l=n&&i.endsWith(n),o=W(i,t,n);let c="";for(const u of o){c+=c?n:"";const d=L(u,t);if(!ge(u,t)){const y=Me(d,t),f=E(y,{dateMode:t}),v=u.endsWith(a)?a:"";c+=f+v;continue}const h=fe(d),m=pe(h,e,s);c+=E(ve(m),{dateMode:t})}return{selection:r,value:c+(l?n:"")}}}function $e({dateModeTemplate:t,dateSegmentsSeparator:e,rangeSeparator:s="",dateTimeSeparator:n=V}){return({elementState:a,data:i})=>{const r=s?new RegExp(`${s}|-`):n,l=i.split(r),o=i.includes(n)?[l[0]]:l;if(o.every(c=>c.trim().split(/\D/).filter(Boolean).length===t.split(e).length)){const c=o.map(u=>ke(u,t,e)).join(s);return{elementState:a,data:`${c}${i.includes(n)&&n+l[1]||""}`}}return{elementState:a,data:i}}}function ke(t,e,s){const n=t.split(/\D/).filter(Boolean),a=e.split(s);return n.map((i,r)=>r===a.length-1?i:i.padStart(a[r].length,"0")).join(s)}function De({dateModeTemplate:t,dateSegmentsSeparator:e,rangeSeparator:s=""}){return({elementState:n,data:a})=>{const{value:i,selection:r}=n;if(a===e)return{elementState:n,data:r[0]===i.length?a:""};const l=a.replaceAll(new RegExp(`[^\\d${q(e)}${s}]`,"g"),"");if(!l)return{elementState:n,data:""};const[o,c]=r;let u=c+a.length;const d=i.slice(0,o)+l+i.slice(u),h=W(d,t,s);let m="";const y=!!s&&d.includes(s);for(const v of h){const{validatedDateString:S,updatedSelection:x}=we({dateString:v,dateModeTemplate:t,dateSegmentsSeparator:e,offset:m.length,selection:[o,u]});if(v&&!S)return{elementState:n,data:""};u=x[1],m+=y&&!m?S+s:S}const f=m.slice(o,u);return{elementState:{selection:r,value:m.slice(0,o)+f.split(e).map(v=>"0".repeat(v.length)).join(e)+m.slice(u)},data:f}}}function Oe(){return({elementState:t},e)=>{const{value:s,selection:n}=t;if(!s||je(s,n))return{elementState:t};const[a,i]=n,r=s.slice(a,i).replaceAll(/\d/g,"0"),l=s.slice(0,a)+r+s.slice(i);return e==="validation"||e==="insert"&&a===i?{elementState:{selection:n,value:l}}:{elementState:{selection:e==="deleteBackward"||e==="insert"?[a,a]:[i,i],value:l}}}}function je(t,[e,s]){return s===t.length}function Le({mode:t,separator:e=".",max:s,min:n}){const a=t.split("/").join(e);return Object.assign(Object.assign({},j),{mask:Array.from(a).map(i=>e.includes(i)?i:/\d/),overwriteMode:"replace",preprocessors:[Te(),Oe(),$e({dateModeTemplate:a,dateSegmentsSeparator:e}),De({dateModeTemplate:a,dateSegmentsSeparator:e})],postprocessors:[xe({dateModeTemplate:a,dateSegmentSeparator:e,splitFn:i=>({dateStrings:[i]}),uniteFn:([i])=>i}),Ae({min:n,max:s,dateModeTemplate:a,dateSegmentSeparator:e})]})}new RegExp(`[${be.map(q).join("")}]$`);const Ce=/^(?:\d{4}[ -]?){0,3}\d{0,4}$/,p={visa:{final:/^4(?:\d{3}[- ]?){3}\d{3,4}$/,start:/^4/,length:/^4\d{0,15}$/},mastercard:{final:/^5[1-5]\d{3}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}$/,start:/^5[1-5]/,length:/^5[1-5]\d{0,15}$/},amex:{final:/^3[47]\d{2}[- ]?\d{6}[- ]?\d{5}$/,start:/^3[47]/,length:/^3[47]\d{0,15}$/},discover:{final:/^(6011|65|64[4-9])\d{4}[- ]?\d{4}[- ]?\d{4}$/,start:/^(6011|65|64[4-9])/,length:/^(6011|65|64[4-9])\d{0,15}$/},diners:{final:/^(30[0-5]|36|38|39)\d{4}[- ]?\d{4}[- ]?\d{4}$/,start:/^(30[0-5]|36|38|39)/,length:/^(30[0-5]|36|38|39)\d{0,14}$/},jcb:{final:/^(2131|1800|35[0-9]{3})\d{4}[- ]?\d{4}[- ]?\d{4}$/,start:/^(2131|1800|35[0-9]{3})/,length:/^(2131|1800|35[0-9]{3})\d{0,15}$/}};var O,K;class Re{constructor(e){G(this,O),this.options=e}mount(){return this.number=this.options.fields.card.number instanceof HTMLInputElement?this.options.fields.card.number:document.querySelector(this.options.fields.card.number),this.date=this.options.fields.card.date instanceof HTMLInputElement?this.options.fields.card.date:document.querySelector(this.options.fields.card.date),this.cvv=this.options.fields.card.cvv instanceof HTMLInputElement?this.options.fields.card.cvv:document.querySelector(this.options.fields.card.cvv),J(this,O,K).call(this),this}check(){const e=p.visa.final.test(this.number.value)||p.mastercard.final.test(this.number.value)||p.amex.final.test(this.number.value)||p.discover.final.test(this.number.value)||p.diners.final.test(this.number.value)||p.jcb.final.test(this.number.value),s=new RegExp("^(0[1-9]|1[0-2])/(?:\\d{2})$").test(this.date.value),n=new RegExp("^\\d{3}$").test(this.cvv.value);return{valid:e&&s&&n,number:{valid:e,value:this.number.value},date:{valid:s,value:this.date.value},cvv:{valid:n,value:this.cvv.value}}}type(){return p.visa.start.test(this.number.value)?"visa":p.mastercard.start.test(this.number.value)?"mastercard":p.amex.start.test(this.number.value)?"amex":p.discover.start.test(this.number.value)?"discover":p.diners.start.test(this.number.value)?"diners":p.jcb.start.test(this.number.value)?"jcb":"unknown"}value(e){if(e==="number")return this.number.value;if(e==="date")return this.date.value;if(e==="year"){const[,s]=this.date.value.split("/");return s}if(e==="month"){const[s]=this.date.value.split("/");return s}return e==="cvv"?this.cvv.value:null}}O=new WeakSet,K=function(){new $(this.number,{mask:t=>p.visa.start.test(t.value)?new RegExp(p.visa.length):p.mastercard.start.test(t.value)?new RegExp(p.mastercard.length):p.amex.start.test(t.value)?new RegExp(p.amex.length):p.discover.start.test(t.value)?new RegExp(p.discover.length):p.diners.start.test(t.value)?new RegExp(p.diners.length):p.jcb.start.test(t.value)?new RegExp(p.jcb.length):new RegExp(Ce)}),new $(this.date,Le({mode:"mm/yy",separator:"/"})),new $(this.cvv,{mask:[/\d/,/\d/,/\d/]})};export{Re as $}; diff --git a/public/build/assets/square-credit-card-83a3d702.js b/public/build/assets/square-credit-card-2fc5c3fa.js similarity index 98% rename from public/build/assets/square-credit-card-83a3d702.js rename to public/build/assets/square-credit-card-2fc5c3fa.js index 6461fea4dee5..fdd7554e820d 100644 --- a/public/build/assets/square-credit-card-83a3d702.js +++ b/public/build/assets/square-credit-card-2fc5c3fa.js @@ -1,4 +1,4 @@ -import{i,w as d}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{i,w as d}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-ach-pay-0bf320bd.js b/public/build/assets/stripe-ach-pay-22d14901.js similarity index 98% rename from public/build/assets/stripe-ach-pay-0bf320bd.js rename to public/build/assets/stripe-ach-pay-22d14901.js index 5175db958573..afc3ee0a621e 100644 --- a/public/build/assets/stripe-ach-pay-0bf320bd.js +++ b/public/build/assets/stripe-ach-pay-22d14901.js @@ -1,4 +1,4 @@ -import{w as g}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{w as g}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-acss-dd3e9f85.js b/public/build/assets/stripe-acss-1184fda8.js similarity index 96% rename from public/build/assets/stripe-acss-dd3e9f85.js rename to public/build/assets/stripe-acss-1184fda8.js index 592f90e653e1..be35b4d809df 100644 --- a/public/build/assets/stripe-acss-dd3e9f85.js +++ b/public/build/assets/stripe-acss-1184fda8.js @@ -1,4 +1,4 @@ -var d=Object.defineProperty;var c=(o,e,t)=>e in o?d(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var a=(o,e,t)=>(c(o,typeof e!="symbol"?e+"":e,t),t);import{i,w as l}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var d=Object.defineProperty;var c=(o,e,t)=>e in o?d(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var a=(o,e,t)=>(c(o,typeof e!="symbol"?e+"":e,t),t);import{i,w as l}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-alipay-4a3641d0.js b/public/build/assets/stripe-alipay-1457b63d.js similarity index 97% rename from public/build/assets/stripe-alipay-4a3641d0.js rename to public/build/assets/stripe-alipay-1457b63d.js index b2c9cc62ab46..6e1ebe2832ec 100644 --- a/public/build/assets/stripe-alipay-4a3641d0.js +++ b/public/build/assets/stripe-alipay-1457b63d.js @@ -1,4 +1,4 @@ -var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(c(n,typeof e!="symbol"?e+"":e,t),t);import{i as a,w as d}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(c(n,typeof e!="symbol"?e+"":e,t),t);import{i as a,w as d}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-bacs-7ec06b1d.js b/public/build/assets/stripe-bacs-c9a61b93.js similarity index 97% rename from public/build/assets/stripe-bacs-7ec06b1d.js rename to public/build/assets/stripe-bacs-c9a61b93.js index d24ce168057b..bce69d1e56bd 100644 --- a/public/build/assets/stripe-bacs-7ec06b1d.js +++ b/public/build/assets/stripe-bacs-c9a61b93.js @@ -1,4 +1,4 @@ -var a=Object.defineProperty;var c=(n,e,t)=>e in n?a(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>(c(n,typeof e!="symbol"?e+"":e,t),t);import{i as d,w as u}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var a=Object.defineProperty;var c=(n,e,t)=>e in n?a(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>(c(n,typeof e!="symbol"?e+"":e,t),t);import{i as d,w as u}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-bancontact-93a0a43b.js b/public/build/assets/stripe-bancontact-4a0d7a40.js similarity index 93% rename from public/build/assets/stripe-bancontact-93a0a43b.js rename to public/build/assets/stripe-bancontact-4a0d7a40.js index 4bf04c1d3792..bb49bc04a6b9 100644 --- a/public/build/assets/stripe-bancontact-93a0a43b.js +++ b/public/build/assets/stripe-bancontact-4a0d7a40.js @@ -1,4 +1,4 @@ -var s=Object.defineProperty;var a=(n,t,e)=>t in n?s(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var r=(n,t,e)=>(a(n,typeof t!="symbol"?t+"":t,e),e);import{i,w as m}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var s=Object.defineProperty;var a=(n,t,e)=>t in n?s(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var r=(n,t,e)=>(a(n,typeof t!="symbol"?t+"":t,e),e);import{i,w as m}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-bank-transfer-c3e1a9c7.js b/public/build/assets/stripe-bank-transfer-4ab58b35.js similarity index 95% rename from public/build/assets/stripe-bank-transfer-c3e1a9c7.js rename to public/build/assets/stripe-bank-transfer-4ab58b35.js index 77fe60396cc1..c723f15b55f7 100644 --- a/public/build/assets/stripe-bank-transfer-c3e1a9c7.js +++ b/public/build/assets/stripe-bank-transfer-4ab58b35.js @@ -1,4 +1,4 @@ -import{i as p,w as y}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{i as p,w as y}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-becs-d51dcef6.js b/public/build/assets/stripe-becs-483b1b23.js similarity index 96% rename from public/build/assets/stripe-becs-d51dcef6.js rename to public/build/assets/stripe-becs-483b1b23.js index a0590a8c600e..25f64659c544 100644 --- a/public/build/assets/stripe-becs-d51dcef6.js +++ b/public/build/assets/stripe-becs-483b1b23.js @@ -1,4 +1,4 @@ -var c=Object.defineProperty;var r=(n,t,e)=>t in n?c(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var o=(n,t,e)=>(r(n,typeof t!="symbol"?t+"":t,e),e);import{i,w as d}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var c=Object.defineProperty;var r=(n,t,e)=>t in n?c(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var o=(n,t,e)=>(r(n,typeof t!="symbol"?t+"":t,e),e);import{i,w as d}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-browserpay-81063a43.js b/public/build/assets/stripe-browserpay-c23582f0.js similarity index 97% rename from public/build/assets/stripe-browserpay-81063a43.js rename to public/build/assets/stripe-browserpay-c23582f0.js index 128053991530..f0952ba0e348 100644 --- a/public/build/assets/stripe-browserpay-81063a43.js +++ b/public/build/assets/stripe-browserpay-c23582f0.js @@ -1,4 +1,4 @@ -import{i as o,w as i}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{i as o,w as i}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-credit-card-843d7cd3.js b/public/build/assets/stripe-credit-card-5487be17.js similarity index 98% rename from public/build/assets/stripe-credit-card-843d7cd3.js rename to public/build/assets/stripe-credit-card-5487be17.js index b01af7f0b1fe..ffbeb08332ea 100644 --- a/public/build/assets/stripe-credit-card-843d7cd3.js +++ b/public/build/assets/stripe-credit-card-5487be17.js @@ -1,4 +1,4 @@ -import{i as c,w as u}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +import{i as c,w as u}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-eps-d5e8f1b5.js b/public/build/assets/stripe-eps-0c461508.js similarity index 97% rename from public/build/assets/stripe-eps-d5e8f1b5.js rename to public/build/assets/stripe-eps-0c461508.js index 70cb7aef5cf3..e6670bf79fac 100644 --- a/public/build/assets/stripe-eps-d5e8f1b5.js +++ b/public/build/assets/stripe-eps-0c461508.js @@ -1,4 +1,4 @@ -var i=Object.defineProperty;var a=(n,t,e)=>t in n?i(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var s=(n,t,e)=>(a(n,typeof t!="symbol"?t+"":t,e),e);import{i as c,w as l}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var i=Object.defineProperty;var a=(n,t,e)=>t in n?i(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var s=(n,t,e)=>(a(n,typeof t!="symbol"?t+"":t,e),e);import{i as c,w as l}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-fpx-e978b36a.js b/public/build/assets/stripe-fpx-c82fd7dc.js similarity index 97% rename from public/build/assets/stripe-fpx-e978b36a.js rename to public/build/assets/stripe-fpx-c82fd7dc.js index 0392fdec00c7..f3a37d114281 100644 --- a/public/build/assets/stripe-fpx-e978b36a.js +++ b/public/build/assets/stripe-fpx-c82fd7dc.js @@ -1,4 +1,4 @@ -var i=Object.defineProperty;var a=(n,t,e)=>t in n?i(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var s=(n,t,e)=>(a(n,typeof t!="symbol"?t+"":t,e),e);import{i as c,w as d}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var i=Object.defineProperty;var a=(n,t,e)=>t in n?i(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var s=(n,t,e)=>(a(n,typeof t!="symbol"?t+"":t,e),e);import{i as c,w as d}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-giropay-f7afcb25.js b/public/build/assets/stripe-giropay-aedb4a64.js similarity index 97% rename from public/build/assets/stripe-giropay-f7afcb25.js rename to public/build/assets/stripe-giropay-aedb4a64.js index 5d8cf1b1c752..e9eb2a9a92b4 100644 --- a/public/build/assets/stripe-giropay-f7afcb25.js +++ b/public/build/assets/stripe-giropay-aedb4a64.js @@ -1,4 +1,4 @@ -var i=Object.defineProperty;var c=(n,t,e)=>t in n?i(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var r=(n,t,e)=>(c(n,typeof t!="symbol"?t+"":t,e),e);import{i as a,w as m}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var i=Object.defineProperty;var c=(n,t,e)=>t in n?i(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var r=(n,t,e)=>(c(n,typeof t!="symbol"?t+"":t,e),e);import{i as a,w as m}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-ideal-3e3b3e7b.js b/public/build/assets/stripe-ideal-95836518.js similarity index 97% rename from public/build/assets/stripe-ideal-3e3b3e7b.js rename to public/build/assets/stripe-ideal-95836518.js index f60290b3cb75..cd679e943098 100644 --- a/public/build/assets/stripe-ideal-3e3b3e7b.js +++ b/public/build/assets/stripe-ideal-95836518.js @@ -1,4 +1,4 @@ -var s=Object.defineProperty;var a=(n,t,e)=>t in n?s(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var r=(n,t,e)=>(a(n,typeof t!="symbol"?t+"":t,e),e);import{i as l,w as c}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var s=Object.defineProperty;var a=(n,t,e)=>t in n?s(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var r=(n,t,e)=>(a(n,typeof t!="symbol"?t+"":t,e),e);import{i as l,w as c}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-klarna-87356b3c.js b/public/build/assets/stripe-klarna-93dcc6f1.js similarity index 98% rename from public/build/assets/stripe-klarna-87356b3c.js rename to public/build/assets/stripe-klarna-93dcc6f1.js index 496b0484f2c9..23d5443b5d68 100644 --- a/public/build/assets/stripe-klarna-87356b3c.js +++ b/public/build/assets/stripe-klarna-93dcc6f1.js @@ -1,4 +1,4 @@ -var c=Object.defineProperty;var m=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var o=(n,e,t)=>(m(n,typeof e!="symbol"?e+"":e,t),t);import{i as d,w as i}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var c=Object.defineProperty;var m=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var o=(n,e,t)=>(m(n,typeof e!="symbol"?e+"":e,t),t);import{i as d,w as i}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-przelewy24-a6eaf471.js b/public/build/assets/stripe-przelewy24-5db060c5.js similarity index 98% rename from public/build/assets/stripe-przelewy24-a6eaf471.js rename to public/build/assets/stripe-przelewy24-5db060c5.js index d06e610850d6..5318ae19a96a 100644 --- a/public/build/assets/stripe-przelewy24-a6eaf471.js +++ b/public/build/assets/stripe-przelewy24-5db060c5.js @@ -1,4 +1,4 @@ -var c=Object.defineProperty;var s=(n,t,e)=>t in n?c(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var o=(n,t,e)=>(s(n,typeof t!="symbol"?t+"":t,e),e);import{i as d,w as m}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var c=Object.defineProperty;var s=(n,t,e)=>t in n?c(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var o=(n,t,e)=>(s(n,typeof t!="symbol"?t+"":t,e),e);import{i as d,w as m}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-sepa-ac6623b2.js b/public/build/assets/stripe-sepa-9ab85221.js similarity index 97% rename from public/build/assets/stripe-sepa-ac6623b2.js rename to public/build/assets/stripe-sepa-9ab85221.js index 12f6c59569b1..839c8a8ccc33 100644 --- a/public/build/assets/stripe-sepa-ac6623b2.js +++ b/public/build/assets/stripe-sepa-9ab85221.js @@ -1,4 +1,4 @@ -var s=Object.defineProperty;var c=(a,e,t)=>e in a?s(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var o=(a,e,t)=>(c(a,typeof e!="symbol"?e+"":e,t),t);import{i,w as l}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var s=Object.defineProperty;var c=(a,e,t)=>e in a?s(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var o=(a,e,t)=>(c(a,typeof e!="symbol"?e+"":e,t),t);import{i,w as l}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/stripe-sofort-ac0f4ccf.js b/public/build/assets/stripe-sofort-fbef42bb.js similarity index 96% rename from public/build/assets/stripe-sofort-ac0f4ccf.js rename to public/build/assets/stripe-sofort-fbef42bb.js index a82c71ecac7f..a43c308c4190 100644 --- a/public/build/assets/stripe-sofort-ac0f4ccf.js +++ b/public/build/assets/stripe-sofort-fbef42bb.js @@ -1,4 +1,4 @@ -var c=Object.defineProperty;var i=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(i(n,typeof e!="symbol"?e+"":e,t),t);import{i as a,w as u}from"./authorize-credit-card-payment-bd9c9d4d.js";/** +var c=Object.defineProperty;var i=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(i(n,typeof e!="symbol"?e+"":e,t),t);import{i as a,w as u}from"./wait-8f4ae121.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository diff --git a/public/build/assets/wait-8f4ae121.js b/public/build/assets/wait-8f4ae121.js new file mode 100644 index 000000000000..ec3d03b10652 --- /dev/null +++ b/public/build/assets/wait-8f4ae121.js @@ -0,0 +1,9 @@ +/** + * Invoice Ninja (https://invoiceninja.com). + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */function i(...e){return new Promise(n=>{if(!e.length){n([]);return}const r=e.map(t=>document.querySelector(t)).filter(Boolean);if(r.length===e.length){n(r);return}const o=new MutationObserver(()=>{const t=e.map(u=>document.querySelector(u)).filter(Boolean);t.length===e.length&&(o.disconnect(),n(t))});o.observe(document.body,{childList:!0,subtree:!0})})}function a(){const e=document.querySelector('meta[name="instant-payment"]');return!!(e&&e instanceof HTMLMetaElement&&e.content==="yes")}export{a as i,i as w}; diff --git a/public/build/manifest.json b/public/build/manifest.json index 2d09a54d72c8..5ceceae721c7 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -8,8 +8,14 @@ "__commonjsHelpers-725317a4.js" ] }, + "_simple-card-4314d842.js": { + "file": "assets/simple-card-4314d842.js" + }, + "_wait-8f4ae121.js": { + "file": "assets/wait-8f4ae121.js" + }, "resources/js/app.js": { - "file": "assets/app-234e3402.js", + "file": "assets/app-c51a8745.js", "imports": [ "_index-08e160a7.js", "__commonjsHelpers-725317a4.js" @@ -46,9 +52,9 @@ "src": "resources/js/clients/payment_methods/authorize-checkout-card.js" }, "resources/js/clients/payment_methods/authorize-stripe-acss.js": { - "file": "assets/authorize-stripe-acss-6fe37711.js", + "file": "assets/authorize-stripe-acss-f6bd46c1.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payment_methods/authorize-stripe-acss.js" @@ -64,52 +70,57 @@ "src": "resources/js/clients/payment_methods/wepay-bank-account.js" }, "resources/js/clients/payments/authorize-credit-card-payment.js": { - "file": "assets/authorize-credit-card-payment-bd9c9d4d.js", + "file": "assets/authorize-credit-card-payment-f92567bc.js", + "imports": [ + "_simple-card-4314d842.js", + "_wait-8f4ae121.js" + ], "isEntry": true, "src": "resources/js/clients/payments/authorize-credit-card-payment.js" }, "resources/js/clients/payments/braintree-credit-card.js": { - "file": "assets/braintree-credit-card-c80deaab.js", + "file": "assets/braintree-credit-card-60bd8878.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/braintree-credit-card.js" }, "resources/js/clients/payments/braintree-paypal.js": { - "file": "assets/braintree-paypal-cf71d092.js", + "file": "assets/braintree-paypal-16e2f577.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/braintree-paypal.js" }, "resources/js/clients/payments/checkout-credit-card.js": { - "file": "assets/checkout-credit-card-5435b293.js", + "file": "assets/checkout-credit-card-eba516f2.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/checkout-credit-card.js" }, "resources/js/clients/payments/eway-credit-card.js": { - "file": "assets/eway-credit-card-319ea034.js", + "file": "assets/eway-credit-card-0119725d.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/eway-credit-card.js" }, "resources/js/clients/payments/forte-ach-payment.js": { - "file": "assets/forte-ach-payment-f051a883.js", + "file": "assets/forte-ach-payment-546428ee.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/forte-ach-payment.js" }, "resources/js/clients/payments/forte-credit-card-payment.js": { <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD "file": "assets/forte-credit-card-payment-7bb15431.js", ======= @@ -117,49 +128,53 @@ ======= "file": "assets/forte-credit-card-payment-5485d5f0.js", >>>>>>> 044b4bce72 (Fixes for Forte & Authorize.net (#83)) +======= + "file": "assets/forte-credit-card-payment-3ff75b59.js", +>>>>>>> 3d69a0b88c (Apply Livewire patch to load assets async (#85)) "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js", + "_simple-card-4314d842.js" ], >>>>>>> fb57d4d9de (Improve new flow) "isEntry": true, "src": "resources/js/clients/payments/forte-credit-card-payment.js" }, "resources/js/clients/payments/mollie-credit-card.js": { - "file": "assets/mollie-credit-card-e1abdd68.js", + "file": "assets/mollie-credit-card-d81afbd4.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/mollie-credit-card.js" }, "resources/js/clients/payments/paytrace-credit-card.js": { - "file": "assets/paytrace-credit-card-f4dfde84.js", + "file": "assets/paytrace-credit-card-7f87b811.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/paytrace-credit-card.js" }, "resources/js/clients/payments/razorpay-aio.js": { - "file": "assets/razorpay-aio-d613afa9.js", + "file": "assets/razorpay-aio-f8e8c7f0.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/razorpay-aio.js" }, "resources/js/clients/payments/square-credit-card.js": { - "file": "assets/square-credit-card-83a3d702.js", + "file": "assets/square-credit-card-2fc5c3fa.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/square-credit-card.js" }, "resources/js/clients/payments/stripe-ach-pay.js": { - "file": "assets/stripe-ach-pay-0bf320bd.js", + "file": "assets/stripe-ach-pay-22d14901.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-ach-pay.js" @@ -170,129 +185,129 @@ "src": "resources/js/clients/payments/stripe-ach.js" }, "resources/js/clients/payments/stripe-acss.js": { - "file": "assets/stripe-acss-dd3e9f85.js", + "file": "assets/stripe-acss-1184fda8.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-acss.js" }, "resources/js/clients/payments/stripe-alipay.js": { - "file": "assets/stripe-alipay-4a3641d0.js", + "file": "assets/stripe-alipay-1457b63d.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-alipay.js" }, "resources/js/clients/payments/stripe-bacs.js": { - "file": "assets/stripe-bacs-7ec06b1d.js", + "file": "assets/stripe-bacs-c9a61b93.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-bacs.js" }, "resources/js/clients/payments/stripe-bancontact.js": { - "file": "assets/stripe-bancontact-93a0a43b.js", + "file": "assets/stripe-bancontact-4a0d7a40.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-bancontact.js" }, "resources/js/clients/payments/stripe-bank-transfer.js": { - "file": "assets/stripe-bank-transfer-c3e1a9c7.js", + "file": "assets/stripe-bank-transfer-4ab58b35.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-bank-transfer.js" }, "resources/js/clients/payments/stripe-becs.js": { - "file": "assets/stripe-becs-d51dcef6.js", + "file": "assets/stripe-becs-483b1b23.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-becs.js" }, "resources/js/clients/payments/stripe-browserpay.js": { - "file": "assets/stripe-browserpay-81063a43.js", + "file": "assets/stripe-browserpay-c23582f0.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-browserpay.js" }, "resources/js/clients/payments/stripe-credit-card.js": { - "file": "assets/stripe-credit-card-843d7cd3.js", + "file": "assets/stripe-credit-card-5487be17.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-credit-card.js" }, "resources/js/clients/payments/stripe-eps.js": { - "file": "assets/stripe-eps-d5e8f1b5.js", + "file": "assets/stripe-eps-0c461508.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-eps.js" }, "resources/js/clients/payments/stripe-fpx.js": { - "file": "assets/stripe-fpx-e978b36a.js", + "file": "assets/stripe-fpx-c82fd7dc.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-fpx.js" }, "resources/js/clients/payments/stripe-giropay.js": { - "file": "assets/stripe-giropay-f7afcb25.js", + "file": "assets/stripe-giropay-aedb4a64.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-giropay.js" }, "resources/js/clients/payments/stripe-ideal.js": { - "file": "assets/stripe-ideal-3e3b3e7b.js", + "file": "assets/stripe-ideal-95836518.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-ideal.js" }, "resources/js/clients/payments/stripe-klarna.js": { - "file": "assets/stripe-klarna-87356b3c.js", + "file": "assets/stripe-klarna-93dcc6f1.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-klarna.js" }, "resources/js/clients/payments/stripe-przelewy24.js": { - "file": "assets/stripe-przelewy24-a6eaf471.js", + "file": "assets/stripe-przelewy24-5db060c5.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-przelewy24.js" }, "resources/js/clients/payments/stripe-sepa.js": { - "file": "assets/stripe-sepa-ac6623b2.js", + "file": "assets/stripe-sepa-9ab85221.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-sepa.js" }, "resources/js/clients/payments/stripe-sofort.js": { - "file": "assets/stripe-sofort-ac0f4ccf.js", + "file": "assets/stripe-sofort-fbef42bb.js", "imports": [ - "resources/js/clients/payments/authorize-credit-card-payment.js" + "_wait-8f4ae121.js" ], "isEntry": true, "src": "resources/js/clients/payments/stripe-sofort.js" diff --git a/resources/js/app.js b/resources/js/app.js index 6b4b70fcae1a..0fbca4508eb5 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -10,7 +10,7 @@ import axios from 'axios'; import cardValidator from 'card-validator'; -import { Livewire, Alpine } from '../../vendor/livewire/livewire/dist/livewire.esm'; +import { Livewire, Alpine } from './livewire_temp.esm'; Livewire.start() window.axios = axios; diff --git a/resources/js/livewire_temp.esm.js b/resources/js/livewire_temp.esm.js new file mode 100644 index 000000000000..ac2eb160d30b --- /dev/null +++ b/resources/js/livewire_temp.esm.js @@ -0,0 +1,10787 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); + +// ../alpine/packages/alpinejs/dist/module.cjs.js +var require_module_cjs = __commonJS({ + "../alpine/packages/alpinejs/dist/module.cjs.js"(exports, module) { + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __commonJS2 = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }; + var __export = (target, all2) => { + for (var name in all2) + __defProp2(target, name, { get: all2[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, mod)); + var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var require_shared_cjs = __commonJS2({ + "node_modules/@vue/shared/dist/shared.cjs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function makeMap(str, expectsLowerCase) { + const map = /* @__PURE__ */ Object.create(null); + const list = str.split(","); + for (let i = 0; i < list.length; i++) { + map[list[i]] = true; + } + return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val]; + } + var PatchFlagNames = { + [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` + }; + var slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" + }; + var GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"; + var isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED); + var range = 2; + function generateCodeFrame(source, start22 = 0, end = source.length) { + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start22) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) + continue; + const line = j + 1; + res.push(`${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start22 - (count - (lineLength + newLineSeqLength)); + const length = Math.max(1, end > count ? lineLength - pad : end - start22); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); + } + var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; + var isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); + var isBooleanAttr2 = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`); + var unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; + var attrValidationCache = {}; + function isSSRSafeAttrName(name) { + if (attrValidationCache.hasOwnProperty(name)) { + return attrValidationCache[name]; + } + const isUnsafe = unsafeAttrCharRE.test(name); + if (isUnsafe) { + console.error(`unsafe attribute name: ${name}`); + } + return attrValidationCache[name] = !isUnsafe; + } + var propsToAttrMap = { + acceptCharset: "accept-charset", + className: "class", + htmlFor: "for", + httpEquiv: "http-equiv" + }; + var isNoUnitNumericStyleProp = /* @__PURE__ */ makeMap(`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`); + var isKnownAttr = /* @__PURE__ */ makeMap(`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 normalizeStyle(value) { + if (isArray2(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = normalizeStyle(isString(item) ? parseStringStyle(item) : item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isObject2(value)) { + return value; + } + } + var listDelimiterRE = /;(?![^(]*\))/g; + var propertyDelimiterRE = /:(.+)/; + function parseStringStyle(cssText) { + const ret = {}; + cssText.split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; + } + function stringifyStyle(styles) { + let ret = ""; + if (!styles) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString(value) || typeof value === "number" && isNoUnitNumericStyleProp(normalizedKey)) { + ret += `${normalizedKey}:${value};`; + } + } + return ret; + } + function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray2(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject2(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); + } + var HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; + var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; + var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; + var isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); + var isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); + var isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + var escapeRE = /["'&<>]/; + function escapeHtml(string) { + const str = "" + string; + const match = escapeRE.exec(str); + if (!match) { + return str; + } + let html = ""; + let escaped; + let index; + let lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escaped = """; + break; + case 38: + escaped = "&"; + break; + case 39: + escaped = "'"; + break; + case 60: + escaped = "<"; + break; + case 62: + escaped = ">"; + break; + default: + continue; + } + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + lastIndex = index + 1; + html += escaped; + } + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; + } + var commentStripRE = /^-?>||--!>| looseEqual(item, val)); + } + var toDisplayString = (val) => { + return val == null ? "" : isObject2(val) ? JSON.stringify(val, replacer, 2) : String(val); + }; + var replacer = (_key, val) => { + if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => { + entries[`${key} =>`] = val2; + return entries; + }, {}) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()] + }; + } else if (isObject2(val) && !isArray2(val) && !isPlainObject(val)) { + return String(val); + } + return val; + }; + var babelParserDefaultPlugins = [ + "bigInt", + "optionalChaining", + "nullishCoalescingOperator" + ]; + var EMPTY_OBJ = Object.freeze({}); + var EMPTY_ARR = Object.freeze([]); + var NOOP = () => { + }; + var NO = () => false; + var onRE = /^on[^a-z]/; + var isOn = (key) => onRE.test(key); + var isModelListener = (key) => key.startsWith("onUpdate:"); + var extend = Object.assign; + var remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } + }; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwn = (val, key) => hasOwnProperty.call(val, key); + var isArray2 = Array.isArray; + var isMap = (val) => toTypeString(val) === "[object Map]"; + var isSet = (val) => toTypeString(val) === "[object Set]"; + var isDate = (val) => val instanceof Date; + var isFunction2 = (val) => typeof val === "function"; + var isString = (val) => typeof val === "string"; + var isSymbol = (val) => typeof val === "symbol"; + var isObject2 = (val) => val !== null && typeof val === "object"; + var isPromise = (val) => { + return isObject2(val) && isFunction2(val.then) && isFunction2(val.catch); + }; + var objectToString = Object.prototype.toString; + var toTypeString = (value) => objectToString.call(value); + var toRawType = (value) => { + return toTypeString(value).slice(8, -1); + }; + var isPlainObject = (val) => toTypeString(val) === "[object Object]"; + var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; + var isReservedProp = /* @__PURE__ */ makeMap(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"); + var cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; + }; + var camelizeRE = /-(\w)/g; + var camelize = cacheStringFunction((str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + }); + var hyphenateRE = /\B([A-Z])/g; + var hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); + var capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); + var toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); + var hasChanged = (value, oldValue) => value !== oldValue && (value === value || oldValue === oldValue); + var invokeArrayFns = (fns, arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } + }; + var def = (obj, key, value) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); + }; + var toNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; + }; + var _globalThis; + var getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); + }; + exports2.EMPTY_ARR = EMPTY_ARR; + exports2.EMPTY_OBJ = EMPTY_OBJ; + exports2.NO = NO; + exports2.NOOP = NOOP; + exports2.PatchFlagNames = PatchFlagNames; + exports2.babelParserDefaultPlugins = babelParserDefaultPlugins; + exports2.camelize = camelize; + exports2.capitalize = capitalize; + exports2.def = def; + exports2.escapeHtml = escapeHtml; + exports2.escapeHtmlComment = escapeHtmlComment; + exports2.extend = extend; + exports2.generateCodeFrame = generateCodeFrame; + exports2.getGlobalThis = getGlobalThis; + exports2.hasChanged = hasChanged; + exports2.hasOwn = hasOwn; + exports2.hyphenate = hyphenate; + exports2.invokeArrayFns = invokeArrayFns; + exports2.isArray = isArray2; + exports2.isBooleanAttr = isBooleanAttr2; + exports2.isDate = isDate; + exports2.isFunction = isFunction2; + exports2.isGloballyWhitelisted = isGloballyWhitelisted; + exports2.isHTMLTag = isHTMLTag; + exports2.isIntegerKey = isIntegerKey; + exports2.isKnownAttr = isKnownAttr; + exports2.isMap = isMap; + exports2.isModelListener = isModelListener; + exports2.isNoUnitNumericStyleProp = isNoUnitNumericStyleProp; + exports2.isObject = isObject2; + exports2.isOn = isOn; + exports2.isPlainObject = isPlainObject; + exports2.isPromise = isPromise; + exports2.isReservedProp = isReservedProp; + exports2.isSSRSafeAttrName = isSSRSafeAttrName; + exports2.isSVGTag = isSVGTag; + exports2.isSet = isSet; + exports2.isSpecialBooleanAttr = isSpecialBooleanAttr; + exports2.isString = isString; + exports2.isSymbol = isSymbol; + exports2.isVoidTag = isVoidTag; + exports2.looseEqual = looseEqual; + exports2.looseIndexOf = looseIndexOf; + exports2.makeMap = makeMap; + exports2.normalizeClass = normalizeClass; + exports2.normalizeStyle = normalizeStyle; + exports2.objectToString = objectToString; + exports2.parseStringStyle = parseStringStyle; + exports2.propsToAttrMap = propsToAttrMap; + exports2.remove = remove; + exports2.slotFlagsText = slotFlagsText; + exports2.stringifyStyle = stringifyStyle; + exports2.toDisplayString = toDisplayString; + exports2.toHandlerKey = toHandlerKey; + exports2.toNumber = toNumber; + exports2.toRawType = toRawType; + exports2.toTypeString = toTypeString; + } + }); + var require_shared = __commonJS2({ + "node_modules/@vue/shared/index.js"(exports2, module2) { + "use strict"; + if (false) { + module2.exports = null; + } else { + module2.exports = require_shared_cjs(); + } + } + }); + var require_reactivity_cjs = __commonJS2({ + "node_modules/@vue/reactivity/dist/reactivity.cjs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var shared = require_shared(); + var targetMap = /* @__PURE__ */ new WeakMap(); + var effectStack = []; + var activeEffect; + var ITERATE_KEY = Symbol("iterate"); + var MAP_KEY_ITERATE_KEY = Symbol("Map key iterate"); + function isEffect(fn) { + return fn && fn._isEffect === true; + } + function effect3(fn, options = shared.EMPTY_OBJ) { + if (isEffect(fn)) { + fn = fn.raw; + } + const effect4 = createReactiveEffect(fn, options); + if (!options.lazy) { + effect4(); + } + return effect4; + } + function stop2(effect4) { + if (effect4.active) { + cleanup(effect4); + if (effect4.options.onStop) { + effect4.options.onStop(); + } + effect4.active = false; + } + } + var uid = 0; + function createReactiveEffect(fn, options) { + const effect4 = function reactiveEffect() { + if (!effect4.active) { + return fn(); + } + if (!effectStack.includes(effect4)) { + cleanup(effect4); + try { + enableTracking(); + effectStack.push(effect4); + activeEffect = effect4; + return fn(); + } finally { + effectStack.pop(); + resetTracking(); + activeEffect = effectStack[effectStack.length - 1]; + } + } + }; + effect4.id = uid++; + effect4.allowRecurse = !!options.allowRecurse; + effect4._isEffect = true; + effect4.active = true; + effect4.raw = fn; + effect4.deps = []; + effect4.options = options; + return effect4; + } + function cleanup(effect4) { + const { deps } = effect4; + if (deps.length) { + for (let i = 0; i < deps.length; i++) { + deps[i].delete(effect4); + } + deps.length = 0; + } + } + var shouldTrack = true; + var trackStack = []; + function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; + } + function enableTracking() { + trackStack.push(shouldTrack); + shouldTrack = true; + } + function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; + } + function track2(target, type, key) { + if (!shouldTrack || activeEffect === void 0) { + return; + } + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = /* @__PURE__ */ new Set()); + } + if (!dep.has(activeEffect)) { + dep.add(activeEffect); + activeEffect.deps.push(dep); + if (activeEffect.options.onTrack) { + activeEffect.options.onTrack({ + effect: activeEffect, + target, + type, + key + }); + } + } + } + function trigger2(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + const effects = /* @__PURE__ */ new Set(); + const add2 = (effectsToAdd) => { + if (effectsToAdd) { + effectsToAdd.forEach((effect4) => { + if (effect4 !== activeEffect || effect4.allowRecurse) { + effects.add(effect4); + } + }); + } + }; + if (type === "clear") { + depsMap.forEach(add2); + } else if (key === "length" && shared.isArray(target)) { + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 >= newValue) { + add2(dep); + } + }); + } else { + if (key !== void 0) { + add2(depsMap.get(key)); + } + switch (type) { + case "add": + if (!shared.isArray(target)) { + add2(depsMap.get(ITERATE_KEY)); + if (shared.isMap(target)) { + add2(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (shared.isIntegerKey(key)) { + add2(depsMap.get("length")); + } + break; + case "delete": + if (!shared.isArray(target)) { + add2(depsMap.get(ITERATE_KEY)); + if (shared.isMap(target)) { + add2(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (shared.isMap(target)) { + add2(depsMap.get(ITERATE_KEY)); + } + break; + } + } + const run = (effect4) => { + if (effect4.options.onTrigger) { + effect4.options.onTrigger({ + effect: effect4, + target, + key, + type, + newValue, + oldValue, + oldTarget + }); + } + if (effect4.options.scheduler) { + effect4.options.scheduler(effect4); + } else { + effect4(); + } + }; + effects.forEach(run); + } + var isNonTrackableKeys = /* @__PURE__ */ shared.makeMap(`__proto__,__v_isRef,__isVue`); + var builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter(shared.isSymbol)); + var get2 = /* @__PURE__ */ createGetter(); + var shallowGet = /* @__PURE__ */ createGetter(false, true); + var readonlyGet = /* @__PURE__ */ createGetter(true); + var shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true); + var arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); + function createArrayInstrumentations() { + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw2(this); + for (let i = 0, l = this.length; i < l; i++) { + track2(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw2)); + } else { + return res; + } + }; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + const res = toRaw2(this)[key].apply(this, args); + resetTracking(); + return res; + }; + }); + return instrumentations; + } + function createGetter(isReadonly2 = false, shallow = false) { + return function get3(target, key, receiver) { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) { + return target; + } + const targetIsArray = shared.isArray(target); + if (!isReadonly2 && targetIsArray && shared.hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + const res = Reflect.get(target, key, receiver); + if (shared.isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track2(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + const shouldUnwrap = !targetIsArray || !shared.isIntegerKey(key); + return shouldUnwrap ? res.value : res; + } + if (shared.isObject(res)) { + return isReadonly2 ? readonly(res) : reactive3(res); + } + return res; + }; + } + var set2 = /* @__PURE__ */ createSetter(); + var shallowSet = /* @__PURE__ */ createSetter(true); + function createSetter(shallow = false) { + return function set3(target, key, value, receiver) { + let oldValue = target[key]; + if (!shallow) { + value = toRaw2(value); + oldValue = toRaw2(oldValue); + if (!shared.isArray(target) && isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } + } + const hadKey = shared.isArray(target) && shared.isIntegerKey(key) ? Number(key) < target.length : shared.hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw2(receiver)) { + if (!hadKey) { + trigger2(target, "add", key, value); + } else if (shared.hasChanged(value, oldValue)) { + trigger2(target, "set", key, value, oldValue); + } + } + return result; + }; + } + function deleteProperty(target, key) { + const hadKey = shared.hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger2(target, "delete", key, void 0, oldValue); + } + return result; + } + function has(target, key) { + const result = Reflect.has(target, key); + if (!shared.isSymbol(key) || !builtInSymbols.has(key)) { + track2(target, "has", key); + } + return result; + } + function ownKeys(target) { + track2(target, "iterate", shared.isArray(target) ? "length" : ITERATE_KEY); + return Reflect.ownKeys(target); + } + var mutableHandlers = { + get: get2, + set: set2, + deleteProperty, + has, + ownKeys + }; + var readonlyHandlers = { + get: readonlyGet, + set(target, key) { + { + console.warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target); + } + return true; + }, + deleteProperty(target, key) { + { + console.warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); + } + return true; + } + }; + var shallowReactiveHandlers = /* @__PURE__ */ shared.extend({}, mutableHandlers, { + get: shallowGet, + set: shallowSet + }); + var shallowReadonlyHandlers = /* @__PURE__ */ shared.extend({}, readonlyHandlers, { + get: shallowReadonlyGet + }); + var toReactive = (value) => shared.isObject(value) ? reactive3(value) : value; + var toReadonly = (value) => shared.isObject(value) ? readonly(value) : value; + var toShallow = (value) => value; + var getProto = (v) => Reflect.getPrototypeOf(v); + function get$1(target, key, isReadonly2 = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw2(target); + const rawKey = toRaw2(key); + if (key !== rawKey) { + !isReadonly2 && track2(rawTarget, "get", key); + } + !isReadonly2 && track2(rawTarget, "get", rawKey); + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } + } + function has$1(key, isReadonly2 = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw2(target); + const rawKey = toRaw2(key); + if (key !== rawKey) { + !isReadonly2 && track2(rawTarget, "has", key); + } + !isReadonly2 && track2(rawTarget, "has", rawKey); + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); + } + function size(target, isReadonly2 = false) { + target = target["__v_raw"]; + !isReadonly2 && track2(toRaw2(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); + } + function add(value) { + value = toRaw2(value); + const target = toRaw2(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger2(target, "add", value, value); + } + return this; + } + function set$1(key, value) { + value = toRaw2(value); + const target = toRaw2(this); + const { has: has2, get: get3 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw2(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get3.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger2(target, "add", key, value); + } else if (shared.hasChanged(value, oldValue)) { + trigger2(target, "set", key, value, oldValue); + } + return this; + } + function deleteEntry(key) { + const target = toRaw2(this); + const { has: has2, get: get3 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw2(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get3 ? get3.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger2(target, "delete", key, void 0, oldValue); + } + return result; + } + function clear() { + const target = toRaw2(this); + const hadItems = target.size !== 0; + const oldTarget = shared.isMap(target) ? new Map(target) : new Set(target); + const result = target.clear(); + if (hadItems) { + trigger2(target, "clear", void 0, void 0, oldTarget); + } + return result; + } + function createForEach(isReadonly2, isShallow) { + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw2(target); + const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track2(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; + } + function createIterableMethod(method, isReadonly2, isShallow) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw2(target); + const targetIsMap = shared.isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track2(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); + return { + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + [Symbol.iterator]() { + return this; + } + }; + }; + } + function createReadonlyMethod(type) { + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn(`${shared.capitalize(type)} operation ${key}failed: target is readonly.`, toRaw2(this)); + } + return type === "delete" ? false : this; + }; + } + function createInstrumentations() { + const mutableInstrumentations2 = { + get(key) { + return get$1(this, key); + }, + get size() { + return size(this); + }, + has: has$1, + add, + set: set$1, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get$1(this, key, false, true); + }, + get size() { + return size(this); + }, + has: has$1, + add, + set: set$1, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get$1(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has$1.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get$1(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has$1.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod(method, false, false); + readonlyInstrumentations2[method] = createIterableMethod(method, true, false); + shallowInstrumentations2[method] = createIterableMethod(method, false, true); + shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; + } + var [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations(); + function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get(shared.hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver); + }; + } + var mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) + }; + var shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) + }; + var readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) + }; + var shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) + }; + function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw2(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = shared.toRawType(target); + console.warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `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 reactiveMap = /* @__PURE__ */ new WeakMap(); + var shallowReactiveMap = /* @__PURE__ */ new WeakMap(); + var readonlyMap = /* @__PURE__ */ new WeakMap(); + var shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); + function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2; + default: + return 0; + } + } + function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(shared.toRawType(value)); + } + function reactive3(target) { + if (target && target["__v_isReadonly"]) { + return target; + } + return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); + } + function shallowReactive(target) { + return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); + } + function readonly(target) { + return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); + } + function shallowReadonly(target) { + return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); + } + function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!shared.isObject(target)) { + { + console.warn(`value cannot be made reactive: ${String(target)}`); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0) { + return target; + } + const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers); + proxyMap.set(target, proxy); + return proxy; + } + function isReactive2(value) { + if (isReadonly(value)) { + return isReactive2(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); + } + function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); + } + function isProxy(value) { + return isReactive2(value) || isReadonly(value); + } + function toRaw2(observed) { + return observed && toRaw2(observed["__v_raw"]) || observed; + } + function markRaw(value) { + shared.def(value, "__v_skip", true); + return value; + } + var convert = (val) => shared.isObject(val) ? reactive3(val) : val; + function isRef(r) { + return Boolean(r && r.__v_isRef === true); + } + function ref(value) { + return createRef(value); + } + function shallowRef(value) { + return createRef(value, true); + } + var RefImpl = class { + constructor(value, _shallow = false) { + this._shallow = _shallow; + this.__v_isRef = true; + this._rawValue = _shallow ? value : toRaw2(value); + this._value = _shallow ? value : convert(value); + } + get value() { + track2(toRaw2(this), "get", "value"); + return this._value; + } + set value(newVal) { + newVal = this._shallow ? newVal : toRaw2(newVal); + if (shared.hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = this._shallow ? newVal : convert(newVal); + trigger2(toRaw2(this), "set", "value", newVal); + } + } + }; + function createRef(rawValue, shallow = false) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); + } + function triggerRef(ref2) { + trigger2(toRaw2(ref2), "set", "value", ref2.value); + } + function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; + } + var shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } + }; + function proxyRefs(objectWithRefs) { + return isReactive2(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); + } + var CustomRefImpl = class { + constructor(factory) { + this.__v_isRef = true; + const { get: get3, set: set3 } = factory(() => track2(this, "get", "value"), () => trigger2(this, "set", "value")); + this._get = get3; + this._set = set3; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } + }; + function customRef(factory) { + return new CustomRefImpl(factory); + } + function toRefs(object) { + if (!isProxy(object)) { + console.warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = shared.isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = toRef(object, key); + } + return ret; + } + var ObjectRefImpl = class { + constructor(_object, _key) { + this._object = _object; + this._key = _key; + this.__v_isRef = true; + } + get value() { + return this._object[this._key]; + } + set value(newVal) { + this._object[this._key] = newVal; + } + }; + function toRef(object, key) { + return isRef(object[key]) ? object[key] : new ObjectRefImpl(object, key); + } + var ComputedRefImpl = class { + constructor(getter, _setter, isReadonly2) { + this._setter = _setter; + this._dirty = true; + this.__v_isRef = true; + this.effect = effect3(getter, { + lazy: true, + scheduler: () => { + if (!this._dirty) { + this._dirty = true; + trigger2(toRaw2(this), "set", "value"); + } + } + }); + this["__v_isReadonly"] = isReadonly2; + } + get value() { + const self2 = toRaw2(this); + if (self2._dirty) { + self2._value = this.effect(); + self2._dirty = false; + } + track2(self2, "get", "value"); + return self2._value; + } + set value(newValue) { + this._setter(newValue); + } + }; + function computed(getterOrOptions) { + let getter; + let setter; + if (shared.isFunction(getterOrOptions)) { + getter = getterOrOptions; + setter = () => { + console.warn("Write operation failed: computed value is readonly"); + }; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + return new ComputedRefImpl(getter, setter, shared.isFunction(getterOrOptions) || !getterOrOptions.set); + } + exports2.ITERATE_KEY = ITERATE_KEY; + exports2.computed = computed; + exports2.customRef = customRef; + exports2.effect = effect3; + exports2.enableTracking = enableTracking; + exports2.isProxy = isProxy; + exports2.isReactive = isReactive2; + exports2.isReadonly = isReadonly; + exports2.isRef = isRef; + exports2.markRaw = markRaw; + exports2.pauseTracking = pauseTracking; + exports2.proxyRefs = proxyRefs; + exports2.reactive = reactive3; + exports2.readonly = readonly; + exports2.ref = ref; + exports2.resetTracking = resetTracking; + exports2.shallowReactive = shallowReactive; + exports2.shallowReadonly = shallowReadonly; + exports2.shallowRef = shallowRef; + exports2.stop = stop2; + exports2.toRaw = toRaw2; + exports2.toRef = toRef; + exports2.toRefs = toRefs; + exports2.track = track2; + exports2.trigger = trigger2; + exports2.triggerRef = triggerRef; + exports2.unref = unref; + } + }); + var require_reactivity = __commonJS2({ + "node_modules/@vue/reactivity/index.js"(exports2, module2) { + "use strict"; + if (false) { + module2.exports = null; + } else { + module2.exports = require_reactivity_cjs(); + } + } + }); + var module_exports = {}; + __export(module_exports, { + Alpine: () => src_default, + default: () => module_default + }); + module.exports = __toCommonJS(module_exports); + var flushPending = false; + var flushing = false; + var queue = []; + var lastFlushedIndex = -1; + function scheduler(callback) { + queueJob(callback); + } + function queueJob(job) { + if (!queue.includes(job)) + queue.push(job); + queueFlush(); + } + function dequeueJob(job) { + let index = queue.indexOf(job); + if (index !== -1 && index > lastFlushedIndex) + queue.splice(index, 1); + } + function queueFlush() { + if (!flushing && !flushPending) { + flushPending = true; + queueMicrotask(flushJobs); + } + } + function flushJobs() { + flushPending = false; + flushing = true; + for (let i = 0; i < queue.length; i++) { + queue[i](); + lastFlushedIndex = i; + } + queue.length = 0; + lastFlushedIndex = -1; + flushing = false; + } + var reactive; + var effect; + var release; + var raw; + var shouldSchedule = true; + function disableEffectScheduling(callback) { + shouldSchedule = false; + callback(); + shouldSchedule = true; + } + function setReactivityEngine(engine) { + reactive = engine.reactive; + release = engine.release; + effect = (callback) => engine.effect(callback, { scheduler: (task) => { + if (shouldSchedule) { + scheduler(task); + } else { + task(); + } + } }); + raw = engine.raw; + } + function overrideEffect(override) { + effect = override; + } + function elementBoundEffect(el) { + let cleanup = () => { + }; + let wrappedEffect = (callback) => { + let effectReference = effect(callback); + if (!el._x_effects) { + el._x_effects = /* @__PURE__ */ new Set(); + el._x_runEffects = () => { + el._x_effects.forEach((i) => i()); + }; + } + el._x_effects.add(effectReference); + cleanup = () => { + if (effectReference === void 0) + return; + el._x_effects.delete(effectReference); + release(effectReference); + }; + return effectReference; + }; + return [wrappedEffect, () => { + cleanup(); + }]; + } + function watch(getter, callback) { + let firstTime = true; + let oldValue; + let effectReference = effect(() => { + let value = getter(); + JSON.stringify(value); + if (!firstTime) { + queueMicrotask(() => { + callback(value, oldValue); + oldValue = value; + }); + } else { + oldValue = value; + } + firstTime = false; + }); + return () => release(effectReference); + } + var onAttributeAddeds = []; + var onElRemoveds = []; + var onElAddeds = []; + function onElAdded(callback) { + onElAddeds.push(callback); + } + function onElRemoved(el, callback) { + if (typeof callback === "function") { + if (!el._x_cleanups) + el._x_cleanups = []; + el._x_cleanups.push(callback); + } else { + callback = el; + onElRemoveds.push(callback); + } + } + function onAttributesAdded(callback) { + onAttributeAddeds.push(callback); + } + function onAttributeRemoved(el, name, callback) { + if (!el._x_attributeCleanups) + el._x_attributeCleanups = {}; + if (!el._x_attributeCleanups[name]) + el._x_attributeCleanups[name] = []; + el._x_attributeCleanups[name].push(callback); + } + function cleanupAttributes(el, names) { + if (!el._x_attributeCleanups) + return; + Object.entries(el._x_attributeCleanups).forEach(([name, value]) => { + if (names === void 0 || names.includes(name)) { + value.forEach((i) => i()); + delete el._x_attributeCleanups[name]; + } + }); + } + function cleanupElement(el) { + if (el._x_cleanups) { + while (el._x_cleanups.length) + el._x_cleanups.pop()(); + } + } + var observer = new MutationObserver(onMutate); + var currentlyObserving = false; + function startObservingMutations() { + observer.observe(document, { subtree: true, childList: true, attributes: true, attributeOldValue: true }); + currentlyObserving = true; + } + function stopObservingMutations() { + flushObserver(); + observer.disconnect(); + currentlyObserving = false; + } + var queuedMutations = []; + function flushObserver() { + let records = observer.takeRecords(); + queuedMutations.push(() => records.length > 0 && onMutate(records)); + let queueLengthWhenTriggered = queuedMutations.length; + queueMicrotask(() => { + if (queuedMutations.length === queueLengthWhenTriggered) { + while (queuedMutations.length > 0) + queuedMutations.shift()(); + } + }); + } + function mutateDom(callback) { + if (!currentlyObserving) + return callback(); + stopObservingMutations(); + let result = callback(); + startObservingMutations(); + return result; + } + var isCollecting = false; + var deferredMutations = []; + function deferMutations() { + isCollecting = true; + } + function flushAndStopDeferringMutations() { + isCollecting = false; + onMutate(deferredMutations); + deferredMutations = []; + } + function onMutate(mutations) { + if (isCollecting) { + deferredMutations = deferredMutations.concat(mutations); + return; + } + let addedNodes = /* @__PURE__ */ new Set(); + let removedNodes = /* @__PURE__ */ new Set(); + let addedAttributes = /* @__PURE__ */ new Map(); + let removedAttributes = /* @__PURE__ */ new Map(); + for (let i = 0; i < mutations.length; i++) { + if (mutations[i].target._x_ignoreMutationObserver) + continue; + if (mutations[i].type === "childList") { + mutations[i].addedNodes.forEach((node) => node.nodeType === 1 && addedNodes.add(node)); + mutations[i].removedNodes.forEach((node) => node.nodeType === 1 && removedNodes.add(node)); + } + if (mutations[i].type === "attributes") { + let el = mutations[i].target; + let name = mutations[i].attributeName; + let oldValue = mutations[i].oldValue; + let add = () => { + if (!addedAttributes.has(el)) + addedAttributes.set(el, []); + addedAttributes.get(el).push({ name, value: el.getAttribute(name) }); + }; + let remove = () => { + if (!removedAttributes.has(el)) + removedAttributes.set(el, []); + removedAttributes.get(el).push(name); + }; + if (el.hasAttribute(name) && oldValue === null) { + add(); + } else if (el.hasAttribute(name)) { + remove(); + add(); + } else { + remove(); + } + } + } + removedAttributes.forEach((attrs, el) => { + cleanupAttributes(el, attrs); + }); + addedAttributes.forEach((attrs, el) => { + onAttributeAddeds.forEach((i) => i(el, attrs)); + }); + for (let node of removedNodes) { + if (addedNodes.has(node)) + continue; + onElRemoveds.forEach((i) => i(node)); + } + addedNodes.forEach((node) => { + node._x_ignoreSelf = true; + node._x_ignore = true; + }); + for (let node of addedNodes) { + if (removedNodes.has(node)) + continue; + if (!node.isConnected) + continue; + delete node._x_ignoreSelf; + delete node._x_ignore; + onElAddeds.forEach((i) => i(node)); + node._x_ignore = true; + node._x_ignoreSelf = true; + } + addedNodes.forEach((node) => { + delete node._x_ignoreSelf; + delete node._x_ignore; + }); + addedNodes = null; + removedNodes = null; + addedAttributes = null; + removedAttributes = null; + } + function scope(node) { + return mergeProxies(closestDataStack(node)); + } + function addScopeToNode(node, data2, referenceNode) { + node._x_dataStack = [data2, ...closestDataStack(referenceNode || node)]; + return () => { + node._x_dataStack = node._x_dataStack.filter((i) => i !== data2); + }; + } + function closestDataStack(node) { + if (node._x_dataStack) + return node._x_dataStack; + if (typeof ShadowRoot === "function" && node instanceof ShadowRoot) { + return closestDataStack(node.host); + } + if (!node.parentNode) { + return []; + } + return closestDataStack(node.parentNode); + } + function mergeProxies(objects) { + return new Proxy({ objects }, mergeProxyTrap); + } + var mergeProxyTrap = { + ownKeys({ objects }) { + return Array.from(new Set(objects.flatMap((i) => Object.keys(i)))); + }, + has({ objects }, name) { + if (name == Symbol.unscopables) + return false; + return objects.some((obj) => Object.prototype.hasOwnProperty.call(obj, name) || Reflect.has(obj, name)); + }, + get({ objects }, name, thisProxy) { + if (name == "toJSON") + return collapseProxies; + return Reflect.get(objects.find((obj) => Reflect.has(obj, name)) || {}, name, thisProxy); + }, + set({ objects }, name, value, thisProxy) { + const target = objects.find((obj) => Object.prototype.hasOwnProperty.call(obj, name)) || objects[objects.length - 1]; + const descriptor = Object.getOwnPropertyDescriptor(target, name); + if ((descriptor == null ? void 0 : descriptor.set) && (descriptor == null ? void 0 : descriptor.get)) + return descriptor.set.call(thisProxy, value) || true; + return Reflect.set(target, name, value); + } + }; + function collapseProxies() { + let keys = Reflect.ownKeys(this); + return keys.reduce((acc, key) => { + acc[key] = Reflect.get(this, key); + return acc; + }, {}); + } + function initInterceptors(data2) { + let isObject2 = (val) => typeof val === "object" && !Array.isArray(val) && val !== null; + let recurse = (obj, basePath = "") => { + Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, { value, enumerable }]) => { + if (enumerable === false || value === void 0) + return; + if (typeof value === "object" && value !== null && value.__v_skip) + return; + let path = basePath === "" ? key : `${basePath}.${key}`; + if (typeof value === "object" && value !== null && value._x_interceptor) { + obj[key] = value.initialize(data2, path, key); + } else { + if (isObject2(value) && value !== obj && !(value instanceof Element)) { + recurse(value, path); + } + } + }); + }; + return recurse(data2); + } + function interceptor(callback, mutateObj = () => { + }) { + let obj = { + initialValue: void 0, + _x_interceptor: true, + initialize(data2, path, key) { + return callback(this.initialValue, () => get(data2, path), (value) => set(data2, path, value), path, key); + } + }; + mutateObj(obj); + return (initialValue) => { + if (typeof initialValue === "object" && initialValue !== null && initialValue._x_interceptor) { + let initialize = obj.initialize.bind(obj); + obj.initialize = (data2, path, key) => { + let innerValue = initialValue.initialize(data2, path, key); + obj.initialValue = innerValue; + return initialize(data2, path, key); + }; + } else { + obj.initialValue = initialValue; + } + return obj; + }; + } + function get(obj, path) { + return path.split(".").reduce((carry, segment) => carry[segment], obj); + } + function set(obj, path, value) { + if (typeof path === "string") + path = path.split("."); + if (path.length === 1) + obj[path[0]] = value; + else if (path.length === 0) + throw error; + else { + if (obj[path[0]]) + return set(obj[path[0]], path.slice(1), value); + else { + obj[path[0]] = {}; + return set(obj[path[0]], path.slice(1), value); + } + } + } + var magics = {}; + function magic(name, callback) { + magics[name] = callback; + } + function injectMagics(obj, el) { + Object.entries(magics).forEach(([name, callback]) => { + let memoizedUtilities = null; + function getUtilities() { + if (memoizedUtilities) { + return memoizedUtilities; + } else { + let [utilities, cleanup] = getElementBoundUtilities(el); + memoizedUtilities = { interceptor, ...utilities }; + onElRemoved(el, cleanup); + return memoizedUtilities; + } + } + Object.defineProperty(obj, `$${name}`, { + get() { + return callback(el, getUtilities()); + }, + enumerable: false + }); + }); + return obj; + } + function tryCatch(el, expression, callback, ...args) { + try { + return callback(...args); + } catch (e) { + handleError(e, el, expression); + } + } + function handleError(error2, el, expression = void 0) { + error2 = Object.assign(error2 != null ? error2 : { message: "No error message given." }, { el, expression }); + console.warn(`Alpine Expression Error: ${error2.message} + +${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); + setTimeout(() => { + throw error2; + }, 0); + } + var shouldAutoEvaluateFunctions = true; + function dontAutoEvaluateFunctions(callback) { + let cache = shouldAutoEvaluateFunctions; + shouldAutoEvaluateFunctions = false; + let result = callback(); + shouldAutoEvaluateFunctions = cache; + return result; + } + function evaluate(el, expression, extras = {}) { + let result; + evaluateLater(el, expression)((value) => result = value, extras); + return result; + } + function evaluateLater(...args) { + return theEvaluatorFunction(...args); + } + var theEvaluatorFunction = normalEvaluator; + function setEvaluator(newEvaluator) { + theEvaluatorFunction = newEvaluator; + } + function normalEvaluator(el, expression) { + let overriddenMagics = {}; + injectMagics(overriddenMagics, el); + let dataStack = [overriddenMagics, ...closestDataStack(el)]; + let evaluator = typeof expression === "function" ? generateEvaluatorFromFunction(dataStack, expression) : generateEvaluatorFromString(dataStack, expression, el); + return tryCatch.bind(null, el, expression, evaluator); + } + function generateEvaluatorFromFunction(dataStack, func) { + return (receiver = () => { + }, { scope: scope2 = {}, params = [] } = {}) => { + let result = func.apply(mergeProxies([scope2, ...dataStack]), params); + runIfTypeOfFunction(receiver, result); + }; + } + var evaluatorMemo = {}; + function generateFunctionFromString(expression, el) { + if (evaluatorMemo[expression]) { + return evaluatorMemo[expression]; + } + let AsyncFunction = Object.getPrototypeOf(async function() { + }).constructor; + let rightSideSafeExpression = /^[\n\s]*if.*\(.*\)/.test(expression.trim()) || /^(let|const)\s/.test(expression.trim()) ? `(async()=>{ ${expression} })()` : expression; + const safeAsyncFunction = () => { + try { + let func2 = new AsyncFunction(["__self", "scope"], `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`); + Object.defineProperty(func2, "name", { + value: `[Alpine] ${expression}` + }); + return func2; + } catch (error2) { + handleError(error2, el, expression); + return Promise.resolve(); + } + }; + let func = safeAsyncFunction(); + evaluatorMemo[expression] = func; + return func; + } + function generateEvaluatorFromString(dataStack, expression, el) { + let func = generateFunctionFromString(expression, el); + return (receiver = () => { + }, { scope: scope2 = {}, params = [] } = {}) => { + func.result = void 0; + func.finished = false; + let completeScope = mergeProxies([scope2, ...dataStack]); + if (typeof func === "function") { + let promise = func(func, completeScope).catch((error2) => handleError(error2, el, expression)); + if (func.finished) { + runIfTypeOfFunction(receiver, func.result, completeScope, params, el); + func.result = void 0; + } else { + promise.then((result) => { + runIfTypeOfFunction(receiver, result, completeScope, params, el); + }).catch((error2) => handleError(error2, el, expression)).finally(() => func.result = void 0); + } + } + }; + } + function runIfTypeOfFunction(receiver, value, scope2, params, el) { + if (shouldAutoEvaluateFunctions && typeof value === "function") { + let result = value.apply(scope2, params); + if (result instanceof Promise) { + result.then((i) => runIfTypeOfFunction(receiver, i, scope2, params)).catch((error2) => handleError(error2, el, value)); + } else { + receiver(result); + } + } else if (typeof value === "object" && value instanceof Promise) { + value.then((i) => receiver(i)); + } else { + receiver(value); + } + } + var prefixAsString = "x-"; + function prefix(subject = "") { + return prefixAsString + subject; + } + function setPrefix(newPrefix) { + prefixAsString = newPrefix; + } + var directiveHandlers = {}; + function directive2(name, callback) { + directiveHandlers[name] = callback; + return { + before(directive22) { + if (!directiveHandlers[directive22]) { + console.warn(String.raw`Cannot find directive \`${directive22}\`. \`${name}\` will use the default order of execution`); + return; + } + const pos = directiveOrder.indexOf(directive22); + directiveOrder.splice(pos >= 0 ? pos : directiveOrder.indexOf("DEFAULT"), 0, name); + } + }; + } + function directiveExists(name) { + return Object.keys(directiveHandlers).includes(name); + } + function directives(el, attributes, originalAttributeOverride) { + attributes = Array.from(attributes); + if (el._x_virtualDirectives) { + let vAttributes = Object.entries(el._x_virtualDirectives).map(([name, value]) => ({ name, value })); + let staticAttributes = attributesOnly(vAttributes); + vAttributes = vAttributes.map((attribute) => { + if (staticAttributes.find((attr) => attr.name === attribute.name)) { + return { + name: `x-bind:${attribute.name}`, + value: `"${attribute.value}"` + }; + } + return attribute; + }); + attributes = attributes.concat(vAttributes); + } + let transformedAttributeMap = {}; + let directives2 = attributes.map(toTransformedAttributes((newName, oldName) => transformedAttributeMap[newName] = oldName)).filter(outNonAlpineAttributes).map(toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort(byPriority); + return directives2.map((directive22) => { + return getDirectiveHandler(el, directive22); + }); + } + function attributesOnly(attributes) { + return Array.from(attributes).map(toTransformedAttributes()).filter((attr) => !outNonAlpineAttributes(attr)); + } + var isDeferringHandlers = false; + var directiveHandlerStacks = /* @__PURE__ */ new Map(); + var currentHandlerStackKey = Symbol(); + function deferHandlingDirectives(callback) { + isDeferringHandlers = true; + let key = Symbol(); + currentHandlerStackKey = key; + directiveHandlerStacks.set(key, []); + let flushHandlers = () => { + while (directiveHandlerStacks.get(key).length) + directiveHandlerStacks.get(key).shift()(); + directiveHandlerStacks.delete(key); + }; + let stopDeferring = () => { + isDeferringHandlers = false; + flushHandlers(); + }; + callback(flushHandlers); + stopDeferring(); + } + function getElementBoundUtilities(el) { + let cleanups2 = []; + let cleanup = (callback) => cleanups2.push(callback); + let [effect3, cleanupEffect] = elementBoundEffect(el); + cleanups2.push(cleanupEffect); + let utilities = { + Alpine: alpine_default, + effect: effect3, + cleanup, + evaluateLater: evaluateLater.bind(evaluateLater, el), + evaluate: evaluate.bind(evaluate, el) + }; + let doCleanup = () => cleanups2.forEach((i) => i()); + return [utilities, doCleanup]; + } + function getDirectiveHandler(el, directive22) { + let noop = () => { + }; + let handler4 = directiveHandlers[directive22.type] || noop; + let [utilities, cleanup] = getElementBoundUtilities(el); + onAttributeRemoved(el, directive22.original, cleanup); + let fullHandler = () => { + if (el._x_ignore || el._x_ignoreSelf) + return; + handler4.inline && handler4.inline(el, directive22, utilities); + handler4 = handler4.bind(handler4, el, directive22, utilities); + isDeferringHandlers ? directiveHandlerStacks.get(currentHandlerStackKey).push(handler4) : handler4(); + }; + fullHandler.runCleanups = cleanup; + return fullHandler; + } + var startingWith = (subject, replacement) => ({ name, value }) => { + if (name.startsWith(subject)) + name = name.replace(subject, replacement); + return { name, value }; + }; + var into = (i) => i; + function toTransformedAttributes(callback = () => { + }) { + return ({ name, value }) => { + let { name: newName, value: newValue } = attributeTransformers.reduce((carry, transform) => { + return transform(carry); + }, { name, value }); + if (newName !== name) + callback(newName, name); + return { name: newName, value: newValue }; + }; + } + var attributeTransformers = []; + function mapAttributes(callback) { + attributeTransformers.push(callback); + } + function outNonAlpineAttributes({ name }) { + return alpineAttributeRegex().test(name); + } + var alpineAttributeRegex = () => new RegExp(`^${prefixAsString}([^:^.]+)\\b`); + function toParsedDirectives(transformedAttributeMap, originalAttributeOverride) { + return ({ name, value }) => { + let typeMatch = name.match(alpineAttributeRegex()); + let valueMatch = name.match(/:([a-zA-Z0-9\-_:]+)/); + let modifiers = name.match(/\.[^.\]]+(?=[^\]]*$)/g) || []; + let original = originalAttributeOverride || transformedAttributeMap[name] || name; + return { + type: typeMatch ? typeMatch[1] : null, + value: valueMatch ? valueMatch[1] : null, + modifiers: modifiers.map((i) => i.replace(".", "")), + expression: value, + original + }; + }; + } + var DEFAULT = "DEFAULT"; + var directiveOrder = [ + "ignore", + "ref", + "data", + "id", + "anchor", + "bind", + "init", + "for", + "model", + "modelable", + "transition", + "show", + "if", + DEFAULT, + "teleport" + ]; + function byPriority(a, b) { + let typeA = directiveOrder.indexOf(a.type) === -1 ? DEFAULT : a.type; + let typeB = directiveOrder.indexOf(b.type) === -1 ? DEFAULT : b.type; + return directiveOrder.indexOf(typeA) - directiveOrder.indexOf(typeB); + } + function dispatch3(el, name, detail = {}) { + el.dispatchEvent(new CustomEvent(name, { + detail, + bubbles: true, + composed: true, + cancelable: true + })); + } + function walk(el, callback) { + if (typeof ShadowRoot === "function" && el instanceof ShadowRoot) { + Array.from(el.children).forEach((el2) => walk(el2, callback)); + return; + } + let skip = false; + callback(el, () => skip = true); + if (skip) + return; + let node = el.firstElementChild; + while (node) { + walk(node, callback, false); + node = node.nextElementSibling; + } + } + function warn(message, ...args) { + console.warn(`Alpine Warning: ${message}`, ...args); + } + var started = false; + function start2() { + if (started) + warn("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."); + started = true; + if (!document.body) + warn("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `