altcha 2.2.2 → 2.2.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.
@@ -1,3 +1,3 @@
1
- (function(x,S){typeof exports=="object"&&typeof module<"u"?S(exports):typeof define=="function"&&define.amd?define(["exports"],S):(x=typeof globalThis<"u"?globalThis:x||self,S(x.altcha={}))})(this,function(x){"use strict";var Da=Object.defineProperty;var Qi=x=>{throw TypeError(x)};var La=(x,S,Z)=>S in x?Da(x,S,{enumerable:!0,configurable:!0,writable:!0,value:Z}):x[S]=Z;var $e=(x,S,Z)=>La(x,typeof S!="symbol"?S+"":S,Z),el=(x,S,Z)=>S.has(x)||Qi("Cannot "+Z);var ve=(x,S,Z)=>(el(x,S,"read from private field"),Z?Z.call(x):S.get(x)),nr=(x,S,Z)=>S.has(x)?Qi("Cannot add the same private member more than once"):S instanceof WeakSet?S.add(x):S.set(x,Z),rr=(x,S,Z,Xt)=>(el(x,S,"write to private field"),Xt?Xt.call(x,Z):S.set(x,Z),Z);var vi,Me,ye;var S=typeof document<"u"?document.currentScript:null;const Z="5";typeof window<"u"&&((vi=window.__svelte??(window.__svelte={})).v??(vi.v=new Set)).add(Z);const Xt=1,tl=4,nl=8,rl=16,il=1,ll=2,kn="[",ir="[!",lr="]",vt={},ue=Symbol(),ol="http://www.w3.org/1999/xhtml",or=!1;function ar(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var sr=Array.isArray,al=Array.prototype.indexOf,sl=Array.from,zt=Object.keys,xt=Object.defineProperty,ze=Object.getOwnPropertyDescriptor,ul=Object.getOwnPropertyDescriptors,fl=Object.prototype,cl=Array.prototype,ur=Object.getPrototypeOf,fr=Object.isExtensible;const ht=()=>{};function cr(e){for(var t=0;t<e.length;t++)e[t]()}function dl(e,t,n=!1){return e===void 0?n?t():t:e}const Ee=2,dr=4,Qt=8,$n=16,Ve=32,Qe=64,en=128,he=256,tn=512,fe=1024,xe=2048,et=4096,gt=8192,nn=16384,vl=32768,xn=65536,hl=1<<19,vr=1<<20,Sn=1<<21,St=Symbol("$state"),hr=Symbol("legacy props"),gl=Symbol("");function _l(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ml(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function pl(e){throw new Error("https://svelte.dev/e/effect_orphan")}function bl(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function yl(){throw new Error("https://svelte.dev/e/hydration_failed")}function wl(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function El(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Cl(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Al(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function rn(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let F=!1;function _t(e){F=e}let V;function qe(e){if(e===null)throw rn(),vt;return V=e}function mt(){return qe(Be(V))}function W(e){if(F){if(Be(V)!==null)throw rn(),vt;V=e}}function Il(){for(var e=0,t=V;;){if(t.nodeType===8){var n=t.data;if(n===lr){if(e===0)return t;e-=1}else(n===kn||n===ir)&&(e+=1)}var i=Be(t);t.remove(),t=i}}let Rl=!1;function je(e){if(typeof e!="object"||e===null||St in e)return e;const t=ur(e);if(t!==fl&&t!==cl)return e;var n=new Map,i=sr(e),a=P(0),l=D,f=s=>{var c=D;Ne(l);var d=s();return Ne(c),d};return i&&n.set("length",P(e.length)),new Proxy(e,{defineProperty(s,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&El();var p=n.get(c);return p===void 0?(p=f(()=>P(d.value)),n.set(c,p)):b(p,f(()=>je(d.value))),!0},deleteProperty(s,c){var d=n.get(c);if(d===void 0)c in s&&(n.set(c,f(()=>P(ue))),Tn(a));else{if(i&&typeof c=="string"){var p=n.get("length"),h=Number(c);Number.isInteger(h)&&h<p.v&&b(p,h)}b(d,ue),Tn(a)}return!0},get(s,c,d){var y;if(c===St)return e;var p=n.get(c),h=c in s;if(p===void 0&&(!h||(y=ze(s,c))!=null&&y.writable)&&(p=f(()=>P(je(h?s[c]:ue))),n.set(c,p)),p!==void 0){var m=o(p);return m===ue?void 0:m}return Reflect.get(s,c,d)},getOwnPropertyDescriptor(s,c){var d=Reflect.getOwnPropertyDescriptor(s,c);if(d&&"value"in d){var p=n.get(c);p&&(d.value=o(p))}else if(d===void 0){var h=n.get(c),m=h==null?void 0:h.v;if(h!==void 0&&m!==ue)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(s,c){var m;if(c===St)return!0;var d=n.get(c),p=d!==void 0&&d.v!==ue||Reflect.has(s,c);if(d!==void 0||L!==null&&(!p||(m=ze(s,c))!=null&&m.writable)){d===void 0&&(d=f(()=>P(p?je(s[c]):ue)),n.set(c,d));var h=o(d);if(h===ue)return!1}return p},set(s,c,d,p){var te;var h=n.get(c),m=c in s;if(i&&c==="length")for(var y=d;y<h.v;y+=1){var N=n.get(y+"");N!==void 0?b(N,ue):y in s&&(N=f(()=>P(ue)),n.set(y+"",N))}h===void 0?(!m||(te=ze(s,c))!=null&&te.writable)&&(h=f(()=>P(void 0)),b(h,f(()=>je(d))),n.set(c,h)):(m=h.v!==ue,b(h,f(()=>je(d))));var E=Reflect.getOwnPropertyDescriptor(s,c);if(E!=null&&E.set&&E.set.call(p,d),!m){if(i&&typeof c=="string"){var j=n.get("length"),_e=Number(c);Number.isInteger(_e)&&_e>=j.v&&b(j,_e+1)}Tn(a)}return!0},ownKeys(s){o(a);var c=Reflect.ownKeys(s).filter(h=>{var m=n.get(h);return m===void 0||m.v!==ue});for(var[d,p]of n)p.v!==ue&&!(d in s)&&c.push(d);return c},setPrototypeOf(){Cl()}})}function Tn(e,t=1){b(e,e.v+t)}var gr,_r,mr,pr;function Nn(){if(gr===void 0){gr=window,_r=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;mr=ze(t,"firstChild").get,pr=ze(t,"nextSibling").get,fr(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),fr(n)&&(n.__t=void 0)}}function ln(e=""){return document.createTextNode(e)}function pe(e){return mr.call(e)}function Be(e){return pr.call(e)}function J(e,t){if(!F)return pe(e);var n=pe(V);return n===null&&(n=V.appendChild(ln())),qe(n),n}function Tt(e,t){if(!F){var n=pe(e);return n instanceof Comment&&n.data===""?Be(n):n}return V}function K(e,t=1,n=!1){let i=F?V:e;for(var a;t--;)a=i,i=Be(i);if(!F)return i;var l=i==null?void 0:i.nodeType;if(n&&l!==3){var f=ln();return i===null?a==null||a.after(f):i.before(f),qe(f),f}return qe(i),i}function kl(e){e.textContent=""}function br(e){return e===this.v}function yr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Dn(e){return!yr(e,this.v)}function on(e){var t=Ee|xe,n=D!==null&&(D.f&Ee)!==0?D:null;return L===null||n!==null&&(n.f&he)!==0?t|=he:L.f|=vr,{ctx:oe,deps:null,effects:null,equals:br,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:n??L}}function Nt(e){const t=on(e);return Pr(t),t}function $l(e){const t=on(e);return t.equals=Dn,t}function wr(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)He(t[n])}}function xl(e){for(var t=e.parent;t!==null;){if((t.f&Ee)===0)return t;t=t.parent}return null}function Er(e){var t,n=L;Ye(xl(e));try{wr(e),t=Ur(e)}finally{Ye(n)}return t}function Cr(e){var t=Er(e),n=(Ge||(e.f&he)!==0)&&e.deps!==null?et:fe;Ce(e,n),e.equals(t)||(e.v=t,e.wv=Fr())}function Sl(e){L===null&&D===null&&pl(),D!==null&&(D.f&he)!==0&&L===null&&ml(),Pt&&_l()}function Tl(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function tt(e,t,n,i=!0){var a=L,l={ctx:oe,deps:null,nodes_start:null,nodes_end:null,f:e|xe,first:null,fn:t,last:null,next:null,parent:a,prev:null,teardown:null,transitions:null,wv:0};if(n)try{qn(l),l.f|=vl}catch(c){throw He(l),c}else t!==null&&vn(l);var f=n&&l.deps===null&&l.first===null&&l.nodes_start===null&&l.teardown===null&&(l.f&(vr|en))===0;if(!f&&i&&(a!==null&&Tl(l,a),D!==null&&(D.f&Ee)!==0)){var s=D;(s.effects??(s.effects=[])).push(l)}return l}function Ln(e){const t=tt(Qt,null,!1);return Ce(t,fe),t.teardown=e,t}function Pn(e){Sl();var t=L!==null&&(L.f&Ve)!==0&&oe!==null&&!oe.m;if(t){var n=oe;(n.e??(n.e=[])).push({fn:e,effect:L,reaction:D})}else{var i=On(e);return i}}function Nl(e){const t=tt(Qe,e,!0);return()=>{He(t)}}function Dl(e){const t=tt(Qe,e,!0);return(n={})=>new Promise(i=>{n.outro?Mn(t,()=>{He(t),i(void 0)}):(He(t),i(void 0))})}function On(e){return tt(dr,e,!1)}function Fn(e){return tt(Qt,e,!0)}function Se(e,t=[],n=on){const i=t.map(n);return Ar(()=>e(...i.map(o)))}function Ar(e,t=0){return tt(Qt|$n|t,e,!0)}function Vn(e,t=!0){return tt(Qt|Ve,e,!0,t)}function Ir(e){var t=e.teardown;if(t!==null){const n=Pt,i=D;Lr(!0),Ne(null);try{t.call(null)}finally{Lr(n),Ne(i)}}}function Rr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){var i=n.next;(n.f&Qe)!==0?n.parent=null:He(n,t),n=i}}function Ll(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Ve)===0&&He(t),t=n}}function He(e,t=!0){var n=!1;(t||(e.f&hl)!==0)&&e.nodes_start!==null&&(kr(e.nodes_start,e.nodes_end),n=!0),Rr(e,t&&!n),dn(e,0),Ce(e,nn);var i=e.transitions;if(i!==null)for(const l of i)l.stop();Ir(e);var a=e.parent;a!==null&&a.first!==null&&$r(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function kr(e,t){for(;e!==null;){var n=e===t?null:Be(e);e.remove(),e=n}}function $r(e){var t=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function Mn(e,t){var n=[];xr(e,n,!0),Pl(n,()=>{He(e),t&&t()})}function Pl(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var a of e)a.out(i)}else t()}function xr(e,t,n){if((e.f&gt)===0){if(e.f^=gt,e.transitions!==null)for(const f of e.transitions)(f.is_global||n)&&t.push(f);for(var i=e.first;i!==null;){var a=i.next,l=(i.f&xn)!==0||(i.f&Ve)!==0;xr(i,t,l?n:!1),i=a}}}function Sr(e){Tr(e,!0)}function Tr(e,t){if((e.f&gt)!==0){e.f^=gt,(e.f&fe)===0&&(e.f^=fe),Ft(e)&&(Ce(e,xe),vn(e));for(var n=e.first;n!==null;){var i=n.next,a=(n.f&xn)!==0||(n.f&Ve)!==0;Tr(n,a?t:!1),n=i}if(e.transitions!==null)for(const l of e.transitions)(l.is_global||t)&&l.in()}}const Ol=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let Dt=[],Lt=[];function Nr(){var e=Dt;Dt=[],cr(e)}function Dr(){var e=Lt;Lt=[],cr(e)}function Un(e){Dt.length===0&&queueMicrotask(Nr),Dt.push(e)}function Fl(e){Lt.length===0&&Ol(Dr),Lt.push(e)}function Vl(){Dt.length>0&&Nr(),Lt.length>0&&Dr()}let an=!1,sn=!1,un=null,nt=!1,Pt=!1;function Lr(e){Pt=e}let Ot=[],Pa=[],D=null,Te=!1;function Ne(e){D=e}let L=null;function Ye(e){L=e}let ie=null;function Pr(e){D!==null&&D.f&Sn&&(ie===null?ie=[e]:ie.push(e))}let le=null,ge=0,be=null;function Ml(e){be=e}let Or=1,fn=0,Ge=!1;function Fr(){return++Or}function Ft(e){var h;var t=e.f;if((t&xe)!==0)return!0;if((t&et)!==0){var n=e.deps,i=(t&he)!==0;if(n!==null){var a,l,f=(t&tn)!==0,s=i&&L!==null&&!Ge,c=n.length;if(f||s){var d=e,p=d.parent;for(a=0;a<c;a++)l=n[a],(f||!((h=l==null?void 0:l.reactions)!=null&&h.includes(d)))&&(l.reactions??(l.reactions=[])).push(d);f&&(d.f^=tn),s&&p!==null&&(p.f&he)===0&&(d.f^=he)}for(a=0;a<c;a++)if(l=n[a],Ft(l)&&Cr(l),l.wv>e.wv)return!0}(!i||L!==null&&!Ge)&&Ce(e,fe)}return!1}function Ul(e,t){for(var n=t;n!==null;){if((n.f&en)!==0)try{n.fn(e);return}catch{n.f^=en}n=n.parent}throw an=!1,e}function Vr(e){return(e.f&nn)===0&&(e.parent===null||(e.parent.f&en)===0)}function cn(e,t,n,i){if(an){if(n===null&&(an=!1),Vr(t))throw e;return}if(n!==null&&(an=!0),Ul(e,t),Vr(t))throw e}function Mr(e,t,n=!0){var i=e.reactions;if(i!==null)for(var a=0;a<i.length;a++){var l=i[a];ie!=null&&ie.includes(e)||((l.f&Ee)!==0?Mr(l,t,!1):t===l&&(n?Ce(l,xe):(l.f&fe)!==0&&Ce(l,et),vn(l)))}}function Ur(e){var y;var t=le,n=ge,i=be,a=D,l=Ge,f=ie,s=oe,c=Te,d=e.f;le=null,ge=0,be=null,Ge=(d&he)!==0&&(Te||!nt||D===null),D=(d&(Ve|Qe))===0?e:null,ie=null,Hr(e.ctx),Te=!1,fn++,e.f|=Sn;try{var p=(0,e.fn)(),h=e.deps;if(le!==null){var m;if(dn(e,ge),h!==null&&ge>0)for(h.length=ge+le.length,m=0;m<le.length;m++)h[ge+m]=le[m];else e.deps=h=le;if(!Ge)for(m=ge;m<h.length;m++)((y=h[m]).reactions??(y.reactions=[])).push(e)}else h!==null&&ge<h.length&&(dn(e,ge),h.length=ge);if(Zr()&&be!==null&&!Te&&h!==null&&(e.f&(Ee|et|xe))===0)for(m=0;m<be.length;m++)Mr(be[m],e);return a!==null&&a!==e&&(fn++,be!==null&&(i===null?i=be:i.push(...be))),p}finally{le=t,ge=n,be=i,D=a,Ge=l,ie=f,Hr(s),Te=c,e.f^=Sn}}function ql(e,t){let n=t.reactions;if(n!==null){var i=al.call(n,e);if(i!==-1){var a=n.length-1;a===0?n=t.reactions=null:(n[i]=n[a],n.pop())}}n===null&&(t.f&Ee)!==0&&(le===null||!le.includes(t))&&(Ce(t,et),(t.f&(he|tn))===0&&(t.f^=tn),wr(t),dn(t,0))}function dn(e,t){var n=e.deps;if(n!==null)for(var i=t;i<n.length;i++)ql(e,n[i])}function qn(e){var t=e.f;if((t&nn)===0){Ce(e,fe);var n=L,i=oe,a=nt;L=e,nt=!0;try{(t&$n)!==0?Ll(e):Rr(e),Ir(e);var l=Ur(e);e.teardown=typeof l=="function"?l:null,e.wv=Or;var f=e.deps,s;or&&Rl&&e.f&xe}catch(c){cn(c,e,n,i||e.ctx)}finally{nt=a,L=n}}}function jl(){try{bl()}catch(e){if(un!==null)cn(e,un,null);else throw e}}function qr(){var e=nt;try{var t=0;for(nt=!0;Ot.length>0;){t++>1e3&&jl();var n=Ot,i=n.length;Ot=[];for(var a=0;a<i;a++){var l=Hl(n[a]);Bl(l)}Vt.clear()}}finally{sn=!1,nt=e,un=null}}function Bl(e){var t=e.length;if(t!==0)for(var n=0;n<t;n++){var i=e[n];if((i.f&(nn|gt))===0)try{Ft(i)&&(qn(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?$r(i):i.fn=null))}catch(a){cn(a,i,null,i.ctx)}}}function vn(e){sn||(sn=!0,queueMicrotask(qr));for(var t=un=e;t.parent!==null;){t=t.parent;var n=t.f;if((n&(Qe|Ve))!==0){if((n&fe)===0)return;t.f^=fe}}Ot.push(t)}function Hl(e){for(var t=[],n=e;n!==null;){var i=n.f,a=(i&(Ve|Qe))!==0,l=a&&(i&fe)!==0;if(!l&&(i&gt)===0){if((i&dr)!==0)t.push(n);else if(a)n.f^=fe;else try{Ft(n)&&qn(n)}catch(c){cn(c,n,null,n.ctx)}var f=n.first;if(f!==null){n=f;continue}}var s=n.parent;for(n=n.next;n===null&&s!==null;)n=s.next,s=s.parent}return t}function A(e){for(var t;;){if(Vl(),Ot.length===0)return t;sn=!0,qr()}}async function jn(){await Promise.resolve(),A()}function o(e){var t=e.f,n=(t&Ee)!==0;if(D!==null&&!Te){if(!(ie!=null&&ie.includes(e))){var i=D.deps;e.rv<fn&&(e.rv=fn,le===null&&i!==null&&i[ge]===e?ge++:le===null?le=[e]:(!Ge||!le.includes(e))&&le.push(e))}}else if(n&&e.deps===null&&e.effects===null){var a=e,l=a.parent;l!==null&&(l.f&he)===0&&(a.f^=he)}return n&&(a=e,Ft(a)&&Cr(a)),Pt&&Vt.has(e)?Vt.get(e):e.v}function rt(e){var t=Te;try{return Te=!0,e()}finally{Te=t}}const Yl=-7169;function Ce(e,t){e.f=e.f&Yl|t}const Vt=new Map;function jr(e,t){var n={f:0,v:e,reactions:null,equals:br,rv:0,wv:0};return n}function P(e,t){const n=jr(e);return Pr(n),n}function Bn(e,t=!1){const n=jr(e);return t||(n.equals=Dn),n}function b(e,t,n=!1){D!==null&&!Te&&Zr()&&(D.f&(Ee|$n))!==0&&!(ie!=null&&ie.includes(e))&&Al();let i=n?je(t):t;return Gl(e,i)}function Gl(e,t){if(!e.equals(t)){var n=e.v;Pt?Vt.set(e,t):Vt.set(e,n),e.v=t,(e.f&Ee)!==0&&((e.f&xe)!==0&&Er(e),Ce(e,(e.f&he)===0?fe:et)),e.wv=Fr(),Br(e,xe),L!==null&&(L.f&fe)!==0&&(L.f&(Ve|Qe))===0&&(be===null?Ml([e]):be.push(e))}return t}function Br(e,t){var n=e.reactions;if(n!==null)for(var i=n.length,a=0;a<i;a++){var l=n[a],f=l.f;(f&xe)===0&&(Ce(l,t),(f&(fe|he))!==0&&((f&Ee)!==0?Br(l,et):vn(l)))}}let oe=null;function Hr(e){oe=e}function Yr(e,t=!1,n){var i=oe={p:oe,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};Ln(()=>{i.d=!0})}function Gr(e){const t=oe;if(t!==null){e!==void 0&&(t.x=e);const f=t.e;if(f!==null){var n=L,i=D;t.e=null;try{for(var a=0;a<f.length;a++){var l=f[a];Ye(l.effect),Ne(l.reaction),On(l.fn)}}finally{Ye(n),Ne(i)}}oe=t.p,t.m=!0}return e||{}}function Zr(){return!0}const Zl=["touchstart","touchmove"];function Wl(e){return Zl.includes(e)}function Jl(e,t){if(t){const n=document.body;e.autofocus=!0,Un(()=>{document.activeElement===n&&e.focus()})}}let Wr=!1;function Jr(){Wr||(Wr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function Kr(e){var t=D,n=L;Ne(null),Ye(null);try{return e()}finally{Ne(t),Ye(n)}}function Kl(e,t,n,i=n){e.addEventListener(t,()=>Kr(n));const a=e.__on_r;a?e.__on_r=()=>{a(),i(!0)}:e.__on_r=()=>i(!0),Jr()}const Xr=new Set,Hn=new Set;function Xl(e,t,n,i={}){function a(l){if(i.capture||Mt.call(t,l),!l.cancelBubble)return Kr(()=>n==null?void 0:n.call(this,l))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Un(()=>{t.addEventListener(e,a,i)}):t.addEventListener(e,a,i),a}function Ze(e,t,n,i,a){var l={capture:i,passive:a},f=Xl(e,t,n,l);(t===document.body||t===window||t===document)&&Ln(()=>{t.removeEventListener(e,f,l)})}function zl(e){for(var t=0;t<e.length;t++)Xr.add(e[t]);for(var n of Hn)n(e)}function Mt(e){var te;var t=this,n=t.ownerDocument,i=e.type,a=((te=e.composedPath)==null?void 0:te.call(e))||[],l=a[0]||e.target,f=0,s=e.__root;if(s){var c=a.indexOf(s);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var d=a.indexOf(t);if(d===-1)return;c<=d&&(f=c)}if(l=a[f]||e.target,l!==t){xt(e,"currentTarget",{configurable:!0,get(){return l||n}});var p=D,h=L;Ne(null),Ye(null);try{for(var m,y=[];l!==null;){var N=l.assignedSlot||l.parentNode||l.host||null;try{var E=l["__"+i];if(E!=null&&(!l.disabled||e.target===l))if(sr(E)){var[j,..._e]=E;j.apply(l,[e,..._e])}else E.call(l,e)}catch(ae){m?y.push(ae):m=ae}if(e.cancelBubble||N===t||N===null)break;l=N}if(m){for(let ae of y)queueMicrotask(()=>{throw ae});throw m}}finally{e.__root=t,delete e.currentTarget,Ne(p),Ye(h)}}}function Yn(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function De(e,t){var n=L;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function Ae(e,t){var n=(t&il)!==0,i=(t&ll)!==0,a,l=!e.startsWith("<!>");return()=>{if(F)return De(V,null),V;a===void 0&&(a=Yn(l?e:"<!>"+e),n||(a=pe(a)));var f=i||_r?document.importNode(a,!0):a.cloneNode(!0);if(n){var s=pe(f),c=f.lastChild;De(s,c)}else De(f,f);return f}}function hn(e,t,n="svg"){var i=!e.startsWith("<!>"),a=`<${n}>${i?e:"<!>"+e}</${n}>`,l;return()=>{if(F)return De(V,null),V;if(!l){var f=Yn(a),s=pe(f);l=pe(s)}var c=l.cloneNode(!0);return De(c,c),c}}function gn(){if(F)return De(V,null),V;var e=document.createDocumentFragment(),t=document.createComment(""),n=ln();return e.append(t,n),De(t,n),e}function B(e,t){if(F){L.nodes_end=V,mt();return}e!==null&&e.before(t)}function Ql(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n+"")}function zr(e,t){return Qr(e,t)}function eo(e,t){Nn(),t.intro=t.intro??!1;const n=t.target,i=F,a=V;try{for(var l=pe(n);l&&(l.nodeType!==8||l.data!==kn);)l=Be(l);if(!l)throw vt;_t(!0),qe(l),mt();const f=Qr(e,{...t,anchor:l});if(V===null||V.nodeType!==8||V.data!==lr)throw rn(),vt;return _t(!1),f}catch(f){if(f===vt)return t.recover===!1&&yl(),Nn(),kl(n),_t(!1),zr(e,t);throw f}finally{_t(i),qe(a)}}const pt=new Map;function Qr(e,{target:t,anchor:n,props:i={},events:a,context:l,intro:f=!0}){Nn();var s=new Set,c=h=>{for(var m=0;m<h.length;m++){var y=h[m];if(!s.has(y)){s.add(y);var N=Wl(y);t.addEventListener(y,Mt,{passive:N});var E=pt.get(y);E===void 0?(document.addEventListener(y,Mt,{passive:N}),pt.set(y,1)):pt.set(y,E+1)}}};c(sl(Xr)),Hn.add(c);var d=void 0,p=Dl(()=>{var h=n??t.appendChild(ln());return Vn(()=>{if(l){Yr({});var m=oe;m.c=l}a&&(i.$$events=a),F&&De(h,null),d=e(h,i)||{},F&&(L.nodes_end=V),l&&Gr()}),()=>{var N;for(var m of s){t.removeEventListener(m,Mt);var y=pt.get(m);--y===0?(document.removeEventListener(m,Mt),pt.delete(m)):pt.set(m,y)}Hn.delete(c),h!==n&&((N=h.parentNode)==null||N.removeChild(h))}});return Gn.set(d,p),d}let Gn=new WeakMap;function to(e,t){const n=Gn.get(e);return n?(Gn.delete(e),n(t)):Promise.resolve()}function X(e,t,[n,i]=[0,0]){F&&n===0&&mt();var a=e,l=null,f=null,s=ue,c=n>0?xn:0,d=!1;const p=(m,y=!0)=>{d=!0,h(y,m)},h=(m,y)=>{if(s===(s=m))return;let N=!1;if(F&&i!==-1){if(n===0){const j=a.data;j===kn?i=0:j===ir?i=1/0:(i=parseInt(j.substring(1)),i!==i&&(i=s?1/0:-1))}const E=i>n;!!s===E&&(a=Il(),qe(a),_t(!1),N=!0,i=-1)}s?(l?Sr(l):y&&(l=Vn(()=>y(a))),f&&Mn(f,()=>{f=null})):(f?Sr(f):y&&(f=Vn(()=>y(a,[n+1,i]))),l&&Mn(l,()=>{l=null})),N&&_t(!0)};Ar(()=>{d=!1,t(p),d||h(null,null)},c),F&&(a=V)}function it(e,t,n=!1,i=!1,a=!1){var l=e,f="";Se(()=>{var s=L;if(f===(f=t()??"")){F&&mt();return}if(s.nodes_start!==null&&(kr(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),f!==""){if(F){V.data;for(var c=mt(),d=c;c!==null&&(c.nodeType!==8||c.data!=="");)d=c,c=Be(c);if(c===null)throw rn(),vt;De(V,d),l=qe(c);return}var p=f+"";n?p=`<svg>${p}</svg>`:i&&(p=`<math>${p}</math>`);var h=Yn(p);if((n||i)&&(h=pe(h)),De(pe(h),h.lastChild),n||i)for(;pe(h);)l.before(pe(h));else l.before(h)}})}function no(e,t,n,i,a){var s;F&&mt();var l=(s=t.$$slots)==null?void 0:s[n],f=!1;l===!0&&(l=t.children,f=!0),l===void 0||l(e,f?()=>i:i)}const ei=[...`
2
- \r\f \v\uFEFF`];function ro(e,t,n){var i=""+e;if(n){for(var a in n)if(n[a])i=i?i+" "+a:a;else if(i.length)for(var l=a.length,f=0;(f=i.indexOf(a,f))>=0;){var s=f+l;(f===0||ei.includes(i[f-1]))&&(s===i.length||ei.includes(i[s]))?i=(f===0?"":i.substring(0,f))+i.substring(s+1):f=s}}return i===""?null:i}function io(e,t,n,i,a,l){var f=e.__className;if(F||f!==n||f===void 0){var s=ro(n,i,l);(!F||s!==e.getAttribute("class"))&&(s==null?e.removeAttribute("class"):e.className=s),e.__className=n}else if(l&&a!==l)for(var c in l){var d=!!l[c];(a==null||d!==!!a[c])&&e.classList.toggle(c,d)}return l}const lo=Symbol("is custom element"),oo=Symbol("is html");function ti(e){if(F){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;T(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var a=e.checked;T(e,"checked",null),e.checked=a}}};e.__on_r=n,Fl(n),Jr()}}function ao(e,t){var n=ni(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function T(e,t,n,i){var a=ni(e);F&&(a[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||a[t]!==(a[t]=n)&&(t==="loading"&&(e[gl]=n),n==null?e.removeAttribute(t):typeof n!="string"&&so(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ni(e){return e.__attributes??(e.__attributes={[lo]:e.nodeName.includes("-"),[oo]:e.namespaceURI===ol})}var ri=new Map;function so(e){var t=ri.get(e.nodeName);if(t)return t;ri.set(e.nodeName,t=[]);for(var n,i=e,a=Element.prototype;a!==i;){n=ul(i);for(var l in n)n[l].set&&t.push(l);i=ur(i)}return t}function uo(e,t,n=t){Kl(e,"change",i=>{var a=i?e.defaultChecked:e.checked;n(a)}),(F&&e.defaultChecked!==e.checked||rt(t)==null)&&n(e.checked),Fn(()=>{var i=t();e.checked=!!i})}function ii(e,t){return e===t||(e==null?void 0:e[St])===t}function _n(e={},t,n,i){return On(()=>{var a,l;return Fn(()=>{a=l,l=[],rt(()=>{e!==n(...l)&&(t(e,...l),a&&ii(n(...a),e)&&t(null,...a))})}),()=>{Un(()=>{l&&ii(n(...l),e)&&t(null,...l)})}}),e}function li(e){oe===null&&ar(),Pn(()=>{const t=rt(e);if(typeof t=="function")return t})}function fo(e){oe===null&&ar(),li(()=>()=>rt(e))}function oi(e,t,n){if(e==null)return t(void 0),ht;const i=rt(()=>e.subscribe(t,n));return i.unsubscribe?()=>i.unsubscribe():i}const bt=[];function co(e,t=ht){let n=null;const i=new Set;function a(s){if(yr(e,s)&&(e=s,n)){const c=!bt.length;for(const d of i)d[1](),bt.push(d,e);if(c){for(let d=0;d<bt.length;d+=2)bt[d][0](bt[d+1]);bt.length=0}}}function l(s){a(s(e))}function f(s,c=ht){const d=[s,c];return i.add(d),i.size===1&&(n=t(a,l)||ht),s(e),()=>{i.delete(d),i.size===0&&n&&(n(),n=null)}}return{set:a,update:l,subscribe:f}}function mn(e){let t;return oi(e,n=>t=n)(),t}let pn=!1,Zn=Symbol();function vo(e,t,n){const i=n[t]??(n[t]={store:null,source:Bn(void 0),unsubscribe:ht});if(i.store!==e&&!(Zn in n))if(i.unsubscribe(),i.store=e??null,e==null)i.source.v=void 0,i.unsubscribe=ht;else{var a=!0;i.unsubscribe=oi(e,l=>{a?i.source.v=l:b(i.source,l)}),a=!1}return e&&Zn in n?mn(e):o(i.source)}function ho(){const e={};function t(){Ln(()=>{for(var n in e)e[n].unsubscribe();xt(e,Zn,{enumerable:!1,value:!0})})}return[e,t]}function go(e){var t=pn;try{return pn=!1,[e(),pn]}finally{pn=t}}function ai(e){var t;return((t=e.ctx)==null?void 0:t.d)??!1}function I(e,t,n,i){var yt;var a=(n&Xt)!==0,l=!0,f=(n&nl)!==0,s=(n&rl)!==0,c=!1,d;f?[d,c]=go(()=>e[t]):d=e[t];var p=St in e||hr in e,h=f&&(((yt=ze(e,t))==null?void 0:yt.set)??(p&&t in e&&(H=>e[t]=H)))||void 0,m=i,y=!0,N=!1,E=()=>(N=!0,y&&(y=!1,s?m=rt(i):m=i),m);d===void 0&&i!==void 0&&(h&&l&&wl(),d=E(),h&&h(d));var j;if(j=()=>{var H=e[t];return H===void 0?E():(y=!0,N=!1,H)},(n&tl)===0)return j;if(h){var _e=e.$$legacy;return function(H,ce){return arguments.length>0?((!ce||_e||c)&&h(ce?j():H),H):j()}}var te=!1,ae=Bn(d),ne=on(()=>{var H=j(),ce=o(ae);return te?(te=!1,ce):ae.v=H});return f&&o(ne),a||(ne.equals=Dn),function(H,ce){if(arguments.length>0){const Ie=ce?o(ne):f?je(H):H;if(!ne.equals(Ie)){if(te=!0,b(ae,Ie),N&&m!==void 0&&(m=Ie),ai(ne))return H;rt(()=>o(ne))}return H}return ai(ne)?ne.v:o(ne)}}function _o(e){return new mo(e)}class mo{constructor(t){nr(this,Me);nr(this,ye);var l;var n=new Map,i=(f,s)=>{var c=Bn(s);return n.set(f,c),c};const a=new Proxy({...t.props||{},$$events:{}},{get(f,s){return o(n.get(s)??i(s,Reflect.get(f,s)))},has(f,s){return s===hr?!0:(o(n.get(s)??i(s,Reflect.get(f,s))),Reflect.has(f,s))},set(f,s,c){return b(n.get(s)??i(s,c),c),Reflect.set(f,s,c)}});rr(this,ye,(t.hydrate?eo:zr)(t.component,{target:t.target,anchor:t.anchor,props:a,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((l=t==null?void 0:t.props)!=null&&l.$$host)||t.sync===!1)&&A(),rr(this,Me,a.$$events);for(const f of Object.keys(ve(this,ye)))f==="$set"||f==="$destroy"||f==="$on"||xt(this,f,{get(){return ve(this,ye)[f]},set(s){ve(this,ye)[f]=s},enumerable:!0});ve(this,ye).$set=f=>{Object.assign(a,f)},ve(this,ye).$destroy=()=>{to(ve(this,ye))}}$set(t){ve(this,ye).$set(t)}$on(t,n){ve(this,Me)[t]=ve(this,Me)[t]||[];const i=(...a)=>n.call(this,...a);return ve(this,Me)[t].push(i),()=>{ve(this,Me)[t]=ve(this,Me)[t].filter(a=>a!==i)}}$destroy(){ve(this,ye).$destroy()}}Me=new WeakMap,ye=new WeakMap;let si;typeof HTMLElement=="function"&&(si=class extends HTMLElement{constructor(t,n,i){super();$e(this,"$$ctor");$e(this,"$$s");$e(this,"$$c");$e(this,"$$cn",!1);$e(this,"$$d",{});$e(this,"$$r",!1);$e(this,"$$p_d",{});$e(this,"$$l",{});$e(this,"$$l_u",new Map);$e(this,"$$me");this.$$ctor=t,this.$$s=n,i&&this.attachShadow({mode:"open"})}addEventListener(t,n,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const a=this.$$c.$on(t,n);this.$$l_u.set(n,a)}super.addEventListener(t,n,i)}removeEventListener(t,n,i){if(super.removeEventListener(t,n,i),this.$$c){const a=this.$$l_u.get(n);a&&(a(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(a){return l=>{const f=document.createElement("slot");a!=="default"&&(f.name=a),B(l,f)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},i=po(this);for(const a of this.$$s)a in i&&(a==="default"&&!this.$$d.children?(this.$$d.children=t(a),n.default=!0):n[a]=t(a));for(const a of this.attributes){const l=this.$$g_p(a.name);l in this.$$d||(this.$$d[l]=bn(l,a.value,this.$$p_d,"toProp"))}for(const a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=_o({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}}),this.$$me=Nl(()=>{Fn(()=>{var a;this.$$r=!0;for(const l of zt(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];const f=bn(l,this.$$d[l],this.$$p_d,"toAttribute");f==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,f)}this.$$r=!1})});for(const a in this.$$l)for(const l of this.$$l[a]){const f=this.$$c.$on(a,l);this.$$l_u.set(l,f)}this.$$l={}}}attributeChangedCallback(t,n,i){var a;this.$$r||(t=this.$$g_p(t),this.$$d[t]=bn(t,i,this.$$p_d,"toProp"),(a=this.$$c)==null||a.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return zt(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function bn(e,t,n,i){var l;const a=(l=n[e])==null?void 0:l.type;if(t=a==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!n[e])return t;if(i==="toAttribute")switch(a){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(a){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function po(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function bo(e,t,n,i,a,l){let f=class extends si{constructor(){super(e,n,a),this.$$p_d=t}static get observedAttributes(){return zt(t).map(s=>(t[s].attribute||s).toLowerCase())}};return zt(t).forEach(s=>{xt(f.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){var h;c=bn(s,c,t),this.$$d[s]=c;var d=this.$$c;if(d){var p=(h=ze(d,s))==null?void 0:h.get;p?d[s]=c:d.$set({[s]:c})}}})}),i.forEach(s=>{xt(f.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),e.element=f,f}const ui=new TextEncoder;function yo(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function wo(e,t="SHA-256",n=1e5){const i=Date.now().toString(16);e||(e=Math.round(Math.random()*n));const a=await fi(i,e,t);return{algorithm:t,challenge:a,salt:i,signature:""}}async function fi(e,t,n){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return yo(await crypto.subtle.digest(n.toUpperCase(),ui.encode(e+t)))}function Eo(e,t,n="SHA-256",i=1e6,a=0){const l=new AbortController,f=Date.now();return{promise:(async()=>{for(let c=a;c<=i;c+=1){if(l.signal.aborted)return null;if(await fi(t,c,n)===e)return{number:c,took:Date.now()-f}}return null})(),controller:l}}function ci(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Co(e){const t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function Ao(e,t=12){const n=new Uint8Array(t);for(let i=0;i<t;i++)n[i]=e%256,e=Math.floor(e/256);return n}async function Io(e,t="",n=1e6,i=0){const a="AES-GCM",l=new AbortController,f=Date.now(),s=async()=>{for(let p=i;p<=n;p+=1){if(l.signal.aborted||!c||!d)return null;try{const h=await crypto.subtle.decrypt({name:a,iv:Ao(p)},c,d);if(h)return{clearText:new TextDecoder().decode(h),took:Date.now()-f}}catch{}}return null};let c=null,d=null;try{d=Co(e);const p=await crypto.subtle.digest("SHA-256",ui.encode(t));c=await crypto.subtle.importKey("raw",p,a,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:l}}return{promise:s(),controller:l}}var w=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(w||{}),ee=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(ee||{});globalThis.altchaPlugins=globalThis.altchaPlugins||[],globalThis.altchaI18n=globalThis.altchaI18n||{get:e=>mn(globalThis.altchaI18n.store)[e],set:(e,t)=>{Object.assign(mn(globalThis.altchaI18n.store),{[e]:t}),globalThis.altchaI18n.store.set(mn(globalThis.altchaI18n.store))},store:co({})};const Ro={ariaLinkLabel:"Visit Altcha.org",enterCode:"Enter code",enterCodeAria:"Enter code you hear. Press Space to play audio.",error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:'Protected by <a href="https://altcha.org/" target="_blank" aria-label="Visit Altcha.org">ALTCHA</a>',getAudioChallenge:"Get an audio challenge",label:"I'm not a robot",loading:"Loading...",reload:"Reload",verify:"Verify",verificationRequired:"Verification required!",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait."};globalThis.altchaI18n.set("en",Ro);const Wn=(e,t)=>{let n=$l(()=>dl(t==null?void 0:t(),24));var i=So();Se(()=>{T(i,"width",o(n)),T(i,"height",o(n))}),B(e,i)};function ko(e,t){e.code==="Space"&&(e.preventDefault(),e.stopImmediatePropagation(),t())}function $o(e,t){e.preventDefault(),t()}function xo(e,t,n,i,a,l,f,s){var c;[w.UNVERIFIED,w.ERROR,w.EXPIRED,w.CODE].includes(o(t))?n()!==!1&&((c=o(i))==null?void 0:c.reportValidity())===!1?b(a,!1):l()?f():s():b(a,!0)}var So=hn('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="altcha-spinner"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor"></path></svg>'),To=Ae('<input type="hidden">'),No=Ae('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>'),Do=hn('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'),Lo=hn('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'),Po=hn('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'),Oo=Ae('<button type="button" class="altcha-code-challenge-audio"><!></button>'),Fo=Ae("<audio hidden autoplay><source></audio>"),Vo=Ae('<div class="altcha-code-challenge" role="dialog"><div class="altcha-code-challenge-arrow"></div> <form data-code-challenge-form="1"><img class="altcha-code-challenge-image" alt=""> <input type="text" autocomplete="off" name="code" class="altcha-code-challenge-input" required> <div class="altcha-code-challenge-buttons"><div class="altcha-code-challenge-buttons-left"><!> <button type="button" class="altcha-code-challenge-reload"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <button type="submit" class="altcha-code-challenge-verify"><!> </button></div> <!></form></div>'),Mo=Ae("<div><!></div>"),Uo=Ae("<div><!></div>"),qo=Ae('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'),jo=Ae('<div class="altcha-footer"><div><!></div></div>'),Bo=Ae('<div class="altcha-anchor-arrow"></div>'),Ho=Ae('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>',1);function di(e,t){var Xi,zi;Yr(t,!0);const[n,i]=ho(),a=()=>vo(Go,"$altchaI18nStore",n);let l=I(t,"auto",7,void 0),f=I(t,"blockspam",7,void 0),s=I(t,"challengeurl",7,void 0),c=I(t,"challengejson",7,void 0),d=I(t,"credentials",7,void 0),p=I(t,"customfetch",7,void 0),h=I(t,"debug",7,!1),m=I(t,"delay",7,0),y=I(t,"disableautofocus",7,!1),N=I(t,"expire",7,void 0),E=I(t,"floating",7,void 0),j=I(t,"floatinganchor",7,void 0),_e=I(t,"floatingoffset",7,void 0),te=I(t,"floatingpersist",7,!1),ae=I(t,"hidefooter",7,!1),ne=I(t,"hidelogo",7,!1),yt=I(t,"id",7,void 0),H=I(t,"language",7,void 0),ce=I(t,"name",7,"altcha"),Ie=I(t,"maxnumber",7,1e6),Ut=I(t,"mockerror",7,!1),We=I(t,"obfuscated",7,void 0),Re=I(t,"overlay",7,void 0),qt=I(t,"overlaycontent",7,void 0),yn=I(t,"plugins",7,void 0),jt=I(t,"refetchonexpire",7,!0),lt=I(t,"sentinel",7,void 0),Le=I(t,"spamfilter",7,!1),wt=I(t,"strings",7,void 0),we=I(t,"test",7,!1),se=I(t,"verifyurl",7,void 0),Et=I(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),Bt=I(t,"workerurl",7,void 0);const{altchaI18n:Yo}=globalThis,Go=Yo.store,hi=["SHA-256","SHA-384","SHA-512"],Zo="https://altcha.org/",Je=(r,u)=>{t.$$host.dispatchEvent(new CustomEvent(r,{detail:u}))},gi=(zi=(Xi=document.documentElement.lang)==null?void 0:Xi.split("-"))==null?void 0:zi[0],Jn=Nt(()=>{var r;return s()&&new URL(s(),location.origin).host.endsWith(".altcha.org")&&!!((r=s())!=null&&r.includes("apiKey=ckey_"))}),wn=Nt(()=>c()?Si(c()):void 0),Wo=Nt(()=>wt()?Si(wt()):{}),M=Nt(()=>({...bi(a()),...o(Wo)})),_i=Nt(()=>`${yt()||ce()}_checkbox_${Math.round(Math.random()*1e8)}`);let ot=P(null),Ht=P(!1),G=P(null),k=P(je(w.UNVERIFIED)),U=P(void 0),Yt=P(null),Ke=P(null),me=P(null),Kn=P(null),Ct=P(null),O=P(null),Gt=P(null),at=P(null),Pe=null,z=P(null),st=P(!1),Xe=[],Xn=P(!1),Oe=P(null);Pn(()=>{aa(o(at))}),Pn(()=>{sa(o(k))}),fo(()=>{Jo(),b(Gt,null),o(O)&&(o(O).removeEventListener("submit",Ii),o(O).removeEventListener("reset",Ri),o(O).removeEventListener("focusin",Ai),b(O,null)),Pe&&(clearTimeout(Pe),Pe=null),document.removeEventListener("click",Ei),document.removeEventListener("scroll",Ci),window.removeEventListener("resize",xi)}),li(()=>{var r;$("mounted","2.2.2"),$("workers",Et()),Qo(),$("plugins",Xe.length?Xe.map(u=>u.constructor.pluginName).join(", "):"none"),we()&&$("using test mode"),N()&&zn(N()),l()!==void 0&&$("auto",l()),E()!==void 0&&Li(E()),b(O,(r=o(U))==null?void 0:r.closest("form"),!0),o(O)&&(o(O).addEventListener("submit",Ii,{capture:!0}),o(O).addEventListener("reset",Ri),(l()==="onfocus"||te()==="focus")&&o(O).addEventListener("focusin",Ai)),Re()&&Pi(!0),l()==="onload"&&(We()?Zt():Ue()),o(Jn)&&(ae()||ne())&&$("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{Je("load")})});function En(r,u){return btoa(JSON.stringify({algorithm:r.algorithm,challenge:r.challenge,number:u.number,salt:r.salt,signature:r.signature,test:we()?!0:void 0,took:u.took}))}function Jo(){for(const r of Xe)r.destroy()}function mi(){s()&&jt()&&o(k)===w.VERIFIED?Ue():ut(w.EXPIRED,o(M).expired)}async function Ko(){if(Ut())throw $("mocking error"),new Error("Mocked error.");if(o(wn))return $("using provided json data"),Ti(o(wn).salt),o(wn);if(we())return $("generating test challenge",{test:we()}),wo(typeof we()!="boolean"?+we():void 0);{if(!s()&&o(O)){const v=o(O).getAttribute("action");v!=null&&v.includes("/form/")&&s(v+"/altcha")}if(!s())throw new Error("Attribute challengeurl not set.");$("fetching challenge from",s());const r={credentials:typeof d()=="boolean"?"include":d(),headers:Le()!==!1?{"x-altcha-spam-filter":"1"}:{}},u=await pi()(s(),r);if(!u||!(u instanceof Response))throw new Error("Custom fetch function did not return a response.");if(u.status!==200)throw new Error(`Server responded with ${u.status}.`);const g=u.headers.get("X-Altcha-Config"),_=await u.json();if(Ti(_.salt),g)try{const v=JSON.parse(g);v&&typeof v=="object"&&(v.verifyurl&&!v.verifyurl.startsWith("fn:")&&(v.verifyurl=wi(v.verifyurl)),Vi(v))}catch(v){$("unable to configure from X-Altcha-Config",v)}return _}}function Xo(r){var g,_;const u=(g=o(O))==null?void 0:g.querySelector(typeof r=="string"?`input[name="${r}"]`:'input[type="email"]:not([data-no-spamfilter])');return((_=u==null?void 0:u.value)==null?void 0:_.slice(u.value.indexOf("@")))||void 0}function pi(){let r=fetch;if(p())if($("using customfetch"),typeof p()=="string"){if(r=globalThis[p()]||null,!r)throw new Error(`Custom fetch function not found: ${p()}`)}else r=p();return r}function bi(r,u=[H()||"",document.documentElement.lang||"",...navigator.languages]){const g=Object.keys(r).map(v=>v.toLowerCase()),_=u.reduce((v,C)=>(C=C.toLowerCase(),v||(r[C]?C:null)||g.find(R=>C.split("-")[0]===R.split("-")[0])||null),null);return r[_||"en"]}function zo(){return Le()==="ipAddress"?{blockedCountries:void 0,classifier:void 0,disableRules:void 0,email:!1,expectedCountries:void 0,expectedLanguages:void 0,fields:!1,ipAddress:void 0,text:void 0,timeZone:void 0}:typeof Le()=="object"?Le():{blockedCountries:void 0,classifier:void 0,disableRules:void 0,email:void 0,expectedCountries:void 0,expectedLanguages:void 0,fields:void 0,ipAddress:void 0,text:void 0,timeZone:void 0}}function yi(r){var g;return[...((g=o(O))==null?void 0:g.querySelectorAll(r!=null&&r.length?r.map(_=>`input[name="${_}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((_,v)=>{const C=v.name,R=v.value;return C&&R&&(_[C]=/\n/.test(R)?R.replace(new RegExp("(?<!\\r)\\n","g"),`\r
3
- `):R),_},{})}function wi(r,u){const g=new URL(s()||location.origin),_=new URL(r,g);if(_.search||(_.search=g.search),u)for(const v in u)u[v]!==void 0&&u[v]!==null&&_.searchParams.set(v,u[v]);return _.toString()}function Qo(){const r=yn()!==void 0?yn().split(","):void 0;for(const u of globalThis.altchaPlugins)(!r||r.includes(u.pluginName))&&Xe.push(new u({el:o(U),clarify:Zt,dispatch:Je,getConfiguration:Mi,getFloatingAnchor:Ui,getState:qi,log:$,reset:ut,solve:Fi,setState:Fe,setFloatingAnchor:ji,verify:Ue}))}function $(...r){(h()||r.some(u=>u instanceof Error))&&console[r[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${ce()}]`,...r)}function ea(){b(z,ee.PAUSED,!0)}function ta(r){b(z,ee.ERROR,!0)}function na(){b(z,ee.READY,!0)}function ra(){b(z,ee.LOADING,!0)}function ia(){b(z,ee.PLAYING,!0)}function la(){b(z,ee.PAUSED,!0)}function oa(r){var u;if(r.preventDefault(),r.stopPropagation(),o(G)){const g=new FormData(r.target),_=String(g.get("code"));if((u=se())!=null&&u.startsWith("fn:")){const v=se().replace(/^fn:/,"");if($(`calling ${v} function instead of verifyurl`),!(v in globalThis))throw new Error(`Global function "${v}" is undefined.`);return globalThis[v]({challenge:o(G).challenge,code:_,solution:o(G).solution})}b(st,!0),Ni(En(o(G).challenge,o(G).solution),_).then(({reason:v,verified:C})=>{C?(b(G,null),Fe(w.VERIFIED),$("verified"),jn().then(()=>{var R;(R=o(Kn))==null||R.focus(),Je("verified",{payload:o(Oe)}),l()==="onsubmit"?Di(o(Gt)):Re()&&Wt()})):(ut(),b(at,v||"Verification failed",!0))}).catch(v=>{b(G,null),Fe(w.ERROR,v),$("sentinel verification failed:",v)}).finally(()=>{b(st,!1)})}}function Ei(r){var g;const u=r.target;E()&&u&&!o(U).contains(u)&&(o(k)===w.VERIFIED&&te()===!1||o(k)===w.VERIFIED&&te()==="focus"&&!((g=o(O))!=null&&g.matches(":focus-within"))||l()==="off"&&o(k)===w.UNVERIFIED)&&Wt()}function Ci(){E()&&o(k)!==w.UNVERIFIED&&Jt()}function aa(r){for(const u of Xe)typeof u.onErrorChange=="function"&&u.onErrorChange(o(at))}function Ai(r){o(k)===w.UNVERIFIED?Ue():E()&&te()==="focus"&&o(k)===w.VERIFIED&&Cn()}function Ii(r){var _;const u=r.target;u!=null&&u.hasAttribute("data-code-challenge-form")||(b(Gt,r.submitter,!0),o(O)&&l()==="onsubmit"?((_=o(Gt))==null||_.blur(),o(k)===w.UNVERIFIED?(r.preventDefault(),r.stopPropagation(),Ue().then(()=>{Di(o(Gt))})):o(k)!==w.VERIFIED&&(r.preventDefault(),r.stopPropagation(),o(k)===w.VERIFYING&&ki())):o(O)&&E()&&l()==="off"&&o(k)===w.UNVERIFIED&&(r.preventDefault(),r.stopPropagation(),Cn()))}function Ri(){ut()}function ki(){o(k)===w.VERIFYING&&o(M).waitAlert&&alert(o(M).waitAlert)}function $i(){o(Ke)?o(Ke).paused?(o(Ke).currentTime=0,o(Ke).play()):o(Ke).pause():(b(Xn,!0),requestAnimationFrame(()=>{var r;(r=o(Ke))==null||r.play()}))}function sa(r){for(const u of Xe)typeof u.onStateChange=="function"&&u.onStateChange(o(k));E()&&o(k)!==w.UNVERIFIED&&requestAnimationFrame(()=>{Jt()}),b(Ht,o(k)===w.VERIFIED),Re()&&o(me)&&(o(k)!==w.UNVERIFIED?Cn():Wt())}function xi(){E()&&Jt()}function Si(r){return JSON.parse(r)}function Ti(r){var _;const u=new URLSearchParams((_=r.split("?"))==null?void 0:_[1]),g=u.get("expires")||u.get("expire");if(g){const v=new Date(+g*1e3),C=isNaN(v.getTime())?0:v.getTime()-Date.now();C>0&&zn(C)}else Pe&&(clearTimeout(Pe),Pe=null)}async function ua(r){if(!se())throw new Error("Attribute verifyurl not set.");$("requesting server verification from",se());const u={payload:r};if(Le()!==!1){const{blockedCountries:v,classifier:C,disableRules:R,email:Y,expectedLanguages:q,expectedCountries:re,fields:de,ipAddress:ct,text:It,timeZone:dt}=zo();u.blockedCountries=v,u.classifier=C,u.disableRules=R,u.email=Y===!1?void 0:Xo(Y),u.expectedCountries=re,u.expectedLanguages=q||(gi?[gi]:void 0),u.fields=de===!1?void 0:yi(de),u.ipAddress=ct===!1?void 0:ct||"auto",u.text=It,u.timeZone=dt===!1?void 0:dt||ci()}const g=await pi()(se(),{body:JSON.stringify(u),headers:{"content-type":"application/json"},method:"POST"});if(!g||!(g instanceof Response))throw new Error("Custom fetch function did not return a response.");if(g.status!==200)throw new Error(`Server responded with ${g.status}.`);const _=await g.json();if(_!=null&&_.payload&&b(Oe,_.payload,!0),Je("serververification",_),f()&&_.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}async function Ni(r,u){if(!se())throw new Error("Attribute verifyurl not set.");$("requesting sentinel verification from",se());const g={code:u,payload:r};lt()&&(g.fields=lt().fields?yi():void 0,g.timeZone=lt().timeZone?ci():void 0);const _=await fetch(se(),{body:JSON.stringify(g),headers:{"content-type":"application/json"},method:"POST"});if(!_||!(_ instanceof Response))throw new Error("Fetch function did not return a response.");if(_.status!==200)throw new Error(`Server responded with ${_.status}.`);const v=await _.json();return v!=null&&v.payload&&b(Oe,v.payload,!0),Je("sentinelverification",v),v}function Di(r){var u;o(O)&&"requestSubmit"in o(O)?o(O).requestSubmit(r):(u=o(O))!=null&&u.reportValidity()&&(r?r.click():o(O).submit())}function zn(r){$("expire",r),Pe&&(clearTimeout(Pe),Pe=null),r<1?mi():Pe=setTimeout(mi,r)}function Li(r){$("floating",r),E()!==r&&(o(U).style.left="",o(U).style.top=""),E(r===!0||r===""?"auto":r===!1||r==="false"?void 0:E()),E()?(l()||l("onsubmit"),document.addEventListener("scroll",Ci),document.addEventListener("click",Ei),window.addEventListener("resize",xi)):l()==="onsubmit"&&l(void 0)}function Pi(r){var u,g;if($("overlay",r),Re(r),r){if(l()||l("onsubmit"),o(me)&&o(U).parentElement&&o(me).replaceWith(o(U).parentElement),(g=(u=o(U))==null?void 0:u.parentElement)!=null&&g.parentElement){b(me,document.createElement("div"),!0),o(U).parentElement.parentElement.appendChild(o(me));const _=document.createElement("div"),v=document.createElement("button");v.type="button",v.innerHTML="&times;",v.addEventListener("click",C=>{C.preventDefault(),ut()}),o(me).classList.add("altcha-overlay-backdrop"),v.classList.add("altcha-overlay-close-button"),_.classList.add("altcha-overlay"),o(me).append(_),_.append(v),qt()&&_.append(...document.querySelectorAll(qt())),_.append(o(U).parentElement)}}else o(me)&&o(U).parentElement&&(o(me).replaceWith(o(U).parentElement),o(U).style.display="block")}function Oi(r){if(!r.algorithm)throw new Error("Invalid challenge. Property algorithm is missing.");if(r.signature===void 0)throw new Error("Invalid challenge. Property signature is missing.");if(!hi.includes(r.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${hi.join(", ")}`);if(!r.challenge||r.challenge.length<40)throw new Error("Challenge is too short. Min. 40 chars.");if(!r.salt||r.salt.length<10)throw new Error("Salt is too short. Min. 10 chars.")}async function Fi(r){let u=null,g=null;if("Worker"in window){try{u=fa(r,r.maxNumber||r.maxnumber||Ie()),b(ot,u.controller,!0),g=await u.promise}catch(_){$(_)}finally{b(ot,null)}if(g===null||(g==null?void 0:g.number)!==void 0||"obfuscated"in r)return{data:r,solution:g}}if("obfuscated"in r){const _=await Io(r.obfuscated,r.key,r.maxNumber||r.maxnumber);return{data:r,solution:await _.promise}}u=Eo(r.challenge,r.salt,r.algorithm,r.maxNumber||r.maxnumber||Ie()),b(ot,u.controller,!0);try{g=await u.promise}catch(_){$(_)}finally{b(ot,null)}return{data:r,solution:g}}function fa(r,u=typeof we()=="number"?we():r.maxNumber||r.maxnumber||Ie(),g=Math.ceil(Et())){const _=new AbortController,v=[];g=Math.min(16,u,Math.max(1,g));for(let Y=0;Y<g;Y++)v.push(altchaCreateWorker(Bt()));const C=Math.ceil(u/g);return{promise:(async()=>{const Y=await Promise.all(v.map((q,re)=>{const de=re*C;return _.signal.addEventListener("abort",()=>{q.postMessage({type:"abort"})}),new Promise(ct=>{q.addEventListener("message",It=>{if(It.data)for(const dt of v)dt!==q&&dt.postMessage({type:"abort"});ct(It.data)}),q.postMessage({payload:r,max:de+C,start:de,type:"work"})})}));for(const q of v)q.terminate();return Y.find(q=>!!q)||null})(),controller:_}}async function Zt(){if(!We()){Fe(w.ERROR);return}const r=Xe.find(u=>u.constructor.pluginName==="obfuscation");if(!r||!("clarify"in r)){Fe(w.ERROR),$("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in r&&typeof r.clarify=="function")return r.clarify()}function Vi(r){r.obfuscated!==void 0&&We(r.obfuscated),r.auto!==void 0&&(l(r.auto),l()==="onload"&&(We()?Zt():Ue())),r.blockspam!==void 0&&f(!!r.blockspam),r.customfetch!==void 0&&p(r.customfetch),r.floatinganchor!==void 0&&j(r.floatinganchor),r.delay!==void 0&&m(r.delay),r.floatingoffset!==void 0&&_e(r.floatingoffset),r.floating!==void 0&&Li(r.floating),r.expire!==void 0&&(zn(r.expire),N(r.expire)),r.challenge&&(c(typeof r.challenge=="string"?r.challenge:JSON.stringify(r.challenge)),Oi(o(wn))),r.challengeurl!==void 0&&s(r.challengeurl),r.debug!==void 0&&h(!!r.debug),r.hidefooter!==void 0&&ae(!!r.hidefooter),r.hidelogo!==void 0&&ne(!!r.hidelogo),r.language!==void 0&&wt(bi(a(),[r.language])),r.maxnumber!==void 0&&Ie(+r.maxnumber),r.mockerror!==void 0&&Ut(!!r.mockerror),r.name!==void 0&&ce(r.name),r.overlaycontent!==void 0&&qt(r.overlaycontent),r.overlay!==void 0&&Pi(r.overlay),r.refetchonexpire!==void 0&&jt(!!r.refetchonexpire),r.sentinel!==void 0&&typeof r.sentinel=="object"&&lt(r.sentinel),r.spamfilter!==void 0&&Le(typeof r.spamfilter=="object"?r.spamfilter:!!r.spamfilter),r.strings&&wt(typeof r.strings=="string"?r.strings:JSON.stringify(r.strings)),r.test!==void 0&&we(typeof r.test=="number"?r.test:!!r.test),r.verifyurl!==void 0&&se(r.verifyurl),r.workers!==void 0&&Et(+r.workers),r.workerurl!==void 0&&Bt(r.workerurl)}function Mi(){return{auto:l(),blockspam:f(),challengeurl:s(),debug:h(),delay:m(),expire:N(),floating:E(),floatinganchor:j(),floatingoffset:_e(),hidefooter:ae(),hidelogo:ne(),name:ce(),maxnumber:Ie(),mockerror:Ut(),obfuscated:We(),overlay:Re(),refetchonexpire:jt(),spamfilter:Le(),strings:o(M),test:we(),verifyurl:se(),workers:Et(),workerurl:Bt()}}function Ui(){return o(Ct)}function ca(r){return Xe.find(u=>u.constructor.pluginName===r)}function qi(){return o(k)}function Wt(){o(U).style.display="none",Re()&&o(me)&&(o(me).style.display="none")}function Jt(r=20){var u;if(o(U))if(o(Ct)||b(Ct,(j()?document.querySelector(j()):(u=o(O))==null?void 0:u.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||o(O),!0),o(Ct)){const g=parseInt(_e(),10)||12,_=o(Ct).getBoundingClientRect(),v=o(U).getBoundingClientRect(),C=document.documentElement.clientHeight,R=document.documentElement.clientWidth,Y=E()==="auto"?_.bottom+v.height+g+r>C:E()==="top",q=Math.max(r,Math.min(R-r-v.width,_.left+_.width/2-v.width/2));if(Y?o(U).style.top=`${_.top-(v.height+g)}px`:o(U).style.top=`${_.bottom+g}px`,o(U).style.left=`${q}px`,o(U).setAttribute("data-floating",Y?"top":"bottom"),o(Yt)){const re=o(Yt).getBoundingClientRect();o(Yt).style.left=_.left-q+_.width/2-re.width/2+"px"}}else $("unable to find floating anchor element")}function ut(r=w.UNVERIFIED,u=null){o(ot)&&(o(ot).abort(),b(ot,null)),b(Ht,!1),b(Oe,null),b(G,null),b(Xn,!1),b(z,null),Fe(r,u)}function ji(r){b(Ct,r,!0)}function Fe(r,u=null){b(k,r,!0),b(at,u,!0),Je("statechange",{payload:o(Oe),state:o(k)})}function Cn(){o(U).style.display="block",E()&&Jt(),Re()&&o(me)&&(o(me).style.display="flex")}async function Ue(){return ut(w.VERIFYING),await new Promise(r=>setTimeout(r,m()||0)),Ko().then(r=>(Oi(r),$("challenge",r),Fi(r))).then(({data:r,solution:u})=>{var g;if($("solution",u),!u||r&&"challenge"in r&&!("clearText"in u)){if((u==null?void 0:u.number)!==void 0&&"challenge"in r)if(se()&&"codeChallenge"in r)["INPUT","BUTTON","SELECT","TEXTAREA"].includes(((g=document.activeElement)==null?void 0:g.tagName)||"")&&y()===!1&&document.activeElement.blur(),b(G,{challenge:r,solution:u},!0);else{if(se()&&lt()!==void 0)return Ni(En(r,u));if(se())return ua(En(r,u));b(Oe,En(r,u),!0),$("payload",o(Oe))}else if(o(k)!==w.EXPIRED)throw $("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}}).then(()=>{o(G)?(Fe(w.CODE),jn().then(()=>{Je("code",{codeChallenge:o(G)})})):o(Oe)&&(Fe(w.VERIFIED),$("verified"),jn().then(()=>{Je("verified",{payload:o(Oe)}),Re()&&Wt()}))}).catch(r=>{$(r),Fe(w.ERROR,r.message)})}var Bi=Ho(),Hi=Tt(Bi);no(Hi,t,"default",{});var At=K(Hi,2),Qn=J(At),An=J(Qn);let Yi;var Gi=J(An);{var da=r=>{Wn(r)};X(Gi,r=>{o(k)===w.VERIFYING&&r(da)})}var ft=K(Gi,2);ti(ft),ft.__change=[xo,k,Le,O,Ht,We,Zt,Ue],_n(ft,r=>b(Kn,r),()=>o(Kn)),W(An);var In=K(An,2),va=J(In);{var ha=r=>{var u=gn(),g=Tt(u);it(g,()=>o(M).verified),B(r,u)},ga=(r,u)=>{{var g=v=>{var C=gn(),R=Tt(C);it(R,()=>o(M).verifying),B(v,C)},_=(v,C)=>{{var R=q=>{var re=gn(),de=Tt(re);it(de,()=>o(M).verificationRequired),B(q,re)},Y=q=>{var re=gn(),de=Tt(re);it(de,()=>o(M).label),B(q,re)};X(v,q=>{o(k)===w.CODE?q(R):q(Y,!1)},C)}};X(r,v=>{o(k)===w.VERIFYING?v(g):v(_,!1)},u)}};X(va,r=>{o(k)===w.VERIFIED?r(ha):r(ga,!1)})}W(In);var Zi=K(In,2);{var _a=r=>{var u=To();ti(u),Se(()=>{T(u,"name",ce()),ao(u,o(Oe))}),B(r,u)};X(Zi,r=>{o(k)===w.VERIFIED&&r(_a)})}var Wi=K(Zi,2);{var ma=r=>{var u=No(),g=J(u);T(g,"href",Zo),W(u),Se(()=>T(g,"aria-label",o(M).ariaLinkLabel)),B(r,u)};X(Wi,r=>{(ne()!==!0||o(Jn))&&r(ma)})}var pa=K(Wi,2);{var ba=r=>{var u=Vo(),g=K(J(u),2),_=J(g),v=K(_,2);Jl(v,!y()),v.__keydown=[ko,$i];var C=K(v,2),R=J(C),Y=J(R);{var q=ke=>{var Q=Oo();Q.__click=$i;var Rn=J(Q);{var Kt=Rt=>{Wn(Rt,()=>20)},ka=(Rt,$a)=>{{var xa=kt=>{var er=Do();B(kt,er)},Sa=(kt,er)=>{{var Ta=$t=>{var tr=Lo();B($t,tr)},Na=$t=>{var tr=Po();B($t,tr)};X(kt,$t=>{o(z)===ee.PLAYING?$t(Ta):$t(Na,!1)},er)}};X(Rt,kt=>{o(z)===ee.ERROR?kt(xa):kt(Sa,!1)},$a)}};X(Rn,Rt=>{o(z)===ee.LOADING?Rt(Kt):Rt(ka,!1)})}W(Q),Se(()=>{T(Q,"title",o(M).getAudioChallenge),Q.disabled=o(z)===ee.LOADING||o(z)===ee.ERROR||o(st),T(Q,"aria-label",o(z)===ee.LOADING?o(M).loading:o(M).getAudioChallenge)}),B(ke,Q)};X(Y,ke=>{o(G).challenge.codeChallenge.audio&&ke(q)})}var re=K(Y,2);re.__click=[$o,Ue],W(R);var de=K(R,2),ct=J(de);{var It=ke=>{Wn(ke,()=>16)};X(ct,ke=>{o(st)&&ke(It)})}var dt=K(ct);W(de),W(C);var Ia=K(C,2);{var Ra=ke=>{var Q=Fo(),Rn=J(Q);W(Q),_n(Q,Kt=>b(Ke,Kt),()=>o(Ke)),Se(Kt=>T(Rn,"src",Kt),[()=>wi(o(G).challenge.codeChallenge.audio,{language:H()})]),Ze("loadstart",Q,ra),Ze("canplay",Q,na),Ze("pause",Q,la),Ze("playing",Q,ia),Ze("ended",Q,ea),Ze("error",Rn,ta),B(ke,Q)};X(Ia,ke=>{o(G).challenge.codeChallenge.audio&&o(Xn)&&ke(Ra)})}W(g),W(u),Se(()=>{T(u,"aria-label",o(M).verificationRequired),T(_,"src",o(G).challenge.codeChallenge.image),T(v,"minlength",o(G).challenge.codeChallenge.length||1),T(v,"maxlength",o(G).challenge.codeChallenge.length),T(v,"placeholder",o(M).enterCode),T(v,"aria-label",o(z)===ee.LOADING?o(M).loading:o(z)===ee.PLAYING?"":o(M).enterCodeAria),T(v,"aria-live",o(z)?"assertive":"polite"),T(v,"aria-busy",o(z)===ee.LOADING),v.disabled=o(st),T(re,"aria-label",o(M).reload),T(re,"title",o(M).reload),re.disabled=o(st),de.disabled=o(st),T(de,"aria-label",o(M).verify),Ql(dt,` ${o(M).verify??""}`)}),Ze("submit",g,oa,!0),B(r,u)};X(pa,r=>{var u;(u=o(G))!=null&&u.challenge.codeChallenge&&r(ba)})}W(Qn);var Ji=K(Qn,2);{var ya=r=>{var u=qo(),g=K(J(u),2);{var _=C=>{var R=Mo(),Y=J(R);it(Y,()=>o(M).expired),W(R),Se(()=>T(R,"title",o(at))),B(C,R)},v=C=>{var R=Uo(),Y=J(R);it(Y,()=>o(M).error),W(R),Se(()=>T(R,"title",o(at))),B(C,R)};X(g,C=>{o(k)===w.EXPIRED?C(_):C(v,!1)})}W(u),B(r,u)};X(Ji,r=>{(o(at)||o(k)===w.EXPIRED)&&r(ya)})}var Ki=K(Ji,2);{var wa=r=>{var u=jo(),g=J(u),_=J(g);it(_,()=>o(M).footer),W(g),W(u),B(r,u)};X(Ki,r=>{o(M).footer&&(ae()!==!0||o(Jn))&&r(wa)})}var Ea=K(Ki,2);{var Ca=r=>{var u=Bo();_n(u,g=>b(Yt,g),()=>o(Yt)),B(r,u)};X(Ea,r=>{E()&&r(Ca)})}W(At),_n(At,r=>b(U,r),()=>o(U)),Se(r=>{T(At,"data-state",o(k)),T(At,"data-floating",E()),T(At,"data-overlay",Re()),Yi=io(An,1,"altcha-checkbox",null,Yi,r),T(ft,"id",o(_i)),ft.required=l()!=="onsubmit"&&(!E()||l()!=="off"),T(In,"for",o(_i))},[()=>({"altcha-checkbox-verifying":o(k)===w.VERIFYING})]),Ze("invalid",ft,ki),uo(ft,()=>o(Ht),r=>b(Ht,r)),B(e,Bi);var Aa=Gr({clarify:Zt,configure:Vi,getConfiguration:Mi,getFloatingAnchor:Ui,getPlugin:ca,getState:qi,hide:Wt,repositionFloating:Jt,reset:ut,setFloatingAnchor:ji,setState:Fe,show:Cn,verify:Ue,get auto(){return l()},set auto(r=void 0){l(r),A()},get blockspam(){return f()},set blockspam(r=void 0){f(r),A()},get challengeurl(){return s()},set challengeurl(r=void 0){s(r),A()},get challengejson(){return c()},set challengejson(r=void 0){c(r),A()},get credentials(){return d()},set credentials(r=void 0){d(r),A()},get customfetch(){return p()},set customfetch(r=void 0){p(r),A()},get debug(){return h()},set debug(r=!1){h(r),A()},get delay(){return m()},set delay(r=0){m(r),A()},get disableautofocus(){return y()},set disableautofocus(r=!1){y(r),A()},get expire(){return N()},set expire(r=void 0){N(r),A()},get floating(){return E()},set floating(r=void 0){E(r),A()},get floatinganchor(){return j()},set floatinganchor(r=void 0){j(r),A()},get floatingoffset(){return _e()},set floatingoffset(r=void 0){_e(r),A()},get floatingpersist(){return te()},set floatingpersist(r=!1){te(r),A()},get hidefooter(){return ae()},set hidefooter(r=!1){ae(r),A()},get hidelogo(){return ne()},set hidelogo(r=!1){ne(r),A()},get id(){return yt()},set id(r=void 0){yt(r),A()},get language(){return H()},set language(r=void 0){H(r),A()},get name(){return ce()},set name(r="altcha"){ce(r),A()},get maxnumber(){return Ie()},set maxnumber(r=1e6){Ie(r),A()},get mockerror(){return Ut()},set mockerror(r=!1){Ut(r),A()},get obfuscated(){return We()},set obfuscated(r=void 0){We(r),A()},get overlay(){return Re()},set overlay(r=void 0){Re(r),A()},get overlaycontent(){return qt()},set overlaycontent(r=void 0){qt(r),A()},get plugins(){return yn()},set plugins(r=void 0){yn(r),A()},get refetchonexpire(){return jt()},set refetchonexpire(r=!0){jt(r),A()},get sentinel(){return lt()},set sentinel(r=void 0){lt(r),A()},get spamfilter(){return Le()},set spamfilter(r=!1){Le(r),A()},get strings(){return wt()},set strings(r=void 0){wt(r),A()},get test(){return we()},set test(r=!1){we(r),A()},get verifyurl(){return se()},set verifyurl(r=void 0){se(r),A()},get workers(){return Et()},set workers(r=Math.min(16,navigator.hardwareConcurrency||8)){Et(r),A()},get workerurl(){return Bt()},set workerurl(r=void 0){Bt(r),A()}});return i(),Aa}zl(["change","keydown","click"]),customElements.define("altcha-widget",bo(di,{blockspam:{type:"Boolean"},debug:{type:"Boolean"},delay:{type:"Number"},disableautofocus:{type:"Boolean"},expire:{type:"Number"},floatingoffset:{type:"Number"},hidefooter:{type:"Boolean"},hidelogo:{type:"Boolean"},maxnumber:{type:"Number"},mockerror:{type:"Boolean"},refetchonexpire:{type:"Boolean"},test:{type:"Boolean"},workers:{type:"Number"},auto:{},challengeurl:{},challengejson:{},credentials:{},customfetch:{},floating:{},floatinganchor:{},floatingpersist:{},id:{},language:{},name:{},obfuscated:{},overlay:{},overlaycontent:{},plugins:{},sentinel:{},spamfilter:{},strings:{},verifyurl:{},workerurl:{}},["default"],["clarify","configure","getConfiguration","getFloatingAnchor","getPlugin","getState","hide","repositionFloating","reset","setFloatingAnchor","setState","show","verify"],!1)),globalThis.altchaCreateWorker=e=>new Worker(new URL(e||"./worker.js",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:S&&S.tagName.toUpperCase()==="SCRIPT"&&S.src||new URL("altcha.umd.cjs",document.baseURI).href)),x.Altcha=di,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
1
+ (function($,S){typeof exports=="object"&&typeof module<"u"?S(exports):typeof define=="function"&&define.amd?define(["exports"],S):($=typeof globalThis<"u"?globalThis:$||self,S($.altcha={}))})(this,function($){"use strict";var La=Object.defineProperty;var el=$=>{throw TypeError($)};var Pa=($,S,W)=>S in $?La($,S,{enumerable:!0,configurable:!0,writable:!0,value:W}):$[S]=W;var Re=($,S,W)=>Pa($,typeof S!="symbol"?S+"":S,W),tl=($,S,W)=>S.has($)||el("Cannot "+W);var ve=($,S,W)=>(tl($,S,"read from private field"),W?W.call($):S.get($)),rn=($,S,W)=>S.has($)?el("Cannot add the same private member more than once"):S instanceof WeakSet?S.add($):S.set($,W),nn=($,S,W,zt)=>(tl($,S,"write to private field"),zt?zt.call($,W):S.set($,W),W);var hi,Ve,pe;var S=typeof document<"u"?document.currentScript:null;const W="5";typeof window<"u"&&((hi=window.__svelte??(window.__svelte={})).v??(hi.v=new Set)).add(W);const zt=1,rl=4,nl=8,il=16,ll=1,ol=2,xr="[",ln="[!",on="]",_t={},ue=Symbol(),al="http://www.w3.org/1999/xhtml",an=!1;function sn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var un=Array.isArray,sl=Array.prototype.indexOf,ul=Array.from,Qt=Object.keys,Tt=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,fl=Object.getOwnPropertyDescriptors,cl=Object.prototype,dl=Array.prototype,fn=Object.getPrototypeOf,cn=Object.isExtensible;const mt=()=>{};function dn(e){for(var t=0;t<e.length;t++)e[t]()}function vl(e,t,r=!1){return e===void 0?r?t():t:e}const we=2,vn=4,er=8,kr=16,Fe=32,et=64,tr=128,he=256,rr=512,fe=1024,xe=2048,tt=4096,bt=8192,nr=16384,hl=32768,$r=65536,gl=1<<19,hn=1<<20,Sr=1<<21,Nt=Symbol("$state"),gn=Symbol("legacy props"),_l=Symbol("");function ml(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function bl(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function pl(e){throw new Error("https://svelte.dev/e/effect_orphan")}function yl(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function wl(){throw new Error("https://svelte.dev/e/hydration_failed")}function El(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Cl(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Al(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Il(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ir(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let V=!1;function pt(e){V=e}let M;function qe(e){if(e===null)throw ir(),_t;return M=e}function yt(){return qe(Be(M))}function J(e){if(V){if(Be(M)!==null)throw ir(),_t;M=e}}function Rl(){for(var e=0,t=M;;){if(t.nodeType===8){var r=t.data;if(r===on){if(e===0)return t;e-=1}else(r===xr||r===ln)&&(e+=1)}var i=Be(t);t.remove(),t=i}}let xl=!1;function je(e){if(typeof e!="object"||e===null||Nt in e)return e;const t=fn(e);if(t!==cl&&t!==dl)return e;var r=new Map,i=un(e),a=P(0),l=N,f=s=>{var c=N;Se(l);var d=s();return Se(c),d};return i&&r.set("length",P(e.length)),new Proxy(e,{defineProperty(s,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Cl();var b=r.get(c);return b===void 0?(b=f(()=>P(d.value)),r.set(c,b)):p(b,f(()=>je(d.value))),!0},deleteProperty(s,c){var d=r.get(c);if(d===void 0)c in s&&(r.set(c,f(()=>P(ue))),Tr(a));else{if(i&&typeof c=="string"){var b=r.get("length"),h=Number(c);Number.isInteger(h)&&h<b.v&&p(b,h)}p(d,ue),Tr(a)}return!0},get(s,c,d){var y;if(c===Nt)return e;var b=r.get(c),h=c in s;if(b===void 0&&(!h||(y=Qe(s,c))!=null&&y.writable)&&(b=f(()=>P(je(h?s[c]:ue))),r.set(c,b)),b!==void 0){var m=o(b);return m===ue?void 0:m}return Reflect.get(s,c,d)},getOwnPropertyDescriptor(s,c){var d=Reflect.getOwnPropertyDescriptor(s,c);if(d&&"value"in d){var b=r.get(c);b&&(d.value=o(b))}else if(d===void 0){var h=r.get(c),m=h==null?void 0:h.v;if(h!==void 0&&m!==ue)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(s,c){var m;if(c===Nt)return!0;var d=r.get(c),b=d!==void 0&&d.v!==ue||Reflect.has(s,c);if(d!==void 0||D!==null&&(!b||(m=Qe(s,c))!=null&&m.writable)){d===void 0&&(d=f(()=>P(b?je(s[c]):ue)),r.set(c,d));var h=o(d);if(h===ue)return!1}return b},set(s,c,d,b){var re;var h=r.get(c),m=c in s;if(i&&c==="length")for(var y=d;y<h.v;y+=1){var L=r.get(y+"");L!==void 0?p(L,ue):y in s&&(L=f(()=>P(ue)),r.set(y+"",L))}h===void 0?(!m||(re=Qe(s,c))!=null&&re.writable)&&(h=f(()=>P(void 0)),p(h,f(()=>je(d))),r.set(c,h)):(m=h.v!==ue,p(h,f(()=>je(d))));var O=Reflect.getOwnPropertyDescriptor(s,c);if(O!=null&&O.set&&O.set.call(b,d),!m){if(i&&typeof c=="string"){var B=r.get("length"),k=Number(c);Number.isInteger(k)&&k>=B.v&&p(B,k+1)}Tr(a)}return!0},ownKeys(s){o(a);var c=Reflect.ownKeys(s).filter(h=>{var m=r.get(h);return m===void 0||m.v!==ue});for(var[d,b]of r)b.v!==ue&&!(d in s)&&c.push(d);return c},setPrototypeOf(){Al()}})}function Tr(e,t=1){p(e,e.v+t)}var _n,mn,bn,pn;function Nr(){if(_n===void 0){_n=window,mn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;bn=Qe(t,"firstChild").get,pn=Qe(t,"nextSibling").get,cn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),cn(r)&&(r.__t=void 0)}}function lr(e=""){return document.createTextNode(e)}function me(e){return bn.call(e)}function Be(e){return pn.call(e)}function K(e,t){if(!V)return me(e);var r=me(M);return r===null&&(r=M.appendChild(lr())),qe(r),r}function Dt(e,t){if(!V){var r=me(e);return r instanceof Comment&&r.data===""?Be(r):r}return M}function X(e,t=1,r=!1){let i=V?M:e;for(var a;t--;)a=i,i=Be(i);if(!V)return i;var l=i==null?void 0:i.nodeType;if(r&&l!==3){var f=lr();return i===null?a==null||a.after(f):i.before(f),qe(f),f}return qe(i),i}function kl(e){e.textContent=""}function yn(e){return e===this.v}function wn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Dr(e){return!wn(e,this.v)}function or(e){var t=we|xe,r=N!==null&&(N.f&we)!==0?N:null;return D===null||r!==null&&(r.f&he)!==0?t|=he:D.f|=hn,{ctx:ae,deps:null,effects:null,equals:yn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??D}}function Lt(e){const t=or(e);return On(t),t}function $l(e){const t=or(e);return t.equals=Dr,t}function En(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)He(t[r])}}function Sl(e){for(var t=e.parent;t!==null;){if((t.f&we)===0)return t;t=t.parent}return null}function Cn(e){var t,r=D;Ye(Sl(e));try{En(e),t=qn(e)}finally{Ye(r)}return t}function An(e){var t=Cn(e),r=(Ge||(e.f&he)!==0)&&e.deps!==null?tt:fe;Ee(e,r),e.equals(t)||(e.v=t,e.wv=Vn())}function Tl(e){D===null&&N===null&&pl(),N!==null&&(N.f&he)!==0&&D===null&&bl(),Ft&&ml()}function Nl(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function rt(e,t,r,i=!0){var a=D,l={ctx:ae,deps:null,nodes_start:null,nodes_end:null,f:e|xe,first:null,fn:t,last:null,next:null,parent:a,prev:null,teardown:null,transitions:null,wv:0};if(r)try{qr(l),l.f|=hl}catch(c){throw He(l),c}else t!==null&&vr(l);var f=r&&l.deps===null&&l.first===null&&l.nodes_start===null&&l.teardown===null&&(l.f&(hn|tr))===0;if(!f&&i&&(a!==null&&Nl(l,a),N!==null&&(N.f&we)!==0)){var s=N;(s.effects??(s.effects=[])).push(l)}return l}function Lr(e){const t=rt(er,null,!1);return Ee(t,fe),t.teardown=e,t}function Pr(e){Tl();var t=D!==null&&(D.f&Fe)!==0&&ae!==null&&!ae.m;if(t){var r=ae;(r.e??(r.e=[])).push({fn:e,effect:D,reaction:N})}else{var i=Or(e);return i}}function Dl(e){const t=rt(et,e,!0);return()=>{He(t)}}function Ll(e){const t=rt(et,e,!0);return(r={})=>new Promise(i=>{r.outro?Mr(t,()=>{He(t),i(void 0)}):(He(t),i(void 0))})}function Or(e){return rt(vn,e,!1)}function Fr(e){return rt(er,e,!0)}function ke(e,t=[],r=or){const i=t.map(r);return In(()=>e(...i.map(o)))}function In(e,t=0){return rt(er|kr|t,e,!0)}function Vr(e,t=!0){return rt(er|Fe,e,!0,t)}function Rn(e){var t=e.teardown;if(t!==null){const r=Ft,i=N;Pn(!0),Se(null);try{t.call(null)}finally{Pn(r),Se(i)}}}function xn(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var i=r.next;(r.f&et)!==0?r.parent=null:He(r,t),r=i}}function Pl(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Fe)===0&&He(t),t=r}}function He(e,t=!0){var r=!1;(t||(e.f&gl)!==0)&&e.nodes_start!==null&&(kn(e.nodes_start,e.nodes_end),r=!0),xn(e,t&&!r),dr(e,0),Ee(e,nr);var i=e.transitions;if(i!==null)for(const l of i)l.stop();Rn(e);var a=e.parent;a!==null&&a.first!==null&&$n(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function kn(e,t){for(;e!==null;){var r=e===t?null:Be(e);e.remove(),e=r}}function $n(e){var t=e.parent,r=e.prev,i=e.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=r))}function Mr(e,t){var r=[];Sn(e,r,!0),Ol(r,()=>{He(e),t&&t()})}function Ol(e,t){var r=e.length;if(r>0){var i=()=>--r||t();for(var a of e)a.out(i)}else t()}function Sn(e,t,r){if((e.f&bt)===0){if(e.f^=bt,e.transitions!==null)for(const f of e.transitions)(f.is_global||r)&&t.push(f);for(var i=e.first;i!==null;){var a=i.next,l=(i.f&$r)!==0||(i.f&Fe)!==0;Sn(i,t,l?r:!1),i=a}}}function Tn(e){Nn(e,!0)}function Nn(e,t){if((e.f&bt)!==0){e.f^=bt,(e.f&fe)===0&&(e.f^=fe),Mt(e)&&(Ee(e,xe),vr(e));for(var r=e.first;r!==null;){var i=r.next,a=(r.f&$r)!==0||(r.f&Fe)!==0;Nn(r,a?t:!1),r=i}if(e.transitions!==null)for(const l of e.transitions)(l.is_global||t)&&l.in()}}const Fl=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let Pt=[],Ot=[];function Dn(){var e=Pt;Pt=[],dn(e)}function Ln(){var e=Ot;Ot=[],dn(e)}function Ur(e){Pt.length===0&&queueMicrotask(Dn),Pt.push(e)}function Vl(e){Ot.length===0&&Fl(Ln),Ot.push(e)}function Ml(){Pt.length>0&&Dn(),Ot.length>0&&Ln()}let ar=!1,sr=!1,ur=null,nt=!1,Ft=!1;function Pn(e){Ft=e}let Vt=[],Oa=[],N=null,$e=!1;function Se(e){N=e}let D=null;function Ye(e){D=e}let le=null;function On(e){N!==null&&N.f&Sr&&(le===null?le=[e]:le.push(e))}let oe=null,ge=0,be=null;function Ul(e){be=e}let Fn=1,fr=0,Ge=!1;function Vn(){return++Fn}function Mt(e){var h;var t=e.f;if((t&xe)!==0)return!0;if((t&tt)!==0){var r=e.deps,i=(t&he)!==0;if(r!==null){var a,l,f=(t&rr)!==0,s=i&&D!==null&&!Ge,c=r.length;if(f||s){var d=e,b=d.parent;for(a=0;a<c;a++)l=r[a],(f||!((h=l==null?void 0:l.reactions)!=null&&h.includes(d)))&&(l.reactions??(l.reactions=[])).push(d);f&&(d.f^=rr),s&&b!==null&&(b.f&he)===0&&(d.f^=he)}for(a=0;a<c;a++)if(l=r[a],Mt(l)&&An(l),l.wv>e.wv)return!0}(!i||D!==null&&!Ge)&&Ee(e,fe)}return!1}function ql(e,t){for(var r=t;r!==null;){if((r.f&tr)!==0)try{r.fn(e);return}catch{r.f^=tr}r=r.parent}throw ar=!1,e}function Mn(e){return(e.f&nr)===0&&(e.parent===null||(e.parent.f&tr)===0)}function cr(e,t,r,i){if(ar){if(r===null&&(ar=!1),Mn(t))throw e;return}if(r!==null&&(ar=!0),ql(e,t),Mn(t))throw e}function Un(e,t,r=!0){var i=e.reactions;if(i!==null)for(var a=0;a<i.length;a++){var l=i[a];le!=null&&le.includes(e)||((l.f&we)!==0?Un(l,t,!1):t===l&&(r?Ee(l,xe):(l.f&fe)!==0&&Ee(l,tt),vr(l)))}}function qn(e){var y;var t=oe,r=ge,i=be,a=N,l=Ge,f=le,s=ae,c=$e,d=e.f;oe=null,ge=0,be=null,Ge=(d&he)!==0&&($e||!nt||N===null),N=(d&(Fe|et))===0?e:null,le=null,Yn(e.ctx),$e=!1,fr++,e.f|=Sr;try{var b=(0,e.fn)(),h=e.deps;if(oe!==null){var m;if(dr(e,ge),h!==null&&ge>0)for(h.length=ge+oe.length,m=0;m<oe.length;m++)h[ge+m]=oe[m];else e.deps=h=oe;if(!Ge)for(m=ge;m<h.length;m++)((y=h[m]).reactions??(y.reactions=[])).push(e)}else h!==null&&ge<h.length&&(dr(e,ge),h.length=ge);if(Wn()&&be!==null&&!$e&&h!==null&&(e.f&(we|tt|xe))===0)for(m=0;m<be.length;m++)Un(be[m],e);return a!==null&&a!==e&&(fr++,be!==null&&(i===null?i=be:i.push(...be))),b}finally{oe=t,ge=r,be=i,N=a,Ge=l,le=f,Yn(s),$e=c,e.f^=Sr}}function jl(e,t){let r=t.reactions;if(r!==null){var i=sl.call(r,e);if(i!==-1){var a=r.length-1;a===0?r=t.reactions=null:(r[i]=r[a],r.pop())}}r===null&&(t.f&we)!==0&&(oe===null||!oe.includes(t))&&(Ee(t,tt),(t.f&(he|rr))===0&&(t.f^=rr),En(t),dr(t,0))}function dr(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)jl(e,r[i])}function qr(e){var t=e.f;if((t&nr)===0){Ee(e,fe);var r=D,i=ae,a=nt;D=e,nt=!0;try{(t&kr)!==0?Pl(e):xn(e),Rn(e);var l=qn(e);e.teardown=typeof l=="function"?l:null,e.wv=Fn;var f=e.deps,s;an&&xl&&e.f&xe}catch(c){cr(c,e,r,i||e.ctx)}finally{nt=a,D=r}}}function Bl(){try{yl()}catch(e){if(ur!==null)cr(e,ur,null);else throw e}}function jn(){var e=nt;try{var t=0;for(nt=!0;Vt.length>0;){t++>1e3&&Bl();var r=Vt,i=r.length;Vt=[];for(var a=0;a<i;a++){var l=Yl(r[a]);Hl(l)}Ut.clear()}}finally{sr=!1,nt=e,ur=null}}function Hl(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var i=e[r];if((i.f&(nr|bt))===0)try{Mt(i)&&(qr(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?$n(i):i.fn=null))}catch(a){cr(a,i,null,i.ctx)}}}function vr(e){sr||(sr=!0,queueMicrotask(jn));for(var t=ur=e;t.parent!==null;){t=t.parent;var r=t.f;if((r&(et|Fe))!==0){if((r&fe)===0)return;t.f^=fe}}Vt.push(t)}function Yl(e){for(var t=[],r=e;r!==null;){var i=r.f,a=(i&(Fe|et))!==0,l=a&&(i&fe)!==0;if(!l&&(i&bt)===0){if((i&vn)!==0)t.push(r);else if(a)r.f^=fe;else try{Mt(r)&&qr(r)}catch(c){cr(c,r,null,r.ctx)}var f=r.first;if(f!==null){r=f;continue}}var s=r.parent;for(r=r.next;r===null&&s!==null;)r=s.next,s=s.parent}return t}function C(e){for(var t;;){if(Ml(),Vt.length===0)return t;sr=!0,jn()}}async function jr(){await Promise.resolve(),C()}function o(e){var t=e.f,r=(t&we)!==0;if(N!==null&&!$e){if(!(le!=null&&le.includes(e))){var i=N.deps;e.rv<fr&&(e.rv=fr,oe===null&&i!==null&&i[ge]===e?ge++:oe===null?oe=[e]:(!Ge||!oe.includes(e))&&oe.push(e))}}else if(r&&e.deps===null&&e.effects===null){var a=e,l=a.parent;l!==null&&(l.f&he)===0&&(a.f^=he)}return r&&(a=e,Mt(a)&&An(a)),Ft&&Ut.has(e)?Ut.get(e):e.v}function it(e){var t=$e;try{return $e=!0,e()}finally{$e=t}}const Gl=-7169;function Ee(e,t){e.f=e.f&Gl|t}const Ut=new Map;function Bn(e,t){var r={f:0,v:e,reactions:null,equals:yn,rv:0,wv:0};return r}function P(e,t){const r=Bn(e);return On(r),r}function Br(e,t=!1){const r=Bn(e);return t||(r.equals=Dr),r}function p(e,t,r=!1){N!==null&&!$e&&Wn()&&(N.f&(we|kr))!==0&&!(le!=null&&le.includes(e))&&Il();let i=r?je(t):t;return Zl(e,i)}function Zl(e,t){if(!e.equals(t)){var r=e.v;Ft?Ut.set(e,t):Ut.set(e,r),e.v=t,(e.f&we)!==0&&((e.f&xe)!==0&&Cn(e),Ee(e,(e.f&he)===0?fe:tt)),e.wv=Vn(),Hn(e,xe),D!==null&&(D.f&fe)!==0&&(D.f&(Fe|et))===0&&(be===null?Ul([e]):be.push(e))}return t}function Hn(e,t){var r=e.reactions;if(r!==null)for(var i=r.length,a=0;a<i;a++){var l=r[a],f=l.f;(f&xe)===0&&(Ee(l,t),(f&(fe|he))!==0&&((f&we)!==0?Hn(l,tt):vr(l)))}}let ae=null;function Yn(e){ae=e}function Gn(e,t=!1,r){var i=ae={p:ae,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};Lr(()=>{i.d=!0})}function Zn(e){const t=ae;if(t!==null){e!==void 0&&(t.x=e);const f=t.e;if(f!==null){var r=D,i=N;t.e=null;try{for(var a=0;a<f.length;a++){var l=f[a];Ye(l.effect),Se(l.reaction),Or(l.fn)}}finally{Ye(r),Se(i)}}ae=t.p,t.m=!0}return e||{}}function Wn(){return!0}const Wl=["touchstart","touchmove"];function Jl(e){return Wl.includes(e)}function Kl(e,t){if(t){const r=document.body;e.autofocus=!0,Ur(()=>{document.activeElement===r&&e.focus()})}}let Jn=!1;function Kn(){Jn||(Jn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Xn(e){var t=N,r=D;Se(null),Ye(null);try{return e()}finally{Se(t),Ye(r)}}function Xl(e,t,r,i=r){e.addEventListener(t,()=>Xn(r));const a=e.__on_r;a?e.__on_r=()=>{a(),i(!0)}:e.__on_r=()=>i(!0),Kn()}const zn=new Set,Hr=new Set;function zl(e,t,r,i={}){function a(l){if(i.capture||qt.call(t,l),!l.cancelBubble)return Xn(()=>r==null?void 0:r.call(this,l))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ur(()=>{t.addEventListener(e,a,i)}):t.addEventListener(e,a,i),a}function Ze(e,t,r,i,a){var l={capture:i,passive:a},f=zl(e,t,r,l);(t===document.body||t===window||t===document)&&Lr(()=>{t.removeEventListener(e,f,l)})}function Ql(e){for(var t=0;t<e.length;t++)zn.add(e[t]);for(var r of Hr)r(e)}function qt(e){var re;var t=this,r=t.ownerDocument,i=e.type,a=((re=e.composedPath)==null?void 0:re.call(e))||[],l=a[0]||e.target,f=0,s=e.__root;if(s){var c=a.indexOf(s);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var d=a.indexOf(t);if(d===-1)return;c<=d&&(f=c)}if(l=a[f]||e.target,l!==t){Tt(e,"currentTarget",{configurable:!0,get(){return l||r}});var b=N,h=D;Se(null),Ye(null);try{for(var m,y=[];l!==null;){var L=l.assignedSlot||l.parentNode||l.host||null;try{var O=l["__"+i];if(O!=null&&(!l.disabled||e.target===l))if(un(O)){var[B,...k]=O;B.apply(l,[e,...k])}else O.call(l,e)}catch(ce){m?y.push(ce):m=ce}if(e.cancelBubble||L===t||L===null)break;l=L}if(m){for(let ce of y)queueMicrotask(()=>{throw ce});throw m}}finally{e.__root=t,delete e.currentTarget,Se(b),Ye(h)}}}function Yr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Te(e,t){var r=D;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function Ce(e,t){var r=(t&ll)!==0,i=(t&ol)!==0,a,l=!e.startsWith("<!>");return()=>{if(V)return Te(M,null),M;a===void 0&&(a=Yr(l?e:"<!>"+e),r||(a=me(a)));var f=i||mn?document.importNode(a,!0):a.cloneNode(!0);if(r){var s=me(f),c=f.lastChild;Te(s,c)}else Te(f,f);return f}}function hr(e,t,r="svg"){var i=!e.startsWith("<!>"),a=`<${r}>${i?e:"<!>"+e}</${r}>`,l;return()=>{if(V)return Te(M,null),M;if(!l){var f=Yr(a),s=me(f);l=me(s)}var c=l.cloneNode(!0);return Te(c,c),c}}function gr(){if(V)return Te(M,null),M;var e=document.createDocumentFragment(),t=document.createComment(""),r=lr();return e.append(t,r),Te(t,r),e}function Y(e,t){if(V){D.nodes_end=M,yt();return}e!==null&&e.before(t)}function eo(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r+"")}function Qn(e,t){return ei(e,t)}function to(e,t){Nr(),t.intro=t.intro??!1;const r=t.target,i=V,a=M;try{for(var l=me(r);l&&(l.nodeType!==8||l.data!==xr);)l=Be(l);if(!l)throw _t;pt(!0),qe(l),yt();const f=ei(e,{...t,anchor:l});if(M===null||M.nodeType!==8||M.data!==on)throw ir(),_t;return pt(!1),f}catch(f){if(f===_t)return t.recover===!1&&wl(),Nr(),kl(r),pt(!1),Qn(e,t);throw f}finally{pt(i),qe(a)}}const wt=new Map;function ei(e,{target:t,anchor:r,props:i={},events:a,context:l,intro:f=!0}){Nr();var s=new Set,c=h=>{for(var m=0;m<h.length;m++){var y=h[m];if(!s.has(y)){s.add(y);var L=Jl(y);t.addEventListener(y,qt,{passive:L});var O=wt.get(y);O===void 0?(document.addEventListener(y,qt,{passive:L}),wt.set(y,1)):wt.set(y,O+1)}}};c(ul(zn)),Hr.add(c);var d=void 0,b=Ll(()=>{var h=r??t.appendChild(lr());return Vr(()=>{if(l){Gn({});var m=ae;m.c=l}a&&(i.$$events=a),V&&Te(h,null),d=e(h,i)||{},V&&(D.nodes_end=M),l&&Zn()}),()=>{var L;for(var m of s){t.removeEventListener(m,qt);var y=wt.get(m);--y===0?(document.removeEventListener(m,qt),wt.delete(m)):wt.set(m,y)}Hr.delete(c),h!==r&&((L=h.parentNode)==null||L.removeChild(h))}});return Gr.set(d,b),d}let Gr=new WeakMap;function ro(e,t){const r=Gr.get(e);return r?(Gr.delete(e),r(t)):Promise.resolve()}function z(e,t,[r,i]=[0,0]){V&&r===0&&yt();var a=e,l=null,f=null,s=ue,c=r>0?$r:0,d=!1;const b=(m,y=!0)=>{d=!0,h(y,m)},h=(m,y)=>{if(s===(s=m))return;let L=!1;if(V&&i!==-1){if(r===0){const B=a.data;B===xr?i=0:B===ln?i=1/0:(i=parseInt(B.substring(1)),i!==i&&(i=s?1/0:-1))}const O=i>r;!!s===O&&(a=Rl(),qe(a),pt(!1),L=!0,i=-1)}s?(l?Tn(l):y&&(l=Vr(()=>y(a))),f&&Mr(f,()=>{f=null})):(f?Tn(f):y&&(f=Vr(()=>y(a,[r+1,i]))),l&&Mr(l,()=>{l=null})),L&&pt(!0)};In(()=>{d=!1,t(b),d||h(null,null)},c),V&&(a=M)}function lt(e,t,r=!1,i=!1,a=!1){var l=e,f="";ke(()=>{var s=D;if(f===(f=t()??"")){V&&yt();return}if(s.nodes_start!==null&&(kn(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),f!==""){if(V){M.data;for(var c=yt(),d=c;c!==null&&(c.nodeType!==8||c.data!=="");)d=c,c=Be(c);if(c===null)throw ir(),_t;Te(M,d),l=qe(c);return}var b=f+"";r?b=`<svg>${b}</svg>`:i&&(b=`<math>${b}</math>`);var h=Yr(b);if((r||i)&&(h=me(h)),Te(me(h),h.lastChild),r||i)for(;me(h);)l.before(me(h));else l.before(h)}})}function no(e,t,r,i,a){var s;V&&yt();var l=(s=t.$$slots)==null?void 0:s[r],f=!1;l===!0&&(l=t.children,f=!0),l===void 0||l(e,f?()=>i:i)}const ti=[...`
2
+ \r\f \v\uFEFF`];function io(e,t,r){var i=""+e;if(r){for(var a in r)if(r[a])i=i?i+" "+a:a;else if(i.length)for(var l=a.length,f=0;(f=i.indexOf(a,f))>=0;){var s=f+l;(f===0||ti.includes(i[f-1]))&&(s===i.length||ti.includes(i[s]))?i=(f===0?"":i.substring(0,f))+i.substring(s+1):f=s}}return i===""?null:i}function lo(e,t,r,i,a,l){var f=e.__className;if(V||f!==r||f===void 0){var s=io(r,i,l);(!V||s!==e.getAttribute("class"))&&(s==null?e.removeAttribute("class"):e.className=s),e.__className=r}else if(l&&a!==l)for(var c in l){var d=!!l[c];(a==null||d!==!!a[c])&&e.classList.toggle(c,d)}return l}const oo=Symbol("is custom element"),ao=Symbol("is html");function ri(e){if(V){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;T(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var a=e.checked;T(e,"checked",null),e.checked=a}}};e.__on_r=r,Vl(r),Kn()}}function so(e,t){var r=ni(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function T(e,t,r,i){var a=ni(e);V&&(a[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||a[t]!==(a[t]=r)&&(t==="loading"&&(e[_l]=r),r==null?e.removeAttribute(t):typeof r!="string"&&uo(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function ni(e){return e.__attributes??(e.__attributes={[oo]:e.nodeName.includes("-"),[ao]:e.namespaceURI===al})}var ii=new Map;function uo(e){var t=ii.get(e.nodeName);if(t)return t;ii.set(e.nodeName,t=[]);for(var r,i=e,a=Element.prototype;a!==i;){r=fl(i);for(var l in r)r[l].set&&t.push(l);i=fn(i)}return t}function fo(e,t,r=t){Xl(e,"change",i=>{var a=i?e.defaultChecked:e.checked;r(a)}),(V&&e.defaultChecked!==e.checked||it(t)==null)&&r(e.checked),Fr(()=>{var i=t();e.checked=!!i})}function li(e,t){return e===t||(e==null?void 0:e[Nt])===t}function _r(e={},t,r,i){return Or(()=>{var a,l;return Fr(()=>{a=l,l=[],it(()=>{e!==r(...l)&&(t(e,...l),a&&li(r(...a),e)&&t(null,...a))})}),()=>{Ur(()=>{l&&li(r(...l),e)&&t(null,...l)})}}),e}function oi(e){ae===null&&sn(),Pr(()=>{const t=it(e);if(typeof t=="function")return t})}function co(e){ae===null&&sn(),oi(()=>()=>it(e))}function ai(e,t,r){if(e==null)return t(void 0),mt;const i=it(()=>e.subscribe(t,r));return i.unsubscribe?()=>i.unsubscribe():i}const Et=[];function vo(e,t=mt){let r=null;const i=new Set;function a(s){if(wn(e,s)&&(e=s,r)){const c=!Et.length;for(const d of i)d[1](),Et.push(d,e);if(c){for(let d=0;d<Et.length;d+=2)Et[d][0](Et[d+1]);Et.length=0}}}function l(s){a(s(e))}function f(s,c=mt){const d=[s,c];return i.add(d),i.size===1&&(r=t(a,l)||mt),s(e),()=>{i.delete(d),i.size===0&&r&&(r(),r=null)}}return{set:a,update:l,subscribe:f}}function mr(e){let t;return ai(e,r=>t=r)(),t}let br=!1,Zr=Symbol();function ho(e,t,r){const i=r[t]??(r[t]={store:null,source:Br(void 0),unsubscribe:mt});if(i.store!==e&&!(Zr in r))if(i.unsubscribe(),i.store=e??null,e==null)i.source.v=void 0,i.unsubscribe=mt;else{var a=!0;i.unsubscribe=ai(e,l=>{a?i.source.v=l:p(i.source,l)}),a=!1}return e&&Zr in r?mr(e):o(i.source)}function go(){const e={};function t(){Lr(()=>{for(var r in e)e[r].unsubscribe();Tt(e,Zr,{enumerable:!1,value:!0})})}return[e,t]}function _o(e){var t=br;try{return br=!1,[e(),br]}finally{br=t}}function si(e){var t;return((t=e.ctx)==null?void 0:t.d)??!1}function A(e,t,r,i){var Me;var a=(r&zt)!==0,l=!0,f=(r&nl)!==0,s=(r&il)!==0,c=!1,d;f?[d,c]=_o(()=>e[t]):d=e[t];var b=Nt in e||gn in e,h=f&&(((Me=Qe(e,t))==null?void 0:Me.set)??(b&&t in e&&(H=>e[t]=H)))||void 0,m=i,y=!0,L=!1,O=()=>(L=!0,y&&(y=!1,s?m=it(i):m=i),m);d===void 0&&i!==void 0&&(h&&l&&El(),d=O(),h&&h(d));var B;if(B=()=>{var H=e[t];return H===void 0?O():(y=!0,L=!1,H)},(r&rl)===0)return B;if(h){var k=e.$$legacy;return function(H,Ne){return arguments.length>0?((!Ne||k||c)&&h(Ne?B():H),H):B()}}var re=!1,ce=Br(d),ne=or(()=>{var H=B(),Ne=o(ce);return re?(re=!1,Ne):ce.v=H});return f&&o(ne),a||(ne.equals=Dr),function(H,Ne){if(arguments.length>0){const We=Ne?o(ne):f?je(H):H;if(!ne.equals(We)){if(re=!0,p(ce,We),L&&m!==void 0&&(m=We),si(ne))return H;it(()=>o(ne))}return H}return si(ne)?ne.v:o(ne)}}function mo(e){return new bo(e)}class bo{constructor(t){rn(this,Ve);rn(this,pe);var l;var r=new Map,i=(f,s)=>{var c=Br(s);return r.set(f,c),c};const a=new Proxy({...t.props||{},$$events:{}},{get(f,s){return o(r.get(s)??i(s,Reflect.get(f,s)))},has(f,s){return s===gn?!0:(o(r.get(s)??i(s,Reflect.get(f,s))),Reflect.has(f,s))},set(f,s,c){return p(r.get(s)??i(s,c),c),Reflect.set(f,s,c)}});nn(this,pe,(t.hydrate?to:Qn)(t.component,{target:t.target,anchor:t.anchor,props:a,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((l=t==null?void 0:t.props)!=null&&l.$$host)||t.sync===!1)&&C(),nn(this,Ve,a.$$events);for(const f of Object.keys(ve(this,pe)))f==="$set"||f==="$destroy"||f==="$on"||Tt(this,f,{get(){return ve(this,pe)[f]},set(s){ve(this,pe)[f]=s},enumerable:!0});ve(this,pe).$set=f=>{Object.assign(a,f)},ve(this,pe).$destroy=()=>{ro(ve(this,pe))}}$set(t){ve(this,pe).$set(t)}$on(t,r){ve(this,Ve)[t]=ve(this,Ve)[t]||[];const i=(...a)=>r.call(this,...a);return ve(this,Ve)[t].push(i),()=>{ve(this,Ve)[t]=ve(this,Ve)[t].filter(a=>a!==i)}}$destroy(){ve(this,pe).$destroy()}}Ve=new WeakMap,pe=new WeakMap;let ui;typeof HTMLElement=="function"&&(ui=class extends HTMLElement{constructor(t,r,i){super();Re(this,"$$ctor");Re(this,"$$s");Re(this,"$$c");Re(this,"$$cn",!1);Re(this,"$$d",{});Re(this,"$$r",!1);Re(this,"$$p_d",{});Re(this,"$$l",{});Re(this,"$$l_u",new Map);Re(this,"$$me");this.$$ctor=t,this.$$s=r,i&&this.attachShadow({mode:"open"})}addEventListener(t,r,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const a=this.$$c.$on(t,r);this.$$l_u.set(r,a)}super.addEventListener(t,r,i)}removeEventListener(t,r,i){if(super.removeEventListener(t,r,i),this.$$c){const a=this.$$l_u.get(r);a&&(a(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(a){return l=>{const f=document.createElement("slot");a!=="default"&&(f.name=a),Y(l,f)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},i=po(this);for(const a of this.$$s)a in i&&(a==="default"&&!this.$$d.children?(this.$$d.children=t(a),r.default=!0):r[a]=t(a));for(const a of this.attributes){const l=this.$$g_p(a.name);l in this.$$d||(this.$$d[l]=pr(l,a.value,this.$$p_d,"toProp"))}for(const a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=mo({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Dl(()=>{Fr(()=>{var a;this.$$r=!0;for(const l of Qt(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];const f=pr(l,this.$$d[l],this.$$p_d,"toAttribute");f==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,f)}this.$$r=!1})});for(const a in this.$$l)for(const l of this.$$l[a]){const f=this.$$c.$on(a,l);this.$$l_u.set(l,f)}this.$$l={}}}attributeChangedCallback(t,r,i){var a;this.$$r||(t=this.$$g_p(t),this.$$d[t]=pr(t,i,this.$$p_d,"toProp"),(a=this.$$c)==null||a.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Qt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function pr(e,t,r,i){var l;const a=(l=r[e])==null?void 0:l.type;if(t=a==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(a){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(a){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function po(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function yo(e,t,r,i,a,l){let f=class extends ui{constructor(){super(e,r,a),this.$$p_d=t}static get observedAttributes(){return Qt(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Qt(t).forEach(s=>{Tt(f.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){var h;c=pr(s,c,t),this.$$d[s]=c;var d=this.$$c;if(d){var b=(h=Qe(d,s))==null?void 0:h.get;b?d[s]=c:d.$set({[s]:c})}}})}),i.forEach(s=>{Tt(f.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),e.element=f,f}const fi=new TextEncoder;function wo(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function Eo(e,t="SHA-256",r=1e5){const i=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const a=await ci(i,e,t);return{algorithm:t,challenge:a,salt:i,signature:""}}async function ci(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return wo(await crypto.subtle.digest(r.toUpperCase(),fi.encode(e+t)))}function Co(e,t,r="SHA-256",i=1e6,a=0){const l=new AbortController,f=Date.now();return{promise:(async()=>{for(let c=a;c<=i;c+=1){if(l.signal.aborted)return null;if(await ci(t,c,r)===e)return{number:c,took:Date.now()-f}}return null})(),controller:l}}function di(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Ao(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function Io(e,t=12){const r=new Uint8Array(t);for(let i=0;i<t;i++)r[i]=e%256,e=Math.floor(e/256);return r}async function Ro(e,t="",r=1e6,i=0){const a="AES-GCM",l=new AbortController,f=Date.now(),s=async()=>{for(let b=i;b<=r;b+=1){if(l.signal.aborted||!c||!d)return null;try{const h=await crypto.subtle.decrypt({name:a,iv:Io(b)},c,d);if(h)return{clearText:new TextDecoder().decode(h),took:Date.now()-f}}catch{}}return null};let c=null,d=null;try{d=Ao(e);const b=await crypto.subtle.digest("SHA-256",fi.encode(t));c=await crypto.subtle.importKey("raw",b,a,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:l}}return{promise:s(),controller:l}}var w=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(w||{}),te=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(te||{});globalThis.altchaPlugins=globalThis.altchaPlugins||[],globalThis.altchaI18n=globalThis.altchaI18n||{get:e=>mr(globalThis.altchaI18n.store)[e],set:(e,t)=>{Object.assign(mr(globalThis.altchaI18n.store),{[e]:t}),globalThis.altchaI18n.store.set(mr(globalThis.altchaI18n.store))},store:vo({})};const xo={ariaLinkLabel:"Visit Altcha.org",enterCode:"Enter code",enterCodeAria:"Enter code you hear. Press Space to play audio.",error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:'Protected by <a href="https://altcha.org/" target="_blank" aria-label="Visit Altcha.org">ALTCHA</a>',getAudioChallenge:"Get an audio challenge",label:"I'm not a robot",loading:"Loading...",reload:"Reload",verify:"Verify",verificationRequired:"Verification required!",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait."};globalThis.altchaI18n.set("en",xo);const Wr=(e,t)=>{let r=$l(()=>vl(t==null?void 0:t(),24));var i=To();ke(()=>{T(i,"width",o(r)),T(i,"height",o(r))}),Y(e,i)};function ko(e,t){e.code==="Space"&&(e.preventDefault(),e.stopImmediatePropagation(),t())}function $o(e,t){e.preventDefault(),t()}function So(e,t,r,i,a,l,f,s){var c;[w.UNVERIFIED,w.ERROR,w.EXPIRED,w.CODE].includes(o(t))?r()!==!1&&((c=o(i))==null?void 0:c.reportValidity())===!1?p(a,!1):l()?f():s():p(a,!0)}var To=hr('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="altcha-spinner"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor"></path></svg>'),No=Ce('<input type="hidden">'),Do=Ce('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>'),Lo=hr('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'),Po=hr('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'),Oo=hr('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'),Fo=Ce('<button type="button" class="altcha-code-challenge-audio"><!></button>'),Vo=Ce("<audio hidden autoplay><source></audio>"),Mo=Ce('<div class="altcha-code-challenge" role="dialog"><div class="altcha-code-challenge-arrow"></div> <form data-code-challenge-form="1"><img class="altcha-code-challenge-image" alt=""> <input type="text" autocomplete="off" name="code" class="altcha-code-challenge-input" required> <div class="altcha-code-challenge-buttons"><div class="altcha-code-challenge-buttons-left"><!> <button type="button" class="altcha-code-challenge-reload"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <button type="submit" class="altcha-code-challenge-verify"><!> </button></div> <!></form></div>'),Uo=Ce("<div><!></div>"),qo=Ce("<div><!></div>"),jo=Ce('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'),Bo=Ce('<div class="altcha-footer"><div><!></div></div>'),Ho=Ce('<div class="altcha-anchor-arrow"></div>'),Yo=Ce('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>',1);function vi(e,t){var zi,Qi;Gn(t,!0);const[r,i]=go(),a=()=>ho(Zo,"$altchaI18nStore",r);let l=A(t,"auto",7,void 0),f=A(t,"blockspam",7,void 0),s=A(t,"challengeurl",7,void 0),c=A(t,"challengejson",7,void 0),d=A(t,"credentials",7,void 0),b=A(t,"customfetch",7,void 0),h=A(t,"debug",7,!1),m=A(t,"delay",7,0),y=A(t,"disableautofocus",7,!1),L=A(t,"refetchonexpire",7,!0),O=A(t,"disablerefetchonexpire",23,()=>!L()),B=A(t,"expire",7,void 0),k=A(t,"floating",7,void 0),re=A(t,"floatinganchor",7,void 0),ce=A(t,"floatingoffset",7,void 0),ne=A(t,"floatingpersist",7,!1),Me=A(t,"hidefooter",7,!1),H=A(t,"hidelogo",7,!1),Ne=A(t,"id",7,void 0),We=A(t,"language",7,void 0),ot=A(t,"name",7,"altcha"),at=A(t,"maxnumber",7,1e6),jt=A(t,"mockerror",7,!1),Je=A(t,"obfuscated",7,void 0),Ae=A(t,"overlay",7,void 0),Bt=A(t,"overlaycontent",7,void 0),yr=A(t,"plugins",7,void 0),st=A(t,"sentinel",7,void 0),De=A(t,"spamfilter",7,!1),Ct=A(t,"strings",7,void 0),ye=A(t,"test",7,!1),se=A(t,"verifyurl",7,void 0),At=A(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),Ht=A(t,"workerurl",7,void 0);const{altchaI18n:Go}=globalThis,Zo=Go.store,gi=["SHA-256","SHA-384","SHA-512"],Wo="https://altcha.org/",Ke=(n,u)=>{t.$$host.dispatchEvent(new CustomEvent(n,{detail:u}))},_i=(Qi=(zi=document.documentElement.lang)==null?void 0:zi.split("-"))==null?void 0:Qi[0],Jr=Lt(()=>{var n;return s()&&new URL(s(),location.origin).host.endsWith(".altcha.org")&&!!((n=s())!=null&&n.includes("apiKey=ckey_"))}),wr=Lt(()=>c()?Ti(c()):void 0),Jo=Lt(()=>Ct()?Ti(Ct()):{}),U=Lt(()=>({...yi(a()),...o(Jo)})),mi=Lt(()=>`${Ne()||ot()}_checkbox_${Math.round(Math.random()*1e8)}`);let ut=P(null),Yt=P(!1),Z=P(null),R=P(je(w.UNVERIFIED)),q=P(void 0),Gt=P(null),Xe=P(null),_e=P(null),Kr=P(null),It=P(null),F=P(null),Zt=P(null),ft=P(null),Le=null,Q=P(null),ct=P(!1),ze=[],Xr=P(!1),Pe=P(null);Pr(()=>{sa(o(ft))}),Pr(()=>{ua(o(R))}),co(()=>{Ko(),p(Zt,null),o(F)&&(o(F).removeEventListener("submit",Ri),o(F).removeEventListener("reset",xi),o(F).removeEventListener("focusin",Ii),p(F,null)),Le&&(clearTimeout(Le),Le=null),document.removeEventListener("click",Ci),document.removeEventListener("scroll",Ai),window.removeEventListener("resize",Si)}),oi(()=>{var n;x("mounted","2.2.3"),x("workers",At()),ea(),x("plugins",ze.length?ze.map(u=>u.constructor.pluginName).join(", "):"none"),ye()&&x("using test mode"),B()&&zr(B()),l()!==void 0&&x("auto",l()),k()!==void 0&&Pi(k()),p(F,(n=o(q))==null?void 0:n.closest("form"),!0),o(F)&&(o(F).addEventListener("submit",Ri,{capture:!0}),o(F).addEventListener("reset",xi),(l()==="onfocus"||ne()==="focus")&&o(F).addEventListener("focusin",Ii)),Ae()&&Oi(!0),l()==="onload"&&(Je()?Wt():Ue()),o(Jr)&&(Me()||H())&&x("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{Ke("load")})});function Er(n,u){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:u.number,salt:n.salt,signature:n.signature,test:ye()?!0:void 0,took:u.took}))}function Ko(){for(const n of ze)n.destroy()}function bi(){s()&&!O()&&o(R)===w.VERIFIED?Ue():dt(w.EXPIRED,o(U).expired)}async function Xo(){if(jt())throw x("mocking error"),new Error("Mocked error.");if(o(wr))return x("using provided json data"),Ni(o(wr).salt),o(wr);if(ye())return x("generating test challenge",{test:ye()}),Eo(typeof ye()!="boolean"?+ye():void 0);{if(!s()&&o(F)){const v=o(F).getAttribute("action");v!=null&&v.includes("/form/")&&s(v+"/altcha")}if(!s())throw new Error("Attribute challengeurl not set.");x("fetching challenge from",s());const n={credentials:typeof d()=="boolean"?"include":d(),headers:De()!==!1?{"x-altcha-spam-filter":"1"}:{}},u=await pi()(s(),n);if(!u||!(u instanceof Response))throw new Error("Custom fetch function did not return a response.");if(u.status!==200)throw new Error(`Server responded with ${u.status}.`);const g=u.headers.get("X-Altcha-Config"),_=await u.json();if(Ni(_.salt),g)try{const v=JSON.parse(g);v&&typeof v=="object"&&(v.verifyurl&&!v.verifyurl.startsWith("fn:")&&(v.verifyurl=Ei(v.verifyurl)),Mi(v))}catch(v){x("unable to configure from X-Altcha-Config",v)}return _}}function zo(n){var g,_;const u=(g=o(F))==null?void 0:g.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((_=u==null?void 0:u.value)==null?void 0:_.slice(u.value.indexOf("@")))||void 0}function pi(){let n=fetch;if(b())if(x("using customfetch"),typeof b()=="string"){if(n=globalThis[b()]||null,!n)throw new Error(`Custom fetch function not found: ${b()}`)}else n=b();return n}function yi(n,u=[We()||"",document.documentElement.lang||"",...navigator.languages]){const g=Object.keys(n).map(v=>v.toLowerCase()),_=u.reduce((v,E)=>(E=E.toLowerCase(),v||(n[E]?E:null)||g.find(I=>E.split("-")[0]===I.split("-")[0])||null),null);return n[_||"en"]}function Qo(){return De()==="ipAddress"?{blockedCountries:void 0,classifier:void 0,disableRules:void 0,email:!1,expectedCountries:void 0,expectedLanguages:void 0,fields:!1,ipAddress:void 0,text:void 0,timeZone:void 0}:typeof De()=="object"?De():{blockedCountries:void 0,classifier:void 0,disableRules:void 0,email:void 0,expectedCountries:void 0,expectedLanguages:void 0,fields:void 0,ipAddress:void 0,text:void 0,timeZone:void 0}}function wi(n){var g;return[...((g=o(F))==null?void 0:g.querySelectorAll(n!=null&&n.length?n.map(_=>`input[name="${_}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((_,v)=>{const E=v.name,I=v.value;return E&&I&&(_[E]=/\n/.test(I)?I.replace(new RegExp("(?<!\\r)\\n","g"),`\r
3
+ `):I),_},{})}function Ei(n,u){const g=new URL(s()||location.origin),_=new URL(n,g);if(_.search||(_.search=g.search),u)for(const v in u)u[v]!==void 0&&u[v]!==null&&_.searchParams.set(v,u[v]);return _.toString()}function ea(){const n=yr()!==void 0?yr().split(","):void 0;for(const u of globalThis.altchaPlugins)(!n||n.includes(u.pluginName))&&ze.push(new u({el:o(q),clarify:Wt,dispatch:Ke,getConfiguration:Ui,getFloatingAnchor:qi,getState:ji,log:x,reset:dt,solve:Vi,setState:Oe,setFloatingAnchor:Bi,verify:Ue}))}function x(...n){(h()||n.some(u=>u instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${ot()}]`,...n)}function ta(){p(Q,te.PAUSED,!0)}function ra(n){p(Q,te.ERROR,!0)}function na(){p(Q,te.READY,!0)}function ia(){p(Q,te.LOADING,!0)}function la(){p(Q,te.PLAYING,!0)}function oa(){p(Q,te.PAUSED,!0)}function aa(n){var u;if(n.preventDefault(),n.stopPropagation(),o(Z)){const g=new FormData(n.target),_=String(g.get("code"));if((u=se())!=null&&u.startsWith("fn:")){const v=se().replace(/^fn:/,"");if(x(`calling ${v} function instead of verifyurl`),!(v in globalThis))throw new Error(`Global function "${v}" is undefined.`);return globalThis[v]({challenge:o(Z).challenge,code:_,solution:o(Z).solution})}p(ct,!0),Di(Er(o(Z).challenge,o(Z).solution),_).then(({reason:v,verified:E})=>{E?(p(Z,null),Oe(w.VERIFIED),x("verified"),jr().then(()=>{var I;(I=o(Kr))==null||I.focus(),Ke("verified",{payload:o(Pe)}),l()==="onsubmit"?Li(o(Zt)):Ae()&&Jt()})):(dt(),p(ft,v||"Verification failed",!0))}).catch(v=>{p(Z,null),Oe(w.ERROR,v),x("sentinel verification failed:",v)}).finally(()=>{p(ct,!1)})}}function Ci(n){var g;const u=n.target;k()&&u&&!o(q).contains(u)&&(o(R)===w.VERIFIED&&ne()===!1||o(R)===w.VERIFIED&&ne()==="focus"&&!((g=o(F))!=null&&g.matches(":focus-within"))||l()==="off"&&o(R)===w.UNVERIFIED)&&Jt()}function Ai(){k()&&o(R)!==w.UNVERIFIED&&Kt()}function sa(n){for(const u of ze)typeof u.onErrorChange=="function"&&u.onErrorChange(o(ft))}function Ii(n){o(R)===w.UNVERIFIED?Ue():k()&&ne()==="focus"&&o(R)===w.VERIFIED&&Cr()}function Ri(n){var _;const u=n.target;u!=null&&u.hasAttribute("data-code-challenge-form")||(p(Zt,n.submitter,!0),o(F)&&l()==="onsubmit"?((_=o(Zt))==null||_.blur(),o(R)===w.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),Ue().then(()=>{Li(o(Zt))})):o(R)!==w.VERIFIED&&(n.preventDefault(),n.stopPropagation(),o(R)===w.VERIFYING&&ki())):o(F)&&k()&&l()==="off"&&o(R)===w.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),Cr()))}function xi(){dt()}function ki(){o(R)===w.VERIFYING&&o(U).waitAlert&&alert(o(U).waitAlert)}function $i(){o(Xe)?o(Xe).paused?(o(Xe).currentTime=0,o(Xe).play()):o(Xe).pause():(p(Xr,!0),requestAnimationFrame(()=>{var n;(n=o(Xe))==null||n.play()}))}function ua(n){for(const u of ze)typeof u.onStateChange=="function"&&u.onStateChange(o(R));k()&&o(R)!==w.UNVERIFIED&&requestAnimationFrame(()=>{Kt()}),p(Yt,o(R)===w.VERIFIED),Ae()&&o(_e)&&(o(R)!==w.UNVERIFIED?Cr():Jt())}function Si(){k()&&Kt()}function Ti(n){return JSON.parse(n)}function Ni(n){var _;const u=new URLSearchParams((_=n.split("?"))==null?void 0:_[1]),g=u.get("expires")||u.get("expire");if(g){const v=new Date(+g*1e3),E=isNaN(v.getTime())?0:v.getTime()-Date.now();E>0&&zr(E)}else Le&&(clearTimeout(Le),Le=null)}async function fa(n){if(!se())throw new Error("Attribute verifyurl not set.");x("requesting server verification from",se());const u={payload:n};if(De()!==!1){const{blockedCountries:v,classifier:E,disableRules:I,email:G,expectedLanguages:j,expectedCountries:ie,fields:de,ipAddress:ht,text:xt,timeZone:gt}=Qo();u.blockedCountries=v,u.classifier=E,u.disableRules=I,u.email=G===!1?void 0:zo(G),u.expectedCountries=ie,u.expectedLanguages=j||(_i?[_i]:void 0),u.fields=de===!1?void 0:wi(de),u.ipAddress=ht===!1?void 0:ht||"auto",u.text=xt,u.timeZone=gt===!1?void 0:gt||di()}const g=await pi()(se(),{body:JSON.stringify(u),headers:{"content-type":"application/json"},method:"POST"});if(!g||!(g instanceof Response))throw new Error("Custom fetch function did not return a response.");if(g.status!==200)throw new Error(`Server responded with ${g.status}.`);const _=await g.json();if(_!=null&&_.payload&&p(Pe,_.payload,!0),Ke("serververification",_),f()&&_.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}async function Di(n,u){if(!se())throw new Error("Attribute verifyurl not set.");x("requesting sentinel verification from",se());const g={code:u,payload:n};st()&&(g.fields=st().fields?wi():void 0,g.timeZone=st().timeZone?di():void 0);const _=await fetch(se(),{body:JSON.stringify(g),headers:{"content-type":"application/json"},method:"POST"});if(!_||!(_ instanceof Response))throw new Error("Fetch function did not return a response.");if(_.status!==200)throw new Error(`Server responded with ${_.status}.`);const v=await _.json();return v!=null&&v.payload&&p(Pe,v.payload,!0),Ke("sentinelverification",v),v}function Li(n){var u;o(F)&&"requestSubmit"in o(F)?o(F).requestSubmit(n):(u=o(F))!=null&&u.reportValidity()&&(n?n.click():o(F).submit())}function zr(n){x("expire",n),Le&&(clearTimeout(Le),Le=null),n<1?bi():Le=setTimeout(bi,n)}function Pi(n){x("floating",n),k()!==n&&(o(q).style.left="",o(q).style.top=""),k(n===!0||n===""?"auto":n===!1||n==="false"?void 0:k()),k()?(l()||l("onsubmit"),document.addEventListener("scroll",Ai),document.addEventListener("click",Ci),window.addEventListener("resize",Si)):l()==="onsubmit"&&l(void 0)}function Oi(n){var u,g;if(x("overlay",n),Ae(n),n){if(l()||l("onsubmit"),o(_e)&&o(q).parentElement&&o(_e).replaceWith(o(q).parentElement),(g=(u=o(q))==null?void 0:u.parentElement)!=null&&g.parentElement){p(_e,document.createElement("div"),!0),o(q).parentElement.parentElement.appendChild(o(_e));const _=document.createElement("div"),v=document.createElement("button");v.type="button",v.innerHTML="&times;",v.addEventListener("click",E=>{E.preventDefault(),dt()}),o(_e).classList.add("altcha-overlay-backdrop"),v.classList.add("altcha-overlay-close-button"),_.classList.add("altcha-overlay"),o(_e).append(_),_.append(v),Bt()&&_.append(...document.querySelectorAll(Bt())),_.append(o(q).parentElement)}}else o(_e)&&o(q).parentElement&&(o(_e).replaceWith(o(q).parentElement),o(q).style.display="block")}function Fi(n){if(!n.algorithm)throw new Error("Invalid challenge. Property algorithm is missing.");if(n.signature===void 0)throw new Error("Invalid challenge. Property signature is missing.");if(!gi.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${gi.join(", ")}`);if(!n.challenge||n.challenge.length<40)throw new Error("Challenge is too short. Min. 40 chars.");if(!n.salt||n.salt.length<10)throw new Error("Salt is too short. Min. 10 chars.")}async function Vi(n){let u=null,g=null;if("Worker"in window){try{u=ca(n,n.maxNumber||n.maxnumber||at()),p(ut,u.controller,!0),g=await u.promise}catch(_){x(_)}finally{p(ut,null)}if(g===null||(g==null?void 0:g.number)!==void 0||"obfuscated"in n)return{data:n,solution:g}}if("obfuscated"in n){const _=await Ro(n.obfuscated,n.key,n.maxNumber||n.maxnumber);return{data:n,solution:await _.promise}}u=Co(n.challenge,n.salt,n.algorithm,n.maxNumber||n.maxnumber||at()),p(ut,u.controller,!0);try{g=await u.promise}catch(_){x(_)}finally{p(ut,null)}return{data:n,solution:g}}function ca(n,u=typeof ye()=="number"?ye():n.maxNumber||n.maxnumber||at(),g=Math.ceil(At())){const _=new AbortController,v=[];g=Math.min(16,u,Math.max(1,g));for(let G=0;G<g;G++)v.push(altchaCreateWorker(Ht()));const E=Math.ceil(u/g);return{promise:(async()=>{const G=await Promise.all(v.map((j,ie)=>{const de=ie*E;return _.signal.addEventListener("abort",()=>{j.postMessage({type:"abort"})}),new Promise(ht=>{j.addEventListener("message",xt=>{if(xt.data)for(const gt of v)gt!==j&&gt.postMessage({type:"abort"});ht(xt.data)}),j.postMessage({payload:n,max:de+E,start:de,type:"work"})})}));for(const j of v)j.terminate();return G.find(j=>!!j)||null})(),controller:_}}async function Wt(){if(!Je()){Oe(w.ERROR);return}const n=ze.find(u=>u.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){Oe(w.ERROR),x("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in n&&typeof n.clarify=="function")return n.clarify()}function Mi(n){n.obfuscated!==void 0&&Je(n.obfuscated),n.auto!==void 0&&(l(n.auto),l()==="onload"&&(Je()?Wt():Ue())),n.blockspam!==void 0&&f(!!n.blockspam),n.customfetch!==void 0&&b(n.customfetch),n.floatinganchor!==void 0&&re(n.floatinganchor),n.delay!==void 0&&m(n.delay),n.floatingoffset!==void 0&&ce(n.floatingoffset),n.floating!==void 0&&Pi(n.floating),n.expire!==void 0&&(zr(n.expire),B(n.expire)),n.challenge&&(c(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),Fi(o(wr))),n.challengeurl!==void 0&&s(n.challengeurl),n.debug!==void 0&&h(!!n.debug),n.hidefooter!==void 0&&Me(!!n.hidefooter),n.hidelogo!==void 0&&H(!!n.hidelogo),n.language!==void 0&&Ct(yi(a(),[n.language])),n.maxnumber!==void 0&&at(+n.maxnumber),n.mockerror!==void 0&&jt(!!n.mockerror),n.name!==void 0&&ot(n.name),n.overlaycontent!==void 0&&Bt(n.overlaycontent),n.overlay!==void 0&&Oi(n.overlay),n.refetchonexpire!==void 0&&O(!n.refetchonexpire),n.disablerefetchonexpire!==void 0&&O(!n.disablerefetchonexpire),n.sentinel!==void 0&&typeof n.sentinel=="object"&&st(n.sentinel),n.spamfilter!==void 0&&De(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&Ct(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&ye(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&se(n.verifyurl),n.workers!==void 0&&At(+n.workers),n.workerurl!==void 0&&Ht(n.workerurl)}function Ui(){return{auto:l(),blockspam:f(),challengeurl:s(),debug:h(),delay:m(),disableautofocus:y(),disablerefetchonexpire:O(),expire:B(),floating:k(),floatinganchor:re(),floatingoffset:ce(),hidefooter:Me(),hidelogo:H(),name:ot(),maxnumber:at(),mockerror:jt(),obfuscated:Je(),overlay:Ae(),refetchonexpire:!O(),spamfilter:De(),strings:o(U),test:ye(),verifyurl:se(),workers:At(),workerurl:Ht()}}function qi(){return o(It)}function da(n){return ze.find(u=>u.constructor.pluginName===n)}function ji(){return o(R)}function Jt(){o(q).style.display="none",Ae()&&o(_e)&&(o(_e).style.display="none")}function Kt(n=20){var u;if(o(q))if(o(It)||p(It,(re()?document.querySelector(re()):(u=o(F))==null?void 0:u.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||o(F),!0),o(It)){const g=parseInt(ce(),10)||12,_=o(It).getBoundingClientRect(),v=o(q).getBoundingClientRect(),E=document.documentElement.clientHeight,I=document.documentElement.clientWidth,G=k()==="auto"?_.bottom+v.height+g+n>E:k()==="top",j=Math.max(n,Math.min(I-n-v.width,_.left+_.width/2-v.width/2));if(G?o(q).style.top=`${_.top-(v.height+g)}px`:o(q).style.top=`${_.bottom+g}px`,o(q).style.left=`${j}px`,o(q).setAttribute("data-floating",G?"top":"bottom"),o(Gt)){const ie=o(Gt).getBoundingClientRect();o(Gt).style.left=_.left-j+_.width/2-ie.width/2+"px"}}else x("unable to find floating anchor element")}function dt(n=w.UNVERIFIED,u=null){o(ut)&&(o(ut).abort(),p(ut,null)),p(Yt,!1),p(Pe,null),p(Z,null),p(Xr,!1),p(Q,null),Oe(n,u)}function Bi(n){p(It,n,!0)}function Oe(n,u=null){p(R,n,!0),p(ft,u,!0),Ke("statechange",{payload:o(Pe),state:o(R)})}function Cr(){o(q).style.display="block",k()&&Kt(),Ae()&&o(_e)&&(o(_e).style.display="flex")}async function Ue(){return dt(w.VERIFYING),await new Promise(n=>setTimeout(n,m()||0)),Xo().then(n=>(Fi(n),x("challenge",n),Vi(n))).then(({data:n,solution:u})=>{var g;if(x("solution",u),!u||n&&"challenge"in n&&!("clearText"in u)){if((u==null?void 0:u.number)!==void 0&&"challenge"in n)if(se()&&"codeChallenge"in n)["INPUT","BUTTON","SELECT","TEXTAREA"].includes(((g=document.activeElement)==null?void 0:g.tagName)||"")&&y()===!1&&document.activeElement.blur(),p(Z,{challenge:n,solution:u},!0);else{if(se()&&st()!==void 0)return Di(Er(n,u));if(se())return fa(Er(n,u));p(Pe,Er(n,u),!0),x("payload",o(Pe))}else if(o(R)!==w.EXPIRED)throw x("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}}).then(()=>{o(Z)?(Oe(w.CODE),jr().then(()=>{Ke("code",{codeChallenge:o(Z)})})):o(Pe)&&(Oe(w.VERIFIED),x("verified"),jr().then(()=>{Ke("verified",{payload:o(Pe)}),Ae()&&Jt()}))}).catch(n=>{x(n),Oe(w.ERROR,n.message)})}var Hi=Yo(),Yi=Dt(Hi);no(Yi,t,"default",{});var Rt=X(Yi,2),Qr=K(Rt),Ar=K(Qr);let Gi;var Zi=K(Ar);{var va=n=>{Wr(n)};z(Zi,n=>{o(R)===w.VERIFYING&&n(va)})}var vt=X(Zi,2);ri(vt),vt.__change=[So,R,De,F,Yt,Je,Wt,Ue],_r(vt,n=>p(Kr,n),()=>o(Kr)),J(Ar);var Ir=X(Ar,2),ha=K(Ir);{var ga=n=>{var u=gr(),g=Dt(u);lt(g,()=>o(U).verified),Y(n,u)},_a=(n,u)=>{{var g=v=>{var E=gr(),I=Dt(E);lt(I,()=>o(U).verifying),Y(v,E)},_=(v,E)=>{{var I=j=>{var ie=gr(),de=Dt(ie);lt(de,()=>o(U).verificationRequired),Y(j,ie)},G=j=>{var ie=gr(),de=Dt(ie);lt(de,()=>o(U).label),Y(j,ie)};z(v,j=>{o(R)===w.CODE?j(I):j(G,!1)},E)}};z(n,v=>{o(R)===w.VERIFYING?v(g):v(_,!1)},u)}};z(ha,n=>{o(R)===w.VERIFIED?n(ga):n(_a,!1)})}J(Ir);var Wi=X(Ir,2);{var ma=n=>{var u=No();ri(u),ke(()=>{T(u,"name",ot()),so(u,o(Pe))}),Y(n,u)};z(Wi,n=>{o(R)===w.VERIFIED&&n(ma)})}var Ji=X(Wi,2);{var ba=n=>{var u=Do(),g=K(u);T(g,"href",Wo),J(u),ke(()=>T(g,"aria-label",o(U).ariaLinkLabel)),Y(n,u)};z(Ji,n=>{(H()!==!0||o(Jr))&&n(ba)})}var pa=X(Ji,2);{var ya=n=>{var u=Mo(),g=X(K(u),2),_=K(g),v=X(_,2);Kl(v,!y()),v.__keydown=[ko,$i];var E=X(v,2),I=K(E),G=K(I);{var j=Ie=>{var ee=Fo();ee.__click=$i;var Rr=K(ee);{var Xt=kt=>{Wr(kt,()=>20)},ka=(kt,$a)=>{{var Sa=$t=>{var en=Lo();Y($t,en)},Ta=($t,en)=>{{var Na=St=>{var tn=Po();Y(St,tn)},Da=St=>{var tn=Oo();Y(St,tn)};z($t,St=>{o(Q)===te.PLAYING?St(Na):St(Da,!1)},en)}};z(kt,$t=>{o(Q)===te.ERROR?$t(Sa):$t(Ta,!1)},$a)}};z(Rr,kt=>{o(Q)===te.LOADING?kt(Xt):kt(ka,!1)})}J(ee),ke(()=>{T(ee,"title",o(U).getAudioChallenge),ee.disabled=o(Q)===te.LOADING||o(Q)===te.ERROR||o(ct),T(ee,"aria-label",o(Q)===te.LOADING?o(U).loading:o(U).getAudioChallenge)}),Y(Ie,ee)};z(G,Ie=>{o(Z).challenge.codeChallenge.audio&&Ie(j)})}var ie=X(G,2);ie.__click=[$o,Ue],J(I);var de=X(I,2),ht=K(de);{var xt=Ie=>{Wr(Ie,()=>16)};z(ht,Ie=>{o(ct)&&Ie(xt)})}var gt=X(ht);J(de),J(E);var Ra=X(E,2);{var xa=Ie=>{var ee=Vo(),Rr=K(ee);J(ee),_r(ee,Xt=>p(Xe,Xt),()=>o(Xe)),ke(Xt=>T(Rr,"src",Xt),[()=>Ei(o(Z).challenge.codeChallenge.audio,{language:We()})]),Ze("loadstart",ee,ia),Ze("canplay",ee,na),Ze("pause",ee,oa),Ze("playing",ee,la),Ze("ended",ee,ta),Ze("error",Rr,ra),Y(Ie,ee)};z(Ra,Ie=>{o(Z).challenge.codeChallenge.audio&&o(Xr)&&Ie(xa)})}J(g),J(u),ke(()=>{T(u,"aria-label",o(U).verificationRequired),T(_,"src",o(Z).challenge.codeChallenge.image),T(v,"minlength",o(Z).challenge.codeChallenge.length||1),T(v,"maxlength",o(Z).challenge.codeChallenge.length),T(v,"placeholder",o(U).enterCode),T(v,"aria-label",o(Q)===te.LOADING?o(U).loading:o(Q)===te.PLAYING?"":o(U).enterCodeAria),T(v,"aria-live",o(Q)?"assertive":"polite"),T(v,"aria-busy",o(Q)===te.LOADING),v.disabled=o(ct),T(ie,"aria-label",o(U).reload),T(ie,"title",o(U).reload),ie.disabled=o(ct),de.disabled=o(ct),T(de,"aria-label",o(U).verify),eo(gt,` ${o(U).verify??""}`)}),Ze("submit",g,aa,!0),Y(n,u)};z(pa,n=>{var u;(u=o(Z))!=null&&u.challenge.codeChallenge&&n(ya)})}J(Qr);var Ki=X(Qr,2);{var wa=n=>{var u=jo(),g=X(K(u),2);{var _=E=>{var I=Uo(),G=K(I);lt(G,()=>o(U).expired),J(I),ke(()=>T(I,"title",o(ft))),Y(E,I)},v=E=>{var I=qo(),G=K(I);lt(G,()=>o(U).error),J(I),ke(()=>T(I,"title",o(ft))),Y(E,I)};z(g,E=>{o(R)===w.EXPIRED?E(_):E(v,!1)})}J(u),Y(n,u)};z(Ki,n=>{(o(ft)||o(R)===w.EXPIRED)&&n(wa)})}var Xi=X(Ki,2);{var Ea=n=>{var u=Bo(),g=K(u),_=K(g);lt(_,()=>o(U).footer),J(g),J(u),Y(n,u)};z(Xi,n=>{o(U).footer&&(Me()!==!0||o(Jr))&&n(Ea)})}var Ca=X(Xi,2);{var Aa=n=>{var u=Ho();_r(u,g=>p(Gt,g),()=>o(Gt)),Y(n,u)};z(Ca,n=>{k()&&n(Aa)})}J(Rt),_r(Rt,n=>p(q,n),()=>o(q)),ke(n=>{T(Rt,"data-state",o(R)),T(Rt,"data-floating",k()),T(Rt,"data-overlay",Ae()),Gi=lo(Ar,1,"altcha-checkbox",null,Gi,n),T(vt,"id",o(mi)),vt.required=l()!=="onsubmit"&&(!k()||l()!=="off"),T(Ir,"for",o(mi))},[()=>({"altcha-checkbox-verifying":o(R)===w.VERIFYING})]),Ze("invalid",vt,ki),fo(vt,()=>o(Yt),n=>p(Yt,n)),Y(e,Hi);var Ia=Zn({clarify:Wt,configure:Mi,getConfiguration:Ui,getFloatingAnchor:qi,getPlugin:da,getState:ji,hide:Jt,repositionFloating:Kt,reset:dt,setFloatingAnchor:Bi,setState:Oe,show:Cr,verify:Ue,get auto(){return l()},set auto(n=void 0){l(n),C()},get blockspam(){return f()},set blockspam(n=void 0){f(n),C()},get challengeurl(){return s()},set challengeurl(n=void 0){s(n),C()},get challengejson(){return c()},set challengejson(n=void 0){c(n),C()},get credentials(){return d()},set credentials(n=void 0){d(n),C()},get customfetch(){return b()},set customfetch(n=void 0){b(n),C()},get debug(){return h()},set debug(n=!1){h(n),C()},get delay(){return m()},set delay(n=0){m(n),C()},get disableautofocus(){return y()},set disableautofocus(n=!1){y(n),C()},get refetchonexpire(){return L()},set refetchonexpire(n=!0){L(n),C()},get disablerefetchonexpire(){return O()},set disablerefetchonexpire(n=!L){O(n),C()},get expire(){return B()},set expire(n=void 0){B(n),C()},get floating(){return k()},set floating(n=void 0){k(n),C()},get floatinganchor(){return re()},set floatinganchor(n=void 0){re(n),C()},get floatingoffset(){return ce()},set floatingoffset(n=void 0){ce(n),C()},get floatingpersist(){return ne()},set floatingpersist(n=!1){ne(n),C()},get hidefooter(){return Me()},set hidefooter(n=!1){Me(n),C()},get hidelogo(){return H()},set hidelogo(n=!1){H(n),C()},get id(){return Ne()},set id(n=void 0){Ne(n),C()},get language(){return We()},set language(n=void 0){We(n),C()},get name(){return ot()},set name(n="altcha"){ot(n),C()},get maxnumber(){return at()},set maxnumber(n=1e6){at(n),C()},get mockerror(){return jt()},set mockerror(n=!1){jt(n),C()},get obfuscated(){return Je()},set obfuscated(n=void 0){Je(n),C()},get overlay(){return Ae()},set overlay(n=void 0){Ae(n),C()},get overlaycontent(){return Bt()},set overlaycontent(n=void 0){Bt(n),C()},get plugins(){return yr()},set plugins(n=void 0){yr(n),C()},get sentinel(){return st()},set sentinel(n=void 0){st(n),C()},get spamfilter(){return De()},set spamfilter(n=!1){De(n),C()},get strings(){return Ct()},set strings(n=void 0){Ct(n),C()},get test(){return ye()},set test(n=!1){ye(n),C()},get verifyurl(){return se()},set verifyurl(n=void 0){se(n),C()},get workers(){return At()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){At(n),C()},get workerurl(){return Ht()},set workerurl(n=void 0){Ht(n),C()}});return i(),Ia}Ql(["change","keydown","click"]),customElements.define("altcha-widget",yo(vi,{blockspam:{type:"Boolean"},debug:{type:"Boolean"},delay:{type:"Number"},disableautofocus:{type:"Boolean"},disablerefetchonexpire:{type:"Boolean"},expire:{type:"Number"},floatingoffset:{type:"Number"},hidefooter:{type:"Boolean"},hidelogo:{type:"Boolean"},maxnumber:{type:"Number"},mockerror:{type:"Boolean"},refetchonexpire:{type:"Boolean"},test:{type:"Boolean"},workers:{type:"Number"},auto:{},challengeurl:{},challengejson:{},credentials:{},customfetch:{},floating:{},floatinganchor:{},floatingpersist:{},id:{},language:{},name:{},obfuscated:{},overlay:{},overlaycontent:{},plugins:{},sentinel:{},spamfilter:{},strings:{},verifyurl:{},workerurl:{}},["default"],["clarify","configure","getConfiguration","getFloatingAnchor","getPlugin","getState","hide","repositionFloating","reset","setFloatingAnchor","setState","show","verify"],!1)),globalThis.altchaCreateWorker=e=>new Worker(new URL(e||"./worker.js",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:S&&S.tagName.toUpperCase()==="SCRIPT"&&S.src||new URL("altcha.umd.cjs",document.baseURI).href)),$.Altcha=vi,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "altcha",
3
3
  "description": "Privacy-first CAPTCHA widget, compliant with global regulations (GDPR/HIPAA/CCPA/LGDP/DPDPA/PIPL) and WCAG accessible. No tracking, self-verifying.",
4
- "version": "2.2.2",
4
+ "version": "2.2.3",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Daniel Regeci",