altcha 2.2.2 → 2.2.4

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,4 +1,4 @@
1
- (function(S,D){typeof exports=="object"&&typeof module<"u"?D(exports):typeof define=="function"&&define.amd?define(["exports"],D):(S=typeof globalThis<"u"?globalThis:S||self,D(S.altcha={}))})(this,function(S){"use strict";var Fl=Object.defineProperty;var to=S=>{throw TypeError(S)};var Ml=(S,D,W)=>D in S?Fl(S,D,{enumerable:!0,configurable:!0,writable:!0,value:W}):S[D]=W;var Re=(S,D,W)=>Ml(S,typeof D!="symbol"?D+"":D,W),ro=(S,D,W)=>D.has(S)||to("Cannot "+W);var he=(S,D,W)=>(ro(S,D,"read from private field"),W?W.call(S):D.get(S)),tn=(S,D,W)=>D.has(S)?to("Cannot add the same private member more than once"):D instanceof WeakSet?D.add(S):D.set(S,W),rn=(S,D,W,Kt)=>(ro(S,D,"write to private field"),Kt?Kt.call(S,W):D.set(S,W),W);var gi,Ve,ye;const D=`(function(){"use strict";const d=new TextEncoder;function p(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function b(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 p(await crypto.subtle.digest(r.toUpperCase(),d.encode(e+t)))}function w(e,t,r="SHA-256",n=1e6,s=0){const o=new AbortController,a=Date.now();return{promise:(async()=>{for(let c=s;c<=n;c+=1){if(o.signal.aborted)return null;if(await b(t,c,r)===e)return{number:c,took:Date.now()-a}}return null})(),controller:o}}function h(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function g(e,t=12){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e%256,e=Math.floor(e/256);return r}async function m(e,t="",r=1e6,n=0){const s="AES-GCM",o=new AbortController,a=Date.now(),l=async()=>{for(let u=n;u<=r;u+=1){if(o.signal.aborted||!c||!y)return null;try{const f=await crypto.subtle.decrypt({name:s,iv:g(u)},c,y);if(f)return{clearText:new TextDecoder().decode(f),took:Date.now()-a}}catch{}}return null};let c=null,y=null;try{y=h(e);const u=await crypto.subtle.digest("SHA-256",d.encode(t));c=await crypto.subtle.importKey("raw",u,s,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:l(),controller:o}}let i;onmessage=async e=>{const{type:t,payload:r,start:n,max:s}=e.data;let o=null;if(t==="abort")i==null||i.abort(),i=void 0;else if(t==="work"){if("obfuscated"in r){const{key:a,obfuscated:l}=r||{};o=await m(l,a,s,n)}else{const{algorithm:a,challenge:l,salt:c}=r||{};o=w(l,c,a,s,n)}i=o.controller,o.promise.then(a=>{self.postMessage(a&&{...a,worker:!0})})}}})();
2
- `,W=typeof self<"u"&&self.Blob&&new Blob([D],{type:"text/javascript;charset=utf-8"});function Kt(e){let t;try{if(t=W&&(self.URL||self.webkitURL).createObjectURL(W),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(D),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}const no="5";typeof window<"u"&&((gi=window.__svelte??(window.__svelte={})).v??(gi.v=new Set)).add(no);const io=1,oo=4,ao=8,lo=16,so=1,uo=2,Ar="[",nn="[!",on="]",ht={},ue=Symbol(),fo="http://www.w3.org/1999/xhtml",an=!1;function ln(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var sn=Array.isArray,co=Array.prototype.indexOf,ho=Array.from,Xt=Object.keys,St=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,vo=Object.getOwnPropertyDescriptors,go=Object.prototype,po=Array.prototype,un=Object.getPrototypeOf,fn=Object.isExtensible;const vt=()=>{};function cn(e){for(var t=0;t<e.length;t++)e[t]()}function mo(e,t,r=!1){return e===void 0?r?t():t:e}const Ee=2,dn=4,Qt=8,Ir=16,Me=32,Qe=64,er=128,ve=256,tr=512,fe=1024,Se=2048,et=4096,gt=8192,rr=16384,_o=32768,Rr=65536,bo=1<<19,hn=1<<20,Sr=1<<21,$t=Symbol("$state"),vn=Symbol("legacy props"),yo=Symbol("");function wo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Eo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Co(e){throw new Error("https://svelte.dev/e/effect_orphan")}function xo(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ko(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ao(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Io(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ro(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function So(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function nr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let F=!1;function pt(e){F=e}let M;function je(e){if(e===null)throw nr(),ht;return M=e}function mt(){return je(Be(M))}function Z(e){if(F){if(Be(M)!==null)throw nr(),ht;M=e}}function $o(){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===Ar||r===nn)&&(e+=1)}var i=Be(t);t.remove(),t=i}}let To=!1;function qe(e){if(typeof e!="object"||e===null||$t in e)return e;const t=un(e);if(t!==go&&t!==po)return e;var r=new Map,i=sn(e),l=P(0),o=N,f=s=>{var c=N;De(o);var d=s();return De(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)&&Io();var _=r.get(c);return _===void 0?(_=f(()=>P(d.value)),r.set(c,_)):b(_,f(()=>qe(d.value))),!0},deleteProperty(s,c){var d=r.get(c);if(d===void 0)c in s&&(r.set(c,f(()=>P(ue))),$r(l));else{if(i&&typeof c=="string"){var _=r.get("length"),v=Number(c);Number.isInteger(v)&&v<_.v&&b(_,v)}b(d,ue),$r(l)}return!0},get(s,c,d){var y;if(c===$t)return e;var _=r.get(c),v=c in s;if(_===void 0&&(!v||(y=Xe(s,c))!=null&&y.writable)&&(_=f(()=>P(qe(v?s[c]:ue))),r.set(c,_)),_!==void 0){var m=a(_);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 _=r.get(c);_&&(d.value=a(_))}else if(d===void 0){var v=r.get(c),m=v==null?void 0:v.v;if(v!==void 0&&m!==ue)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return d},has(s,c){var m;if(c===$t)return!0;var d=r.get(c),_=d!==void 0&&d.v!==ue||Reflect.has(s,c);if(d!==void 0||L!==null&&(!_||(m=Xe(s,c))!=null&&m.writable)){d===void 0&&(d=f(()=>P(_?qe(s[c]):ue)),r.set(c,d));var v=a(d);if(v===ue)return!1}return _},set(s,c,d,_){var te;var v=r.get(c),m=c in s;if(i&&c==="length")for(var y=d;y<v.v;y+=1){var T=r.get(y+"");T!==void 0?b(T,ue):y in s&&(T=f(()=>P(ue)),r.set(y+"",T))}v===void 0?(!m||(te=Xe(s,c))!=null&&te.writable)&&(v=f(()=>P(void 0)),b(v,f(()=>qe(d))),r.set(c,v)):(m=v.v!==ue,b(v,f(()=>qe(d))));var E=Reflect.getOwnPropertyDescriptor(s,c);if(E!=null&&E.set&&E.set.call(_,d),!m){if(i&&typeof c=="string"){var q=r.get("length"),pe=Number(c);Number.isInteger(pe)&&pe>=q.v&&b(q,pe+1)}$r(l)}return!0},ownKeys(s){a(l);var c=Reflect.ownKeys(s).filter(v=>{var m=r.get(v);return m===void 0||m.v!==ue});for(var[d,_]of r)_.v!==ue&&!(d in s)&&c.push(d);return c},setPrototypeOf(){Ro()}})}function $r(e,t=1){b(e,e.v+t)}var gn,pn,mn,_n;function Tr(){if(gn===void 0){gn=window,pn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;mn=Xe(t,"firstChild").get,_n=Xe(t,"nextSibling").get,fn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),fn(r)&&(r.__t=void 0)}}function ir(e=""){return document.createTextNode(e)}function _e(e){return mn.call(e)}function Be(e){return _n.call(e)}function z(e,t){if(!F)return _e(e);var r=_e(M);return r===null&&(r=M.appendChild(ir())),je(r),r}function Tt(e,t){if(!F){var r=_e(e);return r instanceof Comment&&r.data===""?Be(r):r}return M}function J(e,t=1,r=!1){let i=F?M:e;for(var l;t--;)l=i,i=Be(i);if(!F)return i;var o=i==null?void 0:i.nodeType;if(r&&o!==3){var f=ir();return i===null?l==null||l.after(f):i.before(f),je(f),f}return je(i),i}function Do(e){e.textContent=""}function bn(e){return e===this.v}function yn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Dr(e){return!yn(e,this.v)}function or(e){var t=Ee|Se,r=N!==null&&(N.f&Ee)!==0?N:null;return L===null||r!==null&&(r.f&ve)!==0?t|=ve:L.f|=hn,{ctx:ae,deps:null,effects:null,equals:bn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??L}}function Dt(e){const t=or(e);return Pn(t),t}function No(e){const t=or(e);return t.equals=Dr,t}function wn(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)He(t[r])}}function Lo(e){for(var t=e.parent;t!==null;){if((t.f&Ee)===0)return t;t=t.parent}return null}function En(e){var t,r=L;Ge(Lo(e));try{wn(e),t=Un(e)}finally{Ge(r)}return t}function Cn(e){var t=En(e),r=(We||(e.f&ve)!==0)&&e.deps!==null?et:fe;Ce(e,r),e.equals(t)||(e.v=t,e.wv=Fn())}function Po(e){L===null&&N===null&&Co(),N!==null&&(N.f&ve)!==0&&L===null&&Eo(),Pt&&wo()}function Oo(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function tt(e,t,r,i=!0){var l=L,o={ctx:ae,deps:null,nodes_start:null,nodes_end:null,f:e|Se,first:null,fn:t,last:null,next:null,parent:l,prev:null,teardown:null,transitions:null,wv:0};if(r)try{Ur(o),o.f|=_o}catch(c){throw He(o),c}else t!==null&&dr(o);var f=r&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&(hn|er))===0;if(!f&&i&&(l!==null&&Oo(o,l),N!==null&&(N.f&Ee)!==0)){var s=N;(s.effects??(s.effects=[])).push(o)}return o}function Nr(e){const t=tt(Qt,null,!1);return Ce(t,fe),t.teardown=e,t}function Lr(e){Po();var t=L!==null&&(L.f&Me)!==0&&ae!==null&&!ae.m;if(t){var r=ae;(r.e??(r.e=[])).push({fn:e,effect:L,reaction:N})}else{var i=Pr(e);return i}}function Fo(e){const t=tt(Qe,e,!0);return()=>{He(t)}}function Mo(e){const t=tt(Qe,e,!0);return(r={})=>new Promise(i=>{r.outro?Mr(t,()=>{He(t),i(void 0)}):(He(t),i(void 0))})}function Pr(e){return tt(dn,e,!1)}function Or(e){return tt(Qt,e,!0)}function $e(e,t=[],r=or){const i=t.map(r);return xn(()=>e(...i.map(a)))}function xn(e,t=0){return tt(Qt|Ir|t,e,!0)}function Fr(e,t=!0){return tt(Qt|Me,e,!0,t)}function kn(e){var t=e.teardown;if(t!==null){const r=Pt,i=N;Ln(!0),De(null);try{t.call(null)}finally{Ln(r),De(i)}}}function An(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var i=r.next;(r.f&Qe)!==0?r.parent=null:He(r,t),r=i}}function Vo(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Me)===0&&He(t),t=r}}function He(e,t=!0){var r=!1;(t||(e.f&bo)!==0)&&e.nodes_start!==null&&(In(e.nodes_start,e.nodes_end),r=!0),An(e,t&&!r),cr(e,0),Ce(e,rr);var i=e.transitions;if(i!==null)for(const o of i)o.stop();kn(e);var l=e.parent;l!==null&&l.first!==null&&Rn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function In(e,t){for(;e!==null;){var r=e===t?null:Be(e);e.remove(),e=r}}function Rn(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),Uo(r,()=>{He(e),t&&t()})}function Uo(e,t){var r=e.length;if(r>0){var i=()=>--r||t();for(var l of e)l.out(i)}else t()}function Sn(e,t,r){if((e.f&gt)===0){if(e.f^=gt,e.transitions!==null)for(const f of e.transitions)(f.is_global||r)&&t.push(f);for(var i=e.first;i!==null;){var l=i.next,o=(i.f&Rr)!==0||(i.f&Me)!==0;Sn(i,t,o?r:!1),i=l}}}function $n(e){Tn(e,!0)}function Tn(e,t){if((e.f&gt)!==0){e.f^=gt,(e.f&fe)===0&&(e.f^=fe),Ft(e)&&(Ce(e,Se),dr(e));for(var r=e.first;r!==null;){var i=r.next,l=(r.f&Rr)!==0||(r.f&Me)!==0;Tn(r,l?t:!1),r=i}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}const jo=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let Nt=[],Lt=[];function Dn(){var e=Nt;Nt=[],cn(e)}function Nn(){var e=Lt;Lt=[],cn(e)}function Vr(e){Nt.length===0&&queueMicrotask(Dn),Nt.push(e)}function qo(e){Lt.length===0&&jo(Nn),Lt.push(e)}function Bo(){Nt.length>0&&Dn(),Lt.length>0&&Nn()}let ar=!1,lr=!1,sr=null,rt=!1,Pt=!1;function Ln(e){Pt=e}let Ot=[],Vl=[],N=null,Te=!1;function De(e){N=e}let L=null;function Ge(e){L=e}let ie=null;function Pn(e){N!==null&&N.f&Sr&&(ie===null?ie=[e]:ie.push(e))}let oe=null,ge=0,be=null;function Ho(e){be=e}let On=1,ur=0,We=!1;function Fn(){return++On}function Ft(e){var v;var t=e.f;if((t&Se)!==0)return!0;if((t&et)!==0){var r=e.deps,i=(t&ve)!==0;if(r!==null){var l,o,f=(t&tr)!==0,s=i&&L!==null&&!We,c=r.length;if(f||s){var d=e,_=d.parent;for(l=0;l<c;l++)o=r[l],(f||!((v=o==null?void 0:o.reactions)!=null&&v.includes(d)))&&(o.reactions??(o.reactions=[])).push(d);f&&(d.f^=tr),s&&_!==null&&(_.f&ve)===0&&(d.f^=ve)}for(l=0;l<c;l++)if(o=r[l],Ft(o)&&Cn(o),o.wv>e.wv)return!0}(!i||L!==null&&!We)&&Ce(e,fe)}return!1}function Go(e,t){for(var r=t;r!==null;){if((r.f&er)!==0)try{r.fn(e);return}catch{r.f^=er}r=r.parent}throw ar=!1,e}function Mn(e){return(e.f&rr)===0&&(e.parent===null||(e.parent.f&er)===0)}function fr(e,t,r,i){if(ar){if(r===null&&(ar=!1),Mn(t))throw e;return}if(r!==null&&(ar=!0),Go(e,t),Mn(t))throw e}function Vn(e,t,r=!0){var i=e.reactions;if(i!==null)for(var l=0;l<i.length;l++){var o=i[l];ie!=null&&ie.includes(e)||((o.f&Ee)!==0?Vn(o,t,!1):t===o&&(r?Ce(o,Se):(o.f&fe)!==0&&Ce(o,et),dr(o)))}}function Un(e){var y;var t=oe,r=ge,i=be,l=N,o=We,f=ie,s=ae,c=Te,d=e.f;oe=null,ge=0,be=null,We=(d&ve)!==0&&(Te||!rt||N===null),N=(d&(Me|Qe))===0?e:null,ie=null,Hn(e.ctx),Te=!1,ur++,e.f|=Sr;try{var _=(0,e.fn)(),v=e.deps;if(oe!==null){var m;if(cr(e,ge),v!==null&&ge>0)for(v.length=ge+oe.length,m=0;m<oe.length;m++)v[ge+m]=oe[m];else e.deps=v=oe;if(!We)for(m=ge;m<v.length;m++)((y=v[m]).reactions??(y.reactions=[])).push(e)}else v!==null&&ge<v.length&&(cr(e,ge),v.length=ge);if(Yn()&&be!==null&&!Te&&v!==null&&(e.f&(Ee|et|Se))===0)for(m=0;m<be.length;m++)Vn(be[m],e);return l!==null&&l!==e&&(ur++,be!==null&&(i===null?i=be:i.push(...be))),_}finally{oe=t,ge=r,be=i,N=l,We=o,ie=f,Hn(s),Te=c,e.f^=Sr}}function Wo(e,t){let r=t.reactions;if(r!==null){var i=co.call(r,e);if(i!==-1){var l=r.length-1;l===0?r=t.reactions=null:(r[i]=r[l],r.pop())}}r===null&&(t.f&Ee)!==0&&(oe===null||!oe.includes(t))&&(Ce(t,et),(t.f&(ve|tr))===0&&(t.f^=tr),wn(t),cr(t,0))}function cr(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)Wo(e,r[i])}function Ur(e){var t=e.f;if((t&rr)===0){Ce(e,fe);var r=L,i=ae,l=rt;L=e,rt=!0;try{(t&Ir)!==0?Vo(e):An(e),kn(e);var o=Un(e);e.teardown=typeof o=="function"?o:null,e.wv=On;var f=e.deps,s;an&&To&&e.f&Se}catch(c){fr(c,e,r,i||e.ctx)}finally{rt=l,L=r}}}function Yo(){try{xo()}catch(e){if(sr!==null)fr(e,sr,null);else throw e}}function jn(){var e=rt;try{var t=0;for(rt=!0;Ot.length>0;){t++>1e3&&Yo();var r=Ot,i=r.length;Ot=[];for(var l=0;l<i;l++){var o=zo(r[l]);Zo(o)}Mt.clear()}}finally{lr=!1,rt=e,sr=null}}function Zo(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var i=e[r];if((i.f&(rr|gt))===0)try{Ft(i)&&(Ur(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?Rn(i):i.fn=null))}catch(l){fr(l,i,null,i.ctx)}}}function dr(e){lr||(lr=!0,queueMicrotask(jn));for(var t=sr=e;t.parent!==null;){t=t.parent;var r=t.f;if((r&(Qe|Me))!==0){if((r&fe)===0)return;t.f^=fe}}Ot.push(t)}function zo(e){for(var t=[],r=e;r!==null;){var i=r.f,l=(i&(Me|Qe))!==0,o=l&&(i&fe)!==0;if(!o&&(i&gt)===0){if((i&dn)!==0)t.push(r);else if(l)r.f^=fe;else try{Ft(r)&&Ur(r)}catch(c){fr(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 x(e){for(var t;;){if(Bo(),Ot.length===0)return t;lr=!0,jn()}}async function jr(){await Promise.resolve(),x()}function a(e){var t=e.f,r=(t&Ee)!==0;if(N!==null&&!Te){if(!(ie!=null&&ie.includes(e))){var i=N.deps;e.rv<ur&&(e.rv=ur,oe===null&&i!==null&&i[ge]===e?ge++:oe===null?oe=[e]:(!We||!oe.includes(e))&&oe.push(e))}}else if(r&&e.deps===null&&e.effects===null){var l=e,o=l.parent;o!==null&&(o.f&ve)===0&&(l.f^=ve)}return r&&(l=e,Ft(l)&&Cn(l)),Pt&&Mt.has(e)?Mt.get(e):e.v}function nt(e){var t=Te;try{return Te=!0,e()}finally{Te=t}}const Jo=-7169;function Ce(e,t){e.f=e.f&Jo|t}const Mt=new Map;function qn(e,t){var r={f:0,v:e,reactions:null,equals:bn,rv:0,wv:0};return r}function P(e,t){const r=qn(e);return Pn(r),r}function qr(e,t=!1){const r=qn(e);return t||(r.equals=Dr),r}function b(e,t,r=!1){N!==null&&!Te&&Yn()&&(N.f&(Ee|Ir))!==0&&!(ie!=null&&ie.includes(e))&&So();let i=r?qe(t):t;return Ko(e,i)}function Ko(e,t){if(!e.equals(t)){var r=e.v;Pt?Mt.set(e,t):Mt.set(e,r),e.v=t,(e.f&Ee)!==0&&((e.f&Se)!==0&&En(e),Ce(e,(e.f&ve)===0?fe:et)),e.wv=Fn(),Bn(e,Se),L!==null&&(L.f&fe)!==0&&(L.f&(Me|Qe))===0&&(be===null?Ho([e]):be.push(e))}return t}function Bn(e,t){var r=e.reactions;if(r!==null)for(var i=r.length,l=0;l<i;l++){var o=r[l],f=o.f;(f&Se)===0&&(Ce(o,t),(f&(fe|ve))!==0&&((f&Ee)!==0?Bn(o,et):dr(o)))}}let ae=null;function Hn(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};Nr(()=>{i.d=!0})}function Wn(e){const t=ae;if(t!==null){e!==void 0&&(t.x=e);const f=t.e;if(f!==null){var r=L,i=N;t.e=null;try{for(var l=0;l<f.length;l++){var o=f[l];Ge(o.effect),De(o.reaction),Pr(o.fn)}}finally{Ge(r),De(i)}}ae=t.p,t.m=!0}return e||{}}function Yn(){return!0}const Xo=["touchstart","touchmove"];function Qo(e){return Xo.includes(e)}function ea(e,t){if(t){const r=document.body;e.autofocus=!0,Vr(()=>{document.activeElement===r&&e.focus()})}}let Zn=!1;function zn(){Zn||(Zn=!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 Jn(e){var t=N,r=L;De(null),Ge(null);try{return e()}finally{De(t),Ge(r)}}function ta(e,t,r,i=r){e.addEventListener(t,()=>Jn(r));const l=e.__on_r;l?e.__on_r=()=>{l(),i(!0)}:e.__on_r=()=>i(!0),zn()}const Kn=new Set,Br=new Set;function ra(e,t,r,i={}){function l(o){if(i.capture||Vt.call(t,o),!o.cancelBubble)return Jn(()=>r==null?void 0:r.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Vr(()=>{t.addEventListener(e,l,i)}):t.addEventListener(e,l,i),l}function Ye(e,t,r,i,l){var o={capture:i,passive:l},f=ra(e,t,r,o);(t===document.body||t===window||t===document)&&Nr(()=>{t.removeEventListener(e,f,o)})}function na(e){for(var t=0;t<e.length;t++)Kn.add(e[t]);for(var r of Br)r(e)}function Vt(e){var te;var t=this,r=t.ownerDocument,i=e.type,l=((te=e.composedPath)==null?void 0:te.call(e))||[],o=l[0]||e.target,f=0,s=e.__root;if(s){var c=l.indexOf(s);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var d=l.indexOf(t);if(d===-1)return;c<=d&&(f=c)}if(o=l[f]||e.target,o!==t){St(e,"currentTarget",{configurable:!0,get(){return o||r}});var _=N,v=L;De(null),Ge(null);try{for(var m,y=[];o!==null;){var T=o.assignedSlot||o.parentNode||o.host||null;try{var E=o["__"+i];if(E!=null&&(!o.disabled||e.target===o))if(sn(E)){var[q,...pe]=E;q.apply(o,[e,...pe])}else E.call(o,e)}catch(le){m?y.push(le):m=le}if(e.cancelBubble||T===t||T===null)break;o=T}if(m){for(let le of y)queueMicrotask(()=>{throw le});throw m}}finally{e.__root=t,delete e.currentTarget,De(_),Ge(v)}}}function Hr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Ne(e,t){var r=L;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function xe(e,t){var r=(t&so)!==0,i=(t&uo)!==0,l,o=!e.startsWith("<!>");return()=>{if(F)return Ne(M,null),M;l===void 0&&(l=Hr(o?e:"<!>"+e),r||(l=_e(l)));var f=i||pn?document.importNode(l,!0):l.cloneNode(!0);if(r){var s=_e(f),c=f.lastChild;Ne(s,c)}else Ne(f,f);return f}}function hr(e,t,r="svg"){var i=!e.startsWith("<!>"),l=`<${r}>${i?e:"<!>"+e}</${r}>`,o;return()=>{if(F)return Ne(M,null),M;if(!o){var f=Hr(l),s=_e(f);o=_e(s)}var c=o.cloneNode(!0);return Ne(c,c),c}}function vr(){if(F)return Ne(M,null),M;var e=document.createDocumentFragment(),t=document.createComment(""),r=ir();return e.append(t,r),Ne(t,r),e}function B(e,t){if(F){L.nodes_end=M,mt();return}e!==null&&e.before(t)}function ia(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 Xn(e,t){return Qn(e,t)}function oa(e,t){Tr(),t.intro=t.intro??!1;const r=t.target,i=F,l=M;try{for(var o=_e(r);o&&(o.nodeType!==8||o.data!==Ar);)o=Be(o);if(!o)throw ht;pt(!0),je(o),mt();const f=Qn(e,{...t,anchor:o});if(M===null||M.nodeType!==8||M.data!==on)throw nr(),ht;return pt(!1),f}catch(f){if(f===ht)return t.recover===!1&&ko(),Tr(),Do(r),pt(!1),Xn(e,t);throw f}finally{pt(i),je(l)}}const _t=new Map;function Qn(e,{target:t,anchor:r,props:i={},events:l,context:o,intro:f=!0}){Tr();var s=new Set,c=v=>{for(var m=0;m<v.length;m++){var y=v[m];if(!s.has(y)){s.add(y);var T=Qo(y);t.addEventListener(y,Vt,{passive:T});var E=_t.get(y);E===void 0?(document.addEventListener(y,Vt,{passive:T}),_t.set(y,1)):_t.set(y,E+1)}}};c(ho(Kn)),Br.add(c);var d=void 0,_=Mo(()=>{var v=r??t.appendChild(ir());return Fr(()=>{if(o){Gn({});var m=ae;m.c=o}l&&(i.$$events=l),F&&Ne(v,null),d=e(v,i)||{},F&&(L.nodes_end=M),o&&Wn()}),()=>{var T;for(var m of s){t.removeEventListener(m,Vt);var y=_t.get(m);--y===0?(document.removeEventListener(m,Vt),_t.delete(m)):_t.set(m,y)}Br.delete(c),v!==r&&((T=v.parentNode)==null||T.removeChild(v))}});return Gr.set(d,_),d}let Gr=new WeakMap;function aa(e,t){const r=Gr.get(e);return r?(Gr.delete(e),r(t)):Promise.resolve()}function K(e,t,[r,i]=[0,0]){F&&r===0&&mt();var l=e,o=null,f=null,s=ue,c=r>0?Rr:0,d=!1;const _=(m,y=!0)=>{d=!0,v(y,m)},v=(m,y)=>{if(s===(s=m))return;let T=!1;if(F&&i!==-1){if(r===0){const q=l.data;q===Ar?i=0:q===nn?i=1/0:(i=parseInt(q.substring(1)),i!==i&&(i=s?1/0:-1))}const E=i>r;!!s===E&&(l=$o(),je(l),pt(!1),T=!0,i=-1)}s?(o?$n(o):y&&(o=Fr(()=>y(l))),f&&Mr(f,()=>{f=null})):(f?$n(f):y&&(f=Fr(()=>y(l,[r+1,i]))),o&&Mr(o,()=>{o=null})),T&&pt(!0)};xn(()=>{d=!1,t(_),d||v(null,null)},c),F&&(l=M)}function it(e,t,r=!1,i=!1,l=!1){var o=e,f="";$e(()=>{var s=L;if(f===(f=t()??"")){F&&mt();return}if(s.nodes_start!==null&&(In(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),f!==""){if(F){M.data;for(var c=mt(),d=c;c!==null&&(c.nodeType!==8||c.data!=="");)d=c,c=Be(c);if(c===null)throw nr(),ht;Ne(M,d),o=je(c);return}var _=f+"";r?_=`<svg>${_}</svg>`:i&&(_=`<math>${_}</math>`);var v=Hr(_);if((r||i)&&(v=_e(v)),Ne(_e(v),v.lastChild),r||i)for(;_e(v);)o.before(_e(v));else o.before(v)}})}function la(e,t,r,i,l){var s;F&&mt();var o=(s=t.$$slots)==null?void 0:s[r],f=!1;o===!0&&(o=t.children,f=!0),o===void 0||o(e,f?()=>i:i)}const ei=[...`
3
- \r\f \v\uFEFF`];function sa(e,t,r){var i=""+e;if(r){for(var l in r)if(r[l])i=i?i+" "+l:l;else if(i.length)for(var o=l.length,f=0;(f=i.indexOf(l,f))>=0;){var s=f+o;(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 ua(e,t,r,i,l,o){var f=e.__className;if(F||f!==r||f===void 0){var s=sa(r,i,o);(!F||s!==e.getAttribute("class"))&&(s==null?e.removeAttribute("class"):e.className=s),e.__className=r}else if(o&&l!==o)for(var c in o){var d=!!o[c];(l==null||d!==!!l[c])&&e.classList.toggle(c,d)}return o}const fa=Symbol("is custom element"),ca=Symbol("is html");function ti(e){if(F){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;$(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var l=e.checked;$(e,"checked",null),e.checked=l}}};e.__on_r=r,qo(r),zn()}}function da(e,t){var r=ri(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function $(e,t,r,i){var l=ri(e);F&&(l[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||l[t]!==(l[t]=r)&&(t==="loading"&&(e[yo]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ha(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function ri(e){return e.__attributes??(e.__attributes={[fa]:e.nodeName.includes("-"),[ca]:e.namespaceURI===fo})}var ni=new Map;function ha(e){var t=ni.get(e.nodeName);if(t)return t;ni.set(e.nodeName,t=[]);for(var r,i=e,l=Element.prototype;l!==i;){r=vo(i);for(var o in r)r[o].set&&t.push(o);i=un(i)}return t}function va(e,t,r=t){ta(e,"change",i=>{var l=i?e.defaultChecked:e.checked;r(l)}),(F&&e.defaultChecked!==e.checked||nt(t)==null)&&r(e.checked),Or(()=>{var i=t();e.checked=!!i})}function ii(e,t){return e===t||(e==null?void 0:e[$t])===t}function gr(e={},t,r,i){return Pr(()=>{var l,o;return Or(()=>{l=o,o=[],nt(()=>{e!==r(...o)&&(t(e,...o),l&&ii(r(...l),e)&&t(null,...l))})}),()=>{Vr(()=>{o&&ii(r(...o),e)&&t(null,...o)})}}),e}function oi(e){ae===null&&ln(),Lr(()=>{const t=nt(e);if(typeof t=="function")return t})}function ga(e){ae===null&&ln(),oi(()=>()=>nt(e))}function ai(e,t,r){if(e==null)return t(void 0),vt;const i=nt(()=>e.subscribe(t,r));return i.unsubscribe?()=>i.unsubscribe():i}const bt=[];function pa(e,t=vt){let r=null;const i=new Set;function l(s){if(yn(e,s)&&(e=s,r)){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 o(s){l(s(e))}function f(s,c=vt){const d=[s,c];return i.add(d),i.size===1&&(r=t(l,o)||vt),s(e),()=>{i.delete(d),i.size===0&&r&&(r(),r=null)}}return{set:l,update:o,subscribe:f}}function pr(e){let t;return ai(e,r=>t=r)(),t}let mr=!1,Wr=Symbol();function ma(e,t,r){const i=r[t]??(r[t]={store:null,source:qr(void 0),unsubscribe:vt});if(i.store!==e&&!(Wr in r))if(i.unsubscribe(),i.store=e??null,e==null)i.source.v=void 0,i.unsubscribe=vt;else{var l=!0;i.unsubscribe=ai(e,o=>{l?i.source.v=o:b(i.source,o)}),l=!1}return e&&Wr in r?pr(e):a(i.source)}function _a(){const e={};function t(){Nr(()=>{for(var r in e)e[r].unsubscribe();St(e,Wr,{enumerable:!1,value:!0})})}return[e,t]}function ba(e){var t=mr;try{return mr=!1,[e(),mr]}finally{mr=t}}function li(e){var t;return((t=e.ctx)==null?void 0:t.d)??!1}function k(e,t,r,i){var yt;var l=(r&io)!==0,o=!0,f=(r&ao)!==0,s=(r&lo)!==0,c=!1,d;f?[d,c]=ba(()=>e[t]):d=e[t];var _=$t in e||vn in e,v=f&&(((yt=Xe(e,t))==null?void 0:yt.set)??(_&&t in e&&(H=>e[t]=H)))||void 0,m=i,y=!0,T=!1,E=()=>(T=!0,y&&(y=!1,s?m=nt(i):m=i),m);d===void 0&&i!==void 0&&(v&&o&&Ao(),d=E(),v&&v(d));var q;if(q=()=>{var H=e[t];return H===void 0?E():(y=!0,T=!1,H)},(r&oo)===0)return q;if(v){var pe=e.$$legacy;return function(H,ce){return arguments.length>0?((!ce||pe||c)&&v(ce?q():H),H):q()}}var te=!1,le=qr(d),re=or(()=>{var H=q(),ce=a(le);return te?(te=!1,ce):le.v=H});return f&&a(re),l||(re.equals=Dr),function(H,ce){if(arguments.length>0){const ke=ce?a(re):f?qe(H):H;if(!re.equals(ke)){if(te=!0,b(le,ke),T&&m!==void 0&&(m=ke),li(re))return H;nt(()=>a(re))}return H}return li(re)?re.v:a(re)}}function ya(e){return new wa(e)}class wa{constructor(t){tn(this,Ve);tn(this,ye);var o;var r=new Map,i=(f,s)=>{var c=qr(s);return r.set(f,c),c};const l=new Proxy({...t.props||{},$$events:{}},{get(f,s){return a(r.get(s)??i(s,Reflect.get(f,s)))},has(f,s){return s===vn?!0:(a(r.get(s)??i(s,Reflect.get(f,s))),Reflect.has(f,s))},set(f,s,c){return b(r.get(s)??i(s,c),c),Reflect.set(f,s,c)}});rn(this,ye,(t.hydrate?oa:Xn)(t.component,{target:t.target,anchor:t.anchor,props:l,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((o=t==null?void 0:t.props)!=null&&o.$$host)||t.sync===!1)&&x(),rn(this,Ve,l.$$events);for(const f of Object.keys(he(this,ye)))f==="$set"||f==="$destroy"||f==="$on"||St(this,f,{get(){return he(this,ye)[f]},set(s){he(this,ye)[f]=s},enumerable:!0});he(this,ye).$set=f=>{Object.assign(l,f)},he(this,ye).$destroy=()=>{aa(he(this,ye))}}$set(t){he(this,ye).$set(t)}$on(t,r){he(this,Ve)[t]=he(this,Ve)[t]||[];const i=(...l)=>r.call(this,...l);return he(this,Ve)[t].push(i),()=>{he(this,Ve)[t]=he(this,Ve)[t].filter(l=>l!==i)}}$destroy(){he(this,ye).$destroy()}}Ve=new WeakMap,ye=new WeakMap;let si;typeof HTMLElement=="function"&&(si=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 l=this.$$c.$on(t,r);this.$$l_u.set(r,l)}super.addEventListener(t,r,i)}removeEventListener(t,r,i){if(super.removeEventListener(t,r,i),this.$$c){const l=this.$$l_u.get(r);l&&(l(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(l){return o=>{const f=document.createElement("slot");l!=="default"&&(f.name=l),B(o,f)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},i=Ea(this);for(const l of this.$$s)l in i&&(l==="default"&&!this.$$d.children?(this.$$d.children=t(l),r.default=!0):r[l]=t(l));for(const l of this.attributes){const o=this.$$g_p(l.name);o in this.$$d||(this.$$d[o]=_r(o,l.value,this.$$p_d,"toProp"))}for(const l in this.$$p_d)!(l in this.$$d)&&this[l]!==void 0&&(this.$$d[l]=this[l],delete this[l]);this.$$c=ya({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Fo(()=>{Or(()=>{var l;this.$$r=!0;for(const o of Xt(this.$$c)){if(!((l=this.$$p_d[o])!=null&&l.reflect))continue;this.$$d[o]=this.$$c[o];const f=_r(o,this.$$d[o],this.$$p_d,"toAttribute");f==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,f)}this.$$r=!1})});for(const l in this.$$l)for(const o of this.$$l[l]){const f=this.$$c.$on(l,o);this.$$l_u.set(o,f)}this.$$l={}}}attributeChangedCallback(t,r,i){var l;this.$$r||(t=this.$$g_p(t),this.$$d[t]=_r(t,i,this.$$p_d,"toProp"),(l=this.$$c)==null||l.$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 Xt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function _r(e,t,r,i){var o;const l=(o=r[e])==null?void 0:o.type;if(t=l==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(l){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(l){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Ea(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function Ca(e,t,r,i,l,o){let f=class extends si{constructor(){super(e,r,l),this.$$p_d=t}static get observedAttributes(){return Xt(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Xt(t).forEach(s=>{St(f.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){var v;c=_r(s,c,t),this.$$d[s]=c;var d=this.$$c;if(d){var _=(v=Xe(d,s))==null?void 0:v.get;_?d[s]=c:d.$set({[s]:c})}}})}),i.forEach(s=>{St(f.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),e.element=f,f}const ui=new TextEncoder;function xa(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function ka(e,t="SHA-256",r=1e5){const i=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const l=await fi(i,e,t);return{algorithm:t,challenge:l,salt:i,signature:""}}async function fi(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 xa(await crypto.subtle.digest(r.toUpperCase(),ui.encode(e+t)))}function Aa(e,t,r="SHA-256",i=1e6,l=0){const o=new AbortController,f=Date.now();return{promise:(async()=>{for(let c=l;c<=i;c+=1){if(o.signal.aborted)return null;if(await fi(t,c,r)===e)return{number:c,took:Date.now()-f}}return null})(),controller:o}}function ci(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Ia(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 Ra(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 Sa(e,t="",r=1e6,i=0){const l="AES-GCM",o=new AbortController,f=Date.now(),s=async()=>{for(let _=i;_<=r;_+=1){if(o.signal.aborted||!c||!d)return null;try{const v=await crypto.subtle.decrypt({name:l,iv:Ra(_)},c,d);if(v)return{clearText:new TextDecoder().decode(v),took:Date.now()-f}}catch{}}return null};let c=null,d=null;try{d=Ia(e);const _=await crypto.subtle.digest("SHA-256",ui.encode(t));c=await crypto.subtle.importKey("raw",_,l,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:s(),controller:o}}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=>pr(globalThis.altchaI18n.store)[e],set:(e,t)=>{Object.assign(pr(globalThis.altchaI18n.store),{[e]:t}),globalThis.altchaI18n.store.set(pr(globalThis.altchaI18n.store))},store:pa({})};const $a={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",$a);const Yr=(e,t)=>{let r=No(()=>mo(t==null?void 0:t(),24));var i=La();$e(()=>{$(i,"width",a(r)),$(i,"height",a(r))}),B(e,i)};function Ta(e,t){e.code==="Space"&&(e.preventDefault(),e.stopImmediatePropagation(),t())}function Da(e,t){e.preventDefault(),t()}function Na(e,t,r,i,l,o,f,s){var c;[w.UNVERIFIED,w.ERROR,w.EXPIRED,w.CODE].includes(a(t))?r()!==!1&&((c=a(i))==null?void 0:c.reportValidity())===!1?b(l,!1):o()?f():s():b(l,!0)}var La=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>'),Pa=xe('<input type="hidden">'),Oa=xe('<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>'),Fa=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>'),Ma=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>'),Va=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>'),Ua=xe('<button type="button" class="altcha-code-challenge-audio"><!></button>'),ja=xe("<audio hidden autoplay><source></audio>"),qa=xe('<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>'),Ba=xe("<div><!></div>"),Ha=xe("<div><!></div>"),Ga=xe('<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>'),Wa=xe('<div class="altcha-footer"><div><!></div></div>'),Ya=xe('<div class="altcha-anchor-arrow"></div>'),Za=xe('<!> <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 Qi,eo;Gn(t,!0);const[r,i]=_a(),l=()=>ma(Ja,"$altchaI18nStore",r);let o=k(t,"auto",7,void 0),f=k(t,"blockspam",7,void 0),s=k(t,"challengeurl",7,void 0),c=k(t,"challengejson",7,void 0),d=k(t,"credentials",7,void 0),_=k(t,"customfetch",7,void 0),v=k(t,"debug",7,!1),m=k(t,"delay",7,0),y=k(t,"disableautofocus",7,!1),T=k(t,"expire",7,void 0),E=k(t,"floating",7,void 0),q=k(t,"floatinganchor",7,void 0),pe=k(t,"floatingoffset",7,void 0),te=k(t,"floatingpersist",7,!1),le=k(t,"hidefooter",7,!1),re=k(t,"hidelogo",7,!1),yt=k(t,"id",7,void 0),H=k(t,"language",7,void 0),ce=k(t,"name",7,"altcha"),ke=k(t,"maxnumber",7,1e6),Ut=k(t,"mockerror",7,!1),Ze=k(t,"obfuscated",7,void 0),Ae=k(t,"overlay",7,void 0),jt=k(t,"overlaycontent",7,void 0),br=k(t,"plugins",7,void 0),qt=k(t,"refetchonexpire",7,!0),ot=k(t,"sentinel",7,void 0),Le=k(t,"spamfilter",7,!1),wt=k(t,"strings",7,void 0),we=k(t,"test",7,!1),se=k(t,"verifyurl",7,void 0),Et=k(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),Bt=k(t,"workerurl",7,void 0);const{altchaI18n:za}=globalThis,Ja=za.store,pi=["SHA-256","SHA-384","SHA-512"],Ka="https://altcha.org/",ze=(n,u)=>{t.$$host.dispatchEvent(new CustomEvent(n,{detail:u}))},mi=(eo=(Qi=document.documentElement.lang)==null?void 0:Qi.split("-"))==null?void 0:eo[0],Zr=Dt(()=>{var n;return s()&&new URL(s(),location.origin).host.endsWith(".altcha.org")&&!!((n=s())!=null&&n.includes("apiKey=ckey_"))}),yr=Dt(()=>c()?Di(c()):void 0),Xa=Dt(()=>wt()?Di(wt()):{}),V=Dt(()=>({...wi(l()),...a(Xa)})),_i=Dt(()=>`${yt()||ce()}_checkbox_${Math.round(Math.random()*1e8)}`);let at=P(null),Ht=P(!1),Y=P(null),I=P(qe(w.UNVERIFIED)),U=P(void 0),Gt=P(null),Je=P(null),me=P(null),zr=P(null),Ct=P(null),O=P(null),Wt=P(null),lt=P(null),Pe=null,X=P(null),st=P(!1),Ke=[],Jr=P(!1),Oe=P(null);Lr(()=>{cl(a(lt))}),Lr(()=>{dl(a(I))}),ga(()=>{Qa(),b(Wt,null),a(O)&&(a(O).removeEventListener("submit",Ii),a(O).removeEventListener("reset",Ri),a(O).removeEventListener("focusin",Ai),b(O,null)),Pe&&(clearTimeout(Pe),Pe=null),document.removeEventListener("click",xi),document.removeEventListener("scroll",ki),window.removeEventListener("resize",Ti)}),oi(()=>{var n;R("mounted","2.2.2"),R("workers",Et()),nl(),R("plugins",Ke.length?Ke.map(u=>u.constructor.pluginName).join(", "):"none"),we()&&R("using test mode"),T()&&Kr(T()),o()!==void 0&&R("auto",o()),E()!==void 0&&Oi(E()),b(O,(n=a(U))==null?void 0:n.closest("form"),!0),a(O)&&(a(O).addEventListener("submit",Ii,{capture:!0}),a(O).addEventListener("reset",Ri),(o()==="onfocus"||te()==="focus")&&a(O).addEventListener("focusin",Ai)),Ae()&&Fi(!0),o()==="onload"&&(Ze()?Yt():Ue()),a(Zr)&&(le()||re())&&R("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{ze("load")})});function wr(n,u){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:u.number,salt:n.salt,signature:n.signature,test:we()?!0:void 0,took:u.took}))}function Qa(){for(const n of Ke)n.destroy()}function bi(){s()&&qt()&&a(I)===w.VERIFIED?Ue():ut(w.EXPIRED,a(V).expired)}async function el(){if(Ut())throw R("mocking error"),new Error("Mocked error.");if(a(yr))return R("using provided json data"),Ni(a(yr).salt),a(yr);if(we())return R("generating test challenge",{test:we()}),ka(typeof we()!="boolean"?+we():void 0);{if(!s()&&a(O)){const h=a(O).getAttribute("action");h!=null&&h.includes("/form/")&&s(h+"/altcha")}if(!s())throw new Error("Attribute challengeurl not set.");R("fetching challenge from",s());const n={credentials:typeof d()=="boolean"?"include":d(),headers:Le()!==!1?{"x-altcha-spam-filter":"1"}:{}},u=await yi()(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"),p=await u.json();if(Ni(p.salt),g)try{const h=JSON.parse(g);h&&typeof h=="object"&&(h.verifyurl&&!h.verifyurl.startsWith("fn:")&&(h.verifyurl=Ci(h.verifyurl)),Ui(h))}catch(h){R("unable to configure from X-Altcha-Config",h)}return p}}function tl(n){var g,p;const u=(g=a(O))==null?void 0:g.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((p=u==null?void 0:u.value)==null?void 0:p.slice(u.value.indexOf("@")))||void 0}function yi(){let n=fetch;if(_())if(R("using customfetch"),typeof _()=="string"){if(n=globalThis[_()]||null,!n)throw new Error(`Custom fetch function not found: ${_()}`)}else n=_();return n}function wi(n,u=[H()||"",document.documentElement.lang||"",...navigator.languages]){const g=Object.keys(n).map(h=>h.toLowerCase()),p=u.reduce((h,C)=>(C=C.toLowerCase(),h||(n[C]?C:null)||g.find(A=>C.split("-")[0]===A.split("-")[0])||null),null);return n[p||"en"]}function rl(){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 Ei(n){var g;return[...((g=a(O))==null?void 0:g.querySelectorAll(n!=null&&n.length?n.map(p=>`input[name="${p}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((p,h)=>{const C=h.name,A=h.value;return C&&A&&(p[C]=/\n/.test(A)?A.replace(new RegExp("(?<!\\r)\\n","g"),`\r
4
- `):A),p},{})}function Ci(n,u){const g=new URL(s()||location.origin),p=new URL(n,g);if(p.search||(p.search=g.search),u)for(const h in u)u[h]!==void 0&&u[h]!==null&&p.searchParams.set(h,u[h]);return p.toString()}function nl(){const n=br()!==void 0?br().split(","):void 0;for(const u of globalThis.altchaPlugins)(!n||n.includes(u.pluginName))&&Ke.push(new u({el:a(U),clarify:Yt,dispatch:ze,getConfiguration:ji,getFloatingAnchor:qi,getState:Bi,log:R,reset:ut,solve:Vi,setState:Fe,setFloatingAnchor:Hi,verify:Ue}))}function R(...n){(v()||n.some(u=>u instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${ce()}]`,...n)}function il(){b(X,ee.PAUSED,!0)}function ol(n){b(X,ee.ERROR,!0)}function al(){b(X,ee.READY,!0)}function ll(){b(X,ee.LOADING,!0)}function sl(){b(X,ee.PLAYING,!0)}function ul(){b(X,ee.PAUSED,!0)}function fl(n){var u;if(n.preventDefault(),n.stopPropagation(),a(Y)){const g=new FormData(n.target),p=String(g.get("code"));if((u=se())!=null&&u.startsWith("fn:")){const h=se().replace(/^fn:/,"");if(R(`calling ${h} function instead of verifyurl`),!(h in globalThis))throw new Error(`Global function "${h}" is undefined.`);return globalThis[h]({challenge:a(Y).challenge,code:p,solution:a(Y).solution})}b(st,!0),Li(wr(a(Y).challenge,a(Y).solution),p).then(({reason:h,verified:C})=>{C?(b(Y,null),Fe(w.VERIFIED),R("verified"),jr().then(()=>{var A;(A=a(zr))==null||A.focus(),ze("verified",{payload:a(Oe)}),o()==="onsubmit"?Pi(a(Wt)):Ae()&&Zt()})):(ut(),b(lt,h||"Verification failed",!0))}).catch(h=>{b(Y,null),Fe(w.ERROR,h),R("sentinel verification failed:",h)}).finally(()=>{b(st,!1)})}}function xi(n){var g;const u=n.target;E()&&u&&!a(U).contains(u)&&(a(I)===w.VERIFIED&&te()===!1||a(I)===w.VERIFIED&&te()==="focus"&&!((g=a(O))!=null&&g.matches(":focus-within"))||o()==="off"&&a(I)===w.UNVERIFIED)&&Zt()}function ki(){E()&&a(I)!==w.UNVERIFIED&&zt()}function cl(n){for(const u of Ke)typeof u.onErrorChange=="function"&&u.onErrorChange(a(lt))}function Ai(n){a(I)===w.UNVERIFIED?Ue():E()&&te()==="focus"&&a(I)===w.VERIFIED&&Er()}function Ii(n){var p;const u=n.target;u!=null&&u.hasAttribute("data-code-challenge-form")||(b(Wt,n.submitter,!0),a(O)&&o()==="onsubmit"?((p=a(Wt))==null||p.blur(),a(I)===w.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),Ue().then(()=>{Pi(a(Wt))})):a(I)!==w.VERIFIED&&(n.preventDefault(),n.stopPropagation(),a(I)===w.VERIFYING&&Si())):a(O)&&E()&&o()==="off"&&a(I)===w.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),Er()))}function Ri(){ut()}function Si(){a(I)===w.VERIFYING&&a(V).waitAlert&&alert(a(V).waitAlert)}function $i(){a(Je)?a(Je).paused?(a(Je).currentTime=0,a(Je).play()):a(Je).pause():(b(Jr,!0),requestAnimationFrame(()=>{var n;(n=a(Je))==null||n.play()}))}function dl(n){for(const u of Ke)typeof u.onStateChange=="function"&&u.onStateChange(a(I));E()&&a(I)!==w.UNVERIFIED&&requestAnimationFrame(()=>{zt()}),b(Ht,a(I)===w.VERIFIED),Ae()&&a(me)&&(a(I)!==w.UNVERIFIED?Er():Zt())}function Ti(){E()&&zt()}function Di(n){return JSON.parse(n)}function Ni(n){var p;const u=new URLSearchParams((p=n.split("?"))==null?void 0:p[1]),g=u.get("expires")||u.get("expire");if(g){const h=new Date(+g*1e3),C=isNaN(h.getTime())?0:h.getTime()-Date.now();C>0&&Kr(C)}else Pe&&(clearTimeout(Pe),Pe=null)}async function hl(n){if(!se())throw new Error("Attribute verifyurl not set.");R("requesting server verification from",se());const u={payload:n};if(Le()!==!1){const{blockedCountries:h,classifier:C,disableRules:A,email:G,expectedLanguages:j,expectedCountries:ne,fields:de,ipAddress:ct,text:kt,timeZone:dt}=rl();u.blockedCountries=h,u.classifier=C,u.disableRules=A,u.email=G===!1?void 0:tl(G),u.expectedCountries=ne,u.expectedLanguages=j||(mi?[mi]:void 0),u.fields=de===!1?void 0:Ei(de),u.ipAddress=ct===!1?void 0:ct||"auto",u.text=kt,u.timeZone=dt===!1?void 0:dt||ci()}const g=await yi()(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 p=await g.json();if(p!=null&&p.payload&&b(Oe,p.payload,!0),ze("serververification",p),f()&&p.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}async function Li(n,u){if(!se())throw new Error("Attribute verifyurl not set.");R("requesting sentinel verification from",se());const g={code:u,payload:n};ot()&&(g.fields=ot().fields?Ei():void 0,g.timeZone=ot().timeZone?ci():void 0);const p=await fetch(se(),{body:JSON.stringify(g),headers:{"content-type":"application/json"},method:"POST"});if(!p||!(p instanceof Response))throw new Error("Fetch function did not return a response.");if(p.status!==200)throw new Error(`Server responded with ${p.status}.`);const h=await p.json();return h!=null&&h.payload&&b(Oe,h.payload,!0),ze("sentinelverification",h),h}function Pi(n){var u;a(O)&&"requestSubmit"in a(O)?a(O).requestSubmit(n):(u=a(O))!=null&&u.reportValidity()&&(n?n.click():a(O).submit())}function Kr(n){R("expire",n),Pe&&(clearTimeout(Pe),Pe=null),n<1?bi():Pe=setTimeout(bi,n)}function Oi(n){R("floating",n),E()!==n&&(a(U).style.left="",a(U).style.top=""),E(n===!0||n===""?"auto":n===!1||n==="false"?void 0:E()),E()?(o()||o("onsubmit"),document.addEventListener("scroll",ki),document.addEventListener("click",xi),window.addEventListener("resize",Ti)):o()==="onsubmit"&&o(void 0)}function Fi(n){var u,g;if(R("overlay",n),Ae(n),n){if(o()||o("onsubmit"),a(me)&&a(U).parentElement&&a(me).replaceWith(a(U).parentElement),(g=(u=a(U))==null?void 0:u.parentElement)!=null&&g.parentElement){b(me,document.createElement("div"),!0),a(U).parentElement.parentElement.appendChild(a(me));const p=document.createElement("div"),h=document.createElement("button");h.type="button",h.innerHTML="&times;",h.addEventListener("click",C=>{C.preventDefault(),ut()}),a(me).classList.add("altcha-overlay-backdrop"),h.classList.add("altcha-overlay-close-button"),p.classList.add("altcha-overlay"),a(me).append(p),p.append(h),jt()&&p.append(...document.querySelectorAll(jt())),p.append(a(U).parentElement)}}else a(me)&&a(U).parentElement&&(a(me).replaceWith(a(U).parentElement),a(U).style.display="block")}function Mi(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(!pi.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${pi.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=vl(n,n.maxNumber||n.maxnumber||ke()),b(at,u.controller,!0),g=await u.promise}catch(p){R(p)}finally{b(at,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 p=await Sa(n.obfuscated,n.key,n.maxNumber||n.maxnumber);return{data:n,solution:await p.promise}}u=Aa(n.challenge,n.salt,n.algorithm,n.maxNumber||n.maxnumber||ke()),b(at,u.controller,!0);try{g=await u.promise}catch(p){R(p)}finally{b(at,null)}return{data:n,solution:g}}function vl(n,u=typeof we()=="number"?we():n.maxNumber||n.maxnumber||ke(),g=Math.ceil(Et())){const p=new AbortController,h=[];g=Math.min(16,u,Math.max(1,g));for(let G=0;G<g;G++)h.push(altchaCreateWorker(Bt()));const C=Math.ceil(u/g);return{promise:(async()=>{const G=await Promise.all(h.map((j,ne)=>{const de=ne*C;return p.signal.addEventListener("abort",()=>{j.postMessage({type:"abort"})}),new Promise(ct=>{j.addEventListener("message",kt=>{if(kt.data)for(const dt of h)dt!==j&&dt.postMessage({type:"abort"});ct(kt.data)}),j.postMessage({payload:n,max:de+C,start:de,type:"work"})})}));for(const j of h)j.terminate();return G.find(j=>!!j)||null})(),controller:p}}async function Yt(){if(!Ze()){Fe(w.ERROR);return}const n=Ke.find(u=>u.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){Fe(w.ERROR),R("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in n&&typeof n.clarify=="function")return n.clarify()}function Ui(n){n.obfuscated!==void 0&&Ze(n.obfuscated),n.auto!==void 0&&(o(n.auto),o()==="onload"&&(Ze()?Yt():Ue())),n.blockspam!==void 0&&f(!!n.blockspam),n.customfetch!==void 0&&_(n.customfetch),n.floatinganchor!==void 0&&q(n.floatinganchor),n.delay!==void 0&&m(n.delay),n.floatingoffset!==void 0&&pe(n.floatingoffset),n.floating!==void 0&&Oi(n.floating),n.expire!==void 0&&(Kr(n.expire),T(n.expire)),n.challenge&&(c(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),Mi(a(yr))),n.challengeurl!==void 0&&s(n.challengeurl),n.debug!==void 0&&v(!!n.debug),n.hidefooter!==void 0&&le(!!n.hidefooter),n.hidelogo!==void 0&&re(!!n.hidelogo),n.language!==void 0&&wt(wi(l(),[n.language])),n.maxnumber!==void 0&&ke(+n.maxnumber),n.mockerror!==void 0&&Ut(!!n.mockerror),n.name!==void 0&&ce(n.name),n.overlaycontent!==void 0&&jt(n.overlaycontent),n.overlay!==void 0&&Fi(n.overlay),n.refetchonexpire!==void 0&&qt(!!n.refetchonexpire),n.sentinel!==void 0&&typeof n.sentinel=="object"&&ot(n.sentinel),n.spamfilter!==void 0&&Le(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&wt(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&we(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&se(n.verifyurl),n.workers!==void 0&&Et(+n.workers),n.workerurl!==void 0&&Bt(n.workerurl)}function ji(){return{auto:o(),blockspam:f(),challengeurl:s(),debug:v(),delay:m(),expire:T(),floating:E(),floatinganchor:q(),floatingoffset:pe(),hidefooter:le(),hidelogo:re(),name:ce(),maxnumber:ke(),mockerror:Ut(),obfuscated:Ze(),overlay:Ae(),refetchonexpire:qt(),spamfilter:Le(),strings:a(V),test:we(),verifyurl:se(),workers:Et(),workerurl:Bt()}}function qi(){return a(Ct)}function gl(n){return Ke.find(u=>u.constructor.pluginName===n)}function Bi(){return a(I)}function Zt(){a(U).style.display="none",Ae()&&a(me)&&(a(me).style.display="none")}function zt(n=20){var u;if(a(U))if(a(Ct)||b(Ct,(q()?document.querySelector(q()):(u=a(O))==null?void 0:u.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||a(O),!0),a(Ct)){const g=parseInt(pe(),10)||12,p=a(Ct).getBoundingClientRect(),h=a(U).getBoundingClientRect(),C=document.documentElement.clientHeight,A=document.documentElement.clientWidth,G=E()==="auto"?p.bottom+h.height+g+n>C:E()==="top",j=Math.max(n,Math.min(A-n-h.width,p.left+p.width/2-h.width/2));if(G?a(U).style.top=`${p.top-(h.height+g)}px`:a(U).style.top=`${p.bottom+g}px`,a(U).style.left=`${j}px`,a(U).setAttribute("data-floating",G?"top":"bottom"),a(Gt)){const ne=a(Gt).getBoundingClientRect();a(Gt).style.left=p.left-j+p.width/2-ne.width/2+"px"}}else R("unable to find floating anchor element")}function ut(n=w.UNVERIFIED,u=null){a(at)&&(a(at).abort(),b(at,null)),b(Ht,!1),b(Oe,null),b(Y,null),b(Jr,!1),b(X,null),Fe(n,u)}function Hi(n){b(Ct,n,!0)}function Fe(n,u=null){b(I,n,!0),b(lt,u,!0),ze("statechange",{payload:a(Oe),state:a(I)})}function Er(){a(U).style.display="block",E()&&zt(),Ae()&&a(me)&&(a(me).style.display="flex")}async function Ue(){return ut(w.VERIFYING),await new Promise(n=>setTimeout(n,m()||0)),el().then(n=>(Mi(n),R("challenge",n),Vi(n))).then(({data:n,solution:u})=>{var g;if(R("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(),b(Y,{challenge:n,solution:u},!0);else{if(se()&&ot()!==void 0)return Li(wr(n,u));if(se())return hl(wr(n,u));b(Oe,wr(n,u),!0),R("payload",a(Oe))}else if(a(I)!==w.EXPIRED)throw R("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}}).then(()=>{a(Y)?(Fe(w.CODE),jr().then(()=>{ze("code",{codeChallenge:a(Y)})})):a(Oe)&&(Fe(w.VERIFIED),R("verified"),jr().then(()=>{ze("verified",{payload:a(Oe)}),Ae()&&Zt()}))}).catch(n=>{R(n),Fe(w.ERROR,n.message)})}var Gi=Za(),Wi=Tt(Gi);la(Wi,t,"default",{});var xt=J(Wi,2),Xr=z(xt),Cr=z(Xr);let Yi;var Zi=z(Cr);{var pl=n=>{Yr(n)};K(Zi,n=>{a(I)===w.VERIFYING&&n(pl)})}var ft=J(Zi,2);ti(ft),ft.__change=[Na,I,Le,O,Ht,Ze,Yt,Ue],gr(ft,n=>b(zr,n),()=>a(zr)),Z(Cr);var xr=J(Cr,2),ml=z(xr);{var _l=n=>{var u=vr(),g=Tt(u);it(g,()=>a(V).verified),B(n,u)},bl=(n,u)=>{{var g=h=>{var C=vr(),A=Tt(C);it(A,()=>a(V).verifying),B(h,C)},p=(h,C)=>{{var A=j=>{var ne=vr(),de=Tt(ne);it(de,()=>a(V).verificationRequired),B(j,ne)},G=j=>{var ne=vr(),de=Tt(ne);it(de,()=>a(V).label),B(j,ne)};K(h,j=>{a(I)===w.CODE?j(A):j(G,!1)},C)}};K(n,h=>{a(I)===w.VERIFYING?h(g):h(p,!1)},u)}};K(ml,n=>{a(I)===w.VERIFIED?n(_l):n(bl,!1)})}Z(xr);var zi=J(xr,2);{var yl=n=>{var u=Pa();ti(u),$e(()=>{$(u,"name",ce()),da(u,a(Oe))}),B(n,u)};K(zi,n=>{a(I)===w.VERIFIED&&n(yl)})}var Ji=J(zi,2);{var wl=n=>{var u=Oa(),g=z(u);$(g,"href",Ka),Z(u),$e(()=>$(g,"aria-label",a(V).ariaLinkLabel)),B(n,u)};K(Ji,n=>{(re()!==!0||a(Zr))&&n(wl)})}var El=J(Ji,2);{var Cl=n=>{var u=qa(),g=J(z(u),2),p=z(g),h=J(p,2);ea(h,!y()),h.__keydown=[Ta,$i];var C=J(h,2),A=z(C),G=z(A);{var j=Ie=>{var Q=Ua();Q.__click=$i;var kr=z(Q);{var Jt=At=>{Yr(At,()=>20)},Tl=(At,Dl)=>{{var Nl=It=>{var Qr=Fa();B(It,Qr)},Ll=(It,Qr)=>{{var Pl=Rt=>{var en=Ma();B(Rt,en)},Ol=Rt=>{var en=Va();B(Rt,en)};K(It,Rt=>{a(X)===ee.PLAYING?Rt(Pl):Rt(Ol,!1)},Qr)}};K(At,It=>{a(X)===ee.ERROR?It(Nl):It(Ll,!1)},Dl)}};K(kr,At=>{a(X)===ee.LOADING?At(Jt):At(Tl,!1)})}Z(Q),$e(()=>{$(Q,"title",a(V).getAudioChallenge),Q.disabled=a(X)===ee.LOADING||a(X)===ee.ERROR||a(st),$(Q,"aria-label",a(X)===ee.LOADING?a(V).loading:a(V).getAudioChallenge)}),B(Ie,Q)};K(G,Ie=>{a(Y).challenge.codeChallenge.audio&&Ie(j)})}var ne=J(G,2);ne.__click=[Da,Ue],Z(A);var de=J(A,2),ct=z(de);{var kt=Ie=>{Yr(Ie,()=>16)};K(ct,Ie=>{a(st)&&Ie(kt)})}var dt=J(ct);Z(de),Z(C);var Sl=J(C,2);{var $l=Ie=>{var Q=ja(),kr=z(Q);Z(Q),gr(Q,Jt=>b(Je,Jt),()=>a(Je)),$e(Jt=>$(kr,"src",Jt),[()=>Ci(a(Y).challenge.codeChallenge.audio,{language:H()})]),Ye("loadstart",Q,ll),Ye("canplay",Q,al),Ye("pause",Q,ul),Ye("playing",Q,sl),Ye("ended",Q,il),Ye("error",kr,ol),B(Ie,Q)};K(Sl,Ie=>{a(Y).challenge.codeChallenge.audio&&a(Jr)&&Ie($l)})}Z(g),Z(u),$e(()=>{$(u,"aria-label",a(V).verificationRequired),$(p,"src",a(Y).challenge.codeChallenge.image),$(h,"minlength",a(Y).challenge.codeChallenge.length||1),$(h,"maxlength",a(Y).challenge.codeChallenge.length),$(h,"placeholder",a(V).enterCode),$(h,"aria-label",a(X)===ee.LOADING?a(V).loading:a(X)===ee.PLAYING?"":a(V).enterCodeAria),$(h,"aria-live",a(X)?"assertive":"polite"),$(h,"aria-busy",a(X)===ee.LOADING),h.disabled=a(st),$(ne,"aria-label",a(V).reload),$(ne,"title",a(V).reload),ne.disabled=a(st),de.disabled=a(st),$(de,"aria-label",a(V).verify),ia(dt,` ${a(V).verify??""}`)}),Ye("submit",g,fl,!0),B(n,u)};K(El,n=>{var u;(u=a(Y))!=null&&u.challenge.codeChallenge&&n(Cl)})}Z(Xr);var Ki=J(Xr,2);{var xl=n=>{var u=Ga(),g=J(z(u),2);{var p=C=>{var A=Ba(),G=z(A);it(G,()=>a(V).expired),Z(A),$e(()=>$(A,"title",a(lt))),B(C,A)},h=C=>{var A=Ha(),G=z(A);it(G,()=>a(V).error),Z(A),$e(()=>$(A,"title",a(lt))),B(C,A)};K(g,C=>{a(I)===w.EXPIRED?C(p):C(h,!1)})}Z(u),B(n,u)};K(Ki,n=>{(a(lt)||a(I)===w.EXPIRED)&&n(xl)})}var Xi=J(Ki,2);{var kl=n=>{var u=Wa(),g=z(u),p=z(g);it(p,()=>a(V).footer),Z(g),Z(u),B(n,u)};K(Xi,n=>{a(V).footer&&(le()!==!0||a(Zr))&&n(kl)})}var Al=J(Xi,2);{var Il=n=>{var u=Ya();gr(u,g=>b(Gt,g),()=>a(Gt)),B(n,u)};K(Al,n=>{E()&&n(Il)})}Z(xt),gr(xt,n=>b(U,n),()=>a(U)),$e(n=>{$(xt,"data-state",a(I)),$(xt,"data-floating",E()),$(xt,"data-overlay",Ae()),Yi=ua(Cr,1,"altcha-checkbox",null,Yi,n),$(ft,"id",a(_i)),ft.required=o()!=="onsubmit"&&(!E()||o()!=="off"),$(xr,"for",a(_i))},[()=>({"altcha-checkbox-verifying":a(I)===w.VERIFYING})]),Ye("invalid",ft,Si),va(ft,()=>a(Ht),n=>b(Ht,n)),B(e,Gi);var Rl=Wn({clarify:Yt,configure:Ui,getConfiguration:ji,getFloatingAnchor:qi,getPlugin:gl,getState:Bi,hide:Zt,repositionFloating:zt,reset:ut,setFloatingAnchor:Hi,setState:Fe,show:Er,verify:Ue,get auto(){return o()},set auto(n=void 0){o(n),x()},get blockspam(){return f()},set blockspam(n=void 0){f(n),x()},get challengeurl(){return s()},set challengeurl(n=void 0){s(n),x()},get challengejson(){return c()},set challengejson(n=void 0){c(n),x()},get credentials(){return d()},set credentials(n=void 0){d(n),x()},get customfetch(){return _()},set customfetch(n=void 0){_(n),x()},get debug(){return v()},set debug(n=!1){v(n),x()},get delay(){return m()},set delay(n=0){m(n),x()},get disableautofocus(){return y()},set disableautofocus(n=!1){y(n),x()},get expire(){return T()},set expire(n=void 0){T(n),x()},get floating(){return E()},set floating(n=void 0){E(n),x()},get floatinganchor(){return q()},set floatinganchor(n=void 0){q(n),x()},get floatingoffset(){return pe()},set floatingoffset(n=void 0){pe(n),x()},get floatingpersist(){return te()},set floatingpersist(n=!1){te(n),x()},get hidefooter(){return le()},set hidefooter(n=!1){le(n),x()},get hidelogo(){return re()},set hidelogo(n=!1){re(n),x()},get id(){return yt()},set id(n=void 0){yt(n),x()},get language(){return H()},set language(n=void 0){H(n),x()},get name(){return ce()},set name(n="altcha"){ce(n),x()},get maxnumber(){return ke()},set maxnumber(n=1e6){ke(n),x()},get mockerror(){return Ut()},set mockerror(n=!1){Ut(n),x()},get obfuscated(){return Ze()},set obfuscated(n=void 0){Ze(n),x()},get overlay(){return Ae()},set overlay(n=void 0){Ae(n),x()},get overlaycontent(){return jt()},set overlaycontent(n=void 0){jt(n),x()},get plugins(){return br()},set plugins(n=void 0){br(n),x()},get refetchonexpire(){return qt()},set refetchonexpire(n=!0){qt(n),x()},get sentinel(){return ot()},set sentinel(n=void 0){ot(n),x()},get spamfilter(){return Le()},set spamfilter(n=!1){Le(n),x()},get strings(){return wt()},set strings(n=void 0){wt(n),x()},get test(){return we()},set test(n=!1){we(n),x()},get verifyurl(){return se()},set verifyurl(n=void 0){se(n),x()},get workers(){return Et()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){Et(n),x()},get workerurl(){return Bt()},set workerurl(n=void 0){Bt(n),x()}});return i(),Rl}na(["change","keydown","click"]),customElements.define("altcha-widget",Ca(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));const hi='@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:0;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled,.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base:#fff;--altcha-color-text:#000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:99999999}.altcha-overlay-close-button{align-self:flex-end;background:0 0;border:0;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height:450px){.altcha-overlay{top:10%!important;transform:translate(-50%,0)}}';function vi(e,t="__altcha-css"){if(!document.getElementById(t)){const r=document.createElement("style");r.id=t,r.textContent=e,document.head.appendChild(r)}}globalThis.altchaCreateWorker=e=>e?new Worker(new URL(e)):new Kt,vi(hi),vi(hi),S.Altcha=di,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
1
+ (function(st,ut){typeof exports=="object"&&typeof module<"u"?ut(exports):typeof define=="function"&&define.amd?define(["exports"],ut):(st=typeof globalThis<"u"?globalThis:st||self,ut(st.altcha={}))})(this,function(st){"use strict";const ut=`(function(){"use strict";const d=new TextEncoder;function p(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function b(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 p(await crypto.subtle.digest(r.toUpperCase(),d.encode(e+t)))}function w(e,t,r="SHA-256",n=1e6,l=0){const o=new AbortController,a=Date.now();return{promise:(async()=>{for(let c=l;c<=n;c+=1){if(o.signal.aborted)return null;if(await b(t,c,r)===e)return{number:c,took:Date.now()-a}}return null})(),controller:o}}function h(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function g(e,t=12){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e%256,e=Math.floor(e/256);return r}async function m(e,t="",r=1e6,n=0){const l="AES-GCM",o=new AbortController,a=Date.now(),s=async()=>{for(let i=n;i<=r;i+=1){if(o.signal.aborted||!c||!u)return null;try{const f=await crypto.subtle.decrypt({name:l,iv:g(i)},c,u);if(f)return{clearText:new TextDecoder().decode(f),took:Date.now()-a}}catch{}}return null};let c=null,u=null;try{u=h(e);const i=await crypto.subtle.digest("SHA-256",d.encode(t));c=await crypto.subtle.importKey("raw",i,l,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:s(),controller:o}}let y;onmessage=async e=>{const{type:t,payload:r,start:n,max:l}=e.data;let o=null;if(t==="abort")y?.abort(),y=void 0;else if(t==="work"){if("obfuscated"in r){const{key:a,obfuscated:s}=r||{};o=await m(s,a,l,n)}else{const{algorithm:a,challenge:s,salt:c}=r||{};o=w(s,c,a,l,n)}y=o.controller,o.promise.then(a=>{self.postMessage(a&&{...a,worker:!0})})}}})();
2
+ `,Kr=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",ut],{type:"text/javascript;charset=utf-8"});function Wi(e){let t;try{if(t=Kr&&(self.URL||self.webkitURL).createObjectURL(Kr),!t)throw"";const r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ut),{name:e?.name})}}const Yi="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Yi);const Zi=1,zi=4,Ji=8,Ki=16,Xi=1,Qi=2,wr="[",Xr="[!",Qr="]",ct={},ie=Symbol(),eo="http://www.w3.org/1999/xhtml",en=!1;function tn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var rn=Array.isArray,to=Array.prototype.indexOf,ro=Array.from,Wt=Object.keys,kt=Object.defineProperty,He=Object.getOwnPropertyDescriptor,no=Object.getOwnPropertyDescriptors,io=Object.prototype,oo=Array.prototype,nn=Object.getPrototypeOf,on=Object.isExtensible;const ft=()=>{};function an(e){for(var t=0;t<e.length;t++)e[t]()}function ao(e,t,r=!1){return e===void 0?r?t():t:e}const ge=2,ln=4,Yt=8,Er=16,$e=32,Ge=64,Zt=128,se=256,zt=512,oe=1024,ye=2048,We=4096,dt=8192,Jt=16384,lo=32768,xr=65536,so=1<<19,sn=1<<20,Cr=1<<21,At=Symbol("$state"),un=Symbol("legacy props"),uo=Symbol("");function co(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function fo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ho(e){throw new Error("https://svelte.dev/e/effect_orphan")}function vo(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function go(){throw new Error("https://svelte.dev/e/hydration_failed")}function po(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function mo(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function _o(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function bo(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Kt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let L=!1;function ht(e){L=e}let P;function Ne(e){if(e===null)throw Kt(),ct;return P=e}function vt(){return Ne(Pe(P))}function W(e){if(L){if(Pe(P)!==null)throw Kt(),ct;P=e}}function yo(){for(var e=0,t=P;;){if(t.nodeType===8){var r=t.data;if(r===Qr){if(e===0)return t;e-=1}else(r===wr||r===Xr)&&(e+=1)}var i=Pe(t);t.remove(),t=i}}let wo=!1;function Le(e){if(typeof e!="object"||e===null||At in e)return e;const t=nn(e);if(t!==io&&t!==oo)return e;var r=new Map,i=rn(e),l=T(0),a=$,s=c=>{var f=$;xe(a);var d=c();return xe(f),d};return i&&r.set("length",T(e.length)),new Proxy(e,{defineProperty(c,f,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&mo();var m=r.get(f);return m===void 0?(m=s(()=>T(d.value)),r.set(f,m)):b(m,s(()=>Le(d.value))),!0},deleteProperty(c,f){var d=r.get(f);if(d===void 0)f in c&&(r.set(f,s(()=>T(ie))),kr(l));else{if(i&&typeof f=="string"){var m=r.get("length"),v=Number(f);Number.isInteger(v)&&v<m.v&&b(m,v)}b(d,ie),kr(l)}return!0},get(c,f,d){if(f===At)return e;var m=r.get(f),v=f in c;if(m===void 0&&(!v||He(c,f)?.writable)&&(m=s(()=>T(Le(v?c[f]:ie))),r.set(f,m)),m!==void 0){var _=o(m);return _===ie?void 0:_}return Reflect.get(c,f,d)},getOwnPropertyDescriptor(c,f){var d=Reflect.getOwnPropertyDescriptor(c,f);if(d&&"value"in d){var m=r.get(f);m&&(d.value=o(m))}else if(d===void 0){var v=r.get(f),_=v?.v;if(v!==void 0&&_!==ie)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return d},has(c,f){if(f===At)return!0;var d=r.get(f),m=d!==void 0&&d.v!==ie||Reflect.has(c,f);if(d!==void 0||S!==null&&(!m||He(c,f)?.writable)){d===void 0&&(d=s(()=>T(m?Le(c[f]):ie)),r.set(f,d));var v=o(d);if(v===ie)return!1}return m},set(c,f,d,m){var v=r.get(f),_=f in c;if(i&&f==="length")for(var w=d;w<v.v;w+=1){var F=r.get(w+"");F!==void 0?b(F,ie):w in c&&(F=s(()=>T(ie)),r.set(w+"",F))}v===void 0?(!_||He(c,f)?.writable)&&(v=s(()=>T(void 0)),b(v,s(()=>Le(d))),r.set(f,v)):(_=v.v!==ie,b(v,s(()=>Le(d))));var M=Reflect.getOwnPropertyDescriptor(c,f);if(M?.set&&M.set.call(m,d),!_){if(i&&typeof f=="string"){var U=r.get("length"),I=Number(f);Number.isInteger(I)&&I>=U.v&&b(U,I+1)}kr(l)}return!0},ownKeys(c){o(l);var f=Reflect.ownKeys(c).filter(v=>{var _=r.get(v);return _===void 0||_.v!==ie});for(var[d,m]of r)m.v!==ie&&!(d in c)&&f.push(d);return f},setPrototypeOf(){_o()}})}function kr(e,t=1){b(e,e.v+t)}var cn,fn,dn,hn;function Ar(){if(cn===void 0){cn=window,fn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;dn=He(t,"firstChild").get,hn=He(t,"nextSibling").get,on(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),on(r)&&(r.__t=void 0)}}function Xt(e=""){return document.createTextNode(e)}function de(e){return dn.call(e)}function Pe(e){return hn.call(e)}function Y(e,t){if(!L)return de(e);var r=de(P);return r===null&&(r=P.appendChild(Xt())),Ne(r),r}function It(e,t){if(!L){var r=de(e);return r instanceof Comment&&r.data===""?Pe(r):r}return P}function Z(e,t=1,r=!1){let i=L?P:e;for(var l;t--;)l=i,i=Pe(i);if(!L)return i;var a=i?.nodeType;if(r&&a!==3){var s=Xt();return i===null?l?.after(s):i.before(s),Ne(s),s}return Ne(i),i}function Eo(e){e.textContent=""}function vn(e){return e===this.v}function gn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ir(e){return!gn(e,this.v)}function Qt(e){var t=ge|ye,r=$!==null&&($.f&ge)!==0?$:null;return S===null||r!==null&&(r.f&se)!==0?t|=se:S.f|=sn,{ctx:te,deps:null,effects:null,equals:vn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??S}}function Rt(e){const t=Qt(e);return Sn(t),t}function xo(e){const t=Qt(e);return t.equals=Ir,t}function pn(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Oe(t[r])}}function Co(e){for(var t=e.parent;t!==null;){if((t.f&ge)===0)return t;t=t.parent}return null}function mn(e){var t,r=S;Fe(Co(e));try{pn(e),t=Pn(e)}finally{Fe(r)}return t}function _n(e){var t=mn(e),r=(Me||(e.f&se)!==0)&&e.deps!==null?We:oe;pe(e,r),e.equals(t)||(e.v=t,e.wv=Dn())}function ko(e){S===null&&$===null&&ho(),$!==null&&($.f&se)!==0&&S===null&&fo(),Tt&&co()}function Ao(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ye(e,t,r,i=!0){var l=S,a={ctx:te,deps:null,nodes_start:null,nodes_end:null,f:e|ye,first:null,fn:t,last:null,next:null,parent:l,prev:null,teardown:null,transitions:null,wv:0};if(r)try{Pr(a),a.f|=lo}catch(f){throw Oe(a),f}else t!==null&&ar(a);var s=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&(sn|Zt))===0;if(!s&&i&&(l!==null&&Ao(a,l),$!==null&&($.f&ge)!==0)){var c=$;(c.effects??=[]).push(a)}return a}function Rr(e){const t=Ye(Yt,null,!1);return pe(t,oe),t.teardown=e,t}function $r(e){ko();var t=S!==null&&(S.f&$e)!==0&&te!==null&&!te.m;if(t){var r=te;(r.e??=[]).push({fn:e,effect:S,reaction:$})}else{var i=Sr(e);return i}}function Io(e){const t=Ye(Ge,e,!0);return()=>{Oe(t)}}function Ro(e){const t=Ye(Ge,e,!0);return(r={})=>new Promise(i=>{r.outro?Nr(t,()=>{Oe(t),i(void 0)}):(Oe(t),i(void 0))})}function Sr(e){return Ye(ln,e,!1)}function Tr(e){return Ye(Yt,e,!0)}function we(e,t=[],r=Qt){const i=t.map(r);return bn(()=>e(...i.map(o)))}function bn(e,t=0){return Ye(Yt|Er|t,e,!0)}function Dr(e,t=!0){return Ye(Yt|$e,e,!0,t)}function yn(e){var t=e.teardown;if(t!==null){const r=Tt,i=$;$n(!0),xe(null);try{t.call(null)}finally{$n(r),xe(i)}}}function wn(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var i=r.next;(r.f&Ge)!==0?r.parent=null:Oe(r,t),r=i}}function $o(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&$e)===0&&Oe(t),t=r}}function Oe(e,t=!0){var r=!1;(t||(e.f&so)!==0)&&e.nodes_start!==null&&(En(e.nodes_start,e.nodes_end),r=!0),wn(e,t&&!r),or(e,0),pe(e,Jt);var i=e.transitions;if(i!==null)for(const a of i)a.stop();yn(e);var l=e.parent;l!==null&&l.first!==null&&xn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function En(e,t){for(;e!==null;){var r=e===t?null:Pe(e);e.remove(),e=r}}function xn(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 Nr(e,t){var r=[];Cn(e,r,!0),So(r,()=>{Oe(e),t&&t()})}function So(e,t){var r=e.length;if(r>0){var i=()=>--r||t();for(var l of e)l.out(i)}else t()}function Cn(e,t,r){if((e.f&dt)===0){if(e.f^=dt,e.transitions!==null)for(const s of e.transitions)(s.is_global||r)&&t.push(s);for(var i=e.first;i!==null;){var l=i.next,a=(i.f&xr)!==0||(i.f&$e)!==0;Cn(i,t,a?r:!1),i=l}}}function kn(e){An(e,!0)}function An(e,t){if((e.f&dt)!==0){e.f^=dt,(e.f&oe)===0&&(e.f^=oe),Nt(e)&&(pe(e,ye),ar(e));for(var r=e.first;r!==null;){var i=r.next,l=(r.f&xr)!==0||(r.f&$e)!==0;An(r,l?t:!1),r=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}const To=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let $t=[],St=[];function In(){var e=$t;$t=[],an(e)}function Rn(){var e=St;St=[],an(e)}function Lr(e){$t.length===0&&queueMicrotask(In),$t.push(e)}function Do(e){St.length===0&&To(Rn),St.push(e)}function No(){$t.length>0&&In(),St.length>0&&Rn()}let er=!1,tr=!1,rr=null,Ze=!1,Tt=!1;function $n(e){Tt=e}let Dt=[],Il=[],$=null,Ee=!1;function xe(e){$=e}let S=null;function Fe(e){S=e}let Se=null;function Sn(e){$!==null&&$.f&Cr&&(Se===null?Se=[e]:Se.push(e))}let ee=null,ue=0,he=null;function Lo(e){he=e}let Tn=1,nr=0,Me=!1;function Dn(){return++Tn}function Nt(e){var t=e.f;if((t&ye)!==0)return!0;if((t&We)!==0){var r=e.deps,i=(t&se)!==0;if(r!==null){var l,a,s=(t&zt)!==0,c=i&&S!==null&&!Me,f=r.length;if(s||c){var d=e,m=d.parent;for(l=0;l<f;l++)a=r[l],(s||!a?.reactions?.includes(d))&&(a.reactions??=[]).push(d);s&&(d.f^=zt),c&&m!==null&&(m.f&se)===0&&(d.f^=se)}for(l=0;l<f;l++)if(a=r[l],Nt(a)&&_n(a),a.wv>e.wv)return!0}(!i||S!==null&&!Me)&&pe(e,oe)}return!1}function Po(e,t){for(var r=t;r!==null;){if((r.f&Zt)!==0)try{r.fn(e);return}catch{r.f^=Zt}r=r.parent}throw er=!1,e}function Nn(e){return(e.f&Jt)===0&&(e.parent===null||(e.parent.f&Zt)===0)}function ir(e,t,r,i){if(er){if(r===null&&(er=!1),Nn(t))throw e;return}if(r!==null&&(er=!0),Po(e,t),Nn(t))throw e}function Ln(e,t,r=!0){var i=e.reactions;if(i!==null)for(var l=0;l<i.length;l++){var a=i[l];Se?.includes(e)||((a.f&ge)!==0?Ln(a,t,!1):t===a&&(r?pe(a,ye):(a.f&oe)!==0&&pe(a,We),ar(a)))}}function Pn(e){var t=ee,r=ue,i=he,l=$,a=Me,s=Se,c=te,f=Ee,d=e.f;ee=null,ue=0,he=null,Me=(d&se)!==0&&(Ee||!Ze||$===null),$=(d&($e|Ge))===0?e:null,Se=null,Vn(e.ctx),Ee=!1,nr++,e.f|=Cr;try{var m=(0,e.fn)(),v=e.deps;if(ee!==null){var _;if(or(e,ue),v!==null&&ue>0)for(v.length=ue+ee.length,_=0;_<ee.length;_++)v[ue+_]=ee[_];else e.deps=v=ee;if(!Me)for(_=ue;_<v.length;_++)(v[_].reactions??=[]).push(e)}else v!==null&&ue<v.length&&(or(e,ue),v.length=ue);if(qn()&&he!==null&&!Ee&&v!==null&&(e.f&(ge|We|ye))===0)for(_=0;_<he.length;_++)Ln(he[_],e);return l!==null&&l!==e&&(nr++,he!==null&&(i===null?i=he:i.push(...he))),m}finally{ee=t,ue=r,he=i,$=l,Me=a,Se=s,Vn(c),Ee=f,e.f^=Cr}}function Oo(e,t){let r=t.reactions;if(r!==null){var i=to.call(r,e);if(i!==-1){var l=r.length-1;l===0?r=t.reactions=null:(r[i]=r[l],r.pop())}}r===null&&(t.f&ge)!==0&&(ee===null||!ee.includes(t))&&(pe(t,We),(t.f&(se|zt))===0&&(t.f^=zt),pn(t),or(t,0))}function or(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)Oo(e,r[i])}function Pr(e){var t=e.f;if((t&Jt)===0){pe(e,oe);var r=S,i=te,l=Ze;S=e,Ze=!0;try{(t&Er)!==0?$o(e):wn(e),yn(e);var a=Pn(e);e.teardown=typeof a=="function"?a:null,e.wv=Tn;var s=e.deps,c;en&&wo&&e.f&ye}catch(f){ir(f,e,r,i||e.ctx)}finally{Ze=l,S=r}}}function Fo(){try{vo()}catch(e){if(rr!==null)ir(e,rr,null);else throw e}}function On(){var e=Ze;try{var t=0;for(Ze=!0;Dt.length>0;){t++>1e3&&Fo();var r=Dt,i=r.length;Dt=[];for(var l=0;l<i;l++){var a=Vo(r[l]);Mo(a)}Lt.clear()}}finally{tr=!1,Ze=e,rr=null}}function Mo(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var i=e[r];if((i.f&(Jt|dt))===0)try{Nt(i)&&(Pr(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?xn(i):i.fn=null))}catch(l){ir(l,i,null,i.ctx)}}}function ar(e){tr||(tr=!0,queueMicrotask(On));for(var t=rr=e;t.parent!==null;){t=t.parent;var r=t.f;if((r&(Ge|$e))!==0){if((r&oe)===0)return;t.f^=oe}}Dt.push(t)}function Vo(e){for(var t=[],r=e;r!==null;){var i=r.f,l=(i&($e|Ge))!==0,a=l&&(i&oe)!==0;if(!a&&(i&dt)===0){if((i&ln)!==0)t.push(r);else if(l)r.f^=oe;else try{Nt(r)&&Pr(r)}catch(f){ir(f,r,null,r.ctx)}var s=r.first;if(s!==null){r=s;continue}}var c=r.parent;for(r=r.next;r===null&&c!==null;)r=c.next,c=c.parent}return t}function E(e){for(var t;;){if(No(),Dt.length===0)return t;tr=!0,On()}}async function Or(){await Promise.resolve(),E()}function o(e){var t=e.f,r=(t&ge)!==0;if($!==null&&!Ee){if(!Se?.includes(e)){var i=$.deps;e.rv<nr&&(e.rv=nr,ee===null&&i!==null&&i[ue]===e?ue++:ee===null?ee=[e]:(!Me||!ee.includes(e))&&ee.push(e))}}else if(r&&e.deps===null&&e.effects===null){var l=e,a=l.parent;a!==null&&(a.f&se)===0&&(l.f^=se)}return r&&(l=e,Nt(l)&&_n(l)),Tt&&Lt.has(e)?Lt.get(e):e.v}function ze(e){var t=Ee;try{return Ee=!0,e()}finally{Ee=t}}const Uo=-7169;function pe(e,t){e.f=e.f&Uo|t}const Lt=new Map;function Fn(e,t){var r={f:0,v:e,reactions:null,equals:vn,rv:0,wv:0};return r}function T(e,t){const r=Fn(e);return Sn(r),r}function Fr(e,t=!1){const r=Fn(e);return t||(r.equals=Ir),r}function b(e,t,r=!1){$!==null&&!Ee&&qn()&&($.f&(ge|Er))!==0&&!Se?.includes(e)&&bo();let i=r?Le(t):t;return jo(e,i)}function jo(e,t){if(!e.equals(t)){var r=e.v;Tt?Lt.set(e,t):Lt.set(e,r),e.v=t,(e.f&ge)!==0&&((e.f&ye)!==0&&mn(e),pe(e,(e.f&se)===0?oe:We)),e.wv=Dn(),Mn(e,ye),S!==null&&(S.f&oe)!==0&&(S.f&($e|Ge))===0&&(he===null?Lo([e]):he.push(e))}return t}function Mn(e,t){var r=e.reactions;if(r!==null)for(var i=r.length,l=0;l<i;l++){var a=r[l],s=a.f;(s&ye)===0&&(pe(a,t),(s&(oe|se))!==0&&((s&ge)!==0?Mn(a,We):ar(a)))}}let te=null;function Vn(e){te=e}function Un(e,t=!1,r){var i=te={p:te,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};Rr(()=>{i.d=!0})}function jn(e){const t=te;if(t!==null){e!==void 0&&(t.x=e);const s=t.e;if(s!==null){var r=S,i=$;t.e=null;try{for(var l=0;l<s.length;l++){var a=s[l];Fe(a.effect),xe(a.reaction),Sr(a.fn)}}finally{Fe(r),xe(i)}}te=t.p,t.m=!0}return e||{}}function qn(){return!0}const qo=["touchstart","touchmove"];function Bo(e){return qo.includes(e)}function Ho(e,t){if(t){const r=document.body;e.autofocus=!0,Lr(()=>{document.activeElement===r&&e.focus()})}}let Bn=!1;function Hn(){Bn||(Bn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Gn(e){var t=$,r=S;xe(null),Fe(null);try{return e()}finally{xe(t),Fe(r)}}function Go(e,t,r,i=r){e.addEventListener(t,()=>Gn(r));const l=e.__on_r;l?e.__on_r=()=>{l(),i(!0)}:e.__on_r=()=>i(!0),Hn()}const Wn=new Set,Mr=new Set;function Wo(e,t,r,i={}){function l(a){if(i.capture||Pt.call(t,a),!a.cancelBubble)return Gn(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Lr(()=>{t.addEventListener(e,l,i)}):t.addEventListener(e,l,i),l}function Ve(e,t,r,i,l){var a={capture:i,passive:l},s=Wo(e,t,r,a);(t===document.body||t===window||t===document)&&Rr(()=>{t.removeEventListener(e,s,a)})}function Yo(e){for(var t=0;t<e.length;t++)Wn.add(e[t]);for(var r of Mr)r(e)}function Pt(e){var t=this,r=t.ownerDocument,i=e.type,l=e.composedPath?.()||[],a=l[0]||e.target,s=0,c=e.__root;if(c){var f=l.indexOf(c);if(f!==-1&&(t===document||t===window)){e.__root=t;return}var d=l.indexOf(t);if(d===-1)return;f<=d&&(s=f)}if(a=l[s]||e.target,a!==t){kt(e,"currentTarget",{configurable:!0,get(){return a||r}});var m=$,v=S;xe(null),Fe(null);try{for(var _,w=[];a!==null;){var F=a.assignedSlot||a.parentNode||a.host||null;try{var M=a["__"+i];if(M!=null&&(!a.disabled||e.target===a))if(rn(M)){var[U,...I]=M;U.apply(a,[e,...I])}else M.call(a,e)}catch(re){_?w.push(re):_=re}if(e.cancelBubble||F===t||F===null)break;a=F}if(_){for(let re of w)queueMicrotask(()=>{throw re});throw _}}finally{e.__root=t,delete e.currentTarget,xe(m),Fe(v)}}}function Vr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Ce(e,t){var r=S;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function me(e,t){var r=(t&Xi)!==0,i=(t&Qi)!==0,l,a=!e.startsWith("<!>");return()=>{if(L)return Ce(P,null),P;l===void 0&&(l=Vr(a?e:"<!>"+e),r||(l=de(l)));var s=i||fn?document.importNode(l,!0):l.cloneNode(!0);if(r){var c=de(s),f=s.lastChild;Ce(c,f)}else Ce(s,s);return s}}function lr(e,t,r="svg"){var i=!e.startsWith("<!>"),l=`<${r}>${i?e:"<!>"+e}</${r}>`,a;return()=>{if(L)return Ce(P,null),P;if(!a){var s=Vr(l),c=de(s);a=de(c)}var f=a.cloneNode(!0);return Ce(f,f),f}}function sr(){if(L)return Ce(P,null),P;var e=document.createDocumentFragment(),t=document.createComment(""),r=Xt();return e.append(t,r),Ce(t,r),e}function B(e,t){if(L){S.nodes_end=P,vt();return}e!==null&&e.before(t)}function Zo(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function Yn(e,t){return Zn(e,t)}function zo(e,t){Ar(),t.intro=t.intro??!1;const r=t.target,i=L,l=P;try{for(var a=de(r);a&&(a.nodeType!==8||a.data!==wr);)a=Pe(a);if(!a)throw ct;ht(!0),Ne(a),vt();const s=Zn(e,{...t,anchor:a});if(P===null||P.nodeType!==8||P.data!==Qr)throw Kt(),ct;return ht(!1),s}catch(s){if(s===ct)return t.recover===!1&&go(),Ar(),Eo(r),ht(!1),Yn(e,t);throw s}finally{ht(i),Ne(l)}}const gt=new Map;function Zn(e,{target:t,anchor:r,props:i={},events:l,context:a,intro:s=!0}){Ar();var c=new Set,f=v=>{for(var _=0;_<v.length;_++){var w=v[_];if(!c.has(w)){c.add(w);var F=Bo(w);t.addEventListener(w,Pt,{passive:F});var M=gt.get(w);M===void 0?(document.addEventListener(w,Pt,{passive:F}),gt.set(w,1)):gt.set(w,M+1)}}};f(ro(Wn)),Mr.add(f);var d=void 0,m=Ro(()=>{var v=r??t.appendChild(Xt());return Dr(()=>{if(a){Un({});var _=te;_.c=a}l&&(i.$$events=l),L&&Ce(v,null),d=e(v,i)||{},L&&(S.nodes_end=P),a&&jn()}),()=>{for(var _ of c){t.removeEventListener(_,Pt);var w=gt.get(_);--w===0?(document.removeEventListener(_,Pt),gt.delete(_)):gt.set(_,w)}Mr.delete(f),v!==r&&v.parentNode?.removeChild(v)}});return Ur.set(d,m),d}let Ur=new WeakMap;function Jo(e,t){const r=Ur.get(e);return r?(Ur.delete(e),r(t)):Promise.resolve()}function z(e,t,[r,i]=[0,0]){L&&r===0&&vt();var l=e,a=null,s=null,c=ie,f=r>0?xr:0,d=!1;const m=(_,w=!0)=>{d=!0,v(w,_)},v=(_,w)=>{if(c===(c=_))return;let F=!1;if(L&&i!==-1){if(r===0){const U=l.data;U===wr?i=0:U===Xr?i=1/0:(i=parseInt(U.substring(1)),i!==i&&(i=c?1/0:-1))}const M=i>r;!!c===M&&(l=yo(),Ne(l),ht(!1),F=!0,i=-1)}c?(a?kn(a):w&&(a=Dr(()=>w(l))),s&&Nr(s,()=>{s=null})):(s?kn(s):w&&(s=Dr(()=>w(l,[r+1,i]))),a&&Nr(a,()=>{a=null})),F&&ht(!0)};bn(()=>{d=!1,t(m),d||v(null,null)},f),L&&(l=P)}function Je(e,t,r=!1,i=!1,l=!1){var a=e,s="";we(()=>{var c=S;if(s===(s=t()??"")){L&&vt();return}if(c.nodes_start!==null&&(En(c.nodes_start,c.nodes_end),c.nodes_start=c.nodes_end=null),s!==""){if(L){P.data;for(var f=vt(),d=f;f!==null&&(f.nodeType!==8||f.data!=="");)d=f,f=Pe(f);if(f===null)throw Kt(),ct;Ce(P,d),a=Ne(f);return}var m=s+"";r?m=`<svg>${m}</svg>`:i&&(m=`<math>${m}</math>`);var v=Vr(m);if((r||i)&&(v=de(v)),Ce(de(v),v.lastChild),r||i)for(;de(v);)a.before(de(v));else a.before(v)}})}function Ko(e,t,r,i,l){L&&vt();var a=t.$$slots?.[r],s=!1;a===!0&&(a=t.children,s=!0),a===void 0||a(e,s?()=>i:i)}const zn=[...`
3
+ \r\f \v\uFEFF`];function Xo(e,t,r){var i=""+e;if(r){for(var l in r)if(r[l])i=i?i+" "+l:l;else if(i.length)for(var a=l.length,s=0;(s=i.indexOf(l,s))>=0;){var c=s+a;(s===0||zn.includes(i[s-1]))&&(c===i.length||zn.includes(i[c]))?i=(s===0?"":i.substring(0,s))+i.substring(c+1):s=c}}return i===""?null:i}function Qo(e,t,r,i,l,a){var s=e.__className;if(L||s!==r||s===void 0){var c=Xo(r,i,a);(!L||c!==e.getAttribute("class"))&&(c==null?e.removeAttribute("class"):e.className=c),e.__className=r}else if(a&&l!==a)for(var f in a){var d=!!a[f];(l==null||d!==!!l[f])&&e.classList.toggle(f,d)}return a}const ea=Symbol("is custom element"),ta=Symbol("is html");function Jn(e){if(L){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;R(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var l=e.checked;R(e,"checked",null),e.checked=l}}};e.__on_r=r,Do(r),Hn()}}function ra(e,t){var r=Kn(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function R(e,t,r,i){var l=Kn(e);L&&(l[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||l[t]!==(l[t]=r)&&(t==="loading"&&(e[uo]=r),r==null?e.removeAttribute(t):typeof r!="string"&&na(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Kn(e){return e.__attributes??={[ea]:e.nodeName.includes("-"),[ta]:e.namespaceURI===eo}}var Xn=new Map;function na(e){var t=Xn.get(e.nodeName);if(t)return t;Xn.set(e.nodeName,t=[]);for(var r,i=e,l=Element.prototype;l!==i;){r=no(i);for(var a in r)r[a].set&&t.push(a);i=nn(i)}return t}function ia(e,t,r=t){Go(e,"change",i=>{var l=i?e.defaultChecked:e.checked;r(l)}),(L&&e.defaultChecked!==e.checked||ze(t)==null)&&r(e.checked),Tr(()=>{var i=t();e.checked=!!i})}function Qn(e,t){return e===t||e?.[At]===t}function ur(e={},t,r,i){return Sr(()=>{var l,a;return Tr(()=>{l=a,a=[],ze(()=>{e!==r(...a)&&(t(e,...a),l&&Qn(r(...l),e)&&t(null,...l))})}),()=>{Lr(()=>{a&&Qn(r(...a),e)&&t(null,...a)})}}),e}function ei(e){te===null&&tn(),$r(()=>{const t=ze(e);if(typeof t=="function")return t})}function oa(e){te===null&&tn(),ei(()=>()=>ze(e))}function ti(e,t,r){if(e==null)return t(void 0),ft;const i=ze(()=>e.subscribe(t,r));return i.unsubscribe?()=>i.unsubscribe():i}const pt=[];function aa(e,t=ft){let r=null;const i=new Set;function l(c){if(gn(e,c)&&(e=c,r)){const f=!pt.length;for(const d of i)d[1](),pt.push(d,e);if(f){for(let d=0;d<pt.length;d+=2)pt[d][0](pt[d+1]);pt.length=0}}}function a(c){l(c(e))}function s(c,f=ft){const d=[c,f];return i.add(d),i.size===1&&(r=t(l,a)||ft),c(e),()=>{i.delete(d),i.size===0&&r&&(r(),r=null)}}return{set:l,update:a,subscribe:s}}function cr(e){let t;return ti(e,r=>t=r)(),t}let fr=!1,jr=Symbol();function la(e,t,r){const i=r[t]??={store:null,source:Fr(void 0),unsubscribe:ft};if(i.store!==e&&!(jr in r))if(i.unsubscribe(),i.store=e??null,e==null)i.source.v=void 0,i.unsubscribe=ft;else{var l=!0;i.unsubscribe=ti(e,a=>{l?i.source.v=a:b(i.source,a)}),l=!1}return e&&jr in r?cr(e):o(i.source)}function sa(){const e={};function t(){Rr(()=>{for(var r in e)e[r].unsubscribe();kt(e,jr,{enumerable:!1,value:!0})})}return[e,t]}function ua(e){var t=fr;try{return fr=!1,[e(),fr]}finally{fr=t}}function ri(e){return e.ctx?.d??!1}function x(e,t,r,i){var l=(r&Zi)!==0,a=!0,s=(r&Ji)!==0,c=(r&Ki)!==0,f=!1,d;s?[d,f]=ua(()=>e[t]):d=e[t];var m=At in e||un in e,v=s&&(He(e,t)?.set??(m&&t in e&&(j=>e[t]=j)))||void 0,_=i,w=!0,F=!1,M=()=>(F=!0,w&&(w=!1,c?_=ze(i):_=i),_);d===void 0&&i!==void 0&&(v&&a&&po(),d=M(),v&&v(d));var U;if(U=()=>{var j=e[t];return j===void 0?M():(w=!0,F=!1,j)},(r&zi)===0)return U;if(v){var I=e.$$legacy;return function(j,ce){return arguments.length>0?((!ce||I||f)&&v(ce?U():j),j):U()}}var re=!1,Te=Fr(d),Q=Qt(()=>{var j=U(),ce=o(Te);return re?(re=!1,ce):Te.v=j});return s&&o(Q),l||(Q.equals=Ir),function(j,ce){if(arguments.length>0){const Ke=ce?o(Q):s?Le(j):j;if(!Q.equals(Ke)){if(re=!0,b(Te,Ke),F&&_!==void 0&&(_=Ke),ri(Q))return j;ze(()=>o(Q))}return j}return ri(Q)?Q.v:o(Q)}}function ca(e){return new fa(e)}class fa{#t;#e;constructor(t){var r=new Map,i=(a,s)=>{var c=Fr(s);return r.set(a,c),c};const l=new Proxy({...t.props||{},$$events:{}},{get(a,s){return o(r.get(s)??i(s,Reflect.get(a,s)))},has(a,s){return s===un?!0:(o(r.get(s)??i(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,c){return b(r.get(s)??i(s,c),c),Reflect.set(a,s,c)}});this.#e=(t.hydrate?zo:Yn)(t.component,{target:t.target,anchor:t.anchor,props:l,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&E(),this.#t=l.$$events;for(const a of Object.keys(this.#e))a==="$set"||a==="$destroy"||a==="$on"||kt(this,a,{get(){return this.#e[a]},set(s){this.#e[a]=s},enumerable:!0});this.#e.$set=a=>{Object.assign(l,a)},this.#e.$destroy=()=>{Jo(this.#e)}}$set(t){this.#e.$set(t)}$on(t,r){this.#t[t]=this.#t[t]||[];const i=(...l)=>r.call(this,...l);return this.#t[t].push(i),()=>{this.#t[t]=this.#t[t].filter(l=>l!==i)}}$destroy(){this.#e.$destroy()}}let ni;typeof HTMLElement=="function"&&(ni=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const i=this.$$c.$on(e,t);this.$$l_u.set(t,i)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const i=this.$$l_u.get(t);i&&(i(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(i){return l=>{const a=document.createElement("slot");i!=="default"&&(a.name=i),B(l,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=da(this);for(const i of this.$$s)i in r&&(i==="default"&&!this.$$d.children?(this.$$d.children=e(i),t.default=!0):t[i]=e(i));for(const i of this.attributes){const l=this.$$g_p(i.name);l in this.$$d||(this.$$d[l]=dr(l,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=ca({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Io(()=>{Tr(()=>{this.$$r=!0;for(const i of Wt(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const l=dr(i,this.$$d[i],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,l)}this.$$r=!1})});for(const i in this.$$l)for(const l of this.$$l[i]){const a=this.$$c.$on(i,l);this.$$l_u.set(l,a)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=dr(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Wt(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function dr(e,t,r,i){const l=r[e]?.type;if(t=l==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(l){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(l){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function da(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ha(e,t,r,i,l,a){let s=class extends ni{constructor(){super(e,r,l),this.$$p_d=t}static get observedAttributes(){return Wt(t).map(c=>(t[c].attribute||c).toLowerCase())}};return Wt(t).forEach(c=>{kt(s.prototype,c,{get(){return this.$$c&&c in this.$$c?this.$$c[c]:this.$$d[c]},set(f){f=dr(c,f,t),this.$$d[c]=f;var d=this.$$c;if(d){var m=He(d,c)?.get;m?d[c]=f:d.$set({[c]:f})}}})}),i.forEach(c=>{kt(s.prototype,c,{get(){return this.$$c?.[c]}})}),e.element=s,s}const ii=new TextEncoder;function va(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function ga(e,t="SHA-256",r=1e5){const i=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const l=await oi(i,e,t);return{algorithm:t,challenge:l,salt:i,signature:""}}async function oi(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 va(await crypto.subtle.digest(r.toUpperCase(),ii.encode(e+t)))}function pa(e,t,r="SHA-256",i=1e6,l=0){const a=new AbortController,s=Date.now();return{promise:(async()=>{for(let f=l;f<=i;f+=1){if(a.signal.aborted)return null;if(await oi(t,f,r)===e)return{number:f,took:Date.now()-s}}return null})(),controller:a}}function ai(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function ma(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 _a(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 ba(e,t="",r=1e6,i=0){const l="AES-GCM",a=new AbortController,s=Date.now(),c=async()=>{for(let m=i;m<=r;m+=1){if(a.signal.aborted||!f||!d)return null;try{const v=await crypto.subtle.decrypt({name:l,iv:_a(m)},f,d);if(v)return{clearText:new TextDecoder().decode(v),took:Date.now()-s}}catch{}}return null};let f=null,d=null;try{d=ma(e);const m=await crypto.subtle.digest("SHA-256",ii.encode(t));f=await crypto.subtle.importKey("raw",m,l,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:a}}return{promise:c(),controller:a}}var y=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(y||{}),X=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(X||{});globalThis.altchaPlugins=globalThis.altchaPlugins||[],globalThis.altchaI18n=globalThis.altchaI18n||{get:e=>cr(globalThis.altchaI18n.store)[e],set:(e,t)=>{Object.assign(cr(globalThis.altchaI18n.store),{[e]:t}),globalThis.altchaI18n.store.set(cr(globalThis.altchaI18n.store))},store:aa({})};const ya={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",ya);const qr=(e,t)=>{let r=xo(()=>ao(t?.(),24));var i=Ca();we(()=>{R(i,"width",o(r)),R(i,"height",o(r))}),B(e,i)};function wa(e,t){e.code==="Space"&&(e.preventDefault(),e.stopImmediatePropagation(),t())}function Ea(e,t){e.preventDefault(),t()}function xa(e,t,r,i,l,a,s,c){[y.UNVERIFIED,y.ERROR,y.EXPIRED,y.CODE].includes(o(t))?r()!==!1&&o(i)?.reportValidity()===!1?b(l,!1):a()?s():c():b(l,!0)}var Ca=lr('<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>'),ka=me('<input type="hidden">'),Aa=me('<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>'),Ia=lr('<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>'),Ra=lr('<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>'),$a=lr('<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>'),Sa=me('<button type="button" class="altcha-code-challenge-audio"><!></button>'),Ta=me("<audio hidden autoplay><source></audio>"),Da=me('<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>'),Na=me("<div><!></div>"),La=me("<div><!></div>"),Pa=me('<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>'),Oa=me('<div class="altcha-footer"><div><!></div></div>'),Fa=me('<div class="altcha-anchor-arrow"></div>'),Ma=me('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>',1);function li(e,t){Un(t,!0);const[r,i]=sa(),l=()=>la(Ua,"$altchaI18nStore",r);let a=x(t,"auto",7,void 0),s=x(t,"blockspam",7,void 0),c=x(t,"challengeurl",7,void 0),f=x(t,"challengejson",7,void 0),d=x(t,"credentials",7,void 0),m=x(t,"customfetch",7,void 0),v=x(t,"debug",7,!1),_=x(t,"delay",7,0),w=x(t,"disableautofocus",7,!1),F=x(t,"refetchonexpire",7,!0),M=x(t,"disablerefetchonexpire",23,()=>!F()),U=x(t,"expire",7,void 0),I=x(t,"floating",7,void 0),re=x(t,"floatinganchor",7,void 0),Te=x(t,"floatingoffset",7,void 0),Q=x(t,"floatingpersist",7,!1),j=x(t,"hidefooter",7,!1),ce=x(t,"hidelogo",7,!1),Ke=x(t,"id",7,void 0),hr=x(t,"language",7,void 0),Xe=x(t,"name",7,"altcha"),Qe=x(t,"maxnumber",7,1e6),Ot=x(t,"mockerror",7,!1),Ue=x(t,"obfuscated",7,void 0),_e=x(t,"overlay",7,void 0),Ft=x(t,"overlaycontent",7,void 0),vr=x(t,"plugins",7,void 0),et=x(t,"sentinel",7,void 0),ke=x(t,"spamfilter",7,!1),mt=x(t,"strings",7,void 0),ve=x(t,"test",7,!1),ne=x(t,"verifyurl",7,void 0),_t=x(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),Mt=x(t,"workerurl",7,void 0);const{altchaI18n:Va}=globalThis,Ua=Va.store,ci=["SHA-256","SHA-384","SHA-512"],ja="https://altcha.org/",je=(n,u)=>{t.$$host.dispatchEvent(new CustomEvent(n,{detail:u}))},fi=document.documentElement.lang?.split("-")?.[0],Br=Rt(()=>c()&&new URL(c(),location.origin).host.endsWith(".altcha.org")&&!!c()?.includes("apiKey=ckey_")),gr=Rt(()=>f()?ki(f()):void 0),qa=Rt(()=>mt()?ki(mt()):{}),O=Rt(()=>({...vi(l()),...o(qa)})),di=Rt(()=>`${Ke()||Xe()}_checkbox_${Math.round(Math.random()*1e8)}`);let tt=T(null),Vt=T(!1),G=T(null),k=T(Le(y.UNVERIFIED)),V=T(void 0),Ut=T(null),qe=T(null),fe=T(null),Hr=T(null),bt=T(null),D=T(null),jt=T(null),rt=T(null),Ae=null,J=T(null),nt=T(!1),Be=[],Gr=T(!1),Ie=T(null);$r(()=>{tl(o(rt))}),$r(()=>{rl(o(k))}),oa(()=>{Ba(),b(jt,null),o(D)&&(o(D).removeEventListener("submit",yi),o(D).removeEventListener("reset",wi),o(D).removeEventListener("focusin",bi),b(D,null)),Ae&&(clearTimeout(Ae),Ae=null),document.removeEventListener("click",mi),document.removeEventListener("scroll",_i),window.removeEventListener("resize",Ci)}),ei(()=>{A("mounted","2.2.4"),A("workers",_t()),Ya(),A("plugins",Be.length?Be.map(n=>n.constructor.pluginName).join(", "):"none"),ve()&&A("using test mode"),U()&&Yr(U()),a()!==void 0&&A("auto",a()),I()!==void 0&&$i(I()),b(D,o(V)?.closest("form"),!0),o(D)&&(o(D).addEventListener("submit",yi,{capture:!0}),o(D).addEventListener("reset",wi),(a()==="onfocus"||Q()==="focus")&&o(D).addEventListener("focusin",bi)),_e()&&Si(!0),a()==="onload"&&(Ue()?qt():De()),o(Br)&&(j()||ce())&&A("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{je("load")})});function pr(n,u){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:u.number,salt:n.salt,signature:n.signature,test:ve()?!0:void 0,took:u.took}))}function Ba(){for(const n of Be)n.destroy()}function hi(){c()&&!M()&&o(k)===y.VERIFIED?De():it(y.EXPIRED,o(O).expired)}async function Ha(){if(Ot())throw A("mocking error"),new Error("Mocked error.");if(o(gr))return A("using provided json data"),Ai(o(gr).salt),o(gr);if(ve())return A("generating test challenge",{test:ve()}),ga(typeof ve()!="boolean"?+ve():void 0);{if(!c()&&o(D)){const g=o(D).getAttribute("action");g?.includes("/form/")&&c(g+"/altcha")}if(!c())throw new Error("Attribute challengeurl not set.");A("fetching challenge from",c());const n={credentials:typeof d()=="boolean"?"include":d(),headers:ke()!==!1?{"x-altcha-spam-filter":"1"}:{}},u=await Wr()(c(),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 h=u.headers.get("X-Altcha-Config"),p=await u.json();if(Ai(p.salt),h)try{const g=JSON.parse(h);g&&typeof g=="object"&&(g.verifyurl&&!g.verifyurl.startsWith("fn:")&&(g.verifyurl=pi(g.verifyurl)),Ni(g))}catch(g){A("unable to configure from X-Altcha-Config",g)}return p}}function Ga(n){const u=o(D)?.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return u?.value?.slice(u.value.indexOf("@"))||void 0}function Wr(){let n=fetch;if(m())if(A("using customfetch"),typeof m()=="string"){if(n=globalThis[m()]||null,!n)throw new Error(`Custom fetch function not found: ${m()}`)}else n=m();return n}function vi(n,u=[hr()||"",document.documentElement.lang||"",...navigator.languages]){const h=Object.keys(n).map(g=>g.toLowerCase()),p=u.reduce((g,C)=>(C=C.toLowerCase(),g||(n[C]?C:null)||h.find(N=>C.split("-")[0]===N.split("-")[0])||null),null);return n[p||"en"]}function Wa(){return ke()==="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 ke()=="object"?ke():{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 gi(n){return[...o(D)?.querySelectorAll(n?.length?n.map(h=>`input[name="${h}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')||[]].reduce((h,p)=>{const g=p.name,C=p.value;return g&&C&&(h[g]=/\n/.test(C)?C.replace(new RegExp("(?<!\\r)\\n","g"),`\r
4
+ `):C),h},{})}function pi(n,u){const h=new URL(c()||location.origin),p=new URL(n,h);if(p.search||(p.search=h.search),u)for(const g in u)u[g]!==void 0&&u[g]!==null&&p.searchParams.set(g,u[g]);return p.toString()}function Ya(){const n=vr()!==void 0?vr().split(","):void 0;for(const u of globalThis.altchaPlugins)(!n||n.includes(u.pluginName))&&Be.push(new u({el:o(V),clarify:qt,dispatch:je,getConfiguration:Li,getFloatingAnchor:Pi,getState:Oi,log:A,reset:it,solve:Di,setState:Re,setFloatingAnchor:Fi,verify:De}))}function A(...n){(v()||n.some(u=>u instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${Xe()}]`,...n)}function Za(){b(J,X.PAUSED,!0)}function za(n){b(J,X.ERROR,!0)}function Ja(){b(J,X.READY,!0)}function Ka(){b(J,X.LOADING,!0)}function Xa(){b(J,X.PLAYING,!0)}function Qa(){b(J,X.PAUSED,!0)}function el(n){if(n.preventDefault(),n.stopPropagation(),o(G)){const u=new FormData(n.target),h=String(u.get("code"));if(ne()?.startsWith("fn:")){const p=ne().replace(/^fn:/,"");if(A(`calling ${p} function instead of verifyurl`),!(p in globalThis))throw new Error(`Global function "${p}" is undefined.`);return globalThis[p]({challenge:o(G).challenge,code:h,solution:o(G).solution})}b(nt,!0),Ii(pr(o(G).challenge,o(G).solution),h).then(({reason:p,verified:g})=>{g?(b(G,null),Re(y.VERIFIED),A("verified"),Or().then(()=>{o(Hr)?.focus(),je("verified",{payload:o(Ie)}),a()==="onsubmit"?Ri(o(jt)):_e()&&Bt()})):(it(),b(rt,p||"Verification failed",!0))}).catch(p=>{b(G,null),Re(y.ERROR,p),A("sentinel verification failed:",p)}).finally(()=>{b(nt,!1)})}}function mi(n){const u=n.target;I()&&u&&!o(V).contains(u)&&(o(k)===y.VERIFIED&&Q()===!1||o(k)===y.VERIFIED&&Q()==="focus"&&!o(D)?.matches(":focus-within")||a()==="off"&&o(k)===y.UNVERIFIED)&&Bt()}function _i(){I()&&o(k)!==y.UNVERIFIED&&Ht()}function tl(n){for(const u of Be)typeof u.onErrorChange=="function"&&u.onErrorChange(o(rt))}function bi(n){o(k)===y.UNVERIFIED?De():I()&&Q()==="focus"&&o(k)===y.VERIFIED&&mr()}function yi(n){n.target?.hasAttribute("data-code-challenge-form")||(b(jt,n.submitter,!0),o(D)&&a()==="onsubmit"?(o(jt)?.blur(),o(k)===y.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),De().then(()=>{Ri(o(jt))})):o(k)!==y.VERIFIED&&(n.preventDefault(),n.stopPropagation(),o(k)===y.VERIFYING&&Ei())):o(D)&&I()&&a()==="off"&&o(k)===y.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),mr()))}function wi(){it()}function Ei(){o(k)===y.VERIFYING&&o(O).waitAlert&&alert(o(O).waitAlert)}function xi(){o(qe)?o(qe).paused?(o(qe).currentTime=0,o(qe).play()):o(qe).pause():(b(Gr,!0),requestAnimationFrame(()=>{o(qe)?.play()}))}function rl(n){for(const u of Be)typeof u.onStateChange=="function"&&u.onStateChange(o(k));I()&&o(k)!==y.UNVERIFIED&&requestAnimationFrame(()=>{Ht()}),b(Vt,o(k)===y.VERIFIED),_e()&&o(fe)&&(o(k)!==y.UNVERIFIED?mr():Bt())}function Ci(){I()&&Ht()}function ki(n){return JSON.parse(n)}function Ai(n){const u=new URLSearchParams(n.split("?")?.[1]),h=u.get("expires")||u.get("expire");if(h){const p=new Date(+h*1e3),g=isNaN(p.getTime())?0:p.getTime()-Date.now();g>0&&Yr(g)}else Ae&&(clearTimeout(Ae),Ae=null)}async function nl(n){if(!ne())throw new Error("Attribute verifyurl not set.");A("requesting server verification from",ne());const u={payload:n};if(ke()!==!1){const{blockedCountries:g,classifier:C,disableRules:N,email:H,expectedLanguages:q,expectedCountries:ae,fields:le,ipAddress:at,text:wt,timeZone:lt}=Wa();u.blockedCountries=g,u.classifier=C,u.disableRules=N,u.email=H===!1?void 0:Ga(H),u.expectedCountries=ae,u.expectedLanguages=q||(fi?[fi]:void 0),u.fields=le===!1?void 0:gi(le),u.ipAddress=at===!1?void 0:at||"auto",u.text=wt,u.timeZone=lt===!1?void 0:lt||ai()}const h=await Wr()(ne(),{body:JSON.stringify(u),headers:{"content-type":"application/json"},method:"POST"});if(!h||!(h instanceof Response))throw new Error("Custom fetch function did not return a response.");if(h.status!==200)throw new Error(`Server responded with ${h.status}.`);const p=await h.json();if(p?.payload&&b(Ie,p.payload,!0),je("serververification",p),s()&&p.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}async function Ii(n,u){if(!ne())throw new Error("Attribute verifyurl not set.");A("requesting sentinel verification from",ne());const h={code:u,payload:n};et()&&(h.fields=et().fields?gi():void 0,h.timeZone=et().timeZone?ai():void 0);const p=await Wr()(ne(),{body:JSON.stringify(h),headers:{"content-type":"application/json"},method:"POST"});if(!p||!(p instanceof Response))throw new Error("Fetch function did not return a response.");if(p.status!==200)throw new Error(`Server responded with ${p.status}.`);const g=await p.json();return g?.payload&&b(Ie,g.payload,!0),je("sentinelverification",g),g}function Ri(n){o(D)&&"requestSubmit"in o(D)?o(D).requestSubmit(n):o(D)?.reportValidity()&&(n?n.click():o(D).submit())}function Yr(n){A("expire",n),Ae&&(clearTimeout(Ae),Ae=null),n<1?hi():Ae=setTimeout(hi,n)}function $i(n){A("floating",n),I()!==n&&(o(V).style.left="",o(V).style.top=""),I(n===!0||n===""?"auto":n===!1||n==="false"?void 0:I()),I()?(a()||a("onsubmit"),document.addEventListener("scroll",_i),document.addEventListener("click",mi),window.addEventListener("resize",Ci)):a()==="onsubmit"&&a(void 0)}function Si(n){if(A("overlay",n),_e(n),n){if(a()||a("onsubmit"),o(fe)&&o(V).parentElement&&o(fe).replaceWith(o(V).parentElement),o(V)?.parentElement?.parentElement){b(fe,document.createElement("div"),!0),o(V).parentElement.parentElement.appendChild(o(fe));const u=document.createElement("div"),h=document.createElement("button");h.type="button",h.innerHTML="&times;",h.addEventListener("click",p=>{p.preventDefault(),it()}),o(fe).classList.add("altcha-overlay-backdrop"),h.classList.add("altcha-overlay-close-button"),u.classList.add("altcha-overlay"),o(fe).append(u),u.append(h),Ft()&&u.append(...document.querySelectorAll(Ft())),u.append(o(V).parentElement)}}else o(fe)&&o(V).parentElement&&(o(fe).replaceWith(o(V).parentElement),o(V).style.display="block")}function Ti(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(!ci.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${ci.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 Di(n){let u=null,h=null;if("Worker"in window){try{u=il(n,n.maxNumber||n.maxnumber||Qe()),b(tt,u.controller,!0),h=await u.promise}catch(p){A(p)}finally{b(tt,null)}if(h===null||h?.number!==void 0||"obfuscated"in n)return{data:n,solution:h}}if("obfuscated"in n){const p=await ba(n.obfuscated,n.key,n.maxNumber||n.maxnumber);return{data:n,solution:await p.promise}}u=pa(n.challenge,n.salt,n.algorithm,n.maxNumber||n.maxnumber||Qe()),b(tt,u.controller,!0);try{h=await u.promise}catch(p){A(p)}finally{b(tt,null)}return{data:n,solution:h}}function il(n,u=typeof ve()=="number"?ve():n.maxNumber||n.maxnumber||Qe(),h=Math.ceil(_t())){const p=new AbortController,g=[];h=Math.min(16,u,Math.max(1,h));for(let H=0;H<h;H++)g.push(altchaCreateWorker(Mt()));const C=Math.ceil(u/h);return{promise:(async()=>{const H=await Promise.all(g.map((q,ae)=>{const le=ae*C;return p.signal.addEventListener("abort",()=>{q.postMessage({type:"abort"})}),new Promise(at=>{q.addEventListener("message",wt=>{if(wt.data)for(const lt of g)lt!==q&&lt.postMessage({type:"abort"});at(wt.data)}),q.postMessage({payload:n,max:le+C,start:le,type:"work"})})}));for(const q of g)q.terminate();return H.find(q=>!!q)||null})(),controller:p}}async function qt(){if(!Ue()){Re(y.ERROR);return}const n=Be.find(u=>u.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){Re(y.ERROR),A("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in n&&typeof n.clarify=="function")return n.clarify()}function Ni(n){n.obfuscated!==void 0&&Ue(n.obfuscated),n.auto!==void 0&&(a(n.auto),a()==="onload"&&(Ue()?qt():De())),n.blockspam!==void 0&&s(!!n.blockspam),n.customfetch!==void 0&&m(n.customfetch),n.floatinganchor!==void 0&&re(n.floatinganchor),n.delay!==void 0&&_(n.delay),n.floatingoffset!==void 0&&Te(n.floatingoffset),n.floating!==void 0&&$i(n.floating),n.expire!==void 0&&(Yr(n.expire),U(n.expire)),n.challenge&&(f(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),Ti(o(gr))),n.challengeurl!==void 0&&c(n.challengeurl),n.debug!==void 0&&v(!!n.debug),n.hidefooter!==void 0&&j(!!n.hidefooter),n.hidelogo!==void 0&&ce(!!n.hidelogo),n.language!==void 0&&mt(vi(l(),[n.language])),n.maxnumber!==void 0&&Qe(+n.maxnumber),n.mockerror!==void 0&&Ot(!!n.mockerror),n.name!==void 0&&Xe(n.name),n.overlaycontent!==void 0&&Ft(n.overlaycontent),n.overlay!==void 0&&Si(n.overlay),n.refetchonexpire!==void 0&&M(!n.refetchonexpire),n.disablerefetchonexpire!==void 0&&M(!n.disablerefetchonexpire),n.sentinel!==void 0&&typeof n.sentinel=="object"&&et(n.sentinel),n.spamfilter!==void 0&&ke(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&mt(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&ve(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&ne(n.verifyurl),n.workers!==void 0&&_t(+n.workers),n.workerurl!==void 0&&Mt(n.workerurl)}function Li(){return{auto:a(),blockspam:s(),challengeurl:c(),debug:v(),delay:_(),disableautofocus:w(),disablerefetchonexpire:M(),expire:U(),floating:I(),floatinganchor:re(),floatingoffset:Te(),hidefooter:j(),hidelogo:ce(),name:Xe(),maxnumber:Qe(),mockerror:Ot(),obfuscated:Ue(),overlay:_e(),refetchonexpire:!M(),spamfilter:ke(),strings:o(O),test:ve(),verifyurl:ne(),workers:_t(),workerurl:Mt()}}function Pi(){return o(bt)}function ol(n){return Be.find(u=>u.constructor.pluginName===n)}function Oi(){return o(k)}function Bt(){o(V).style.display="none",_e()&&o(fe)&&(o(fe).style.display="none")}function Ht(n=20){if(o(V))if(o(bt)||b(bt,(re()?document.querySelector(re()):o(D)?.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||o(D),!0),o(bt)){const u=parseInt(Te(),10)||12,h=o(bt).getBoundingClientRect(),p=o(V).getBoundingClientRect(),g=document.documentElement.clientHeight,C=document.documentElement.clientWidth,N=I()==="auto"?h.bottom+p.height+u+n>g:I()==="top",H=Math.max(n,Math.min(C-n-p.width,h.left+h.width/2-p.width/2));if(N?o(V).style.top=`${h.top-(p.height+u)}px`:o(V).style.top=`${h.bottom+u}px`,o(V).style.left=`${H}px`,o(V).setAttribute("data-floating",N?"top":"bottom"),o(Ut)){const q=o(Ut).getBoundingClientRect();o(Ut).style.left=h.left-H+h.width/2-q.width/2+"px"}}else A("unable to find floating anchor element")}function it(n=y.UNVERIFIED,u=null){o(tt)&&(o(tt).abort(),b(tt,null)),b(Vt,!1),b(Ie,null),b(G,null),b(Gr,!1),b(J,null),Re(n,u)}function Fi(n){b(bt,n,!0)}function Re(n,u=null){b(k,n,!0),b(rt,u,!0),je("statechange",{payload:o(Ie),state:o(k)})}function mr(){o(V).style.display="block",I()&&Ht(),_e()&&o(fe)&&(o(fe).style.display="flex")}async function De(){return it(y.VERIFYING),await new Promise(n=>setTimeout(n,_()||0)),Ha().then(n=>(Ti(n),A("challenge",n),Di(n))).then(({data:n,solution:u})=>{if(A("solution",u),!u||n&&"challenge"in n&&!("clearText"in u)){if(u?.number!==void 0&&"challenge"in n)if(ne()&&"codeChallenge"in n)["INPUT","BUTTON","SELECT","TEXTAREA"].includes(document.activeElement?.tagName||"")&&w()===!1&&document.activeElement.blur(),b(G,{challenge:n,solution:u},!0);else{if(ne()&&et()!==void 0)return Ii(pr(n,u));if(ne())return nl(pr(n,u));b(Ie,pr(n,u),!0),A("payload",o(Ie))}else if(o(k)!==y.EXPIRED)throw A("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)?(Re(y.CODE),Or().then(()=>{je("code",{codeChallenge:o(G)})})):o(Ie)&&(Re(y.VERIFIED),A("verified"),Or().then(()=>{je("verified",{payload:o(Ie)}),_e()&&Bt()}))}).catch(n=>{A(n),Re(y.ERROR,n.message)})}var Mi=Ma(),Vi=It(Mi);Ko(Vi,t,"default",{});var yt=Z(Vi,2),Zr=Y(yt),_r=Y(Zr);let Ui;var ji=Y(_r);{var al=n=>{qr(n)};z(ji,n=>{o(k)===y.VERIFYING&&n(al)})}var ot=Z(ji,2);Jn(ot),ot.__change=[xa,k,ke,D,Vt,Ue,qt,De],ur(ot,n=>b(Hr,n),()=>o(Hr)),W(_r);var br=Z(_r,2),ll=Y(br);{var sl=n=>{var u=sr(),h=It(u);Je(h,()=>o(O).verified),B(n,u)},ul=(n,u)=>{{var h=g=>{var C=sr(),N=It(C);Je(N,()=>o(O).verifying),B(g,C)},p=(g,C)=>{{var N=q=>{var ae=sr(),le=It(ae);Je(le,()=>o(O).verificationRequired),B(q,ae)},H=q=>{var ae=sr(),le=It(ae);Je(le,()=>o(O).label),B(q,ae)};z(g,q=>{o(k)===y.CODE?q(N):q(H,!1)},C)}};z(n,g=>{o(k)===y.VERIFYING?g(h):g(p,!1)},u)}};z(ll,n=>{o(k)===y.VERIFIED?n(sl):n(ul,!1)})}W(br);var qi=Z(br,2);{var cl=n=>{var u=ka();Jn(u),we(()=>{R(u,"name",Xe()),ra(u,o(Ie))}),B(n,u)};z(qi,n=>{o(k)===y.VERIFIED&&n(cl)})}var Bi=Z(qi,2);{var fl=n=>{var u=Aa(),h=Y(u);R(h,"href",ja),W(u),we(()=>R(h,"aria-label",o(O).ariaLinkLabel)),B(n,u)};z(Bi,n=>{(ce()!==!0||o(Br))&&n(fl)})}var dl=Z(Bi,2);{var hl=n=>{var u=Da(),h=Z(Y(u),2),p=Y(h),g=Z(p,2);Ho(g,!w()),g.__keydown=[wa,xi];var C=Z(g,2),N=Y(C),H=Y(N);{var q=be=>{var K=Sa();K.__click=xi;var yr=Y(K);{var Gt=Et=>{qr(Et,()=>20)},wl=(Et,El)=>{{var xl=xt=>{var zr=Ia();B(xt,zr)},Cl=(xt,zr)=>{{var kl=Ct=>{var Jr=Ra();B(Ct,Jr)},Al=Ct=>{var Jr=$a();B(Ct,Jr)};z(xt,Ct=>{o(J)===X.PLAYING?Ct(kl):Ct(Al,!1)},zr)}};z(Et,xt=>{o(J)===X.ERROR?xt(xl):xt(Cl,!1)},El)}};z(yr,Et=>{o(J)===X.LOADING?Et(Gt):Et(wl,!1)})}W(K),we(()=>{R(K,"title",o(O).getAudioChallenge),K.disabled=o(J)===X.LOADING||o(J)===X.ERROR||o(nt),R(K,"aria-label",o(J)===X.LOADING?o(O).loading:o(O).getAudioChallenge)}),B(be,K)};z(H,be=>{o(G).challenge.codeChallenge.audio&&be(q)})}var ae=Z(H,2);ae.__click=[Ea,De],W(N);var le=Z(N,2),at=Y(le);{var wt=be=>{qr(be,()=>16)};z(at,be=>{o(nt)&&be(wt)})}var lt=Z(at);W(le),W(C);var bl=Z(C,2);{var yl=be=>{var K=Ta(),yr=Y(K);W(K),ur(K,Gt=>b(qe,Gt),()=>o(qe)),we(Gt=>R(yr,"src",Gt),[()=>pi(o(G).challenge.codeChallenge.audio,{language:hr()})]),Ve("loadstart",K,Ka),Ve("canplay",K,Ja),Ve("pause",K,Qa),Ve("playing",K,Xa),Ve("ended",K,Za),Ve("error",yr,za),B(be,K)};z(bl,be=>{o(G).challenge.codeChallenge.audio&&o(Gr)&&be(yl)})}W(h),W(u),we(()=>{R(u,"aria-label",o(O).verificationRequired),R(p,"src",o(G).challenge.codeChallenge.image),R(g,"minlength",o(G).challenge.codeChallenge.length||1),R(g,"maxlength",o(G).challenge.codeChallenge.length),R(g,"placeholder",o(O).enterCode),R(g,"aria-label",o(J)===X.LOADING?o(O).loading:o(J)===X.PLAYING?"":o(O).enterCodeAria),R(g,"aria-live",o(J)?"assertive":"polite"),R(g,"aria-busy",o(J)===X.LOADING),g.disabled=o(nt),R(ae,"aria-label",o(O).reload),R(ae,"title",o(O).reload),ae.disabled=o(nt),le.disabled=o(nt),R(le,"aria-label",o(O).verify),Zo(lt,` ${o(O).verify??""}`)}),Ve("submit",h,el,!0),B(n,u)};z(dl,n=>{o(G)?.challenge.codeChallenge&&n(hl)})}W(Zr);var Hi=Z(Zr,2);{var vl=n=>{var u=Pa(),h=Z(Y(u),2);{var p=C=>{var N=Na(),H=Y(N);Je(H,()=>o(O).expired),W(N),we(()=>R(N,"title",o(rt))),B(C,N)},g=C=>{var N=La(),H=Y(N);Je(H,()=>o(O).error),W(N),we(()=>R(N,"title",o(rt))),B(C,N)};z(h,C=>{o(k)===y.EXPIRED?C(p):C(g,!1)})}W(u),B(n,u)};z(Hi,n=>{(o(rt)||o(k)===y.EXPIRED)&&n(vl)})}var Gi=Z(Hi,2);{var gl=n=>{var u=Oa(),h=Y(u),p=Y(h);Je(p,()=>o(O).footer),W(h),W(u),B(n,u)};z(Gi,n=>{o(O).footer&&(j()!==!0||o(Br))&&n(gl)})}var pl=Z(Gi,2);{var ml=n=>{var u=Fa();ur(u,h=>b(Ut,h),()=>o(Ut)),B(n,u)};z(pl,n=>{I()&&n(ml)})}W(yt),ur(yt,n=>b(V,n),()=>o(V)),we(n=>{R(yt,"data-state",o(k)),R(yt,"data-floating",I()),R(yt,"data-overlay",_e()),Ui=Qo(_r,1,"altcha-checkbox",null,Ui,n),R(ot,"id",o(di)),ot.required=a()!=="onsubmit"&&(!I()||a()!=="off"),R(br,"for",o(di))},[()=>({"altcha-checkbox-verifying":o(k)===y.VERIFYING})]),Ve("invalid",ot,Ei),ia(ot,()=>o(Vt),n=>b(Vt,n)),B(e,Mi);var _l=jn({clarify:qt,configure:Ni,getConfiguration:Li,getFloatingAnchor:Pi,getPlugin:ol,getState:Oi,hide:Bt,repositionFloating:Ht,reset:it,setFloatingAnchor:Fi,setState:Re,show:mr,verify:De,get auto(){return a()},set auto(n=void 0){a(n),E()},get blockspam(){return s()},set blockspam(n=void 0){s(n),E()},get challengeurl(){return c()},set challengeurl(n=void 0){c(n),E()},get challengejson(){return f()},set challengejson(n=void 0){f(n),E()},get credentials(){return d()},set credentials(n=void 0){d(n),E()},get customfetch(){return m()},set customfetch(n=void 0){m(n),E()},get debug(){return v()},set debug(n=!1){v(n),E()},get delay(){return _()},set delay(n=0){_(n),E()},get disableautofocus(){return w()},set disableautofocus(n=!1){w(n),E()},get refetchonexpire(){return F()},set refetchonexpire(n=!0){F(n),E()},get disablerefetchonexpire(){return M()},set disablerefetchonexpire(n=!F){M(n),E()},get expire(){return U()},set expire(n=void 0){U(n),E()},get floating(){return I()},set floating(n=void 0){I(n),E()},get floatinganchor(){return re()},set floatinganchor(n=void 0){re(n),E()},get floatingoffset(){return Te()},set floatingoffset(n=void 0){Te(n),E()},get floatingpersist(){return Q()},set floatingpersist(n=!1){Q(n),E()},get hidefooter(){return j()},set hidefooter(n=!1){j(n),E()},get hidelogo(){return ce()},set hidelogo(n=!1){ce(n),E()},get id(){return Ke()},set id(n=void 0){Ke(n),E()},get language(){return hr()},set language(n=void 0){hr(n),E()},get name(){return Xe()},set name(n="altcha"){Xe(n),E()},get maxnumber(){return Qe()},set maxnumber(n=1e6){Qe(n),E()},get mockerror(){return Ot()},set mockerror(n=!1){Ot(n),E()},get obfuscated(){return Ue()},set obfuscated(n=void 0){Ue(n),E()},get overlay(){return _e()},set overlay(n=void 0){_e(n),E()},get overlaycontent(){return Ft()},set overlaycontent(n=void 0){Ft(n),E()},get plugins(){return vr()},set plugins(n=void 0){vr(n),E()},get sentinel(){return et()},set sentinel(n=void 0){et(n),E()},get spamfilter(){return ke()},set spamfilter(n=!1){ke(n),E()},get strings(){return mt()},set strings(n=void 0){mt(n),E()},get test(){return ve()},set test(n=!1){ve(n),E()},get verifyurl(){return ne()},set verifyurl(n=void 0){ne(n),E()},get workers(){return _t()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){_t(n),E()},get workerurl(){return Mt()},set workerurl(n=void 0){Mt(n),E()}});return i(),_l}Yo(["change","keydown","click"]),customElements.define("altcha-widget",ha(li,{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));const si='@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:0;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled,.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base:#fff;--altcha-color-text:#000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:99999999}.altcha-overlay-close-button{align-self:flex-end;background:0 0;border:0;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height:450px){.altcha-overlay{top:10%!important;transform:translate(-50%,0)}}';function ui(e,t="__altcha-css"){if(!document.getElementById(t)){const r=document.createElement("style");r.id=t,r.textContent=e,document.head.appendChild(r)}}globalThis.altchaCreateWorker=e=>e?new Worker(new URL(e)):new Wi,ui(si),ui(si),st.Altcha=li,Object.defineProperty(st,Symbol.toStringTag,{value:"Module"})});
@@ -1 +1 @@
1
- .altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within:after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within:after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:none;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer:hover{opacity:1}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base: #fff;--altcha-color-text: #000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:#00000080;bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:99999999}.altcha-overlay-close-button{align-self:flex-end;background:none;border:none;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height: 450px){.altcha-overlay{top:10%!important;transform:translate(-50%)}}@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}
1
+ .altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within:after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within:after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:none;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer:hover{opacity:1}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{inset:0;position:absolute}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base: #fff;--altcha-color-text: #000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:#00000080;display:none;inset:0;position:fixed;z-index:99999999}.altcha-overlay-close-button{align-self:flex-end;background:none;border:none;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height: 450px){.altcha-overlay{top:10%!important;transform:translate(-50%)}}@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}
@@ -10,23 +10,40 @@ declare global {
10
10
  set: (language: string, translation: Record<string, string>) => void;
11
11
  store: {
12
12
  set(this: void, value: Record<string, Record<string, string>>): void;
13
- update(this: void, updater: (value: Record<string, Record<string, string>>) => Record<string, Record<string, string>>): void;
14
- subscribe(this: void, run: (value: Record<string, Record<string, string>>) => void, invalidate?: () => void): () => void;
13
+ update(
14
+ this: void,
15
+ updater: (
16
+ value: Record<string, Record<string, string>>
17
+ ) => Record<string, Record<string, string>>
18
+ ): void;
19
+ subscribe(
20
+ this: void,
21
+ run: (value: Record<string, Record<string, string>>) => void,
22
+ invalidate?: () => void
23
+ ): () => void;
15
24
  };
16
25
  };
17
26
 
18
- type AltchaState = 'error' | 'expired' | 'verified' | 'verifying' | 'unverified';
27
+ type AltchaState =
28
+ | 'error'
29
+ | 'expired'
30
+ | 'verified'
31
+ | 'verifying'
32
+ | 'unverified';
19
33
 
20
- interface AltchaStateChangeEvent extends CustomEvent<{
21
- payload?: string;
22
- state: AltchaState;
23
- }> {}
34
+ interface AltchaStateChangeEvent
35
+ extends CustomEvent<{
36
+ payload?: string;
37
+ state: AltchaState;
38
+ }> {}
24
39
 
25
- interface AltchaVerifiedEvent extends CustomEvent<{
26
- payload: string;
27
- }> {}
40
+ interface AltchaVerifiedEvent
41
+ extends CustomEvent<{
42
+ payload: string;
43
+ }> {}
28
44
 
29
- interface AltchaServerVerificationEvent extends CustomEvent<Record<string, unknown>> {}
45
+ interface AltchaServerVerificationEvent
46
+ extends CustomEvent<Record<string, unknown>> {}
30
47
 
31
48
  interface AltchaWidgetOptions {
32
49
  auto?: 'off' | 'onfocus' | 'onload' | 'onsubmit';
@@ -35,10 +52,13 @@ declare global {
35
52
  challengeurl?: string;
36
53
  challengejson?: string;
37
54
  credentials?: 'omit' | 'same-origin' | 'include' | boolean | undefined;
38
- customfetch?: string | ((url: string, init?: RequestInit) => Promise<Response>);
55
+ customfetch?:
56
+ | string
57
+ | ((url: string, init?: RequestInit) => Promise<Response>);
39
58
  debug?: boolean;
40
59
  delay?: number;
41
60
  disableautofocus?: boolean;
61
+ disablerefetchonexpire?: boolean;
42
62
  expire?: number;
43
63
  floating?: 'auto' | 'top' | 'bottom' | 'false' | '' | boolean;
44
64
  floatinganchor?: string;
@@ -62,6 +82,7 @@ declare global {
62
82
  overlay?: boolean;
63
83
  overlaycontent?: string;
64
84
  plugins?: string;
85
+ /** @deprecated Use `disablerefetchonexpire` instead. */
65
86
  refetchonexpire?: boolean;
66
87
  /** @deprecated */
67
88
  spamfilter?: boolean | 'ipAddress';
@@ -82,14 +103,13 @@ declare global {
82
103
  hide: () => void;
83
104
  repositionFloating: (viewportOffset?: number) => void;
84
105
  reset: (newState?: AltchaState, err?: string | null) => void;
85
- setFloatingAnchor: (el: HTMLElement) => void;
86
- setState: (newState: AltchaState, err?: string | null) => void;
106
+ setFloatingAnchor: (el: HTMLElement) => void;
107
+ setState: (newState: AltchaState, err?: string | null) => void;
87
108
  show: () => void;
88
109
  verify: () => Promise<void>;
89
110
  }
90
111
 
91
- interface AltchaWidget extends AltchaWidgetOptions {
92
- }
112
+ interface AltchaWidget extends AltchaWidgetOptions {}
93
113
 
94
114
  interface AltchaWidgetCSSProperties extends Partial<CSSStyleDeclaration> {
95
115
  '--altcha-border-width'?: string;
@@ -138,7 +158,7 @@ declare global {
138
158
  }
139
159
  }
140
160
 
141
- declare module "react" {
161
+ declare module 'react' {
142
162
  namespace JSX {
143
163
  interface IntrinsicElements {
144
164
  'altcha-widget': AltchaWidgetReact;
@@ -146,7 +166,7 @@ declare module "react" {
146
166
  }
147
167
  }
148
168
 
149
- declare module "react/jsx-runtime" {
169
+ declare module 'react/jsx-runtime' {
150
170
  namespace JSX {
151
171
  interface IntrinsicElements {
152
172
  'altcha-widget': AltchaWidgetReact;
@@ -154,7 +174,7 @@ declare module "react/jsx-runtime" {
154
174
  }
155
175
  }
156
176
 
157
- declare module "react/jsx-dev-runtime" {
177
+ declare module 'react/jsx-dev-runtime' {
158
178
  namespace JSX {
159
179
  interface IntrinsicElements {
160
180
  'altcha-widget': AltchaWidgetReact;