@htmlbricks/hb-checkout 0.60.2 → 0.60.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.iife.js +32 -32
- package/main.iife.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
package/main.iife.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(Mn){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const Fr=1,Br=2,Ur=16,Vr=1,Yr=4,Hr=8,Wr=16,Gr=1,Jr=2,Wt="[",Gt="[!",Jt="]",ut={},ue=Symbol(),Xr="http://www.w3.org/1999/xhtml",Pn=!1;var Xt=Array.isArray,Zr=Array.prototype.indexOf,Zt=Array.from,Mt=Object.keys,ft=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,Kr=Object.getOwnPropertyDescriptors,Qr=Object.prototype,es=Array.prototype,Rn=Object.getPrototypeOf,Nn=Object.isExtensible;function An(e){for(var t=0;t<e.length;t++)e[t]()}function ts(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}const _e=2,Kt=4,Qt=8,ct=16,Fe=32,He=64,In=128,xe=256,Pt=512,fe=1024,Ce=2048,We=4096,Re=8192,Qe=16384,en=32768,tn=65536,On=1<<17,Dn=1<<18,dt=1<<19,ns=1<<20,nn=1<<21,rn=1<<22,et=1<<23,Rt=Symbol("$state"),Ln=Symbol("legacy props"),rs=Symbol(""),sn=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},qn=3,ht=8;function ss(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function is(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function as(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function os(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ls(e){throw new Error("https://svelte.dev/e/effect_orphan")}function us(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function fs(){throw new Error("https://svelte.dev/e/hydration_failed")}function cs(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ds(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function hs(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function vs(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Nt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let A=!1;function ye(e){A=e}let B;function be(e){if(e===null)throw Nt(),ut;return B=e}function St(){return be(Ae(B))}function I(e){if(A){if(Ae(B)!==null)throw Nt(),ut;B=e}}function jn(e=1){if(A){for(var t=e,n=B;t--;)n=Ae(n);B=n}}function an(){for(var e=0,t=B;;){if(t.nodeType===ht){var n=t.data;if(n===Jt){if(e===0)return t;e-=1}else(n===Wt||n===Gt)&&(e+=1)}var r=Ae(t);t.remove(),t=r}}function zn(e){if(!e||e.nodeType!==ht)throw Nt(),ut;return e.data}function Fn(e){return e===this.v}function ps(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Bn(e){return!ps(e,this.v)}let ms=!1,Ne=null;function At(e){Ne=e}function Un(e,t=!1,n){Ne={p:Ne,c:null,e:null,s:e,x:null,l:null}}function Vn(e){var t=Ne,n=t.e;if(n!==null){t.e=null;for(var r of n)fr(r)}return e!==void 0&&(t.x=e),Ne=t.p,e??{}}function Yn(){return!0}const _s=new WeakMap;function ys(e){var t=N;if(t===null)return O.f|=et,e;if((t.f&en)===0){if((t.f&In)===0)throw!t.parent&&e instanceof Error&&Hn(e),e;t.b.error(e)}else on(e,t)}function on(e,t){for(;t!==null;){if((t.f&In)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e instanceof Error&&Hn(e),e}function Hn(e){const t=_s.get(e);t&&(ft(e,"message",{value:t.message}),ft(e,"stack",{value:t.stack}))}let xt=[],ln=[];function Wn(){var e=xt;xt=[],An(e)}function bs(){var e=ln;ln=[],An(e)}function gs(e){xt.length===0&&queueMicrotask(Wn),xt.push(e)}function ws(){xt.length>0&&Wn(),ln.length>0&&bs()}function $s(){const e=N.b;return e===null&&ss(),e}function un(e){var t=_e|Ce,n=O!==null&&(O.f&_e)!==0?O:null;return N===null||n!==null&&(n.f&xe)!==0?t|=xe:N.f|=dt,{ctx:Ne,deps:null,effects:null,equals:Fn,f:t,fn:e,reactions:null,rv:0,v:ue,wv:0,parent:n??N,ac:null}}function Es(e,t){let n=N;n===null&&is();var r=n.b,s=void 0,a=Ct(ue),i=null,o=!O;return Os(()=>{try{var f=e();i&&Promise.resolve(f).catch(()=>{})}catch(d){f=Promise.reject(d)}var u=()=>f;s=i?.then(u,u)??Promise.resolve(f),i=s;var c=ae,h=r.is_pending();o&&(r.update_pending_count(1),h||c.increment());const p=(d,m=void 0)=>{i=null,h||c.activate(),m?m!==sn&&(a.f|=et,Lt(a,m)):((a.f&et)!==0&&(a.f^=et),Lt(a,d)),o&&(r.update_pending_count(-1),h||c.decrement()),Zn()};if(s.then(p,d=>p(null,d||"unknown")),c)return()=>{queueMicrotask(()=>c.neuter())}}),new Promise(f=>{function u(c){function h(){c===s?f(a):u(s)}c.then(h,h)}u(s)})}function Gn(e){const t=un(e);return t.equals=Bn,t}function Jn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Le(t[n])}}function Ss(e){for(var t=e.parent;t!==null;){if((t.f&_e)===0)return t;t=t.parent}return null}function fn(e){var t,n=N;je(Ss(e));try{Jn(e),t=$r(e)}finally{je(n)}return t}function Xn(e){var t=fn(e);if(e.equals(t)||(e.v=t,e.wv=gr()),!at){var n=(Xe||(e.f&xe)!==0)&&e.deps!==null?We:fe;pe(e,n)}}function xs(e,t,n){const r=un;if(t.length===0){n(e.map(r));return}var s=ae,a=N,i=Cs(),o=$s();Promise.all(t.map(f=>Es(f))).then(f=>{s?.activate(),i();try{n([...e.map(r),...f])}catch(u){(a.f&Qe)===0&&on(u,a)}s?.deactivate(),Zn()}).catch(f=>{o.error(f)})}function Cs(){var e=N,t=O,n=Ne,r=ae;return function(){je(e),Te(t),At(n),r?.activate()}}function Zn(){je(null),Te(null),At(null)}const cn=new Set;let ae=null,Kn=new Set,It=[];function Qn(){const e=It.shift();It.length>0&&queueMicrotask(Qn),e()}let tt=[],Ot=null,dn=!1,Dt=!1;class nt{current=new Map;#t=new Map;#e=new Set;#n=0;#u=null;#f=!1;#s=[];#a=[];#i=[];#r=[];#o=[];#c=[];#d=[];skipped_effects=new Set;process(t){tt=[];for(const s of t)this.#v(s);if(this.#s.length===0&&this.#n===0){this.#h();var n=this.#i,r=this.#r;this.#i=[],this.#r=[],this.#o=[],ae=null,tr(n),tr(r),ae===null?ae=this:cn.delete(this),this.#u?.resolve()}else this.#l(this.#i),this.#l(this.#r),this.#l(this.#o);for(const s of this.#s)_t(s);for(const s of this.#a)_t(s);this.#s=[],this.#a=[]}#v(t){t.f^=fe;for(var n=t.first;n!==null;){var r=n.f,s=(r&(Fe|He))!==0,a=s&&(r&fe)!==0,i=a||(r&Re)!==0||this.skipped_effects.has(n);if(!i&&n.fn!==null){if(s)n.f^=fe;else if((r&Kt)!==0)this.#r.push(n);else if((r&fe)===0)if((r&rn)!==0){var o=n.b?.is_pending()?this.#a:this.#s;o.push(n)}else qt(n)&&((n.f&ct)!==0&&this.#o.push(n),_t(n));var f=n.first;if(f!==null){n=f;continue}}var u=n.parent;for(n=n.next;n===null&&u!==null;)n=u.next,u=u.parent}}#l(t){for(const n of t)((n.f&Ce)!==0?this.#c:this.#d).push(n),pe(n,fe);t.length=0}capture(t,n){this.#t.has(t)||this.#t.set(t,n),this.current.set(t,t.v)}activate(){ae=this}deactivate(){ae=null;for(const t of Kn)if(Kn.delete(t),t(),ae!==null)break}neuter(){this.#f=!0}flush(){tt.length>0?er():this.#h(),ae===this&&(this.#n===0&&cn.delete(this),this.deactivate())}#h(){if(!this.#f)for(const t of this.#e)t();this.#e.clear()}increment(){this.#n+=1}decrement(){if(this.#n-=1,this.#n===0){for(const t of this.#c)pe(t,Ce),vt(t);for(const t of this.#d)pe(t,We),vt(t);this.#i=[],this.#r=[],this.flush()}else this.deactivate()}add_callback(t){this.#e.add(t)}settled(){return(this.#u??=ts()).promise}static ensure(){if(ae===null){const t=ae=new nt;cn.add(ae),Dt||nt.enqueue(()=>{ae===t&&t.flush()})}return ae}static enqueue(t){It.length===0&&queueMicrotask(Qn),It.unshift(t)}}function rt(e){var t=Dt;Dt=!0;try{for(var n;;){if(ws(),tt.length===0&&(ae?.flush(),tt.length===0))return Ot=null,n;er()}}finally{Dt=t}}function er(){var e=mt;dn=!0;try{var t=0;for(mr(!0);tt.length>0;){var n=nt.ensure();if(t++>1e3){var r,s;Ts()}n.process(tt),Ge.clear()}}finally{dn=!1,mr(e),Ot=null}}function Ts(){try{us()}catch(e){on(e,Ot)}}let st=null;function tr(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(Qe|Re))===0&&qt(r)&&(st=[],_t(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?hr(r):r.fn=null),st?.length>0)){Ge.clear();for(const s of st)_t(s);st=[]}}st=null}}function vt(e){for(var t=Ot=e;t.parent!==null;){t=t.parent;var n=t.f;if(dn&&t===N&&(n&ct)!==0)return;if((n&(He|Fe))!==0){if((n&fe)===0)return;t.f^=fe}}tt.push(t)}const Ge=new Map;function Ct(e,t){var n={f:0,v:e,reactions:null,equals:Fn,rv:0,wv:0};return n}function he(e,t){const n=Ct(e);return js(n),n}function nr(e,t=!1,n=!0){const r=Ct(e);return t||(r.equals=Bn),r}function re(e,t,n=!1){O!==null&&(!qe||(O.f&On)!==0)&&Yn()&&(O.f&(_e|ct|rn|On))!==0&&!Ue?.includes(e)&&vs();let r=n?it(t):t;return Lt(e,r)}function Lt(e,t){if(!e.equals(t)){var n=e.v;at?Ge.set(e,t):Ge.set(e,n),e.v=t;var r=nt.ensure();r.capture(e,n),(e.f&_e)!==0&&((e.f&Ce)!==0&&fn(e),pe(e,(e.f&xe)===0?fe:We)),e.wv=gr(),rr(e,Ce),N!==null&&(N.f&fe)!==0&&(N.f&(Fe|He))===0&&(ke===null?zs([e]):ke.push(e))}return t}function hn(e){re(e,e.v+1)}function rr(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,s=0;s<r;s++){var a=n[s],i=a.f,o=(i&Ce)===0;o&&pe(a,t),(i&_e)!==0?rr(a,We):o&&((i&ct)!==0&&st!==null&&st.push(a),vt(a))}}function it(e){if(typeof e!="object"||e===null||Rt in e)return e;const t=Rn(e);if(t!==Qr&&t!==es)return e;var n=new Map,r=Xt(e),s=he(0),a=ot,i=o=>{if(ot===a)return o();var f=O,u=ot;Te(null),br(a);var c=o();return Te(f),br(u),c};return r&&n.set("length",he(e.length)),new Proxy(e,{defineProperty(o,f,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&ds();var c=n.get(f);return c===void 0?c=i(()=>{var h=he(u.value);return n.set(f,h),h}):re(c,u.value,!0),!0},deleteProperty(o,f){var u=n.get(f);if(u===void 0){if(f in o){const c=i(()=>he(ue));n.set(f,c),hn(s)}}else re(u,ue),hn(s);return!0},get(o,f,u){if(f===Rt)return e;var c=n.get(f),h=f in o;if(c===void 0&&(!h||Ke(o,f)?.writable)&&(c=i(()=>{var d=it(h?o[f]:ue),m=he(d);return m}),n.set(f,c)),c!==void 0){var p=j(c);return p===ue?void 0:p}return Reflect.get(o,f,u)},getOwnPropertyDescriptor(o,f){var u=Reflect.getOwnPropertyDescriptor(o,f);if(u&&"value"in u){var c=n.get(f);c&&(u.value=j(c))}else if(u===void 0){var h=n.get(f),p=h?.v;if(h!==void 0&&p!==ue)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return u},has(o,f){if(f===Rt)return!0;var u=n.get(f),c=u!==void 0&&u.v!==ue||Reflect.has(o,f);if(u!==void 0||N!==null&&(!c||Ke(o,f)?.writable)){u===void 0&&(u=i(()=>{var p=c?it(o[f]):ue,d=he(p);return d}),n.set(f,u));var h=j(u);if(h===ue)return!1}return c},set(o,f,u,c){var h=n.get(f),p=f in o;if(r&&f==="length")for(var d=u;d<h.v;d+=1){var m=n.get(d+"");m!==void 0?re(m,ue):d in o&&(m=i(()=>he(ue)),n.set(d+"",m))}if(h===void 0)(!p||Ke(o,f)?.writable)&&(h=i(()=>he(void 0)),re(h,it(u)),n.set(f,h));else{p=h.v!==ue;var w=i(()=>it(u));re(h,w)}var x=Reflect.getOwnPropertyDescriptor(o,f);if(x?.set&&x.set.call(c,u),!p){if(r&&typeof f=="string"){var V=n.get("length"),S=Number(f);Number.isInteger(S)&&S>=V.v&&re(V,S+1)}hn(s)}return!0},ownKeys(o){j(s);var f=Reflect.ownKeys(o).filter(h=>{var p=n.get(h);return p===void 0||p.v!==ue});for(var[u,c]of n)c.v!==ue&&!(u in o)&&f.push(u);return f},setPrototypeOf(){hs()}})}var sr,ir,ar,or;function vn(){if(sr===void 0){sr=window,ir=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;ar=Ke(t,"firstChild").get,or=Ke(t,"nextSibling").get,Nn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Nn(n)&&(n.__t=void 0)}}function Be(e=""){return document.createTextNode(e)}function Je(e){return ar.call(e)}function Ae(e){return or.call(e)}function L(e,t){if(!A)return Je(e);var n=Je(B);if(n===null)n=B.appendChild(Be());else if(t&&n.nodeType!==qn){var r=Be();return n?.before(r),be(r),r}return be(n),n}function ge(e,t){if(!A){var n=Je(e);return n instanceof Comment&&n.data===""?Ae(n):n}return B}function Z(e,t=1,n=!1){let r=A?B:e;for(var s;t--;)s=r,r=Ae(r);if(!A)return r;if(n&&r?.nodeType!==qn){var a=Be();return r===null?s?.after(a):r.before(a),be(a),a}return be(r),r}function lr(e){e.textContent=""}function ur(){return!1}function pn(e){var t=O,n=N;Te(null),je(null);try{return e()}finally{Te(t),je(n)}}function ks(e){N===null&&O===null&&ls(),O!==null&&(O.f&xe)!==0&&N===null&&os(),at&&as()}function Ms(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function De(e,t,n,r=!0){var s=N;s!==null&&(s.f&Re)!==0&&(e|=Re);var a={ctx:Ne,deps:null,nodes_start:null,nodes_end:null,f:e|Ce,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{_t(a),a.f|=en}catch(f){throw Le(a),f}else t!==null&&vt(a);if(r){var i=a;if(n&&i.deps===null&&i.teardown===null&&i.nodes_start===null&&i.first===i.last&&(i.f&dt)===0&&(i=i.first),i!==null&&(i.parent=s,s!==null&&Ms(i,s),O!==null&&(O.f&_e)!==0&&(e&He)===0)){var o=O;(o.effects??=[]).push(i)}}return a}function Ps(e){const t=De(Qt,null,!1);return pe(t,fe),t.teardown=e,t}function Rs(e){ks();var t=N.f,n=!O&&(t&Fe)!==0&&(t&en)===0;if(n){var r=Ne;(r.e??=[]).push(e)}else return fr(e)}function fr(e){return De(Kt|ns,e,!1)}function Ns(e){nt.ensure();const t=De(He|dt,e,!0);return()=>{Le(t)}}function As(e){nt.ensure();const t=De(He|dt,e,!0);return(n={})=>new Promise(r=>{n.outro?_n(t,()=>{Le(t),r(void 0)}):(Le(t),r(void 0))})}function Is(e){return De(Kt,e,!1)}function Os(e){return De(rn|dt,e,!0)}function Ds(e,t=0){return De(Qt|t,e,!0)}function we(e,t=[],n=[]){xs(t,n,r=>{De(Qt,()=>e(...r.map(j)),!0)})}function mn(e,t=0){var n=De(ct|t,e,!0);return n}function pt(e,t=!0){return De(Fe|dt,e,!0,t)}function cr(e){var t=e.teardown;if(t!==null){const n=at,r=O;_r(!0),Te(null);try{t.call(null)}finally{_r(n),Te(r)}}}function dr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&pn(()=>{s.abort(sn)});var r=n.next;(n.f&He)!==0?n.parent=null:Le(n,t),n=r}}function Ls(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Fe)===0&&Le(t),t=n}}function Le(e,t=!0){var n=!1;(t||(e.f&Dn)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(qs(e.nodes_start,e.nodes_end),n=!0),dr(e,t&&!n),jt(e,0),pe(e,Qe);var r=e.transitions;if(r!==null)for(const a of r)a.stop();cr(e);var s=e.parent;s!==null&&s.first!==null&&hr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function qs(e,t){for(;e!==null;){var n=e===t?null:Ae(e);e.remove(),e=n}}function hr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function _n(e,t){var n=[];yn(e,n,!0),vr(n,()=>{Le(e),t&&t()})}function vr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var s of e)s.out(r)}else t()}function yn(e,t,n){if((e.f&Re)===0){if(e.f^=Re,e.transitions!==null)for(const i of e.transitions)(i.is_global||n)&&t.push(i);for(var r=e.first;r!==null;){var s=r.next,a=(r.f&tn)!==0||(r.f&Fe)!==0;yn(r,t,a?n:!1),r=s}}}function bn(e){pr(e,!0)}function pr(e,t){if((e.f&Re)!==0){e.f^=Re,(e.f&fe)===0&&(pe(e,Ce),vt(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&tn)!==0||(n.f&Fe)!==0;pr(n,s?t:!1),n=r}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let mt=!1;function mr(e){mt=e}let at=!1;function _r(e){at=e}let O=null,qe=!1;function Te(e){O=e}let N=null;function je(e){N=e}let Ue=null;function js(e){O!==null&&(Ue===null?Ue=[e]:Ue.push(e))}let ve=null,$e=0,ke=null;function zs(e){ke=e}let yr=1,Tt=0,ot=Tt;function br(e){ot=e}let Xe=!1;function gr(){return++yr}function qt(e){var t=e.f;if((t&Ce)!==0)return!0;if((t&We)!==0){var n=e.deps,r=(t&xe)!==0;if(n!==null){var s,a,i=(t&Pt)!==0,o=r&&N!==null&&!Xe,f=n.length;if((i||o)&&(N===null||(N.f&Qe)===0)){var u=e,c=u.parent;for(s=0;s<f;s++)a=n[s],(i||!a?.reactions?.includes(u))&&(a.reactions??=[]).push(u);i&&(u.f^=Pt),o&&c!==null&&(c.f&xe)===0&&(u.f^=xe)}for(s=0;s<f;s++)if(a=n[s],qt(a)&&Xn(a),a.wv>e.wv)return!0}(!r||N!==null&&!Xe)&&pe(e,fe)}return!1}function wr(e,t,n=!0){var r=e.reactions;if(r!==null&&!Ue?.includes(e))for(var s=0;s<r.length;s++){var a=r[s];(a.f&_e)!==0?wr(a,t,!1):t===a&&(n?pe(a,Ce):(a.f&fe)!==0&&pe(a,We),vt(a))}}function $r(e){var t=ve,n=$e,r=ke,s=O,a=Xe,i=Ue,o=Ne,f=qe,u=ot,c=e.f;ve=null,$e=0,ke=null,Xe=(c&xe)!==0&&(qe||!mt||O===null),O=(c&(Fe|He))===0?e:null,Ue=null,At(e.ctx),qe=!1,ot=++Tt,e.ac!==null&&(pn(()=>{e.ac.abort(sn)}),e.ac=null);try{e.f|=nn;var h=e.fn,p=h(),d=e.deps;if(ve!==null){var m;if(jt(e,$e),d!==null&&$e>0)for(d.length=$e+ve.length,m=0;m<ve.length;m++)d[$e+m]=ve[m];else e.deps=d=ve;if(!Xe||(c&_e)!==0&&e.reactions!==null)for(m=$e;m<d.length;m++)(d[m].reactions??=[]).push(e)}else d!==null&&$e<d.length&&(jt(e,$e),d.length=$e);if(Yn()&&ke!==null&&!qe&&d!==null&&(e.f&(_e|We|Ce))===0)for(m=0;m<ke.length;m++)wr(ke[m],e);return s!==null&&s!==e&&(Tt++,ke!==null&&(r===null?r=ke:r.push(...ke))),(e.f&et)!==0&&(e.f^=et),p}catch(w){return ys(w)}finally{e.f^=nn,ve=t,$e=n,ke=r,O=s,Xe=a,Ue=i,At(o),qe=f,ot=u}}function Fs(e,t){let n=t.reactions;if(n!==null){var r=Zr.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}n===null&&(t.f&_e)!==0&&(ve===null||!ve.includes(t))&&(pe(t,We),(t.f&(xe|Pt))===0&&(t.f^=Pt),Jn(t),jt(t,0))}function jt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Fs(e,n[r])}function _t(e){var t=e.f;if((t&Qe)===0){pe(e,fe);var n=N,r=mt;N=e,mt=!0;try{(t&ct)!==0?Ls(e):dr(e),cr(e);var s=$r(e);e.teardown=typeof s=="function"?s:null,e.wv=yr;var a;Pn&&ms&&(e.f&Ce)!==0&&e.deps}finally{mt=r,N=n}}}function j(e){var t=e.f,n=(t&_e)!==0;if(O!==null&&!qe){var r=N!==null&&(N.f&Qe)!==0;if(!r&&!Ue?.includes(e)){var s=O.deps;if((O.f&nn)!==0)e.rv<Tt&&(e.rv=Tt,ve===null&&s!==null&&s[$e]===e?$e++:ve===null?ve=[e]:(!Xe||!ve.includes(e))&&ve.push(e));else{(O.deps??=[]).push(e);var a=e.reactions;a===null?e.reactions=[O]:a.includes(O)||a.push(O)}}}else if(n&&e.deps===null&&e.effects===null){var i=e,o=i.parent;o!==null&&(o.f&xe)===0&&(i.f^=xe)}if(at){if(Ge.has(e))return Ge.get(e);if(n){i=e;var f=i.v;return((i.f&fe)===0&&i.reactions!==null||Er(i))&&(f=fn(i)),Ge.set(i,f),f}}else n&&(i=e,qt(i)&&Xn(i));if((e.f&et)!==0)throw e.v;return e.v}function Er(e){if(e.v===ue)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Ge.has(t)||(t.f&_e)!==0&&Er(t))return!0;return!1}function Bs(e){var t=qe;try{return qe=!0,e()}finally{qe=t}}const Us=-7169;function pe(e,t){e.f=e.f&Us|t}const Sr=new Set,gn=new Set;function Vs(e,t,n,r={}){function s(a){if(r.capture||kt.call(t,a),!a.cancelBubble)return pn(()=>n?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?gs(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function zt(e,t,n,r,s){var a={capture:r,passive:s},i=Vs(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ps(()=>{t.removeEventListener(e,i,a)})}function Ys(e){for(var t=0;t<e.length;t++)Sr.add(e[t]);for(var n of gn)n(e)}let xr=null;function kt(e){var t=this,n=t.ownerDocument,r=e.type,s=e.composedPath?.()||[],a=s[0]||e.target;xr=e;var i=0,o=xr===e&&e.__root;if(o){var f=s.indexOf(o);if(f!==-1&&(t===document||t===window)){e.__root=t;return}var u=s.indexOf(t);if(u===-1)return;f<=u&&(i=f)}if(a=s[i]||e.target,a!==t){ft(e,"currentTarget",{configurable:!0,get(){return a||n}});var c=O,h=N;Te(null),je(null);try{for(var p,d=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var w=a["__"+r];if(w!=null&&(!a.disabled||e.target===a))if(Xt(w)){var[x,...V]=w;x.apply(a,[e,...V])}else w.call(a,e)}catch(S){p?d.push(S):p=S}if(e.cancelBubble||m===t||m===null)break;a=m}if(p){for(let S of d)queueMicrotask(()=>{throw S});throw p}}finally{e.__root=t,delete e.currentTarget,Te(c),je(h)}}}let Me;function Hs(){Me=void 0}function Ws(e){let t=null,n=A;var r;if(A){for(t=B,Me===void 0&&(Me=Je(document.head));Me!==null&&(Me.nodeType!==ht||Me.data!==Wt);)Me=Ae(Me);Me===null?ye(!1):Me=be(Ae(Me))}A||(r=document.head.appendChild(Be()));try{mn(()=>e(r),Dn)}finally{n&&(ye(!0),Me=B,be(t))}}function Gs(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function yt(e,t){var n=N;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function oe(e,t){var n=(t&Gr)!==0,r=(t&Jr)!==0,s,a=!e.startsWith("<!>");return()=>{if(A)return yt(B,null),B;s===void 0&&(s=Gs(a?e:"<!>"+e),n||(s=Je(s)));var i=r||ir?document.importNode(s,!0):s.cloneNode(!0);if(n){var o=Je(i),f=i.lastChild;yt(o,f)}else yt(i,i);return i}}function bt(){if(A)return yt(B,null),B;var e=document.createDocumentFragment(),t=document.createComment(""),n=Be();return e.append(t,n),yt(t,n),e}function K(e,t){if(A){N.nodes_end=B,St();return}e!==null&&e.before(t)}const Js=["touchstart","touchmove"];function Xs(e){return Js.includes(e)}function Ze(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+"")}function Cr(e,t){return Tr(e,t)}function Zs(e,t){vn(),t.intro=t.intro??!1;const n=t.target,r=A,s=B;try{for(var a=Je(n);a&&(a.nodeType!==ht||a.data!==Wt);)a=Ae(a);if(!a)throw ut;ye(!0),be(a),St();const i=Tr(e,{...t,anchor:a});if(B===null||B.nodeType!==ht||B.data!==Jt)throw Nt(),ut;return ye(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
|
|
2
|
-
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw i;return i!==ut&&console.warn("Failed to hydrate: ",i),t.recover===!1&&fs(),vn(),lr(n),ye(!1),Cr(e,t)}finally{ye(r),be(s),Hs()}}const gt=new Map;function Tr(e,{target:t,anchor:n,props:r={},events:s,context:a,intro:i=!0}){vn();var o=new Set,f=h=>{for(var p=0;p<h.length;p++){var d=h[p];if(!o.has(d)){o.add(d);var m=Xs(d);t.addEventListener(d,kt,{passive:m});var w=gt.get(d);w===void 0?(document.addEventListener(d,kt,{passive:m}),gt.set(d,1)):gt.set(d,w+1)}}};f(Zt(Sr)),gn.add(f);var u=void 0,c=As(()=>{var h=n??t.appendChild(Be());return pt(()=>{if(a){Un({});var p=Ne;p.c=a}s&&(r.$$events=s),A&&yt(h,null),u=e(h,r)||{},A&&(N.nodes_end=B),a&&Vn()}),()=>{for(var p of o){t.removeEventListener(p,kt);var d=gt.get(p);--d===0?(document.removeEventListener(p,kt),gt.delete(p)):gt.set(p,d)}gn.delete(f),h!==n&&h.parentNode?.removeChild(h)}});return wn.set(u,c),u}let wn=new WeakMap;function Ks(e,t){const n=wn.get(e);return n?(wn.delete(e),n(t)):Promise.resolve()}function Ie(e,t,n=!1){A&&St();var r=e,s=null,a=null,i=ue,o=n?tn:0,f=!1;const u=(d,m=!0)=>{f=!0,p(m,d)};var c=null;function h(){c!==null&&(c.lastChild.remove(),r.before(c),c=null);var d=i?s:a,m=i?a:s;d&&bn(d),m&&_n(m,()=>{i?a=null:s=null})}const p=(d,m)=>{if(i===(i=d))return;let w=!1;if(A){const q=zn(r)===Gt;!!i===q&&(r=an(),be(r),ye(!1),w=!0)}var x=ur(),V=r;if(x&&(c=document.createDocumentFragment(),c.append(V=Be())),i?s??=m&&pt(()=>m(V)):a??=m&&pt(()=>m(V)),x){var S=ae,M=i?s:a,G=i?a:s;M&&S.skipped_effects.delete(M),G&&S.skipped_effects.add(G),S.add_callback(h)}else h();w&&ye(!0)};mn(()=>{f=!1,t(u),f||p(null,null)},o),A&&(r=B)}function Qs(e,t,n){for(var r=e.items,s=[],a=t.length,i=0;i<a;i++)yn(t[i].e,s,!0);var o=a>0&&s.length===0&&n!==null;if(o){var f=n.parentNode;lr(f),f.append(n),r.clear(),ze(e,t[0].prev,t[a-1].next)}vr(s,()=>{for(var u=0;u<a;u++){var c=t[u];o||(r.delete(c.k),ze(e,c.prev,c.next)),Le(c.e,!o)}})}function ei(e,t,n,r,s,a=null){var i=e,o={flags:t,items:new Map,first:null};{var f=e;i=A?be(Je(f)):f.appendChild(Be())}A&&St();var u=null,c=!1,h=new Map,p=Gn(()=>{var x=n();return Xt(x)?x:x==null?[]:Zt(x)}),d,m;function w(){ti(m,d,o,h,i,s,t,r,n),a!==null&&(d.length===0?u?bn(u):u=pt(()=>a(i)):u!==null&&_n(u,()=>{u=null}))}mn(()=>{m??=N,d=j(p);var x=d.length;if(c&&x===0)return;c=x===0;let V=!1;if(A){var S=zn(i)===Gt;S!==(x===0)&&(i=an(),be(i),ye(!1),V=!0)}if(A){for(var M=null,G,q=0;q<x;q++){if(B.nodeType===ht&&B.data===Jt){i=B,V=!0,ye(!1);break}var te=d[q],ne=r(te,q);G=$n(B,o,M,null,te,ne,q,s,t,n),o.items.set(ne,G),M=G}x>0&&be(an())}if(A)x===0&&a&&(u=pt(()=>a(i)));else if(ur()){var le=new Set,ie=ae;for(q=0;q<x;q+=1){te=d[q],ne=r(te,q);var Y=o.items.get(ne)??h.get(ne);Y?kr(Y,te,q):(G=$n(null,o,null,null,te,ne,q,s,t,n,!0),h.set(ne,G)),le.add(ne)}for(const[P,me]of o.items)le.has(P)||ie.skipped_effects.add(me.e);ie.add_callback(w)}else w();V&&ye(!0),j(p)}),A&&(i=B)}function ti(e,t,n,r,s,a,i,o,f){var u=t.length,c=n.items,h=n.first,p=h,d,m=null,w=[],x=[],V,S,M,G;for(G=0;G<u;G+=1){if(V=t[G],S=o(V,G),M=c.get(S),M===void 0){var q=r.get(S);if(q!==void 0){r.delete(S),c.set(S,q);var te=m?m.next:p;ze(n,m,q),ze(n,q,te),En(q,te,s),m=q}else{var ne=p?p.e.nodes_start:s;m=$n(ne,n,m,m===null?n.first:m.next,V,S,G,a,i,f)}c.set(S,m),w=[],x=[],p=m.next;continue}if(kr(M,V,G),(M.e.f&Re)!==0&&bn(M.e),M!==p){if(d!==void 0&&d.has(M)){if(w.length<x.length){var le=x[0],ie;m=le.prev;var Y=w[0],P=w[w.length-1];for(ie=0;ie<w.length;ie+=1)En(w[ie],le,s);for(ie=0;ie<x.length;ie+=1)d.delete(x[ie]);ze(n,Y.prev,P.next),ze(n,m,Y),ze(n,P,le),p=le,m=P,G-=1,w=[],x=[]}else d.delete(M),En(M,p,s),ze(n,M.prev,M.next),ze(n,M,m===null?n.first:m.next),ze(n,m,M),m=M;continue}for(w=[],x=[];p!==null&&p.k!==S;)(p.e.f&Re)===0&&(d??=new Set).add(p),x.push(p),p=p.next;if(p===null)continue;M=p}w.push(M),m=M,p=M.next}if(p!==null||d!==void 0){for(var me=d===void 0?[]:Zt(d);p!==null;)(p.e.f&Re)===0&&me.push(p),p=p.next;var D=me.length;if(D>0){var v=u===0?s:null;Qs(n,me,v)}}e.first=n.first&&n.first.e,e.last=m&&m.e;for(var y of r.values())Le(y.e);r.clear()}function kr(e,t,n,r){Lt(e.v,t),e.i=n}function $n(e,t,n,r,s,a,i,o,f,u,c){var h=(f&Fr)!==0,p=(f&Ur)===0,d=h?p?nr(s,!1,!1):Ct(s):s,m=(f&Br)===0?i:Ct(i),w={i:m,v:d,k:a,a:null,e:null,prev:n,next:r};try{if(e===null){var x=document.createDocumentFragment();x.append(e=Be())}return w.e=pt(()=>o(e,d,m,u),A),w.e.prev=n&&n.e,w.e.next=r&&r.e,n===null?c||(t.first=w):(n.next=w,n.e.next=w.e),r!==null&&(r.prev=w,r.e.prev=w.e),w}finally{}}function En(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,s=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==null&&a!==r;){var i=Ae(a);s.before(a),a=i}}function ze(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function Ft(e,t,n,r,s){A&&St();var a=t.$$slots?.[n],i=!1;a===!0&&(a=t[n==="default"?"children":n],i=!0),a===void 0?s!==null&&s(e):a(e,i?()=>r:r)}function ni(e,t){Is(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const s=document.createElement("style");s.id=t.hash,s.textContent=t.code,r.appendChild(s)}})}function ri(e,t,n){var r=e==null?"":""+e;return r===""?null:r}function si(e,t){return e==null?null:String(e)}function Bt(e,t,n,r,s,a){var i=e.__className;if(A||i!==n||i===void 0){var o=ri(n);(!A||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):e.className=o),e.__className=n}return a}function Sn(e,t,n,r){var s=e.__style;if(A||s!==t){var a=si(t);(!A||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e.__style=t}return r}const ii=Symbol("is custom element"),ai=Symbol("is html");function oi(e,t,n,r){var s=li(e);A&&(s[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||s[t]!==(s[t]=n)&&(t==="loading"&&(e[rs]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Mr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ee(e,t,n){var r=O,s=N;let a=A;A&&ye(!1),Te(null),je(null);try{t!=="style"&&(xn.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?Mr(e).includes(t):n&&typeof n=="object")?e[t]=n:oi(e,t,n==null?n:String(n))}finally{Te(r),je(s),a&&ye(!0)}}function li(e){return e.__attributes??={[ii]:e.nodeName.includes("-"),[ai]:e.namespaceURI===Xr}}var xn=new Map;function Mr(e){var t=e.getAttribute("is")||e.nodeName,n=xn.get(t);if(n)return n;xn.set(t,n=[]);for(var r,s=e,a=Element.prototype;a!==s;){r=Kr(s);for(var i in r)r[i].set&&n.push(i);s=Rn(s)}return n}let Ut=!1;function ui(e){var t=Ut;try{return Ut=!1,[e(),Ut]}finally{Ut=t}}function wt(e,t,n,r){var s=(n&Hr)!==0,a=(n&Wr)!==0,i=r,o=!0,f=()=>(o&&(o=!1,i=a?Bs(r):r),i),u;if(s){var c=Rt in e||Ln in e;u=Ke(e,t)?.set??(c&&t in e?S=>e[t]=S:void 0)}var h,p=!1;s?[h,p]=ui(()=>e[t]):h=e[t],h===void 0&&r!==void 0&&(h=f(),u&&(cs(),u(h)));var d;if(d=()=>{var S=e[t];return S===void 0?f():(o=!0,S)},(n&Yr)===0)return d;if(u){var m=e.$$legacy;return(function(S,M){return arguments.length>0?((!M||m||p)&&u(M?d():S),S):d()})}var w=!1,x=((n&Vr)!==0?un:Gn)(()=>(w=!1,d()));s&&j(x);var V=N;return(function(S,M){if(arguments.length>0){const G=M?j(x):s?it(S):S;return re(x,G),w=!0,i!==void 0&&(i=G),S}return at&&w||(V.f&Qe)!==0?x.v:j(x)})}function fi(e){return new ci(e)}class ci{#t;#e;constructor(t){var n=new Map,r=(a,i)=>{var o=nr(i,!1,!1);return n.set(a,o),o};const s=new Proxy({...t.props||{},$$events:{}},{get(a,i){return j(n.get(i)??r(i,Reflect.get(a,i)))},has(a,i){return i===Ln?!0:(j(n.get(i)??r(i,Reflect.get(a,i))),Reflect.has(a,i))},set(a,i,o){return re(n.get(i)??r(i,o),o),Reflect.set(a,i,o)}});this.#e=(t.hydrate?Zs:Cr)(t.component,{target:t.target,anchor:t.anchor,props:s,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&rt(),this.#t=s.$$events;for(const a of Object.keys(this.#e))a==="$set"||a==="$destroy"||a==="$on"||ft(this,a,{get(){return this.#e[a]},set(i){this.#e[a]=i},enumerable:!0});this.#e.$set=a=>{Object.assign(s,a)},this.#e.$destroy=()=>{Ks(this.#e)}}$set(t){this.#e.$set(t)}$on(t,n){this.#t[t]=this.#t[t]||[];const r=(...s)=>n.call(this,...s);return this.#t[t].push(r),()=>{this.#t[t]=this.#t[t].filter(s=>s!==r)}}$destroy(){this.#e.$destroy()}}let Pr;typeof HTMLElement=="function"&&(Pr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return s=>{const a=document.createElement("slot");r!=="default"&&(a.name=r),K(s,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=di(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const s=this.$$g_p(r.name);s in this.$$d||(this.$$d[s]=Vt(s,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=fi({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Ns(()=>{Ds(()=>{this.$$r=!0;for(const r of Mt(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const s=Vt(r,this.$$d[r],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,s)}this.$$r=!1})});for(const r in this.$$l)for(const s of this.$$l[r]){const a=this.$$c.$on(r,s);this.$$l_u.set(s,a)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Vt(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Mt(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Vt(e,t,n,r){const s=n[e]?.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(s){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function di(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function hi(e,t,n,r,s,a){let i=class extends Pr{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return Mt(t).map(o=>(t[o].attribute||o).toLowerCase())}};return Mt(t).forEach(o=>{ft(i.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(f){f=Vt(o,f,t),this.$$d[o]=f;var u=this.$$c;if(u){var c=Ke(u,o)?.get;c?u[o]=f:u.$set({[o]:f})}}})}),r.forEach(o=>{ft(i.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=i,i}/*! *****************************************************************************
|
|
1
|
+
(function(Mn){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const Fr=1,Br=2,Ur=16,Vr=1,Yr=4,Hr=8,Wr=16,Gr=1,Jr=2,Wt="[",Gt="[!",Jt="]",ut={},ue=Symbol(),Xr="http://www.w3.org/1999/xhtml",Pn=!1;var Xt=Array.isArray,Zr=Array.prototype.indexOf,Zt=Array.from,Mt=Object.keys,dt=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,Kr=Object.getOwnPropertyDescriptors,Qr=Object.prototype,ei=Array.prototype,Rn=Object.getPrototypeOf,Nn=Object.isExtensible;function An(e){for(var t=0;t<e.length;t++)e[t]()}function ti(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const me=2,Kt=4,Qt=8,ct=16,Fe=32,He=64,In=128,xe=256,Pt=512,de=1024,Se=2048,We=4096,Re=8192,Qe=16384,en=32768,tn=65536,On=1<<17,Dn=1<<18,ft=1<<19,ni=1<<20,nn=1<<21,rn=1<<22,et=1<<23,Rt=Symbol("$state"),Ln=Symbol("legacy props"),ri=Symbol(""),sn=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},qn=3,ht=8;function ii(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function si(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ai(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function oi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function li(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ui(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function di(){throw new Error("https://svelte.dev/e/hydration_failed")}function ci(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function fi(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function hi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function vi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Nt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let A=!1;function _e(e){A=e}let B;function ye(e){if(e===null)throw Nt(),ut;return B=e}function Et(){return ye(Ae(B))}function I(e){if(A){if(Ae(B)!==null)throw Nt(),ut;B=e}}function jn(e=1){if(A){for(var t=e,n=B;t--;)n=Ae(n);B=n}}function an(){for(var e=0,t=B;;){if(t.nodeType===ht){var n=t.data;if(n===Jt){if(e===0)return t;e-=1}else(n===Wt||n===Gt)&&(e+=1)}var r=Ae(t);t.remove(),t=r}}function zn(e){if(!e||e.nodeType!==ht)throw Nt(),ut;return e.data}function Fn(e){return e===this.v}function bi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Bn(e){return!bi(e,this.v)}let pi=!1,Ne=null;function At(e){Ne=e}function Un(e,t=!1,n){Ne={p:Ne,c:null,e:null,s:e,x:null,l:null}}function Vn(e){var t=Ne,n=t.e;if(n!==null){t.e=null;for(var r of n)dr(r)}return e!==void 0&&(t.x=e),Ne=t.p,e??{}}function Yn(){return!0}const mi=new WeakMap;function _i(e){var t=N;if(t===null)return O.f|=et,e;if((t.f&en)===0){if((t.f&In)===0)throw!t.parent&&e instanceof Error&&Hn(e),e;t.b.error(e)}else on(e,t)}function on(e,t){for(;t!==null;){if((t.f&In)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e instanceof Error&&Hn(e),e}function Hn(e){const t=mi.get(e);t&&(dt(e,"message",{value:t.message}),dt(e,"stack",{value:t.stack}))}let xt=[],ln=[];function Wn(){var e=xt;xt=[],An(e)}function yi(){var e=ln;ln=[],An(e)}function gi(e){xt.length===0&&queueMicrotask(Wn),xt.push(e)}function wi(){xt.length>0&&Wn(),ln.length>0&&yi()}function ki(){const e=N.b;return e===null&&ii(),e}function un(e){var t=me|Se,n=O!==null&&(O.f&me)!==0?O:null;return N===null||n!==null&&(n.f&xe)!==0?t|=xe:N.f|=ft,{ctx:Ne,deps:null,effects:null,equals:Fn,f:t,fn:e,reactions:null,rv:0,v:ue,wv:0,parent:n??N,ac:null}}function $i(e,t){let n=N;n===null&&si();var r=n.b,i=void 0,a=St(ue),s=null,o=!O;return Oi(()=>{try{var d=e();s&&Promise.resolve(d).catch(()=>{})}catch(f){d=Promise.reject(f)}var u=()=>d;i=s?.then(u,u)??Promise.resolve(d),s=i;var c=ae,h=r.is_pending();o&&(r.update_pending_count(1),h||c.increment());const b=(f,p=void 0)=>{s=null,h||c.activate(),p?p!==sn&&(a.f|=et,Lt(a,p)):((a.f&et)!==0&&(a.f^=et),Lt(a,f)),o&&(r.update_pending_count(-1),h||c.decrement()),Zn()};if(i.then(b,f=>b(null,f||"unknown")),c)return()=>{queueMicrotask(()=>c.neuter())}}),new Promise(d=>{function u(c){function h(){c===i?d(a):u(i)}c.then(h,h)}u(i)})}function Gn(e){const t=un(e);return t.equals=Bn,t}function Jn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Le(t[n])}}function Ei(e){for(var t=e.parent;t!==null;){if((t.f&me)===0)return t;t=t.parent}return null}function dn(e){var t,n=N;je(Ei(e));try{Jn(e),t=kr(e)}finally{je(n)}return t}function Xn(e){var t=dn(e);if(e.equals(t)||(e.v=t,e.wv=gr()),!at){var n=(Xe||(e.f&xe)!==0)&&e.deps!==null?We:de;be(e,n)}}function xi(e,t,n){const r=un;if(t.length===0){n(e.map(r));return}var i=ae,a=N,s=Si(),o=ki();Promise.all(t.map(d=>$i(d))).then(d=>{i?.activate(),s();try{n([...e.map(r),...d])}catch(u){(a.f&Qe)===0&&on(u,a)}i?.deactivate(),Zn()}).catch(d=>{o.error(d)})}function Si(){var e=N,t=O,n=Ne,r=ae;return function(){je(e),Ce(t),At(n),r?.activate()}}function Zn(){je(null),Ce(null),At(null)}const cn=new Set;let ae=null,Kn=new Set,It=[];function Qn(){const e=It.shift();It.length>0&&queueMicrotask(Qn),e()}let tt=[],Ot=null,fn=!1,Dt=!1;class nt{current=new Map;#t=new Map;#e=new Set;#n=0;#u=null;#d=!1;#i=[];#a=[];#s=[];#r=[];#o=[];#c=[];#f=[];skipped_effects=new Set;process(t){tt=[];for(const i of t)this.#v(i);if(this.#i.length===0&&this.#n===0){this.#h();var n=this.#s,r=this.#r;this.#s=[],this.#r=[],this.#o=[],ae=null,tr(n),tr(r),ae===null?ae=this:cn.delete(this),this.#u?.resolve()}else this.#l(this.#s),this.#l(this.#r),this.#l(this.#o);for(const i of this.#i)mt(i);for(const i of this.#a)mt(i);this.#i=[],this.#a=[]}#v(t){t.f^=de;for(var n=t.first;n!==null;){var r=n.f,i=(r&(Fe|He))!==0,a=i&&(r&de)!==0,s=a||(r&Re)!==0||this.skipped_effects.has(n);if(!s&&n.fn!==null){if(i)n.f^=de;else if((r&Kt)!==0)this.#r.push(n);else if((r&de)===0)if((r&rn)!==0){var o=n.b?.is_pending()?this.#a:this.#i;o.push(n)}else qt(n)&&((n.f&ct)!==0&&this.#o.push(n),mt(n));var d=n.first;if(d!==null){n=d;continue}}var u=n.parent;for(n=n.next;n===null&&u!==null;)n=u.next,u=u.parent}}#l(t){for(const n of t)((n.f&Se)!==0?this.#c:this.#f).push(n),be(n,de);t.length=0}capture(t,n){this.#t.has(t)||this.#t.set(t,n),this.current.set(t,t.v)}activate(){ae=this}deactivate(){ae=null;for(const t of Kn)if(Kn.delete(t),t(),ae!==null)break}neuter(){this.#d=!0}flush(){tt.length>0?er():this.#h(),ae===this&&(this.#n===0&&cn.delete(this),this.deactivate())}#h(){if(!this.#d)for(const t of this.#e)t();this.#e.clear()}increment(){this.#n+=1}decrement(){if(this.#n-=1,this.#n===0){for(const t of this.#c)be(t,Se),vt(t);for(const t of this.#f)be(t,We),vt(t);this.#s=[],this.#r=[],this.flush()}else this.deactivate()}add_callback(t){this.#e.add(t)}settled(){return(this.#u??=ti()).promise}static ensure(){if(ae===null){const t=ae=new nt;cn.add(ae),Dt||nt.enqueue(()=>{ae===t&&t.flush()})}return ae}static enqueue(t){It.length===0&&queueMicrotask(Qn),It.unshift(t)}}function rt(e){var t=Dt;Dt=!0;try{for(var n;;){if(wi(),tt.length===0&&(ae?.flush(),tt.length===0))return Ot=null,n;er()}}finally{Dt=t}}function er(){var e=pt;fn=!0;try{var t=0;for(pr(!0);tt.length>0;){var n=nt.ensure();if(t++>1e3){var r,i;Ci()}n.process(tt),Ge.clear()}}finally{fn=!1,pr(e),Ot=null}}function Ci(){try{ui()}catch(e){on(e,Ot)}}let it=null;function tr(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(Qe|Re))===0&&qt(r)&&(it=[],mt(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?hr(r):r.fn=null),it?.length>0)){Ge.clear();for(const i of it)mt(i);it=[]}}it=null}}function vt(e){for(var t=Ot=e;t.parent!==null;){t=t.parent;var n=t.f;if(fn&&t===N&&(n&ct)!==0)return;if((n&(He|Fe))!==0){if((n&de)===0)return;t.f^=de}}tt.push(t)}const Ge=new Map;function St(e,t){var n={f:0,v:e,reactions:null,equals:Fn,rv:0,wv:0};return n}function he(e,t){const n=St(e);return ji(n),n}function nr(e,t=!1,n=!0){const r=St(e);return t||(r.equals=Bn),r}function re(e,t,n=!1){O!==null&&(!qe||(O.f&On)!==0)&&Yn()&&(O.f&(me|ct|rn|On))!==0&&!Ue?.includes(e)&&vi();let r=n?st(t):t;return Lt(e,r)}function Lt(e,t){if(!e.equals(t)){var n=e.v;at?Ge.set(e,t):Ge.set(e,n),e.v=t;var r=nt.ensure();r.capture(e,n),(e.f&me)!==0&&((e.f&Se)!==0&&dn(e),be(e,(e.f&xe)===0?de:We)),e.wv=gr(),rr(e,Se),N!==null&&(N.f&de)!==0&&(N.f&(Fe|He))===0&&(Te===null?zi([e]):Te.push(e))}return t}function hn(e){re(e,e.v+1)}function rr(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var a=n[i],s=a.f,o=(s&Se)===0;o&&be(a,t),(s&me)!==0?rr(a,We):o&&((s&ct)!==0&&it!==null&&it.push(a),vt(a))}}function st(e){if(typeof e!="object"||e===null||Rt in e)return e;const t=Rn(e);if(t!==Qr&&t!==ei)return e;var n=new Map,r=Xt(e),i=he(0),a=ot,s=o=>{if(ot===a)return o();var d=O,u=ot;Ce(null),yr(a);var c=o();return Ce(d),yr(u),c};return r&&n.set("length",he(e.length)),new Proxy(e,{defineProperty(o,d,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&fi();var c=n.get(d);return c===void 0?c=s(()=>{var h=he(u.value);return n.set(d,h),h}):re(c,u.value,!0),!0},deleteProperty(o,d){var u=n.get(d);if(u===void 0){if(d in o){const c=s(()=>he(ue));n.set(d,c),hn(i)}}else re(u,ue),hn(i);return!0},get(o,d,u){if(d===Rt)return e;var c=n.get(d),h=d in o;if(c===void 0&&(!h||Ke(o,d)?.writable)&&(c=s(()=>{var f=st(h?o[d]:ue),p=he(f);return p}),n.set(d,c)),c!==void 0){var b=j(c);return b===ue?void 0:b}return Reflect.get(o,d,u)},getOwnPropertyDescriptor(o,d){var u=Reflect.getOwnPropertyDescriptor(o,d);if(u&&"value"in u){var c=n.get(d);c&&(u.value=j(c))}else if(u===void 0){var h=n.get(d),b=h?.v;if(h!==void 0&&b!==ue)return{enumerable:!0,configurable:!0,value:b,writable:!0}}return u},has(o,d){if(d===Rt)return!0;var u=n.get(d),c=u!==void 0&&u.v!==ue||Reflect.has(o,d);if(u!==void 0||N!==null&&(!c||Ke(o,d)?.writable)){u===void 0&&(u=s(()=>{var b=c?st(o[d]):ue,f=he(b);return f}),n.set(d,u));var h=j(u);if(h===ue)return!1}return c},set(o,d,u,c){var h=n.get(d),b=d in o;if(r&&d==="length")for(var f=u;f<h.v;f+=1){var p=n.get(f+"");p!==void 0?re(p,ue):f in o&&(p=s(()=>he(ue)),n.set(f+"",p))}if(h===void 0)(!b||Ke(o,d)?.writable)&&(h=s(()=>he(void 0)),re(h,st(u)),n.set(d,h));else{b=h.v!==ue;var w=s(()=>st(u));re(h,w)}var x=Reflect.getOwnPropertyDescriptor(o,d);if(x?.set&&x.set.call(c,u),!b){if(r&&typeof d=="string"){var V=n.get("length"),E=Number(d);Number.isInteger(E)&&E>=V.v&&re(V,E+1)}hn(i)}return!0},ownKeys(o){j(i);var d=Reflect.ownKeys(o).filter(h=>{var b=n.get(h);return b===void 0||b.v!==ue});for(var[u,c]of n)c.v!==ue&&!(u in o)&&d.push(u);return d},setPrototypeOf(){hi()}})}var ir,sr,ar,or;function vn(){if(ir===void 0){ir=window,sr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;ar=Ke(t,"firstChild").get,or=Ke(t,"nextSibling").get,Nn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Nn(n)&&(n.__t=void 0)}}function Be(e=""){return document.createTextNode(e)}function Je(e){return ar.call(e)}function Ae(e){return or.call(e)}function L(e,t){if(!A)return Je(e);var n=Je(B);if(n===null)n=B.appendChild(Be());else if(t&&n.nodeType!==qn){var r=Be();return n?.before(r),ye(r),r}return ye(n),n}function ge(e,t){if(!A){var n=Je(e);return n instanceof Comment&&n.data===""?Ae(n):n}return B}function Z(e,t=1,n=!1){let r=A?B:e;for(var i;t--;)i=r,r=Ae(r);if(!A)return r;if(n&&r?.nodeType!==qn){var a=Be();return r===null?i?.after(a):r.before(a),ye(a),a}return ye(r),r}function lr(e){e.textContent=""}function ur(){return!1}function bn(e){var t=O,n=N;Ce(null),je(null);try{return e()}finally{Ce(t),je(n)}}function Ti(e){N===null&&O===null&&li(),O!==null&&(O.f&xe)!==0&&N===null&&oi(),at&&ai()}function Mi(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function De(e,t,n,r=!0){var i=N;i!==null&&(i.f&Re)!==0&&(e|=Re);var a={ctx:Ne,deps:null,nodes_start:null,nodes_end:null,f:e|Se,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{mt(a),a.f|=en}catch(d){throw Le(a),d}else t!==null&&vt(a);if(r){var s=a;if(n&&s.deps===null&&s.teardown===null&&s.nodes_start===null&&s.first===s.last&&(s.f&ft)===0&&(s=s.first),s!==null&&(s.parent=i,i!==null&&Mi(s,i),O!==null&&(O.f&me)!==0&&(e&He)===0)){var o=O;(o.effects??=[]).push(s)}}return a}function Pi(e){const t=De(Qt,null,!1);return be(t,de),t.teardown=e,t}function Ri(e){Ti();var t=N.f,n=!O&&(t&Fe)!==0&&(t&en)===0;if(n){var r=Ne;(r.e??=[]).push(e)}else return dr(e)}function dr(e){return De(Kt|ni,e,!1)}function Ni(e){nt.ensure();const t=De(He|ft,e,!0);return()=>{Le(t)}}function Ai(e){nt.ensure();const t=De(He|ft,e,!0);return(n={})=>new Promise(r=>{n.outro?mn(t,()=>{Le(t),r(void 0)}):(Le(t),r(void 0))})}function Ii(e){return De(Kt,e,!1)}function Oi(e){return De(rn|ft,e,!0)}function Di(e,t=0){return De(Qt|t,e,!0)}function we(e,t=[],n=[]){xi(t,n,r=>{De(Qt,()=>e(...r.map(j)),!0)})}function pn(e,t=0){var n=De(ct|t,e,!0);return n}function bt(e,t=!0){return De(Fe|ft,e,!0,t)}function cr(e){var t=e.teardown;if(t!==null){const n=at,r=O;mr(!0),Ce(null);try{t.call(null)}finally{mr(n),Ce(r)}}}function fr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&bn(()=>{i.abort(sn)});var r=n.next;(n.f&He)!==0?n.parent=null:Le(n,t),n=r}}function Li(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Fe)===0&&Le(t),t=n}}function Le(e,t=!0){var n=!1;(t||(e.f&Dn)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(qi(e.nodes_start,e.nodes_end),n=!0),fr(e,t&&!n),jt(e,0),be(e,Qe);var r=e.transitions;if(r!==null)for(const a of r)a.stop();cr(e);var i=e.parent;i!==null&&i.first!==null&&hr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function qi(e,t){for(;e!==null;){var n=e===t?null:Ae(e);e.remove(),e=n}}function hr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function mn(e,t){var n=[];_n(e,n,!0),vr(n,()=>{Le(e),t&&t()})}function vr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function _n(e,t,n){if((e.f&Re)===0){if(e.f^=Re,e.transitions!==null)for(const s of e.transitions)(s.is_global||n)&&t.push(s);for(var r=e.first;r!==null;){var i=r.next,a=(r.f&tn)!==0||(r.f&Fe)!==0;_n(r,t,a?n:!1),r=i}}}function yn(e){br(e,!0)}function br(e,t){if((e.f&Re)!==0){e.f^=Re,(e.f&de)===0&&(be(e,Se),vt(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&tn)!==0||(n.f&Fe)!==0;br(n,i?t:!1),n=r}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let pt=!1;function pr(e){pt=e}let at=!1;function mr(e){at=e}let O=null,qe=!1;function Ce(e){O=e}let N=null;function je(e){N=e}let Ue=null;function ji(e){O!==null&&(Ue===null?Ue=[e]:Ue.push(e))}let ve=null,ke=0,Te=null;function zi(e){Te=e}let _r=1,Ct=0,ot=Ct;function yr(e){ot=e}let Xe=!1;function gr(){return++_r}function qt(e){var t=e.f;if((t&Se)!==0)return!0;if((t&We)!==0){var n=e.deps,r=(t&xe)!==0;if(n!==null){var i,a,s=(t&Pt)!==0,o=r&&N!==null&&!Xe,d=n.length;if((s||o)&&(N===null||(N.f&Qe)===0)){var u=e,c=u.parent;for(i=0;i<d;i++)a=n[i],(s||!a?.reactions?.includes(u))&&(a.reactions??=[]).push(u);s&&(u.f^=Pt),o&&c!==null&&(c.f&xe)===0&&(u.f^=xe)}for(i=0;i<d;i++)if(a=n[i],qt(a)&&Xn(a),a.wv>e.wv)return!0}(!r||N!==null&&!Xe)&&be(e,de)}return!1}function wr(e,t,n=!0){var r=e.reactions;if(r!==null&&!Ue?.includes(e))for(var i=0;i<r.length;i++){var a=r[i];(a.f&me)!==0?wr(a,t,!1):t===a&&(n?be(a,Se):(a.f&de)!==0&&be(a,We),vt(a))}}function kr(e){var t=ve,n=ke,r=Te,i=O,a=Xe,s=Ue,o=Ne,d=qe,u=ot,c=e.f;ve=null,ke=0,Te=null,Xe=(c&xe)!==0&&(qe||!pt||O===null),O=(c&(Fe|He))===0?e:null,Ue=null,At(e.ctx),qe=!1,ot=++Ct,e.ac!==null&&(bn(()=>{e.ac.abort(sn)}),e.ac=null);try{e.f|=nn;var h=e.fn,b=h(),f=e.deps;if(ve!==null){var p;if(jt(e,ke),f!==null&&ke>0)for(f.length=ke+ve.length,p=0;p<ve.length;p++)f[ke+p]=ve[p];else e.deps=f=ve;if(!Xe||(c&me)!==0&&e.reactions!==null)for(p=ke;p<f.length;p++)(f[p].reactions??=[]).push(e)}else f!==null&&ke<f.length&&(jt(e,ke),f.length=ke);if(Yn()&&Te!==null&&!qe&&f!==null&&(e.f&(me|We|Se))===0)for(p=0;p<Te.length;p++)wr(Te[p],e);return i!==null&&i!==e&&(Ct++,Te!==null&&(r===null?r=Te:r.push(...Te))),(e.f&et)!==0&&(e.f^=et),b}catch(w){return _i(w)}finally{e.f^=nn,ve=t,ke=n,Te=r,O=i,Xe=a,Ue=s,At(o),qe=d,ot=u}}function Fi(e,t){let n=t.reactions;if(n!==null){var r=Zr.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&(t.f&me)!==0&&(ve===null||!ve.includes(t))&&(be(t,We),(t.f&(xe|Pt))===0&&(t.f^=Pt),Jn(t),jt(t,0))}function jt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Fi(e,n[r])}function mt(e){var t=e.f;if((t&Qe)===0){be(e,de);var n=N,r=pt;N=e,pt=!0;try{(t&ct)!==0?Li(e):fr(e),cr(e);var i=kr(e);e.teardown=typeof i=="function"?i:null,e.wv=_r;var a;Pn&&pi&&(e.f&Se)!==0&&e.deps}finally{pt=r,N=n}}}function j(e){var t=e.f,n=(t&me)!==0;if(O!==null&&!qe){var r=N!==null&&(N.f&Qe)!==0;if(!r&&!Ue?.includes(e)){var i=O.deps;if((O.f&nn)!==0)e.rv<Ct&&(e.rv=Ct,ve===null&&i!==null&&i[ke]===e?ke++:ve===null?ve=[e]:(!Xe||!ve.includes(e))&&ve.push(e));else{(O.deps??=[]).push(e);var a=e.reactions;a===null?e.reactions=[O]:a.includes(O)||a.push(O)}}}else if(n&&e.deps===null&&e.effects===null){var s=e,o=s.parent;o!==null&&(o.f&xe)===0&&(s.f^=xe)}if(at){if(Ge.has(e))return Ge.get(e);if(n){s=e;var d=s.v;return((s.f&de)===0&&s.reactions!==null||$r(s))&&(d=dn(s)),Ge.set(s,d),d}}else n&&(s=e,qt(s)&&Xn(s));if((e.f&et)!==0)throw e.v;return e.v}function $r(e){if(e.v===ue)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Ge.has(t)||(t.f&me)!==0&&$r(t))return!0;return!1}function Bi(e){var t=qe;try{return qe=!0,e()}finally{qe=t}}const Ui=-7169;function be(e,t){e.f=e.f&Ui|t}const Er=new Set,gn=new Set;function Vi(e,t,n,r={}){function i(a){if(r.capture||Tt.call(t,a),!a.cancelBubble)return bn(()=>n?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?gi(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function zt(e,t,n,r,i){var a={capture:r,passive:i},s=Vi(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Pi(()=>{t.removeEventListener(e,s,a)})}function Yi(e){for(var t=0;t<e.length;t++)Er.add(e[t]);for(var n of gn)n(e)}let xr=null;function Tt(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;xr=e;var s=0,o=xr===e&&e.__root;if(o){var d=i.indexOf(o);if(d!==-1&&(t===document||t===window)){e.__root=t;return}var u=i.indexOf(t);if(u===-1)return;d<=u&&(s=d)}if(a=i[s]||e.target,a!==t){dt(e,"currentTarget",{configurable:!0,get(){return a||n}});var c=O,h=N;Ce(null),je(null);try{for(var b,f=[];a!==null;){var p=a.assignedSlot||a.parentNode||a.host||null;try{var w=a["__"+r];if(w!=null&&(!a.disabled||e.target===a))if(Xt(w)){var[x,...V]=w;x.apply(a,[e,...V])}else w.call(a,e)}catch(E){b?f.push(E):b=E}if(e.cancelBubble||p===t||p===null)break;a=p}if(b){for(let E of f)queueMicrotask(()=>{throw E});throw b}}finally{e.__root=t,delete e.currentTarget,Ce(c),je(h)}}}let Me;function Hi(){Me=void 0}function Wi(e){let t=null,n=A;var r;if(A){for(t=B,Me===void 0&&(Me=Je(document.head));Me!==null&&(Me.nodeType!==ht||Me.data!==Wt);)Me=Ae(Me);Me===null?_e(!1):Me=ye(Ae(Me))}A||(r=document.head.appendChild(Be()));try{pn(()=>e(r),Dn)}finally{n&&(_e(!0),Me=B,ye(t))}}function Gi(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function _t(e,t){var n=N;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function oe(e,t){var n=(t&Gr)!==0,r=(t&Jr)!==0,i,a=!e.startsWith("<!>");return()=>{if(A)return _t(B,null),B;i===void 0&&(i=Gi(a?e:"<!>"+e),n||(i=Je(i)));var s=r||sr?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Je(s),d=s.lastChild;_t(o,d)}else _t(s,s);return s}}function yt(){if(A)return _t(B,null),B;var e=document.createDocumentFragment(),t=document.createComment(""),n=Be();return e.append(t,n),_t(t,n),e}function K(e,t){if(A){N.nodes_end=B,Et();return}e!==null&&e.before(t)}const Ji=["touchstart","touchmove"];function Xi(e){return Ji.includes(e)}function Ze(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+"")}function Sr(e,t){return Cr(e,t)}function Zi(e,t){vn(),t.intro=t.intro??!1;const n=t.target,r=A,i=B;try{for(var a=Je(n);a&&(a.nodeType!==ht||a.data!==Wt);)a=Ae(a);if(!a)throw ut;_e(!0),ye(a),Et();const s=Cr(e,{...t,anchor:a});if(B===null||B.nodeType!==ht||B.data!==Jt)throw Nt(),ut;return _e(!1),s}catch(s){if(s instanceof Error&&s.message.split(`
|
|
2
|
+
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw s;return s!==ut&&console.warn("Failed to hydrate: ",s),t.recover===!1&&di(),vn(),lr(n),_e(!1),Sr(e,t)}finally{_e(r),ye(i),Hi()}}const gt=new Map;function Cr(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:s=!0}){vn();var o=new Set,d=h=>{for(var b=0;b<h.length;b++){var f=h[b];if(!o.has(f)){o.add(f);var p=Xi(f);t.addEventListener(f,Tt,{passive:p});var w=gt.get(f);w===void 0?(document.addEventListener(f,Tt,{passive:p}),gt.set(f,1)):gt.set(f,w+1)}}};d(Zt(Er)),gn.add(d);var u=void 0,c=Ai(()=>{var h=n??t.appendChild(Be());return bt(()=>{if(a){Un({});var b=Ne;b.c=a}i&&(r.$$events=i),A&&_t(h,null),u=e(h,r)||{},A&&(N.nodes_end=B),a&&Vn()}),()=>{for(var b of o){t.removeEventListener(b,Tt);var f=gt.get(b);--f===0?(document.removeEventListener(b,Tt),gt.delete(b)):gt.set(b,f)}gn.delete(d),h!==n&&h.parentNode?.removeChild(h)}});return wn.set(u,c),u}let wn=new WeakMap;function Ki(e,t){const n=wn.get(e);return n?(wn.delete(e),n(t)):Promise.resolve()}function Ie(e,t,n=!1){A&&Et();var r=e,i=null,a=null,s=ue,o=n?tn:0,d=!1;const u=(f,p=!0)=>{d=!0,b(p,f)};var c=null;function h(){c!==null&&(c.lastChild.remove(),r.before(c),c=null);var f=s?i:a,p=s?a:i;f&&yn(f),p&&mn(p,()=>{s?a=null:i=null})}const b=(f,p)=>{if(s===(s=f))return;let w=!1;if(A){const q=zn(r)===Gt;!!s===q&&(r=an(),ye(r),_e(!1),w=!0)}var x=ur(),V=r;if(x&&(c=document.createDocumentFragment(),c.append(V=Be())),s?i??=p&&bt(()=>p(V)):a??=p&&bt(()=>p(V)),x){var E=ae,M=s?i:a,G=s?a:i;M&&E.skipped_effects.delete(M),G&&E.skipped_effects.add(G),E.add_callback(h)}else h();w&&_e(!0)};pn(()=>{d=!1,t(u),d||b(null,null)},o),A&&(r=B)}function Qi(e,t,n){for(var r=e.items,i=[],a=t.length,s=0;s<a;s++)_n(t[s].e,i,!0);var o=a>0&&i.length===0&&n!==null;if(o){var d=n.parentNode;lr(d),d.append(n),r.clear(),ze(e,t[0].prev,t[a-1].next)}vr(i,()=>{for(var u=0;u<a;u++){var c=t[u];o||(r.delete(c.k),ze(e,c.prev,c.next)),Le(c.e,!o)}})}function es(e,t,n,r,i,a=null){var s=e,o={flags:t,items:new Map,first:null};{var d=e;s=A?ye(Je(d)):d.appendChild(Be())}A&&Et();var u=null,c=!1,h=new Map,b=Gn(()=>{var x=n();return Xt(x)?x:x==null?[]:Zt(x)}),f,p;function w(){ts(p,f,o,h,s,i,t,r,n),a!==null&&(f.length===0?u?yn(u):u=bt(()=>a(s)):u!==null&&mn(u,()=>{u=null}))}pn(()=>{p??=N,f=j(b);var x=f.length;if(c&&x===0)return;c=x===0;let V=!1;if(A){var E=zn(s)===Gt;E!==(x===0)&&(s=an(),ye(s),_e(!1),V=!0)}if(A){for(var M=null,G,q=0;q<x;q++){if(B.nodeType===ht&&B.data===Jt){s=B,V=!0,_e(!1);break}var te=f[q],ne=r(te,q);G=kn(B,o,M,null,te,ne,q,i,t,n),o.items.set(ne,G),M=G}x>0&&ye(an())}if(A)x===0&&a&&(u=bt(()=>a(s)));else if(ur()){var le=new Set,se=ae;for(q=0;q<x;q+=1){te=f[q],ne=r(te,q);var Y=o.items.get(ne)??h.get(ne);Y?Tr(Y,te,q):(G=kn(null,o,null,null,te,ne,q,i,t,n,!0),h.set(ne,G)),le.add(ne)}for(const[P,pe]of o.items)le.has(P)||se.skipped_effects.add(pe.e);se.add_callback(w)}else w();V&&_e(!0),j(b)}),A&&(s=B)}function ts(e,t,n,r,i,a,s,o,d){var u=t.length,c=n.items,h=n.first,b=h,f,p=null,w=[],x=[],V,E,M,G;for(G=0;G<u;G+=1){if(V=t[G],E=o(V,G),M=c.get(E),M===void 0){var q=r.get(E);if(q!==void 0){r.delete(E),c.set(E,q);var te=p?p.next:b;ze(n,p,q),ze(n,q,te),$n(q,te,i),p=q}else{var ne=b?b.e.nodes_start:i;p=kn(ne,n,p,p===null?n.first:p.next,V,E,G,a,s,d)}c.set(E,p),w=[],x=[],b=p.next;continue}if(Tr(M,V,G),(M.e.f&Re)!==0&&yn(M.e),M!==b){if(f!==void 0&&f.has(M)){if(w.length<x.length){var le=x[0],se;p=le.prev;var Y=w[0],P=w[w.length-1];for(se=0;se<w.length;se+=1)$n(w[se],le,i);for(se=0;se<x.length;se+=1)f.delete(x[se]);ze(n,Y.prev,P.next),ze(n,p,Y),ze(n,P,le),b=le,p=P,G-=1,w=[],x=[]}else f.delete(M),$n(M,b,i),ze(n,M.prev,M.next),ze(n,M,p===null?n.first:p.next),ze(n,p,M),p=M;continue}for(w=[],x=[];b!==null&&b.k!==E;)(b.e.f&Re)===0&&(f??=new Set).add(b),x.push(b),b=b.next;if(b===null)continue;M=b}w.push(M),p=M,b=M.next}if(b!==null||f!==void 0){for(var pe=f===void 0?[]:Zt(f);b!==null;)(b.e.f&Re)===0&&pe.push(b),b=b.next;var D=pe.length;if(D>0){var v=u===0?i:null;Qi(n,pe,v)}}e.first=n.first&&n.first.e,e.last=p&&p.e;for(var _ of r.values())Le(_.e);r.clear()}function Tr(e,t,n,r){Lt(e.v,t),e.i=n}function kn(e,t,n,r,i,a,s,o,d,u,c){var h=(d&Fr)!==0,b=(d&Ur)===0,f=h?b?nr(i,!1,!1):St(i):i,p=(d&Br)===0?s:St(s),w={i:p,v:f,k:a,a:null,e:null,prev:n,next:r};try{if(e===null){var x=document.createDocumentFragment();x.append(e=Be())}return w.e=bt(()=>o(e,f,p,u),A),w.e.prev=n&&n.e,w.e.next=r&&r.e,n===null?c||(t.first=w):(n.next=w,n.e.next=w.e),r!==null&&(r.prev=w,r.e.prev=w.e),w}finally{}}function $n(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,i=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==null&&a!==r;){var s=Ae(a);i.before(a),a=s}}function ze(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function Ft(e,t,n,r,i){A&&Et();var a=t.$$slots?.[n],s=!1;a===!0&&(a=t[n==="default"?"children":n],s=!0),a===void 0?i!==null&&i(e):a(e,s?()=>r:r)}function ns(e,t){Ii(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function rs(e,t,n){var r=e==null?"":""+e;return r===""?null:r}function is(e,t){return e==null?null:String(e)}function Bt(e,t,n,r,i,a){var s=e.__className;if(A||s!==n||s===void 0){var o=rs(n);(!A||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):e.className=o),e.__className=n}return a}function En(e,t,n,r){var i=e.__style;if(A||i!==t){var a=is(t);(!A||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e.__style=t}return r}const ss=Symbol("is custom element"),as=Symbol("is html");function os(e,t,n,r){var i=ls(e);A&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=n)&&(t==="loading"&&(e[ri]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Mr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function $e(e,t,n){var r=O,i=N;let a=A;A&&_e(!1),Ce(null),je(null);try{t!=="style"&&(xn.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?Mr(e).includes(t):n&&typeof n=="object")?e[t]=n:os(e,t,n==null?n:String(n))}finally{Ce(r),je(i),a&&_e(!0)}}function ls(e){return e.__attributes??={[ss]:e.nodeName.includes("-"),[as]:e.namespaceURI===Xr}}var xn=new Map;function Mr(e){var t=e.getAttribute("is")||e.nodeName,n=xn.get(t);if(n)return n;xn.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){r=Kr(i);for(var s in r)r[s].set&&n.push(s);i=Rn(i)}return n}let Ut=!1;function us(e){var t=Ut;try{return Ut=!1,[e(),Ut]}finally{Ut=t}}function wt(e,t,n,r){var i=(n&Hr)!==0,a=(n&Wr)!==0,s=r,o=!0,d=()=>(o&&(o=!1,s=a?Bi(r):r),s),u;if(i){var c=Rt in e||Ln in e;u=Ke(e,t)?.set??(c&&t in e?E=>e[t]=E:void 0)}var h,b=!1;i?[h,b]=us(()=>e[t]):h=e[t],h===void 0&&r!==void 0&&(h=d(),u&&(ci(),u(h)));var f;if(f=()=>{var E=e[t];return E===void 0?d():(o=!0,E)},(n&Yr)===0)return f;if(u){var p=e.$$legacy;return(function(E,M){return arguments.length>0?((!M||p||b)&&u(M?f():E),E):f()})}var w=!1,x=((n&Vr)!==0?un:Gn)(()=>(w=!1,f()));i&&j(x);var V=N;return(function(E,M){if(arguments.length>0){const G=M?j(x):i?st(E):E;return re(x,G),w=!0,s!==void 0&&(s=G),E}return at&&w||(V.f&Qe)!==0?x.v:j(x)})}function ds(e){return new cs(e)}class cs{#t;#e;constructor(t){var n=new Map,r=(a,s)=>{var o=nr(s,!1,!1);return n.set(a,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(a,s){return j(n.get(s)??r(s,Reflect.get(a,s)))},has(a,s){return s===Ln?!0:(j(n.get(s)??r(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,o){return re(n.get(s)??r(s,o),o),Reflect.set(a,s,o)}});this.#e=(t.hydrate?Zi:Sr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&rt(),this.#t=i.$$events;for(const a of Object.keys(this.#e))a==="$set"||a==="$destroy"||a==="$on"||dt(this,a,{get(){return this.#e[a]},set(s){this.#e[a]=s},enumerable:!0});this.#e.$set=a=>{Object.assign(i,a)},this.#e.$destroy=()=>{Ki(this.#e)}}$set(t){this.#e.$set(t)}$on(t,n){this.#t[t]=this.#t[t]||[];const r=(...i)=>n.call(this,...i);return this.#t[t].push(r),()=>{this.#t[t]=this.#t[t].filter(i=>i!==r)}}$destroy(){this.#e.$destroy()}}let Pr;typeof HTMLElement=="function"&&(Pr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const a=document.createElement("slot");r!=="default"&&(a.name=r),K(i,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=fs(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=Vt(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=ds({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Ni(()=>{Di(()=>{this.$$r=!0;for(const r of Mt(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Vt(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const a=this.$$c.$on(r,i);this.$$l_u.set(i,a)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Vt(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Mt(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Vt(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function fs(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function hs(e,t,n,r,i,a){let s=class extends Pr{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Mt(t).map(o=>(t[o].attribute||o).toLowerCase())}};return Mt(t).forEach(o=>{dt(s.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(d){d=Vt(o,d,t),this.$$d[o]=d;var u=this.$$c;if(u){var c=Ke(u,o)?.get;c?u[o]=d:u.$set({[o]:d})}}})}),r.forEach(o=>{dt(s.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=s,s}/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
5
5
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */function ce(e,t,n,r){var
|
|
15
|
+
***************************************************************************** */function ce(e,t,n,r){var i=arguments.length,a=i<3?t:r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,n,a):s(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function Yt(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(h){s(h)}}function d(c){try{u(r.throw(c))}catch(h){s(h)}}function u(c){c.done?a(c.value):i(c.value).then(o,d)}u((r=r.apply(e,[])).next())})}function Rr(e){return e.replace(/[A-Z]+/g,t=>`-${t}`).replace(/^-/,"").toLowerCase()}function lt(e){return function(t,n){const r=Rr(n);t.addObservedAttribute&&t.addObservedAttribute(r),Object.defineProperty(t,n,{get(){return this.getAttribute(r)},set(i){i==null?this.removeAttribute(r):this.setAttribute(r,i),this.notifyPropertyChanged(n)},enumerable:!0,configurable:!0})}}function vs(e){return function(t,n){const r=Rr(n);t.addObservedAttribute&&t.addObservedAttribute(r),Object.defineProperty(t,n,{get(){return this.hasAttribute(r)},set(i){i?this.setAttribute(r,""):this.removeAttribute(r),this.notifyPropertyChanged(n)},enumerable:!0,configurable:!0})}}function Sn(e){return function(t,n){Object.defineProperty(t,n,{get(){return this[`$__${n}`]},set(r){this[`$__${n}`]=r,this.notifyPropertyChanged(n)},enumerable:!0,configurable:!0})}}function U(e){return function(t,n){Object.defineProperty(t,e,{get(){return this[n]},set(r){this[n]=r},enumerable:!0,configurable:!1})}}let Cn={};function bs(e){const t=Cn[e];if(t)return t;const n=new Promise((r,i)=>{const a=document.createElement("script");a.src=e,a.async=!0;const s=()=>{r()},o=()=>{d(),delete Cn[e],a.remove(),i(new Error(`Unable to load script ${e}`))};a.addEventListener("load",s),a.addEventListener("error",o),document.body.appendChild(a);function d(){a.removeEventListener("load",s),a.removeEventListener("error",o)}});return Cn[e]=n,n}class ps{constructor(t){this.handleClick=n=>Yt(this,void 0,void 0,function*(){const r=this.config;if(!r)throw new Error("google-pay-button: Missing configuration");const i=this.createLoadPaymentDataRequest(r);try{if(r.onClick&&r.onClick(n),n.defaultPrevented)return;const a=yield this.client.loadPaymentData(i);r.onLoadPaymentData&&r.onLoadPaymentData(a)}catch(a){a.statusCode==="CANCELED"?r.onCancel&&r.onCancel(a):r.onError?r.onError(a):console.error(a)}}),this.options=t}getElement(){return this.element}isGooglePayLoaded(){var t,n;return"google"in(window||global)&&!!(!((n=(t=google==null?void 0:google.payments)===null||t===void 0?void 0:t.api)===null||n===void 0)&&n.PaymentsClient)}mount(t){var n;return Yt(this,void 0,void 0,function*(){if(!this.isGooglePayLoaded())try{yield bs("https://pay.google.com/gp/p/js/pay.js")}catch(r){!((n=this.config)===null||n===void 0)&&n.onError?this.config.onError(r):console.error(r);return}this.element=t,t&&(this.appendStyles(),this.config&&this.updateElement())})}unmount(){this.element=void 0}configure(t){let n;return this.config=t,(!this.oldInvalidationValues||this.isClientInvalidated(t))&&(n=this.updateElement()),this.oldInvalidationValues=this.getInvalidationValues(t),n??Promise.resolve()}createClientOptions(t){const n={environment:t.environment,merchantInfo:this.createMerchantInfo(t)};return(t.onPaymentDataChanged||t.onPaymentAuthorized)&&(n.paymentDataCallbacks={},t.onPaymentDataChanged&&(n.paymentDataCallbacks.onPaymentDataChanged=r=>t.onPaymentDataChanged(r)||{}),t.onPaymentAuthorized&&(n.paymentDataCallbacks.onPaymentAuthorized=r=>t.onPaymentAuthorized(r)||{})),n}createIsReadyToPayRequest(t){const n=t.paymentRequest;return{apiVersion:n.apiVersion,apiVersionMinor:n.apiVersionMinor,allowedPaymentMethods:n.allowedPaymentMethods,existingPaymentMethodRequired:t.existingPaymentMethodRequired}}createLoadPaymentDataRequest(t){return Object.assign(Object.assign({},t.paymentRequest),{merchantInfo:this.createMerchantInfo(t)})}createMerchantInfo(t){const n=Object.assign({},t.paymentRequest.merchantInfo);return n.softwareInfo||(n.softwareInfo={id:this.options.softwareInfoId,version:this.options.softwareInfoVersion}),n}isMounted(){return this.element!=null&&this.element.isConnected!==!1}removeButton(){if(this.element instanceof ShadowRoot||this.element instanceof Element)for(const t of Array.from(this.element.children))t.tagName!=="STYLE"&&t.remove()}updateElement(){return Yt(this,void 0,void 0,function*(){if(!this.isMounted())return;const t=this.getElement();if(!this.config)throw new Error("google-pay-button: Missing configuration");this.removeButton();try{this.client=new google.payments.api.PaymentsClient(this.createClientOptions(this.config))}catch(o){this.config.onError?this.config.onError(o):console.error(o);return}const n={buttonType:this.config.buttonType,buttonColor:this.config.buttonColor,buttonRadius:this.config.buttonRadius,buttonSizeMode:this.config.buttonSizeMode,buttonLocale:this.config.buttonLocale,buttonBorderType:this.config.buttonBorderType,onClick:this.handleClick,allowedPaymentMethods:this.config.paymentRequest.allowedPaymentMethods},r=t.getRootNode();r instanceof ShadowRoot&&(n.buttonRootNode=r);const i=this.client.createButton(n);this.setClassName(t,[t.className,"not-ready"]),t.appendChild(i);let a=!1,s;try{s=yield this.client.isReadyToPay(this.createIsReadyToPayRequest(this.config)),a=s.result&&!this.config.existingPaymentMethodRequired||s.result&&s.paymentMethodPresent&&this.config.existingPaymentMethodRequired||!1}catch(o){this.config.onError?this.config.onError(o):console.error(o)}if(this.isMounted()){if(a){try{this.client.prefetchPaymentData(this.createLoadPaymentDataRequest(this.config))}catch(o){console.log("Error with prefetch",o)}this.setClassName(t,(t.className||"").split(" ").filter(o=>o&&o!=="not-ready"))}if((this.isReadyToPay!==s?.result||this.paymentMethodPresent!==s?.paymentMethodPresent)&&(this.isReadyToPay=!!s?.result,this.paymentMethodPresent=s?.paymentMethodPresent,this.config.onReadyToPayChange)){const o={isButtonVisible:a,isReadyToPay:this.isReadyToPay};this.paymentMethodPresent&&(o.paymentMethodPresent=this.paymentMethodPresent),this.config.onReadyToPayChange(o)}}})}setClassName(t,n){const r=n.filter(i=>i).join(" ");r?t.className=r:t.removeAttribute("class")}appendStyles(){var t,n,r;if(typeof document>"u")return;const i=(t=this.element)===null||t===void 0?void 0:t.getRootNode(),a=`default-google-style-${this.options.cssSelector.replace(/[^\w-]+/g,"")}-${(n=this.config)===null||n===void 0?void 0:n.buttonLocale}`;if(i&&!(!((r=i.getElementById)===null||r===void 0)&&r.call(i,a))){const s=document.createElement("style");s.id=a,s.type="text/css",s.innerHTML=`
|
|
16
16
|
${this.options.cssSelector} {
|
|
17
17
|
display: inline-block;
|
|
18
18
|
}
|
|
@@ -21,37 +21,37 @@
|
|
|
21
21
|
height: 0;
|
|
22
22
|
overflow: hidden;
|
|
23
23
|
}
|
|
24
|
-
`,s instanceof Document&&s.head?s.head.appendChild(i):s.appendChild(i)}}isClientInvalidated(t){return this.oldInvalidationValues?this.getInvalidationValues(t).some((r,s)=>JSON.stringify(r)!==JSON.stringify(this.oldInvalidationValues[s])):!0}getInvalidationValues(t){var n,r;return[t.environment,t.existingPaymentMethodRequired,!!t.onPaymentDataChanged,!!t.onPaymentAuthorized,t.buttonType,t.buttonColor,t.buttonRadius,t.buttonLocale,t.buttonSizeMode,t.buttonBorderType,t.paymentRequest.merchantInfo.merchantId,t.paymentRequest.merchantInfo.merchantName,(n=t.paymentRequest.merchantInfo.softwareInfo)===null||n===void 0?void 0:n.id,(r=t.paymentRequest.merchantInfo.softwareInfo)===null||r===void 0?void 0:r.version,t.paymentRequest.allowedPaymentMethods]}}var _i="@google-pay/button-element",yi="3.2.1";function bi(e,t=0){let n;return function(...r){window.clearTimeout(n);const s=function(){return n=void 0,e(...r)};return new Promise(a=>{n=window.setTimeout(()=>{const i=s();a(i)},t)})}}class se extends HTMLElement{constructor(){super(...arguments),this.manager=new mi({cssSelector:"google-pay-button",softwareInfoId:_i,softwareInfoVersion:yi}),this.initializeButton=bi(()=>{if(!this.assertRequiredProperty("paymentRequest")||!this.assertRequiredProperty("environment"))return;const t={paymentRequest:this.paymentRequest,environment:this.environment,existingPaymentMethodRequired:this.existingPaymentMethodRequired,onPaymentDataChanged:this.onPaymentDataChanged,onPaymentAuthorized:this.onPaymentAuthorized,buttonColor:this.buttonColor,buttonType:this.buttonType,buttonRadius:this.buttonRadius,buttonSizeMode:this.buttonSizeMode,buttonLocale:this.buttonLocale,buttonBorderType:this.buttonBorderType,onReadyToPayChange:n=>{this.onReadyToPayChange&&this.onReadyToPayChange(n),this.dispatch("readytopaychange",n)},onCancel:n=>{this.onCancel&&this.onCancel(n),this.dispatch("cancel",n)},onError:n=>{var r;this.onError&&((r=this.onError)===null||r===void 0||r.call(this,n)),this.dispatchEvent(new ErrorEvent("error",{error:n}))},onLoadPaymentData:n=>{this.onLoadPaymentData&&this.onLoadPaymentData(n),this.dispatch("loadpaymentdata",n)},onClick:n=>{var r;this.onClick&&((r=this.onClick)===null||r===void 0||r.call(this,n))}};this.manager.configure(t)})}get isReadyToPay(){return this.manager.isReadyToPay}assertRequiredProperty(t){const n=this[t];return n==null?(this.throwError(Error(`Required property not set: ${t}`)),!1):!0}throwError(t){throw t}static get observedAttributes(){return se._observedAttributes}addObservedAttribute(t){se._observedAttributes.push(t)}dispatch(t,n){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!1,detail:n}))}connectedCallback(){return Yt(this,void 0,void 0,function*(){return yield this.manager.mount(this),this.initializeButton()})}disconnectedCallback(){this.manager.unmount()}attributeChangedCallback(t){return this.initializeButton()}notifyPropertyChanged(t){return this.initializeButton()}}se._observedAttributes=[],ce([Cn(),U("paymentrequest")],se.prototype,"paymentRequest",void 0),ce([lt()],se.prototype,"environment",void 0),ce([vi(),U("existingpaymentmethodrequired")],se.prototype,"existingPaymentMethodRequired",void 0),ce([lt(),U("buttoncolor")],se.prototype,"buttonColor",void 0),ce([lt(),U("buttontype")],se.prototype,"buttonType",void 0),ce([lt(),U("buttonradius")],se.prototype,"buttonRadius",void 0),ce([lt(),U("buttonsizemode")],se.prototype,"buttonSizeMode",void 0),ce([lt(),U("buttonlocale")],se.prototype,"buttonLocale",void 0),ce([lt(),U("buttonbordertype")],se.prototype,"buttonBorderType",void 0),ce([Cn(),U("paymentDataChangedCallback"),U("paymentdatachangedcallback"),U("onpaymentdatachanged")],se.prototype,"onPaymentDataChanged",void 0),ce([Cn(),U("paymentAuthorizedCallback"),U("paymentauthorizedcallback"),U("onpaymentauthorized")],se.prototype,"onPaymentAuthorized",void 0),ce([U("readyToPayChangeCallback"),U("readytopaychangecallback"),U("onreadytopaychange")],se.prototype,"onReadyToPayChange",void 0),ce([U("loadPaymentDataCallback"),U("loadpaymentdatacallback"),U("onloadpaymentdata")],se.prototype,"onLoadPaymentData",void 0),ce([U("cancelCallback"),U("cancelcallback"),U("oncancel")],se.prototype,"onCancel",void 0),ce([U("errorCallback"),U("errorcallback"),U("onerror")],se.prototype,"onError",void 0),ce([U("clickCallback"),U("clickcallback"),U("onclick")],se.prototype,"onClick",void 0),customElements.define("google-pay-button",se);const Nr={version:"0.60.2"},de=[{type:"text",placeholder:"Insert your Full Name here...",id:"fullName",required:!0,label:"Full Name",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Insert your Street/Square address with number...",id:"addressWithNumber",required:!0,label:"Street/Square/...",validationTip:"This field cannot be empty."},{id:"name-row2",type:"row",params:{columns:[{type:"text",placeholder:"Insert your nationality here...",id:"nationality",required:!0,label:"Nationality",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Insert your city name here...",id:"city",required:!0,label:"City",validationTip:"This field cannot be empty."},{type:"number",placeholder:"Insert your zip code here...",id:"zip",required:!0,label:"Zip",validationTip:"This field cannot be empty."}]}}];function Ar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ht={exports:{}},gi=Ht.exports,Ir;function wi(){return Ir||(Ir=1,(function(e,t){(function(n,r){e.exports=r()})(gi,(function(){var n=1e3,r=6e4,s=36e5,a="millisecond",i="second",o="minute",f="hour",u="day",c="week",h="month",p="quarter",d="year",m="date",w="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,V=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(v){var y=["th","st","nd","rd"],b=v%100;return"["+v+(y[(b-20)%10]||y[b]||y[0])+"]"}},M=function(v,y,b){var $=String(v);return!$||$.length>=y?v:""+Array(y+1-$.length).join(b)+v},G={s:M,z:function(v){var y=-v.utcOffset(),b=Math.abs(y),$=Math.floor(b/60),l=b%60;return(y<=0?"+":"-")+M($,2,"0")+":"+M(l,2,"0")},m:function v(y,b){if(y.date()<b.date())return-v(b,y);var $=12*(b.year()-y.year())+(b.month()-y.month()),l=y.clone().add($,h),_=b-l<0,g=y.clone().add($+(_?-1:1),h);return+(-($+(b-l)/(_?l-g:g-l))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:h,y:d,w:c,d:u,D:m,h:f,m:o,s:i,ms:a,Q:p}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},q="en",te={};te[q]=S;var ne="$isDayjsObject",le=function(v){return v instanceof me||!(!v||!v[ne])},ie=function v(y,b,$){var l;if(!y)return q;if(typeof y=="string"){var _=y.toLowerCase();te[_]&&(l=_),b&&(te[_]=b,l=_);var g=y.split("-");if(!l&&g.length>1)return v(g[0])}else{var E=y.name;te[E]=y,l=E}return!$&&l&&(q=l),l||!$&&q},Y=function(v,y){if(le(v))return v.clone();var b=typeof y=="object"?y:{};return b.date=v,b.args=arguments,new me(b)},P=G;P.l=ie,P.i=le,P.w=function(v,y){return Y(v,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var me=(function(){function v(b){this.$L=ie(b.locale,null,!0),this.parse(b),this.$x=this.$x||b.x||{},this[ne]=!0}var y=v.prototype;return y.parse=function(b){this.$d=(function($){var l=$.date,_=$.utc;if(l===null)return new Date(NaN);if(P.u(l))return new Date;if(l instanceof Date)return new Date(l);if(typeof l=="string"&&!/Z$/i.test(l)){var g=l.match(x);if(g){var E=g[2]-1||0,T=(g[7]||"0").substring(0,3);return _?new Date(Date.UTC(g[1],E,g[3]||1,g[4]||0,g[5]||0,g[6]||0,T)):new Date(g[1],E,g[3]||1,g[4]||0,g[5]||0,g[6]||0,T)}}return new Date(l)})(b),this.init()},y.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},y.$utils=function(){return P},y.isValid=function(){return this.$d.toString()!==w},y.isSame=function(b,$){var l=Y(b);return this.startOf($)<=l&&l<=this.endOf($)},y.isAfter=function(b,$){return Y(b)<this.startOf($)},y.isBefore=function(b,$){return this.endOf($)<Y(b)},y.$g=function(b,$,l){return P.u(b)?this[$]:this.set(l,b)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(b,$){var l=this,_=!!P.u($)||$,g=P.p(b),E=function(W,J){var X=P.w(l.$u?Date.UTC(l.$y,J,W):new Date(l.$y,J,W),l);return _?X:X.endOf(u)},T=function(W,J){return P.w(l.toDate()[W].apply(l.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(J)),l)},C=this.$W,k=this.$M,R=this.$D,H="set"+(this.$u?"UTC":"");switch(g){case d:return _?E(1,0):E(31,11);case h:return _?E(1,k):E(0,k+1);case c:var F=this.$locale().weekStart||0,z=(C<F?C+7:C)-F;return E(_?R-z:R+(6-z),k);case u:case m:return T(H+"Hours",0);case f:return T(H+"Minutes",1);case o:return T(H+"Seconds",2);case i:return T(H+"Milliseconds",3);default:return this.clone()}},y.endOf=function(b){return this.startOf(b,!1)},y.$set=function(b,$){var l,_=P.p(b),g="set"+(this.$u?"UTC":""),E=(l={},l[u]=g+"Date",l[m]=g+"Date",l[h]=g+"Month",l[d]=g+"FullYear",l[f]=g+"Hours",l[o]=g+"Minutes",l[i]=g+"Seconds",l[a]=g+"Milliseconds",l)[_],T=_===u?this.$D+($-this.$W):$;if(_===h||_===d){var C=this.clone().set(m,1);C.$d[E](T),C.init(),this.$d=C.set(m,Math.min(this.$D,C.daysInMonth())).$d}else E&&this.$d[E](T);return this.init(),this},y.set=function(b,$){return this.clone().$set(b,$)},y.get=function(b){return this[P.p(b)]()},y.add=function(b,$){var l,_=this;b=Number(b);var g=P.p($),E=function(k){var R=Y(_);return P.w(R.date(R.date()+Math.round(k*b)),_)};if(g===h)return this.set(h,this.$M+b);if(g===d)return this.set(d,this.$y+b);if(g===u)return E(1);if(g===c)return E(7);var T=(l={},l[o]=r,l[f]=s,l[i]=n,l)[g]||1,C=this.$d.getTime()+b*T;return P.w(C,this)},y.subtract=function(b,$){return this.add(-1*b,$)},y.format=function(b){var $=this,l=this.$locale();if(!this.isValid())return l.invalidDate||w;var _=b||"YYYY-MM-DDTHH:mm:ssZ",g=P.z(this),E=this.$H,T=this.$m,C=this.$M,k=l.weekdays,R=l.months,H=l.meridiem,F=function(J,X,Q,ee){return J&&(J[X]||J($,_))||Q[X].slice(0,ee)},z=function(J){return P.s(E%12||12,J,"0")},W=H||function(J,X,Q){var ee=J<12?"AM":"PM";return Q?ee.toLowerCase():ee};return _.replace(V,(function(J,X){return X||(function(Q){switch(Q){case"YY":return String($.$y).slice(-2);case"YYYY":return P.s($.$y,4,"0");case"M":return C+1;case"MM":return P.s(C+1,2,"0");case"MMM":return F(l.monthsShort,C,R,3);case"MMMM":return F(R,C);case"D":return $.$D;case"DD":return P.s($.$D,2,"0");case"d":return String($.$W);case"dd":return F(l.weekdaysMin,$.$W,k,2);case"ddd":return F(l.weekdaysShort,$.$W,k,3);case"dddd":return k[$.$W];case"H":return String(E);case"HH":return P.s(E,2,"0");case"h":return z(1);case"hh":return z(2);case"a":return W(E,T,!0);case"A":return W(E,T,!1);case"m":return String(T);case"mm":return P.s(T,2,"0");case"s":return String($.$s);case"ss":return P.s($.$s,2,"0");case"SSS":return P.s($.$ms,3,"0");case"Z":return g}return null})(J)||g.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(b,$,l){var _,g=this,E=P.p($),T=Y(b),C=(T.utcOffset()-this.utcOffset())*r,k=this-T,R=function(){return P.m(g,T)};switch(E){case d:_=R()/12;break;case h:_=R();break;case p:_=R()/3;break;case c:_=(k-C)/6048e5;break;case u:_=(k-C)/864e5;break;case f:_=k/s;break;case o:_=k/r;break;case i:_=k/n;break;default:_=k}return l?_:P.a(_)},y.daysInMonth=function(){return this.endOf(h).$D},y.$locale=function(){return te[this.$L]},y.locale=function(b,$){if(!b)return this.$L;var l=this.clone(),_=ie(b,$,!0);return _&&(l.$L=_),l},y.clone=function(){return P.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},v})(),D=me.prototype;return Y.prototype=D,[["$ms",a],["$s",i],["$m",o],["$H",f],["$W",u],["$M",h],["$y",d],["$D",m]].forEach((function(v){D[v[1]]=function(y){return this.$g(y,v[0],v[1])}})),Y.extend=function(v,y){return v.$i||(v(y,me,Y),v.$i=!0),Y},Y.locale=ie,Y.isDayjs=le,Y.unix=function(v){return Y(1e3*v)},Y.en=te[q],Y.Ls=te,Y.p={},Y}))})(Ht)),Ht.exports}var $i=wi();const Ei=Ar($i);function Or(e){const t=e?.repoName.split("/")?.[1]||e?.repoName;if(!t)throw new Error("wrong componentPath "+e?.repoName);if(!e?.version)throw new Error("wrong version "+e?.version);const n=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const r=document.createElement("script");if(r.id=t+"-script",r.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${n}`,e?.local)r.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const s=t.split("-")[0];r.src=`http://localhost:6006/webcomponents/${t.replace(s+"-","")}/${n}`}document.head.appendChild(r)}catch(r){console.warn(r)}}var $t={},kn,Dr;function Si(){if(Dr)return kn;Dr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,o=/^\s+|\s+$/g,f=`
|
|
25
|
-
`,u="/",c="*",h="",
|
|
24
|
+
`,i instanceof Document&&i.head?i.head.appendChild(s):i.appendChild(s)}}isClientInvalidated(t){return this.oldInvalidationValues?this.getInvalidationValues(t).some((r,i)=>JSON.stringify(r)!==JSON.stringify(this.oldInvalidationValues[i])):!0}getInvalidationValues(t){var n,r;return[t.environment,t.existingPaymentMethodRequired,!!t.onPaymentDataChanged,!!t.onPaymentAuthorized,t.buttonType,t.buttonColor,t.buttonRadius,t.buttonLocale,t.buttonSizeMode,t.buttonBorderType,t.paymentRequest.merchantInfo.merchantId,t.paymentRequest.merchantInfo.merchantName,(n=t.paymentRequest.merchantInfo.softwareInfo)===null||n===void 0?void 0:n.id,(r=t.paymentRequest.merchantInfo.softwareInfo)===null||r===void 0?void 0:r.version,t.paymentRequest.allowedPaymentMethods]}}var ms="@google-pay/button-element",_s="3.2.1";function ys(e,t=0){let n;return function(...r){window.clearTimeout(n);const i=function(){return n=void 0,e(...r)};return new Promise(a=>{n=window.setTimeout(()=>{const s=i();a(s)},t)})}}class ie extends HTMLElement{constructor(){super(...arguments),this.manager=new ps({cssSelector:"google-pay-button",softwareInfoId:ms,softwareInfoVersion:_s}),this.initializeButton=ys(()=>{if(!this.assertRequiredProperty("paymentRequest")||!this.assertRequiredProperty("environment"))return;const t={paymentRequest:this.paymentRequest,environment:this.environment,existingPaymentMethodRequired:this.existingPaymentMethodRequired,onPaymentDataChanged:this.onPaymentDataChanged,onPaymentAuthorized:this.onPaymentAuthorized,buttonColor:this.buttonColor,buttonType:this.buttonType,buttonRadius:this.buttonRadius,buttonSizeMode:this.buttonSizeMode,buttonLocale:this.buttonLocale,buttonBorderType:this.buttonBorderType,onReadyToPayChange:n=>{this.onReadyToPayChange&&this.onReadyToPayChange(n),this.dispatch("readytopaychange",n)},onCancel:n=>{this.onCancel&&this.onCancel(n),this.dispatch("cancel",n)},onError:n=>{var r;this.onError&&((r=this.onError)===null||r===void 0||r.call(this,n)),this.dispatchEvent(new ErrorEvent("error",{error:n}))},onLoadPaymentData:n=>{this.onLoadPaymentData&&this.onLoadPaymentData(n),this.dispatch("loadpaymentdata",n)},onClick:n=>{var r;this.onClick&&((r=this.onClick)===null||r===void 0||r.call(this,n))}};this.manager.configure(t)})}get isReadyToPay(){return this.manager.isReadyToPay}assertRequiredProperty(t){const n=this[t];return n==null?(this.throwError(Error(`Required property not set: ${t}`)),!1):!0}throwError(t){throw t}static get observedAttributes(){return ie._observedAttributes}addObservedAttribute(t){ie._observedAttributes.push(t)}dispatch(t,n){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!1,detail:n}))}connectedCallback(){return Yt(this,void 0,void 0,function*(){return yield this.manager.mount(this),this.initializeButton()})}disconnectedCallback(){this.manager.unmount()}attributeChangedCallback(t){return this.initializeButton()}notifyPropertyChanged(t){return this.initializeButton()}}ie._observedAttributes=[],ce([Sn(),U("paymentrequest")],ie.prototype,"paymentRequest",void 0),ce([lt()],ie.prototype,"environment",void 0),ce([vs(),U("existingpaymentmethodrequired")],ie.prototype,"existingPaymentMethodRequired",void 0),ce([lt(),U("buttoncolor")],ie.prototype,"buttonColor",void 0),ce([lt(),U("buttontype")],ie.prototype,"buttonType",void 0),ce([lt(),U("buttonradius")],ie.prototype,"buttonRadius",void 0),ce([lt(),U("buttonsizemode")],ie.prototype,"buttonSizeMode",void 0),ce([lt(),U("buttonlocale")],ie.prototype,"buttonLocale",void 0),ce([lt(),U("buttonbordertype")],ie.prototype,"buttonBorderType",void 0),ce([Sn(),U("paymentDataChangedCallback"),U("paymentdatachangedcallback"),U("onpaymentdatachanged")],ie.prototype,"onPaymentDataChanged",void 0),ce([Sn(),U("paymentAuthorizedCallback"),U("paymentauthorizedcallback"),U("onpaymentauthorized")],ie.prototype,"onPaymentAuthorized",void 0),ce([U("readyToPayChangeCallback"),U("readytopaychangecallback"),U("onreadytopaychange")],ie.prototype,"onReadyToPayChange",void 0),ce([U("loadPaymentDataCallback"),U("loadpaymentdatacallback"),U("onloadpaymentdata")],ie.prototype,"onLoadPaymentData",void 0),ce([U("cancelCallback"),U("cancelcallback"),U("oncancel")],ie.prototype,"onCancel",void 0),ce([U("errorCallback"),U("errorcallback"),U("onerror")],ie.prototype,"onError",void 0),ce([U("clickCallback"),U("clickcallback"),U("onclick")],ie.prototype,"onClick",void 0),customElements.define("google-pay-button",ie);const Nr={version:"0.60.3"},fe=[{type:"text",placeholder:"Insert your Full Name here...",id:"fullName",required:!0,label:"Full Name",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Insert your Street/Square address with number...",id:"addressWithNumber",required:!0,label:"Street/Square/...",validationTip:"This field cannot be empty."},{id:"name-row2",type:"row",params:{columns:[{type:"text",placeholder:"Insert your nationality here...",id:"nationality",required:!0,label:"Nationality",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Insert your city name here...",id:"city",required:!0,label:"City",validationTip:"This field cannot be empty."},{type:"number",placeholder:"Insert your zip code here...",id:"zip",required:!0,label:"Zip",validationTip:"This field cannot be empty."}]}}];function Ar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ht={exports:{}},gs=Ht.exports,Ir;function ws(){return Ir||(Ir=1,(function(e,t){(function(n,r){e.exports=r()})(gs,(function(){var n=1e3,r=6e4,i=36e5,a="millisecond",s="second",o="minute",d="hour",u="day",c="week",h="month",b="quarter",f="year",p="date",w="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,V=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(v){var _=["th","st","nd","rd"],y=v%100;return"["+v+(_[(y-20)%10]||_[y]||_[0])+"]"}},M=function(v,_,y){var k=String(v);return!k||k.length>=_?v:""+Array(_+1-k.length).join(y)+v},G={s:M,z:function(v){var _=-v.utcOffset(),y=Math.abs(_),k=Math.floor(y/60),l=y%60;return(_<=0?"+":"-")+M(k,2,"0")+":"+M(l,2,"0")},m:function v(_,y){if(_.date()<y.date())return-v(y,_);var k=12*(y.year()-_.year())+(y.month()-_.month()),l=_.clone().add(k,h),m=y-l<0,g=_.clone().add(k+(m?-1:1),h);return+(-(k+(y-l)/(m?l-g:g-l))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:h,y:f,w:c,d:u,D:p,h:d,m:o,s,ms:a,Q:b}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},q="en",te={};te[q]=E;var ne="$isDayjsObject",le=function(v){return v instanceof pe||!(!v||!v[ne])},se=function v(_,y,k){var l;if(!_)return q;if(typeof _=="string"){var m=_.toLowerCase();te[m]&&(l=m),y&&(te[m]=y,l=m);var g=_.split("-");if(!l&&g.length>1)return v(g[0])}else{var $=_.name;te[$]=_,l=$}return!k&&l&&(q=l),l||!k&&q},Y=function(v,_){if(le(v))return v.clone();var y=typeof _=="object"?_:{};return y.date=v,y.args=arguments,new pe(y)},P=G;P.l=se,P.i=le,P.w=function(v,_){return Y(v,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var pe=(function(){function v(y){this.$L=se(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[ne]=!0}var _=v.prototype;return _.parse=function(y){this.$d=(function(k){var l=k.date,m=k.utc;if(l===null)return new Date(NaN);if(P.u(l))return new Date;if(l instanceof Date)return new Date(l);if(typeof l=="string"&&!/Z$/i.test(l)){var g=l.match(x);if(g){var $=g[2]-1||0,C=(g[7]||"0").substring(0,3);return m?new Date(Date.UTC(g[1],$,g[3]||1,g[4]||0,g[5]||0,g[6]||0,C)):new Date(g[1],$,g[3]||1,g[4]||0,g[5]||0,g[6]||0,C)}}return new Date(l)})(y),this.init()},_.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},_.$utils=function(){return P},_.isValid=function(){return this.$d.toString()!==w},_.isSame=function(y,k){var l=Y(y);return this.startOf(k)<=l&&l<=this.endOf(k)},_.isAfter=function(y,k){return Y(y)<this.startOf(k)},_.isBefore=function(y,k){return this.endOf(k)<Y(y)},_.$g=function(y,k,l){return P.u(y)?this[k]:this.set(l,y)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(y,k){var l=this,m=!!P.u(k)||k,g=P.p(y),$=function(W,J){var X=P.w(l.$u?Date.UTC(l.$y,J,W):new Date(l.$y,J,W),l);return m?X:X.endOf(u)},C=function(W,J){return P.w(l.toDate()[W].apply(l.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(J)),l)},S=this.$W,T=this.$M,R=this.$D,H="set"+(this.$u?"UTC":"");switch(g){case f:return m?$(1,0):$(31,11);case h:return m?$(1,T):$(0,T+1);case c:var F=this.$locale().weekStart||0,z=(S<F?S+7:S)-F;return $(m?R-z:R+(6-z),T);case u:case p:return C(H+"Hours",0);case d:return C(H+"Minutes",1);case o:return C(H+"Seconds",2);case s:return C(H+"Milliseconds",3);default:return this.clone()}},_.endOf=function(y){return this.startOf(y,!1)},_.$set=function(y,k){var l,m=P.p(y),g="set"+(this.$u?"UTC":""),$=(l={},l[u]=g+"Date",l[p]=g+"Date",l[h]=g+"Month",l[f]=g+"FullYear",l[d]=g+"Hours",l[o]=g+"Minutes",l[s]=g+"Seconds",l[a]=g+"Milliseconds",l)[m],C=m===u?this.$D+(k-this.$W):k;if(m===h||m===f){var S=this.clone().set(p,1);S.$d[$](C),S.init(),this.$d=S.set(p,Math.min(this.$D,S.daysInMonth())).$d}else $&&this.$d[$](C);return this.init(),this},_.set=function(y,k){return this.clone().$set(y,k)},_.get=function(y){return this[P.p(y)]()},_.add=function(y,k){var l,m=this;y=Number(y);var g=P.p(k),$=function(T){var R=Y(m);return P.w(R.date(R.date()+Math.round(T*y)),m)};if(g===h)return this.set(h,this.$M+y);if(g===f)return this.set(f,this.$y+y);if(g===u)return $(1);if(g===c)return $(7);var C=(l={},l[o]=r,l[d]=i,l[s]=n,l)[g]||1,S=this.$d.getTime()+y*C;return P.w(S,this)},_.subtract=function(y,k){return this.add(-1*y,k)},_.format=function(y){var k=this,l=this.$locale();if(!this.isValid())return l.invalidDate||w;var m=y||"YYYY-MM-DDTHH:mm:ssZ",g=P.z(this),$=this.$H,C=this.$m,S=this.$M,T=l.weekdays,R=l.months,H=l.meridiem,F=function(J,X,Q,ee){return J&&(J[X]||J(k,m))||Q[X].slice(0,ee)},z=function(J){return P.s($%12||12,J,"0")},W=H||function(J,X,Q){var ee=J<12?"AM":"PM";return Q?ee.toLowerCase():ee};return m.replace(V,(function(J,X){return X||(function(Q){switch(Q){case"YY":return String(k.$y).slice(-2);case"YYYY":return P.s(k.$y,4,"0");case"M":return S+1;case"MM":return P.s(S+1,2,"0");case"MMM":return F(l.monthsShort,S,R,3);case"MMMM":return F(R,S);case"D":return k.$D;case"DD":return P.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return F(l.weekdaysMin,k.$W,T,2);case"ddd":return F(l.weekdaysShort,k.$W,T,3);case"dddd":return T[k.$W];case"H":return String($);case"HH":return P.s($,2,"0");case"h":return z(1);case"hh":return z(2);case"a":return W($,C,!0);case"A":return W($,C,!1);case"m":return String(C);case"mm":return P.s(C,2,"0");case"s":return String(k.$s);case"ss":return P.s(k.$s,2,"0");case"SSS":return P.s(k.$ms,3,"0");case"Z":return g}return null})(J)||g.replace(":","")}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(y,k,l){var m,g=this,$=P.p(k),C=Y(y),S=(C.utcOffset()-this.utcOffset())*r,T=this-C,R=function(){return P.m(g,C)};switch($){case f:m=R()/12;break;case h:m=R();break;case b:m=R()/3;break;case c:m=(T-S)/6048e5;break;case u:m=(T-S)/864e5;break;case d:m=T/i;break;case o:m=T/r;break;case s:m=T/n;break;default:m=T}return l?m:P.a(m)},_.daysInMonth=function(){return this.endOf(h).$D},_.$locale=function(){return te[this.$L]},_.locale=function(y,k){if(!y)return this.$L;var l=this.clone(),m=se(y,k,!0);return m&&(l.$L=m),l},_.clone=function(){return P.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},v})(),D=pe.prototype;return Y.prototype=D,[["$ms",a],["$s",s],["$m",o],["$H",d],["$W",u],["$M",h],["$y",f],["$D",p]].forEach((function(v){D[v[1]]=function(_){return this.$g(_,v[0],v[1])}})),Y.extend=function(v,_){return v.$i||(v(_,pe,Y),v.$i=!0),Y},Y.locale=se,Y.isDayjs=le,Y.unix=function(v){return Y(1e3*v)},Y.en=te[q],Y.Ls=te,Y.p={},Y}))})(Ht)),Ht.exports}var ks=ws();const $s=Ar(ks);function Or(e){const t=e?.repoName.split("/")?.[1]||e?.repoName;if(!t)throw new Error("wrong componentPath "+e?.repoName);if(!e?.version)throw new Error("wrong version "+e?.version);const n=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const r=document.createElement("script");if(r.id=t+"-script",r.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${n}`,e?.local)r.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const i=t.split("-")[0];r.src=`http://localhost:6006/webcomponents/${t.replace(i+"-","")}/${n}`}document.head.appendChild(r)}catch(r){console.warn(r)}}var kt={},Tn,Dr;function Es(){if(Dr)return Tn;Dr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,d=`
|
|
25
|
+
`,u="/",c="*",h="",b="comment",f="declaration";Tn=function(w,x){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];x=x||{};var V=1,E=1;function M(D){var v=D.match(t);v&&(V+=v.length);var _=D.lastIndexOf(d);E=~_?D.length-_:E+D.length}function G(){var D={line:V,column:E};return function(v){return v.position=new q(D),le(),v}}function q(D){this.start=D,this.end={line:V,column:E},this.source=x.source}q.prototype.content=w;function te(D){var v=new Error(x.source+":"+V+":"+E+": "+D);if(v.reason=D,v.filename=x.source,v.line=V,v.column=E,v.source=w,!x.silent)throw v}function ne(D){var v=D.exec(w);if(v){var _=v[0];return M(_),w=w.slice(_.length),v}}function le(){ne(n)}function se(D){var v;for(D=D||[];v=Y();)v!==!1&&D.push(v);return D}function Y(){var D=G();if(!(u!=w.charAt(0)||c!=w.charAt(1))){for(var v=2;h!=w.charAt(v)&&(c!=w.charAt(v)||u!=w.charAt(v+1));)++v;if(v+=2,h===w.charAt(v-1))return te("End of comment missing");var _=w.slice(2,v-2);return E+=2,M(_),w=w.slice(v),E+=2,D({type:b,comment:_})}}function P(){var D=G(),v=ne(r);if(v){if(Y(),!ne(i))return te("property missing ':'");var _=ne(a),y=D({type:f,property:p(v[0].replace(e,h)),value:_?p(_[0].replace(e,h)):h});return ne(s),y}}function pe(){var D=[];se(D);for(var v;v=P();)v!==!1&&(D.push(v),se(D));return D}return le(),pe()};function p(w){return w?w.replace(o,h):h}return Tn}var Lr;function xs(){if(Lr)return kt;Lr=1;var e=kt&&kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kt,"__esModule",{value:!0}),kt.default=n;var t=e(Es());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),o=typeof i=="function";return s.forEach(function(d){if(d.type==="declaration"){var u=d.property,c=d.value;o?i(u,c,d):c&&(a=a||{},a[u]=c)}}),a}return kt}var Ss=xs();const qr=Ar(Ss);qr.default;function Cs(e,t,n){re(t,!0),re(n,!1)}function jr(e,t,n){re(t,!1),re(n,!0)}var Ts=oe('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css" class="svelte-1ekidn3"/>'),Ms=oe('<h1 class="title svelte-1ekidn3" part="title">Checkout</h1>'),Ps=oe('<div class="dataentry svelte-1ekidn3"><span class="dataentry_value svelte-1ekidn3"> </span></div>'),Rs=oe('<div class="dataentrycontainer svelte-1ekidn3"><!></div>'),Ns=oe('<h4 class="subtitle svelte-1ekidn3" part="subtitle"><button class="btn btn-sm detail_btn svelte-1ekidn3">edit</button></h4> <div class="dataentrycontainer svelte-1ekidn3"><div class="dataentry svelte-1ekidn3"><span class="dataentry_key svelte-1ekidn3">Name</span><span class="dataentry_value svelte-1ekidn3"> </span></div> <div class="dataentry svelte-1ekidn3"><span class="dataentry_key svelte-1ekidn3">Address</span><span class="dataentry_value svelte-1ekidn3"> </span></div></div>',1),As=(e,t)=>{re(t,"yes"),setTimeout(()=>{re(t,"no")},200)},Is=oe('<h4 class="subtitle svelte-1ekidn3" part="subtitle">Address</h4> <div class="svelte-1ekidn3"><hb-form></hb-form> <div class="svelte-1ekidn3"><button style="width:100%;margin-bottom:10px" class="btn btn-primary svelte-1ekidn3">continue</button></div></div>',3),Os=oe('<h4 style="margin-top:20px" class="subtitle svelte-1ekidn3" part="subtitle"><span class="detail_label svelte-1ekidn3"><i class="bi bi-truck svelte-1ekidn3"></i> Shipment Service</span><button class="btn btn-sm detail_btn svelte-1ekidn3">edit</button></h4> <div class="dataentrycontainer svelte-1ekidn3"><div class="dataentry svelte-1ekidn3"><span class="dataentry_key svelte-1ekidn3">Shipping Fee</span><span class="dataentry_value svelte-1ekidn3"> </span></div> <div class="dataentry svelte-1ekidn3"><span class="dataentry_key svelte-1ekidn3">Arrive</span><span class="dataentry_value svelte-1ekidn3"> </span></div></div>',1),Ds=(e,t)=>{re(t,"yes"),setTimeout(()=>{re(t,"no")},200)},Ls=oe('<h4 class="subtitle svelte-1ekidn3" part="subtitle" style="margin-top:20px"><i class="bi bi-truck svelte-1ekidn3"></i> Shipment Service</h4> <div class="svelte-1ekidn3"><hb-form></hb-form> <div class="svelte-1ekidn3"><button style="width:100%" class="btn btn-primary svelte-1ekidn3">continue</button></div></div>',3),qs=oe('<h4 style="margin-top:20px" class="subtitle svelte-1ekidn3" part="subtitle"><span class="detail_label svelte-1ekidn3"><i class="bi bi-truck svelte-1ekidn3"></i> Shipment Service</span><button class="btn btn-sm detail_btn svelte-1ekidn3">edit</button></h4> <div class="dataentrycontainer svelte-1ekidn3"><div class="dataentry svelte-1ekidn3"><span class="dataentry_key svelte-1ekidn3">Shipping Fee</span><span class="dataentry_value svelte-1ekidn3"> </span></div> <div class="dataentry svelte-1ekidn3"><span class="dataentry_key svelte-1ekidn3">Shipping Time</span><span class="dataentry_value svelte-1ekidn3"> </span></div></div>',1),js=oe('<div id="shipment_separator" class="svelte-1ekidn3"><!></div>'),zs=oe("<hb-payment-paypal></hb-payment-paypal>",2),Fs=oe("<google-pay-button></google-pay-button>",2),Bs=oe('<div class="payment_button_container svelte-1ekidn3"><!></div>'),Us=oe('<div id="payment_btn_container" class="svelte-1ekidn3"></div>'),Vs=oe('By Clicking..<button class="btn btn-default svelte-1ekidn3">Terms and conditions</button>',1),Ys=oe('<h3 class="subtitle svelte-1ekidn3" part="subtitle"><i class="bi bi-wallet2 svelte-1ekidn3"></i> Payment Method</h3> <!> <div class="footer_note svelte-1ekidn3"><!></div>',1),Hs=oe('<div id="payment_completed_content" class="svelte-1ekidn3"><div id="payment_completed_title" class="svelte-1ekidn3">payment completed</div> <div id="payment_completed_content" class="svelte-1ekidn3"> </div> <div id="payment_completed_footer" class="svelte-1ekidn3"><button class="btn btn-link svelte-1ekidn3">invoice</button></div></div>'),Ws=oe('<!> <div id="border_top" class="svelte-1ekidn3"><div class="svelte-1ekidn3"><h3 class="subtitle svelte-1ekidn3" part="subtitle"><i class="bi bi-send-fill svelte-1ekidn3"></i> Delivery</h3> <!></div> <!></div> <div class="payment_title svelte-1ekidn3"><!></div>',1);const Gs={hash:"svelte-1ekidn3",code:`@charset "UTF-8";
|
|
26
26
|
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
|
|
27
27
|
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");
|
|
28
28
|
/*!
|
|
29
|
-
* Bootstrap v5.
|
|
29
|
+
* Bootstrap v5.3.8 (https://getbootstrap.com/)
|
|
30
30
|
* Copyright 2011-2021 The Bootstrap Authors
|
|
31
31
|
* Copyright 2011-2021 Twitter, Inc.
|
|
32
32
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
33
|
-
*/:
|
|
34
|
-
.svelte-
|
|
35
|
-
.svelte-
|
|
36
|
-
@media (prefers-reduced-motion: no-preference) {:
|
|
37
|
-
} h4.svelte-
|
|
38
|
-
@media (min-width: 1200px) {h1.svelte-
|
|
33
|
+
*/:root {--bs-blue: #0d6efd;--bs-indigo: #6610f2;--bs-purple: #6f42c1;--bs-pink: #d63384;--bs-red: #dc3545;--bs-orange: #fd7e14;--bs-yellow: #ffc107;--bs-green: #198754;--bs-teal: #20c997;--bs-cyan: #0dcaf0;--bs-black: #000;--bs-white: #fff;--bs-gray: #6c757d;--bs-gray-dark: #343a40;--bs-gray-100: #f8f9fa;--bs-gray-200: #e9ecef;--bs-gray-300: #dee2e6;--bs-gray-400: #ced4da;--bs-gray-500: #adb5bd;--bs-gray-600: #6c757d;--bs-gray-700: #495057;--bs-gray-800: #343a40;--bs-gray-900: #212529;--bs-primary: #0d6efd;--bs-secondary: #6c757d;--bs-success: #198754;--bs-info: #0dcaf0;--bs-warning: #ffc107;--bs-danger: #dc3545;--bs-light: #f8f9fa;--bs-dark: #212529;--bs-primary-rgb: 13, 110, 253;--bs-secondary-rgb: 108, 117, 125;--bs-success-rgb: 25, 135, 84;--bs-info-rgb: 13, 202, 240;--bs-warning-rgb: 255, 193, 7;--bs-danger-rgb: 220, 53, 69;--bs-light-rgb: 248, 249, 250;--bs-dark-rgb: 33, 37, 41;--bs-primary-text-emphasis: rgb(5.2, 44, 101.2);--bs-secondary-text-emphasis: rgb(43.2, 46.8, 50);--bs-success-text-emphasis: rgb(10, 54, 33.6);--bs-info-text-emphasis: rgb(5.2, 80.8, 96);--bs-warning-text-emphasis: rgb(102, 77.2, 2.8);--bs-danger-text-emphasis: rgb(88, 21.2, 27.6);--bs-light-text-emphasis: #495057;--bs-dark-text-emphasis: #495057;--bs-primary-bg-subtle: rgb(206.6, 226, 254.6);--bs-secondary-bg-subtle: rgb(225.6, 227.4, 229);--bs-success-bg-subtle: rgb(209, 231, 220.8);--bs-info-bg-subtle: rgb(206.6, 244.4, 252);--bs-warning-bg-subtle: rgb(255, 242.6, 205.4);--bs-danger-bg-subtle: rgb(248, 214.6, 217.8);--bs-light-bg-subtle: rgb(251.5, 252, 252.5);--bs-dark-bg-subtle: #ced4da;--bs-primary-border-subtle: rgb(158.2, 197, 254.2);--bs-secondary-border-subtle: rgb(196.2, 199.8, 203);--bs-success-border-subtle: rgb(163, 207, 186.6);--bs-info-border-subtle: rgb(158.2, 233.8, 249);--bs-warning-border-subtle: rgb(255, 230.2, 155.8);--bs-danger-border-subtle: rgb(241, 174.2, 180.6);--bs-light-border-subtle: #e9ecef;--bs-dark-border-subtle: #adb5bd;--bs-white-rgb: 255, 255, 255;--bs-black-rgb: 0, 0, 0;--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family: var(--bs-font-sans-serif);--bs-body-font-size: 1rem;--bs-body-font-weight: 400;--bs-body-line-height: 1.5;--bs-body-color: #212529;--bs-body-color-rgb: 33, 37, 41;--bs-body-bg: #fff;--bs-body-bg-rgb: 255, 255, 255;--bs-emphasis-color: #000;--bs-emphasis-color-rgb: 0, 0, 0;--bs-secondary-color: rgba(33, 37, 41, 0.75);--bs-secondary-color-rgb: 33, 37, 41;--bs-secondary-bg: #e9ecef;--bs-secondary-bg-rgb: 233, 236, 239;--bs-tertiary-color: rgba(33, 37, 41, 0.5);--bs-tertiary-color-rgb: 33, 37, 41;--bs-tertiary-bg: #f8f9fa;--bs-tertiary-bg-rgb: 248, 249, 250;--bs-heading-color: inherit;--bs-link-color: #0d6efd;--bs-link-color-rgb: 13, 110, 253;--bs-link-decoration: underline;--bs-link-hover-color: rgb(10.4, 88, 202.4);--bs-link-hover-color-rgb: 10, 88, 202;--bs-code-color: #d63384;--bs-highlight-color: #212529;--bs-highlight-bg: rgb(255, 242.6, 205.4);--bs-border-width: 1px;--bs-border-style: solid;--bs-border-color: #dee2e6;--bs-border-color-translucent: rgba(0, 0, 0, 0.175);--bs-border-radius: 0.375rem;--bs-border-radius-sm: 0.25rem;--bs-border-radius-lg: 0.5rem;--bs-border-radius-xl: 1rem;--bs-border-radius-xxl: 2rem;--bs-border-radius-2xl: var(--bs-border-radius-xxl);--bs-border-radius-pill: 50rem;--bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);--bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-focus-ring-width: 0.25rem;--bs-focus-ring-opacity: 0.25;--bs-focus-ring-color: rgba(13, 110, 253, 0.25);--bs-form-valid-color: #198754;--bs-form-valid-border-color: #198754;--bs-form-invalid-color: #dc3545;--bs-form-invalid-border-color: #dc3545;}.svelte-1ekidn3,
|
|
34
|
+
.svelte-1ekidn3::before,
|
|
35
|
+
.svelte-1ekidn3::after {box-sizing:border-box;}
|
|
36
|
+
@media (prefers-reduced-motion: no-preference) {:root {scroll-behavior:smooth;}
|
|
37
|
+
} h4.svelte-1ekidn3, h3.svelte-1ekidn3, h1.svelte-1ekidn3 {margin-top:0;margin-bottom:0.5rem;font-weight:500;line-height:1.2;color:var(--bs-heading-color);}h1.svelte-1ekidn3 {font-size:calc(1.375rem + 1.5vw);}
|
|
38
|
+
@media (min-width: 1200px) {h1.svelte-1ekidn3 {font-size:2.5rem;}
|
|
39
39
|
}
|
|
40
40
|
@media (min-width: 1200px) {
|
|
41
|
-
}h3.svelte-
|
|
42
|
-
@media (min-width: 1200px) {h3.svelte-
|
|
43
|
-
}h4.svelte-
|
|
44
|
-
@media (min-width: 1200px) {h4.svelte-
|
|
45
|
-
}button.svelte-
|
|
46
|
-
button.svelte-
|
|
41
|
+
}h3.svelte-1ekidn3 {font-size:calc(1.3rem + 0.6vw);}
|
|
42
|
+
@media (min-width: 1200px) {h3.svelte-1ekidn3 {font-size:1.75rem;}
|
|
43
|
+
}h4.svelte-1ekidn3 {font-size:calc(1.275rem + 0.3vw);}
|
|
44
|
+
@media (min-width: 1200px) {h4.svelte-1ekidn3 {font-size:1.5rem;}
|
|
45
|
+
}button.svelte-1ekidn3 {border-radius:0;}button.svelte-1ekidn3:focus:not(:focus-visible) {outline:0;}
|
|
46
|
+
button.svelte-1ekidn3 {margin:0;font-family:inherit;font-size:inherit;line-height:inherit;}button.svelte-1ekidn3 {text-transform:none;}button.svelte-1ekidn3 {-webkit-appearance:button;}button.svelte-1ekidn3:not(:disabled) {cursor:pointer;}.svelte-1ekidn3::-moz-focus-inner {padding:0;border-style:none;}
|
|
47
47
|
@media (min-width: 1200px) {
|
|
48
|
-
}.svelte-
|
|
49
|
-
.svelte-
|
|
50
|
-
.svelte-
|
|
51
|
-
.svelte-
|
|
52
|
-
.svelte-
|
|
53
|
-
.svelte-
|
|
54
|
-
.svelte-
|
|
48
|
+
}.svelte-1ekidn3::-webkit-datetime-edit-fields-wrapper,
|
|
49
|
+
.svelte-1ekidn3::-webkit-datetime-edit-text,
|
|
50
|
+
.svelte-1ekidn3::-webkit-datetime-edit-minute,
|
|
51
|
+
.svelte-1ekidn3::-webkit-datetime-edit-hour-field,
|
|
52
|
+
.svelte-1ekidn3::-webkit-datetime-edit-day-field,
|
|
53
|
+
.svelte-1ekidn3::-webkit-datetime-edit-month-field,
|
|
54
|
+
.svelte-1ekidn3::-webkit-datetime-edit-year-field {padding:0;}.svelte-1ekidn3::-webkit-inner-spin-button {height:auto;}
|
|
55
55
|
/* rtl:raw:
|
|
56
56
|
[type="tel"],
|
|
57
57
|
[type="url"],
|
|
@@ -59,7 +59,7 @@ button.svelte-4e76ss {margin:0;font-family:inherit;font-size:inherit;line-height
|
|
|
59
59
|
[type="number"] {
|
|
60
60
|
direction: ltr;
|
|
61
61
|
}
|
|
62
|
-
*/.svelte-
|
|
62
|
+
*/.svelte-1ekidn3::-webkit-search-decoration {-webkit-appearance:none;}.svelte-1ekidn3::-webkit-color-swatch-wrapper {padding:0;}.svelte-1ekidn3::file-selector-button {font:inherit;-webkit-appearance:button;}
|
|
63
63
|
@media (min-width: 1200px) {
|
|
64
64
|
}
|
|
65
65
|
@media (min-width: 1200px) {
|
|
@@ -81,7 +81,7 @@ button.svelte-4e76ss {margin:0;font-family:inherit;font-size:inherit;line-height
|
|
|
81
81
|
@media (min-width: 1200px) {
|
|
82
82
|
}
|
|
83
83
|
@media (min-width: 1400px) {
|
|
84
|
-
}
|
|
84
|
+
}:root {--bs-breakpoint-xs: 0;--bs-breakpoint-sm: 576px;--bs-breakpoint-md: 768px;--bs-breakpoint-lg: 992px;--bs-breakpoint-xl: 1200px;--bs-breakpoint-xxl: 1400px;}
|
|
85
85
|
@media (min-width: 576px) {
|
|
86
86
|
}
|
|
87
87
|
@media (min-width: 768px) {
|
|
@@ -91,9 +91,9 @@ button.svelte-4e76ss {margin:0;font-family:inherit;font-size:inherit;line-height
|
|
|
91
91
|
@media (min-width: 1200px) {
|
|
92
92
|
}
|
|
93
93
|
@media (min-width: 1400px) {
|
|
94
|
-
}.btn.svelte-
|
|
95
|
-
@media (prefers-reduced-motion: reduce) {.btn.svelte-
|
|
96
|
-
}.btn.svelte-
|
|
94
|
+
}.btn.svelte-1ekidn3 {--bs-btn-padding-x: 0.75rem;--bs-btn-padding-y: 0.375rem;--bs-btn-font-family: ;--bs-btn-font-size: 1rem;--bs-btn-font-weight: 400;--bs-btn-line-height: 1.5;--bs-btn-color: var(--bs-body-color);--bs-btn-bg: transparent;--bs-btn-border-width: var(--bs-border-width);--bs-btn-border-color: transparent;--bs-btn-border-radius: var(--bs-border-radius);--bs-btn-hover-border-color: transparent;--bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity: 0.65;--bs-btn-focus-box-shadow: 0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;}
|
|
95
|
+
@media (prefers-reduced-motion: reduce) {.btn.svelte-1ekidn3 {transition:none;}
|
|
96
|
+
}.btn.svelte-1ekidn3:hover {color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);}.btn.svelte-1ekidn3:focus-visible {color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow);} .svelte-1ekidn3:not(.btn-check) + .btn:where(.svelte-1ekidn3):active, .btn.svelte-1ekidn3:first-child:active {color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color);} .svelte-1ekidn3:not(.btn-check) + .btn:where(.svelte-1ekidn3):active:focus-visible, .btn.svelte-1ekidn3:first-child:active:focus-visible {box-shadow:var(--bs-btn-focus-box-shadow);}.btn.svelte-1ekidn3:disabled {color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity);}.btn-primary.svelte-1ekidn3 {--bs-btn-color: #fff;--bs-btn-bg: #0d6efd;--bs-btn-border-color: #0d6efd;--bs-btn-hover-color: #fff;--bs-btn-hover-bg: rgb(11.05, 93.5, 215.05);--bs-btn-hover-border-color: rgb(10.4, 88, 202.4);--bs-btn-focus-shadow-rgb: 49, 132, 253;--bs-btn-active-color: #fff;--bs-btn-active-bg: rgb(10.4, 88, 202.4);--bs-btn-active-border-color: rgb(9.75, 82.5, 189.75);--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color: #fff;--bs-btn-disabled-bg: #0d6efd;--bs-btn-disabled-border-color: #0d6efd;}.btn-link.svelte-1ekidn3 {--bs-btn-font-weight: 400;--bs-btn-color: var(--bs-link-color);--bs-btn-bg: transparent;--bs-btn-border-color: transparent;--bs-btn-hover-color: var(--bs-link-hover-color);--bs-btn-hover-border-color: transparent;--bs-btn-active-color: var(--bs-link-hover-color);--bs-btn-active-border-color: transparent;--bs-btn-disabled-color: #6c757d;--bs-btn-disabled-border-color: transparent;--bs-btn-box-shadow: 0 0 0 #000;--bs-btn-focus-shadow-rgb: 49, 132, 253;text-decoration:underline;}.btn-link.svelte-1ekidn3:focus-visible {color:var(--bs-btn-color);}.btn-link.svelte-1ekidn3:hover {color:var(--bs-btn-hover-color);}.btn-sm.svelte-1ekidn3 {--bs-btn-padding-y: 0.25rem;--bs-btn-padding-x: 0.5rem;--bs-btn-font-size: 0.875rem;--bs-btn-border-radius: var(--bs-border-radius-sm);}
|
|
97
97
|
/* rtl:begin:remove */
|
|
98
98
|
/* rtl:end:remove */
|
|
99
99
|
@media (min-width: 576px) {
|
|
@@ -109,7 +109,7 @@ button.svelte-4e76ss {margin:0;font-family:inherit;font-size:inherit;line-height
|
|
|
109
109
|
@media (min-width: 1200px) {
|
|
110
110
|
}
|
|
111
111
|
@media print {
|
|
112
|
-
}:host {--edit-color: blue;--paypal-button-color: yellow;--hb-checkout-border: 0.5px solid rgba(197, 197, 197, 0.808);font-family:"Roboto", sans-serif;display:block;margin:40px 0px 40px 0px;}#payment_completed_content.svelte-
|
|
112
|
+
}:host {--edit-color: blue;--paypal-button-color: yellow;--hb-checkout-border: 0.5px solid rgba(197, 197, 197, 0.808);font-family:"Roboto", sans-serif;display:block;margin:40px 0px 40px 0px;}#payment_completed_content.svelte-1ekidn3 {text-align:center;}#payment_completed_title.svelte-1ekidn3 {margin:30px;text-transform:capitalize;font-size:2em;font-weight:bold;}#payment_btn_container.svelte-1ekidn3 {display:flex;}.payment_button_container.svelte-1ekidn3 {flex:1;margin:15px;display:inline-block;text-align:center;}.payment_button.svelte-1ekidn3 {height:40px;width:100%;max-width:50vw;}.detail_label.svelte-1ekidn3 {font-size:0.8em;font-weight:bold;}.dataentry_key.svelte-1ekidn3 {margin-right:3px;}.dataentry_key.svelte-1ekidn3::after {content:":";}.detail_btn.svelte-1ekidn3 {float:right;margin-right:10px;color:var(--edit-color);font-weight:bold;text-transform:capitalize;}.dataentry.svelte-1ekidn3 {line-height:30px;}.footer_note.svelte-1ekidn3 {text-align:center;font-size:12px;padding:5px;line-height:30px;}.subtitle.svelte-1ekidn3 {margin-bottom:30px;}.title.svelte-1ekidn3 {text-align:center;border-bottom:var(--hb-checkout-border);padding-bottom:20px;}.payment_title.svelte-1ekidn3 {margin-top:20px;border-top:var(--hb-checkout-border);padding-top:10px;}`};function zr(e,t){Un(t,!0),ns(e,Gs);/**
|
|
113
113
|
* Svelte Payment Page WebComponent
|
|
114
114
|
* =====================
|
|
115
115
|
*
|
|
@@ -117,5 +117,5 @@ button.svelte-4e76ss {margin:0;font-family:inherit;font-size:inherit;line-height
|
|
|
117
117
|
*
|
|
118
118
|
* @license: MIT License
|
|
119
119
|
*
|
|
120
|
-
*/let n=he(""),r=he("");
|
|
120
|
+
*/let n=he(""),r=he("");st({});const i={type:"plain",total:0,currencyCode:"EUR",countryCode:"IT",merchantName:"merchant"};let a=wt(t,"id",7,""),s=wt(t,"shipments",23,()=>[]),o=wt(t,"user",7,void 0),d=wt(t,"gateways",23,()=>[]),u=wt(t,"payment",7,i),c=wt(t,"completed",7,"no");const h=[{type:"radio",placeholder:"Insert your Full Name here...",id:"shipmentsolution",required:!0,label:"Shipment",validationTip:"This field cannot be empty.",params:{options:[]}}];let b=he(!1),f=he(!1),p=he("no"),w=he("no");Ri(()=>{if(typeof u()=="string"&&u(JSON.parse(u())||i),typeof s()=="string"&&s(JSON.parse(s())||[]),typeof d()=="string"){d(JSON.parse(d())||[]);for(const l of d())l.cardNetworks?.length||(l.cardNetworks=["VISA","MASTERCARD"])}if(u().type||(u().type="buy"),typeof o()=="string"&&(o(JSON.parse(o())),o())){for(const l of Object.keys(o()))if(fe?.find?.(m=>m.id===l))fe[fe?.findIndex?.(m=>m.id===l)].value=o()[l];else if(fe?.find?.(m=>m.params?.columns?.length&&m.params.columns?.find?.(g=>g.id===l))){const m=fe?.findIndex?.($=>$.params?.columns?.length&&$.params.columns.find(C=>C.id===l)),g=fe[m].params?.columns?.findIndex?.($=>$.id===l);fe[m].params&&(g||g===0)&&(fe[m].params.columns[g].value=o()[l])}}h?.[0]?.params&&(h[0].params.options=s().map(l=>({value:l.id,label:l.label+" "+l.price+l.currency}))),h[0]&&s()&&(s().find(l=>l.selected)||s().find(l=>l.standard))&&(s().find(l=>l.selected)||s().find(l=>l.standard))?.id&&(h[0].value=(s().find(l=>l.selected)||s().find(l=>l.standard))?.id)});function x(l){console.log("saveuser",l);const m={fullName:l.fullName,addressWithNumber:l.addressWithNumber,city:l.city,zip:l.zip,nationality:l.nationality};for(const g of Object.keys(l))if(fe.find($=>$.id===g))fe[fe.findIndex($=>$.id===g)].value=l[g];else if(fe.find($=>$.params?.columns?.length&&$.params.columns.find(C=>C.id===g))){const $=fe.findIndex(S=>S.params?.columns?.length&&S.params.columns.find(T=>T.id===g)),C=fe[$].params?.columns.findIndex(S=>S.id===g);C&&(fe[$].params.columns[C].value=l[g])}o(m),re(b,!1),re(p,"no"),console.log("edited"),E("saveUser",o())}function V(l){console.log("saveShipment",l);const m=l?.shipmentsolution;if(m&&s().find(g=>g.id===m)){s().forEach($=>$.selected=!1);const g=s().findIndex($=>$.id===m);s()[g].selected=!0,re(f,!1),h[0].value=m,E("saveShipment",s()[g])}re(w,"no")}function E(l,m){t.$$host.dispatchEvent(new CustomEvent(l,{detail:m}))}Or({repoName:"@htmlbricks/hb-form",version:Nr.version}),Or({repoName:"@htmlbricks/hb-payment-paypal",version:Nr.version});function M(l){c("yes"),E("paymentCompleted",{total:u()?.total,method:l,completed:!0})}var G={get id(){return a()},set id(l=""){a(l),rt()},get shipments(){return s()},set shipments(l=[]){s(l),rt()},get user(){return o()},set user(l=void 0){o(l),rt()},get gateways(){return d()},set gateways(l=[]){d(l),rt()},get payment(){return u()},set payment(l=i){u(l),rt()},get completed(){return c()},set completed(l="no"){c(l),rt()}},q=Ws();Wi(l=>{var m=Ts();K(l,m)});var te=ge(q);Ft(te,t,"title",{},l=>{var m=Ms();K(l,m)});var ne=Z(te,2),le=L(ne),se=Z(L(le),2);{var Y=l=>{var m=Rs(),g=L(m);Ft(g,t,"userinfo",{},$=>{var C=yt(),S=ge(C);{var T=R=>{var H=Ps(),F=L(H),z=L(F,!0);I(F),I(H),we(()=>Ze(z,o().fullName)),K(R,H)};Ie(S,R=>{o().fullName&&R(T)})}K($,C)}),I(m),K(l,m)},P=l=>{var m=yt(),g=ge(m);{var $=S=>{var T=Ns(),R=ge(T),H=L(R);H.__click=[Cs,b,f],I(R);var F=Z(R,2),z=L(F),W=Z(L(z)),J=L(W,!0);I(W),I(z);var X=Z(z,2),Q=Z(L(X)),ee=L(Q,!0);I(Q),I(X),I(F),we(()=>{Ze(J,o().fullName),Ze(ee,`${o().addressWithNumber}, ${o().city}, ${o().zip},${o().nationality}`)}),K(S,T)},C=S=>{var T=Is(),R=Z(ge(T),2),H=L(R);$e(H,"hide_submit","yes"),En(H,j(n)),we(()=>$e(H,"schema",JSON.stringify(fe))),we(()=>$e(H,"submitted",j(p))),Bt(H,1,"svelte-1ekidn3");var F=Z(H,2),z=L(F);z.__click=[As,p],I(F),I(R),zt("submit",H,W=>{x(W.detail)}),K(S,T)};Ie(g,S=>{o()?.fullName&&o()?.addressWithNumber&&!j(b)?S($):S(C,!1)},!0)}K(l,m)};Ie(se,l=>{o()?.fixed&&!j(b)?l(Y):l(P,!1)})}I(le);var pe=Z(le,2);{var D=l=>{var m=js(),g=L(m);{var $=S=>{var T=yt(),R=ge(T);{var H=z=>{var W=Os(),J=ge(W),X=Z(L(J));X.__click=[jr,b,f],I(J);var Q=Z(J,2),ee=L(Q),Ve=Z(L(ee)),$t=L(Ve,!0);I(Ve),I(ee);var Ye=Z(ee,2),Ee=Z(L(Ye)),Pe=L(Ee,!0);I(Ee),I(Ye),I(Q),we((Oe,Js)=>{Ze($t,Oe),Ze(Pe,Js)},[()=>(s().find(Oe=>Oe.selected)||s().find(Oe=>Oe.standard))?.price,()=>$s((s().find(Oe=>Oe.selected)||s().find(Oe=>Oe.standard))?.arriveDate).format()]),K(z,W)},F=z=>{var W=Ls(),J=Z(ge(W),2),X=L(J);$e(X,"hide_submit","yes"),En(X,j(n)),we(()=>$e(X,"schema",JSON.stringify(h))),we(()=>$e(X,"submitted",j(w))),Bt(X,1,"svelte-1ekidn3");var Q=Z(X,2),ee=L(Q);ee.__click=[Ds,w],I(Q),I(J),zt("submit",X,Ve=>{V(Ve.detail)}),K(z,W)};Ie(R,z=>{!j(f)&&typeof s()=="object"&&s()?.length&&(s().find(W=>W.selected)||s().find(W=>W.standard))?z(H):z(F,!1)})}K(S,T)},C=S=>{var T=yt(),R=ge(T);{var H=F=>{var z=qs(),W=ge(z),J=Z(L(W));J.__click=[jr,b,f],I(W);var X=Z(W,2),Q=L(X),ee=Z(L(Q)),Ve=L(ee,!0);I(ee),I(Q);var $t=Z(Q,2),Ye=Z(L($t)),Ee=L(Ye,!0);I(Ye),I($t),I(X),we((Pe,Oe)=>{Ze(Ve,Pe),Ze(Ee,Oe)},[()=>(s().find(Pe=>Pe.selected)||s().find(Pe=>Pe.standard))?.price,()=>(s().find(Pe=>Pe.selected)||s().find(Pe=>Pe.standard))?.arriveDate]),K(F,z)};Ie(R,F=>{!j(f)&&s()&&typeof s()=="object"&&(s().find(z=>z.selected)||s().find(z=>z.standard))&&F(H)},!0)}K(S,T)};Ie(g,S=>{(o()?.fullName&&o()?.addressWithNumber||o()?.fixed)&&!j(b)?S($):S(C,!1)})}I(m),K(l,m)};Ie(pe,l=>{s()?.length&&l(D)})}I(ne);var v=Z(ne,2),_=L(v);{var y=l=>{var m=Ys(),g=Z(ge(m),2);{var $=T=>{var R=Us();es(R,21,d,H=>H.id,(H,F)=>{var z=Bs(),W=L(z);{var J=Q=>{var ee=zs();En(ee,j(r)),Bt(ee,1,"payment_button svelte-1ekidn3"),we(()=>$e(ee,"paypalid",j(F).paypalid)),we(()=>$e(ee,"total",u()?.total?.toString())),zt("paymentCompleted",ee,Ve=>M("paypal")),K(Q,ee)},X=Q=>{var ee=yt(),Ve=ge(ee);{var $t=Ye=>{var Ee=Fs();Bt(Ee,1,"payment_button svelte-1ekidn3"),$e(Ee,"environment","TEST"),we(()=>$e(Ee,"button-type",u()?.type?.toLowerCase())),$e(Ee,"button-color","black"),$e(Ee,"button-size-mode","fill"),we(()=>$e(Ee,"paymentRequest",{apiVersion:2,apiVersionMinor:0,merchantInfo:{merchantName:u().merchantName,merchantId:j(F).gatewayMerchantId},allowedPaymentMethods:[{type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:j(F).cardNetworks},tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:j(F).gatewayId,gatewayMerchantId:j(F).gatewayMerchantId}}}],transactionInfo:{totalPriceStatus:"FINAL",totalPriceLabel:"Total",totalPrice:u()?.total?.toString(),currencyCode:u()?.currencyCode?.toUpperCase(),countryCode:u()?.countryCode?.toUpperCase(),checkoutOption:"COMPLETE_IMMEDIATE_PURCHASE"}})),zt("loadpaymentdata",Ee,Pe=>{M("google")}),K(Ye,Ee)};Ie(Ve,Ye=>{j(F).id==="google"&&u().countryCode&&Ye($t)},!0)}K(Q,ee)};Ie(W,Q=>{j(F).id==="paypal"?Q(J):Q(X,!1)})}I(z),K(H,z)}),I(R),K(T,R)};Ie(g,T=>{!j(b)&&!j(f)&&(s()?.find?.(R=>R.selected)||s()?.find?.(R=>R.standard)||!s()?.length)&&T($)})}var C=Z(g,2),S=L(C);Ft(S,t,"payment_terms",{},T=>{var R=Vs();jn(),K(T,R)}),I(C),K(l,m)},k=l=>{var m=yt(),g=ge(m);Ft(g,t,"payment_completed",{},$=>{var C=Hs(),S=Z(L(C),2),T=L(S);I(S),jn(2),I(C),we(()=>Ze(T,`Total: ${u().total??""}`)),K($,C)}),K(l,m)};Ie(_,l=>{c()!=="yes"?l(y):l(k,!1)})}return I(v),K(e,q),Vn(G)}Yi(["click"]),customElements.define("hb-checkout",hs(zr,{id:{},shipments:{},user:{},gateways:{},payment:{},completed:{}},["title","userinfo","payment_terms","payment_completed"],[],!0)),Mn.Component=zr,Object.defineProperty(Mn,Symbol.toStringTag,{value:"Module"})})(this.checkout=this.checkout||{});
|
|
121
121
|
//# sourceMappingURL=main.iife.js.map
|