altcha 1.4.2 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +144 -156
- package/dist/altcha.d.ts +6 -0
- package/dist/altcha.js +1683 -1383
- package/dist/altcha.umd.cjs +10 -7
- package/dist_external/altcha.css +127 -13
- package/dist_external/altcha.d.ts +6 -0
- package/dist_external/altcha.js +1667 -1367
- package/dist_external/altcha.umd.cjs +9 -6
- package/dist_i18n/all.js +810 -0
- package/dist_i18n/all.umd.cjs +1 -0
- package/dist_i18n/americas.js +54 -0
- package/dist_i18n/americas.umd.cjs +1 -0
- package/dist_i18n/ar.js +21 -0
- package/dist_i18n/ar.umd.cjs +1 -0
- package/dist_i18n/asia.js +288 -0
- package/dist_i18n/asia.umd.cjs +1 -0
- package/dist_i18n/bg.js +21 -0
- package/dist_i18n/bg.umd.cjs +1 -0
- package/dist_i18n/bn.js +21 -0
- package/dist_i18n/bn.umd.cjs +1 -0
- package/dist_i18n/cs.js +21 -0
- package/dist_i18n/cs.umd.cjs +1 -0
- package/dist_i18n/da.js +21 -0
- package/dist_i18n/da.umd.cjs +1 -0
- package/dist_i18n/de.js +21 -0
- package/dist_i18n/de.umd.cjs +1 -0
- package/dist_i18n/el.js +21 -0
- package/dist_i18n/el.umd.cjs +1 -0
- package/dist_i18n/en.js +21 -0
- package/dist_i18n/en.umd.cjs +1 -0
- package/dist_i18n/es-419.js +21 -0
- package/dist_i18n/es-419.umd.cjs +1 -0
- package/dist_i18n/es-es.js +21 -0
- package/dist_i18n/es-es.umd.cjs +1 -0
- package/dist_i18n/et.js +21 -0
- package/dist_i18n/et.umd.cjs +1 -0
- package/dist_i18n/eu.js +21 -0
- package/dist_i18n/eu.umd.cjs +1 -0
- package/dist_i18n/europe.js +468 -0
- package/dist_i18n/europe.umd.cjs +1 -0
- package/dist_i18n/fi.js +21 -0
- package/dist_i18n/fi.umd.cjs +1 -0
- package/dist_i18n/fr-ca.js +21 -0
- package/dist_i18n/fr-ca.umd.cjs +1 -0
- package/dist_i18n/fr-fr.js +21 -0
- package/dist_i18n/fr-fr.umd.cjs +1 -0
- package/dist_i18n/ga.js +21 -0
- package/dist_i18n/ga.umd.cjs +1 -0
- package/dist_i18n/he.js +21 -0
- package/dist_i18n/he.umd.cjs +1 -0
- package/dist_i18n/hi.js +21 -0
- package/dist_i18n/hi.umd.cjs +1 -0
- package/dist_i18n/hr.js +21 -0
- package/dist_i18n/hr.umd.cjs +1 -0
- package/dist_i18n/hu.js +21 -0
- package/dist_i18n/hu.umd.cjs +1 -0
- package/dist_i18n/id.js +21 -0
- package/dist_i18n/id.umd.cjs +1 -0
- package/dist_i18n/it.js +21 -0
- package/dist_i18n/it.umd.cjs +1 -0
- package/dist_i18n/ja.js +21 -0
- package/dist_i18n/ja.umd.cjs +1 -0
- package/dist_i18n/ko.js +21 -0
- package/dist_i18n/ko.umd.cjs +1 -0
- package/dist_i18n/lt.js +21 -0
- package/dist_i18n/lt.umd.cjs +1 -0
- package/dist_i18n/lv.js +21 -0
- package/dist_i18n/lv.umd.cjs +1 -0
- package/dist_i18n/mr.js +21 -0
- package/dist_i18n/mr.umd.cjs +1 -0
- package/dist_i18n/mt.js +21 -0
- package/dist_i18n/mt.umd.cjs +1 -0
- package/dist_i18n/nl.js +21 -0
- package/dist_i18n/nl.umd.cjs +1 -0
- package/dist_i18n/pl.js +21 -0
- package/dist_i18n/pl.umd.cjs +1 -0
- package/dist_i18n/pt-br.js +21 -0
- package/dist_i18n/pt-br.umd.cjs +1 -0
- package/dist_i18n/pt-pt.js +21 -0
- package/dist_i18n/pt-pt.umd.cjs +1 -0
- package/dist_i18n/ro.js +21 -0
- package/dist_i18n/ro.umd.cjs +1 -0
- package/dist_i18n/ru.js +21 -0
- package/dist_i18n/ru.umd.cjs +1 -0
- package/dist_i18n/sk.js +21 -0
- package/dist_i18n/sk.umd.cjs +1 -0
- package/dist_i18n/sl.js +21 -0
- package/dist_i18n/sl.umd.cjs +1 -0
- package/dist_i18n/sv.js +21 -0
- package/dist_i18n/sv.umd.cjs +1 -0
- package/dist_i18n/ta.js +21 -0
- package/dist_i18n/ta.umd.cjs +1 -0
- package/dist_i18n/te.js +21 -0
- package/dist_i18n/te.umd.cjs +1 -0
- package/dist_i18n/th.js +21 -0
- package/dist_i18n/th.umd.cjs +1 -0
- package/dist_i18n/tr.js +21 -0
- package/dist_i18n/tr.umd.cjs +1 -0
- package/dist_i18n/uk.js +21 -0
- package/dist_i18n/uk.umd.cjs +1 -0
- package/dist_i18n/ur.js +21 -0
- package/dist_i18n/ur.umd.cjs +1 -0
- package/dist_i18n/vi.js +21 -0
- package/dist_i18n/vi.umd.cjs +1 -0
- package/dist_i18n/zh-cn.js +21 -0
- package/dist_i18n/zh-cn.umd.cjs +1 -0
- package/dist_i18n/zh-tw.js +21 -0
- package/dist_i18n/zh-tw.umd.cjs +1 -0
- package/dist_plugins/obfuscation.js +10 -10
- package/dist_plugins/obfuscation.umd.cjs +1 -1
- package/dist_plugins/upload.js +145 -133
- package/dist_plugins/upload.umd.cjs +4 -4
- package/package.json +12 -8
- package/postinstall.js +0 -10
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
(function(k,C){typeof exports=="object"&&typeof module<"u"?C(exports):typeof define=="function"&&define.amd?define(["exports"],C):(k=typeof globalThis<"u"?globalThis:k||self,C(k.altcha={}))})(this,function(k){"use strict";var aa=Object.defineProperty;var Gn=k=>{throw TypeError(k)};var oa=(k,C,U)=>C in k?aa(k,C,{enumerable:!0,configurable:!0,writable:!0,value:U}):k[C]=U;var ce=(k,C,U)=>oa(k,typeof C!="symbol"?C+"":C,U),Jn=(k,C,U)=>C.has(k)||Gn("Cannot "+U);var K=(k,C,U)=>(Jn(k,C,"read from private field"),U?U.call(k):C.get(k)),or=(k,C,U)=>C.has(k)?Gn("Cannot add the same private member more than once"):C instanceof WeakSet?C.add(k):C.set(k,U),sr=(k,C,U,bt)=>(Jn(k,C,"write to private field"),bt?bt.call(k,U):C.set(k,U),U);var hn,xe,ie;var C=typeof document<"u"?document.currentScript:null;const U="5";typeof window<"u"&&((hn=window.__svelte??(window.__svelte={})).v??(hn.v=new Set)).add(U);const bt=1,Kn=4,Xn=8,Qn=16,ei=1,ti=2,Mt="[",fr="[!",ur="]",qe={},W=Symbol(),ri="http://www.w3.org/1999/xhtml",cr=!1,oe=2,dr=4,yt=8,Vt=16,me=32,Pe=64,Et=128,re=256,xt=512,X=1024,pe=2048,Be=4096,He=8192,$t=16384,ni=32768,Ut=65536,ii=1<<19,vr=1<<20,lt=Symbol("$state"),hr=Symbol("legacy props"),li=Symbol("");var gr=Array.isArray,ai=Array.prototype.indexOf,oi=Array.from,kt=Object.keys,Ct=Object.defineProperty,ze=Object.getOwnPropertyDescriptor,si=Object.getOwnPropertyDescriptors,fi=Object.prototype,ui=Array.prototype,_r=Object.getPrototypeOf;function mr(e){for(var t=0;t<e.length;t++)e[t]()}const ci=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let at=[],ot=[];function pr(){var e=at;at=[],mr(e)}function wr(){var e=ot;ot=[],mr(e)}function jt(e){at.length===0&&queueMicrotask(pr),at.push(e)}function di(e){ot.length===0&&ci(wr),ot.push(e)}function br(){at.length>0&&pr(),ot.length>0&&wr()}function yr(e){return e===this.v}function vi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Er(e){return!vi(e,this.v)}function hi(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function gi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function _i(e){throw new Error("https://svelte.dev/e/effect_orphan")}function mi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function pi(){throw new Error("https://svelte.dev/e/hydration_failed")}function wi(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function bi(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function yi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ei(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function xi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let $i=!1;function de(e,t){var r={f:0,v:e,reactions:null,equals:yr,rv:0,wv:0};return r}function Ye(e){return ki(de(e))}function xr(e,t=!1){const r=de(e);return t||(r.equals=Er),r}function ki(e){return A!==null&&!fe&&(A.f&oe)!==0&&(ve===null?Ti([e]):ve.push(e)),e}function z(e,t){return A!==null&&!fe&&Gr()&&(A.f&(oe|Vt))!==0&&(ve===null||!ve.includes(e))&&xi(),Ci(e,t)}function Ci(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=Pr(),$r(e,pe),S!==null&&(S.f&X)!==0&&(S.f&(me|Pe))===0&&(ye===null?Ni([e]):ye.push(e))),t}function $r(e,t){var r=e.reactions;if(r!==null)for(var l=r.length,i=0;i<l;i++){var a=r[i],o=a.f;(o&pe)===0&&(he(a,t),(o&(X|re))!==0&&((o&oe)!==0?$r(a,Be):Dt(a)))}}function Oe(e){var t=oe|pe,r=A!==null&&(A.f&oe)!==0?A:null;return S===null||r!==null&&(r.f&re)!==0?t|=re:S.f|=vr,{ctx:H,deps:null,effects:null,equals:yr,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??S}}function kr(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Ee(t[r])}}function Ai(e){for(var t=e.parent;t!==null;){if((t.f&oe)===0)return t;t=t.parent}return null}function Ri(e){var t,r=S;Re(Ai(e));try{kr(e),t=Or(e)}finally{Re(r)}return t}function Cr(e){var t=Ri(e),r=(Ie||(e.f&re)!==0)&&e.deps!==null?Be:X;he(e,r),e.equals(t)||(e.v=t,e.wv=Pr())}function At(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let D=!1;function We(e){D=e}let O;function ke(e){if(e===null)throw At(),qe;return O=e}function Ze(){return ke(Ce(O))}function Q(e){if(D){if(Ce(O)!==null)throw At(),qe;O=e}}function Ii(){for(var e=0,t=O;;){if(t.nodeType===8){var r=t.data;if(r===ur){if(e===0)return t;e-=1}else(r===Mt||r===fr)&&(e+=1)}var l=Ce(t);t.remove(),t=l}}function se(e,t=null,r){if(typeof e!="object"||e===null||lt in e)return e;const l=_r(e);if(l!==fi&&l!==ui)return e;var i=new Map,a=gr(e),o=de(0);a&&i.set("length",de(e.length));var f;return new Proxy(e,{defineProperty(s,c,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&bi();var h=i.get(c);return h===void 0?(h=de(v.value),i.set(c,h)):z(h,se(v.value,f)),!0},deleteProperty(s,c){var v=i.get(c);if(v===void 0)c in s&&i.set(c,de(W));else{if(a&&typeof c=="string"){var h=i.get("length"),g=Number(c);Number.isInteger(g)&&g<h.v&&z(h,g)}z(v,W),Ar(o)}return!0},get(s,c,v){var b;if(c===lt)return e;var h=i.get(c),g=c in s;if(h===void 0&&(!g||(b=ze(s,c))!=null&&b.writable)&&(h=de(se(g?s[c]:W,f)),i.set(c,h)),h!==void 0){var m=d(h);return m===W?void 0:m}return Reflect.get(s,c,v)},getOwnPropertyDescriptor(s,c){var v=Reflect.getOwnPropertyDescriptor(s,c);if(v&&"value"in v){var h=i.get(c);h&&(v.value=d(h))}else if(v===void 0){var g=i.get(c),m=g==null?void 0:g.v;if(g!==void 0&&m!==W)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return v},has(s,c){var m;if(c===lt)return!0;var v=i.get(c),h=v!==void 0&&v.v!==W||Reflect.has(s,c);if(v!==void 0||S!==null&&(!h||(m=ze(s,c))!=null&&m.writable)){v===void 0&&(v=de(h?se(s[c],f):W),i.set(c,v));var g=d(v);if(g===W)return!1}return h},set(s,c,v,h){var j;var g=i.get(c),m=c in s;if(a&&c==="length")for(var b=v;b<g.v;b+=1){var L=i.get(b+"");L!==void 0?z(L,W):b in s&&(L=de(W),i.set(b+"",L))}g===void 0?(!m||(j=ze(s,c))!=null&&j.writable)&&(g=de(void 0),z(g,se(v,f)),i.set(c,g)):(m=g.v!==W,z(g,se(v,f)));var F=Reflect.getOwnPropertyDescriptor(s,c);if(F!=null&&F.set&&F.set.call(h,v),!m){if(a&&typeof c=="string"){var Z=i.get("length"),V=Number(c);Number.isInteger(V)&&V>=Z.v&&z(Z,V+1)}Ar(o)}return!0},ownKeys(s){d(o);var c=Reflect.ownKeys(s).filter(g=>{var m=i.get(g);return m===void 0||m.v!==W});for(var[v,h]of i)h.v!==W&&!(v in s)&&c.push(v);return c},setPrototypeOf(){yi()}})}function Ar(e,t=1){z(e,e.v+t)}var Rr,Ir,Sr,Tr;function qt(){if(Rr===void 0){Rr=window,Ir=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype;Sr=ze(t,"firstChild").get,Tr=ze(t,"nextSibling").get,e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0,Text.prototype.__t=void 0}}function Bt(e=""){return document.createTextNode(e)}function we(e){return Sr.call(e)}function Ce(e){return Tr.call(e)}function ee(e,t){if(!D)return we(e);var r=we(O);return r===null&&(r=O.appendChild(Bt())),ke(r),r}function Nr(e,t){if(!D){var r=we(e);return r instanceof Comment&&r.data===""?Ce(r):r}return O}function be(e,t=1,r=!1){let l=D?O:e;for(var i;t--;)i=l,l=Ce(l);if(!D)return l;var a=l==null?void 0:l.nodeType;if(r&&a!==3){var o=Bt();return l===null?i==null||i.after(o):l.before(o),ke(o),o}return ke(l),l}function Si(e){e.textContent=""}let Rt=!1,It=!1,St=null,Fe=!1,Ht=!1;function Lr(e){Ht=e}let st=[],sa=[],A=null,fe=!1;function Ae(e){A=e}let S=null;function Re(e){S=e}let ve=null;function Ti(e){ve=e}let B=null,te=0,ye=null;function Ni(e){ye=e}let Dr=1,Tt=0,Ie=!1;function Pr(){return++Dr}function ft(e){var h;var t=e.f;if((t&pe)!==0)return!0;if((t&Be)!==0){var r=e.deps,l=(t&re)!==0;if(r!==null){var i,a,o=(t&xt)!==0,f=l&&S!==null&&!Ie,s=r.length;if(o||f){var c=e,v=c.parent;for(i=0;i<s;i++)a=r[i],(o||!((h=a==null?void 0:a.reactions)!=null&&h.includes(c)))&&(a.reactions??(a.reactions=[])).push(c);o&&(c.f^=xt),f&&v!==null&&(v.f&re)===0&&(c.f^=re)}for(i=0;i<s;i++)if(a=r[i],ft(a)&&Cr(a),a.wv>e.wv)return!0}(!l||S!==null&&!Ie)&&he(e,X)}return!1}function Li(e,t){for(var r=t;r!==null;){if((r.f&Et)!==0)try{r.fn(e);return}catch{r.f^=Et}r=r.parent}throw Rt=!1,e}function Di(e){return(e.f&$t)===0&&(e.parent===null||(e.parent.f&Et)===0)}function Nt(e,t,r,l){if(Rt){if(r===null&&(Rt=!1),Di(t))throw e;return}r!==null&&(Rt=!0);{Li(e,t);return}}function zr(e,t,r=!0){var l=e.reactions;if(l!==null)for(var i=0;i<l.length;i++){var a=l[i];(a.f&oe)!==0?zr(a,t,!1):t===a&&(r?he(a,pe):(a.f&X)!==0&&he(a,Be),Dt(a))}}function Or(e){var m;var t=B,r=te,l=ye,i=A,a=Ie,o=ve,f=H,s=fe,c=e.f;B=null,te=0,ye=null,Ie=(c&re)!==0&&(fe||!Fe||A===null),A=(c&(me|Pe))===0?e:null,ve=null,Yr(e.ctx),fe=!1,Tt++;try{var v=(0,e.fn)(),h=e.deps;if(B!==null){var g;if(Lt(e,te),h!==null&&te>0)for(h.length=te+B.length,g=0;g<B.length;g++)h[te+g]=B[g];else e.deps=h=B;if(!Ie)for(g=te;g<h.length;g++)((m=h[g]).reactions??(m.reactions=[])).push(e)}else h!==null&&te<h.length&&(Lt(e,te),h.length=te);if(Gr()&&ye!==null&&!fe&&h!==null&&(e.f&(oe|Be|pe))===0)for(g=0;g<ye.length;g++)zr(ye[g],e);return i!==null&&Tt++,v}finally{B=t,te=r,ye=l,A=i,Ie=a,ve=o,Yr(f),fe=s}}function Pi(e,t){let r=t.reactions;if(r!==null){var l=ai.call(r,e);if(l!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[l]=r[i],r.pop())}}r===null&&(t.f&oe)!==0&&(B===null||!B.includes(t))&&(he(t,Be),(t.f&(re|xt))===0&&(t.f^=xt),kr(t),Lt(t,0))}function Lt(e,t){var r=e.deps;if(r!==null)for(var l=t;l<r.length;l++)Pi(e,r[l])}function Yt(e){var t=e.f;if((t&$t)===0){he(e,X);var r=S,l=H,i=Fe;S=e,Fe=!0;try{(t&Vt)!==0?Yi(e):Vr(e),Mr(e);var a=Or(e);e.teardown=typeof a=="function"?a:null,e.wv=Dr;var o=e.deps,f;cr&&$i&&e.f&pe}catch(s){Nt(s,e,r,l||e.ctx)}finally{Fe=i,S=r}}}function zi(){try{mi()}catch(e){if(St!==null)Nt(e,St,null);else throw e}}function Fr(){var e=Fe;try{var t=0;for(Fe=!0;st.length>0;){t++>1e3&&zi();var r=st,l=r.length;st=[];for(var i=0;i<l;i++){var a=Fi(r[i]);Oi(a)}}}finally{It=!1,Fe=e,St=null}}function Oi(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var l=e[r];if((l.f&($t|He))===0)try{ft(l)&&(Yt(l),l.deps===null&&l.first===null&&l.nodes_start===null&&(l.teardown===null?Ur(l):l.fn=null))}catch(i){Nt(i,l,null,l.ctx)}}}function Dt(e){It||(It=!0,queueMicrotask(Fr));for(var t=St=e;t.parent!==null;){t=t.parent;var r=t.f;if((r&(Pe|me))!==0){if((r&X)===0)return;t.f^=X}}st.push(t)}function Fi(e){for(var t=[],r=e;r!==null;){var l=r.f,i=(l&(me|Pe))!==0,a=i&&(l&X)!==0;if(!a&&(l&He)===0){if((l&dr)!==0)t.push(r);else if(i)r.f^=X;else{var o=A;try{A=r,ft(r)&&Yt(r)}catch(c){Nt(c,r,null,r.ctx)}finally{A=o}}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){var t;for(br();st.length>0;)It=!0,Fr(),br();return t}async function Mi(){await Promise.resolve(),x()}function d(e){var t=e.f,r=(t&oe)!==0;if(A!==null&&!fe){ve!==null&&ve.includes(e)&&Ei();var l=A.deps;e.rv<Tt&&(e.rv=Tt,B===null&&l!==null&&l[te]===e?te++:B===null?B=[e]:(!Ie||!B.includes(e))&&B.push(e))}else if(r&&e.deps===null&&e.effects===null){var i=e,a=i.parent;a!==null&&(a.f&re)===0&&(i.f^=re)}return r&&(i=e,ft(i)&&Cr(i)),e.v}function Ge(e){var t=fe;try{return fe=!0,e()}finally{fe=t}}const Vi=-7169;function he(e,t){e.f=e.f&Vi|t}function Ui(e){S===null&&A===null&&_i(),A!==null&&(A.f&re)!==0&&S===null&&gi(),Ht&&hi()}function ji(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Me(e,t,r,l=!0){var i=S,a={ctx:H,deps:null,nodes_start:null,nodes_end:null,f:e|pe,first:null,fn:t,last:null,next:null,parent:i,prev:null,teardown:null,transitions:null,wv:0};if(r)try{Yt(a),a.f|=ni}catch(s){throw Ee(a),s}else t!==null&&Dt(a);var o=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&(vr|Et))===0;if(!o&&l&&(i!==null&&ji(a,i),A!==null&&(A.f&oe)!==0)){var f=A;(f.effects??(f.effects=[])).push(a)}return a}function qi(e){const t=Me(yt,null,!1);return he(t,X),t.teardown=e,t}function Wt(e){Ui();var t=S!==null&&(S.f&me)!==0&&H!==null&&!H.m;if(t){var r=H;(r.e??(r.e=[])).push({fn:e,effect:S,reaction:A})}else{var l=Zt(e);return l}}function Bi(e){const t=Me(Pe,e,!0);return()=>{Ee(t)}}function Hi(e){const t=Me(Pe,e,!0);return(r={})=>new Promise(l=>{r.outro?Kt(t,()=>{Ee(t),l(void 0)}):(Ee(t),l(void 0))})}function Zt(e){return Me(dr,e,!1)}function Gt(e){return Me(yt,e,!0)}function Je(e,t=[],r=Oe){const l=t.map(r);return Jt(()=>e(...l.map(d)))}function Jt(e,t=0){return Me(yt|Vt|t,e,!0)}function Pt(e,t=!0){return Me(yt|me,e,!0,t)}function Mr(e){var t=e.teardown;if(t!==null){const r=Ht,l=A;Lr(!0),Ae(null);try{t.call(null)}finally{Lr(r),Ae(l)}}}function Vr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var l=r.next;(r.f&Pe)!==0?r.parent=null:Ee(r,t),r=l}}function Yi(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&me)===0&&Ee(t),t=r}}function Ee(e,t=!0){var r=!1;if((t||(e.f&ii)!==0)&&e.nodes_start!==null){for(var l=e.nodes_start,i=e.nodes_end;l!==null;){var a=l===i?null:Ce(l);l.remove(),l=a}r=!0}Vr(e,t&&!r),Lt(e,0),he(e,$t);var o=e.transitions;if(o!==null)for(const s of o)s.stop();Mr(e);var f=e.parent;f!==null&&f.first!==null&&Ur(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Ur(e){var t=e.parent,r=e.prev,l=e.next;r!==null&&(r.next=l),l!==null&&(l.prev=r),t!==null&&(t.first===e&&(t.first=l),t.last===e&&(t.last=r))}function Kt(e,t){var r=[];jr(e,r,!0),Wi(r,()=>{Ee(e),t&&t()})}function Wi(e,t){var r=e.length;if(r>0){var l=()=>--r||t();for(var i of e)i.out(l)}else t()}function jr(e,t,r){if((e.f&He)===0){if(e.f^=He,e.transitions!==null)for(const o of e.transitions)(o.is_global||r)&&t.push(o);for(var l=e.first;l!==null;){var i=l.next,a=(l.f&Ut)!==0||(l.f&me)!==0;jr(l,t,a?r:!1),l=i}}}function qr(e){Br(e,!0)}function Br(e,t){if((e.f&He)!==0){e.f^=He,(e.f&X)===0&&(e.f^=X),ft(e)&&(he(e,pe),Dt(e));for(var r=e.first;r!==null;){var l=r.next,i=(r.f&Ut)!==0||(r.f&me)!==0;Br(r,i?t:!1),r=l}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}function Hr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let H=null;function Yr(e){H=e}function Wr(e,t=!1,r){H={p:H,c:null,e:null,m:!1,s:e,x:null,l:null}}function Zr(e){const t=H;if(t!==null){e!==void 0&&(t.x=e);const o=t.e;if(o!==null){var r=S,l=A;t.e=null;try{for(var i=0;i<o.length;i++){var a=o[i];Re(a.effect),Ae(a.reaction),Zt(a.fn)}}finally{Re(r),Ae(l)}}H=t.p,t.m=!0}return e||{}}function Gr(){return!0}const Zi=["touchstart","touchmove"];function Gi(e){return Zi.includes(e)}let Jr=!1;function Kr(){Jr||(Jr=!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 Xr(e){var t=A,r=S;Ae(null),Re(null);try{return e()}finally{Ae(t),Re(r)}}function Ji(e,t,r,l=r){e.addEventListener(t,()=>Xr(r));const i=e.__on_r;i?e.__on_r=()=>{i(),l(!0)}:e.__on_r=()=>l(!0),Kr()}const Qr=new Set,Xt=new Set;function Ki(e,t,r,l={}){function i(a){if(l.capture||ut.call(t,a),!a.cancelBubble)return Xr(()=>r==null?void 0:r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?jt(()=>{t.addEventListener(e,i,l)}):t.addEventListener(e,i,l),i}function Xi(e,t,r,l,i){var a={capture:l,passive:i},o=Ki(e,t,r,a);(t===document.body||t===window||t===document)&&qi(()=>{t.removeEventListener(e,o,a)})}function Qi(e){for(var t=0;t<e.length;t++)Qr.add(e[t]);for(var r of Xt)r(e)}function ut(e){var V;var t=this,r=t.ownerDocument,l=e.type,i=((V=e.composedPath)==null?void 0:V.call(e))||[],a=i[0]||e.target,o=0,f=e.__root;if(f){var s=i.indexOf(f);if(s!==-1&&(t===document||t===window)){e.__root=t;return}var c=i.indexOf(t);if(c===-1)return;s<=c&&(o=s)}if(a=i[o]||e.target,a!==t){Ct(e,"currentTarget",{configurable:!0,get(){return a||r}});var v=A,h=S;Ae(null),Re(null);try{for(var g,m=[];a!==null;){var b=a.assignedSlot||a.parentNode||a.host||null;try{var L=a["__"+l];if(L!=null&&(!a.disabled||e.target===a))if(gr(L)){var[F,...Z]=L;F.apply(a,[e,...Z])}else L.call(a,e)}catch(j){g?m.push(j):g=j}if(e.cancelBubble||b===t||b===null)break;a=b}if(g){for(let j of m)queueMicrotask(()=>{throw j});throw g}}finally{e.__root=t,delete e.currentTarget,Ae(v),Re(h)}}}function Qt(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Se(e,t){var r=S;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function ge(e,t){var r=(t&ei)!==0,l=(t&ti)!==0,i,a=!e.startsWith("<!>");return()=>{if(D)return Se(O,null),O;i===void 0&&(i=Qt(a?e:"<!>"+e),r||(i=we(i)));var o=l||Ir?document.importNode(i,!0):i.cloneNode(!0);if(r){var f=we(o),s=o.lastChild;Se(f,s)}else Se(o,o);return o}}function el(e,t,r="svg"){var l=!e.startsWith("<!>"),i=`<${r}>${l?e:"<!>"+e}</${r}>`,a;return()=>{if(D)return Se(O,null),O;if(!a){var o=Qt(i),f=we(o);a=we(f)}var s=a.cloneNode(!0);return Se(s,s),s}}function ne(e,t){if(D){S.nodes_end=O,Ze();return}e!==null&&e.before(t)}function en(e,t){return tn(e,t)}function tl(e,t){qt(),t.intro=t.intro??!1;const r=t.target,l=D,i=O;try{for(var a=we(r);a&&(a.nodeType!==8||a.data!==Mt);)a=Ce(a);if(!a)throw qe;We(!0),ke(a),Ze();const o=tn(e,{...t,anchor:a});if(O===null||O.nodeType!==8||O.data!==ur)throw At(),qe;return We(!1),o}catch(o){if(o===qe)return t.recover===!1&&pi(),qt(),Si(r),We(!1),en(e,t);throw o}finally{We(l),ke(i)}}const Ke=new Map;function tn(e,{target:t,anchor:r,props:l={},events:i,context:a,intro:o=!0}){qt();var f=new Set,s=h=>{for(var g=0;g<h.length;g++){var m=h[g];if(!f.has(m)){f.add(m);var b=Gi(m);t.addEventListener(m,ut,{passive:b});var L=Ke.get(m);L===void 0?(document.addEventListener(m,ut,{passive:b}),Ke.set(m,1)):Ke.set(m,L+1)}}};s(oi(Qr)),Xt.add(s);var c=void 0,v=Hi(()=>{var h=r??t.appendChild(Bt());return Pt(()=>{if(a){Wr({});var g=H;g.c=a}i&&(l.$$events=i),D&&Se(h,null),c=e(h,l)||{},D&&(S.nodes_end=O),a&&Zr()}),()=>{var b;for(var g of f){t.removeEventListener(g,ut);var m=Ke.get(g);--m===0?(document.removeEventListener(g,ut),Ke.delete(g)):Ke.set(g,m)}Xt.delete(s),h!==r&&((b=h.parentNode)==null||b.removeChild(h))}});return er.set(c,v),c}let er=new WeakMap;function rl(e,t){const r=er.get(e);return r?(er.delete(e),r(t)):Promise.resolve()}function Te(e,t,[r,l]=[0,0]){D&&r===0&&Ze();var i=e,a=null,o=null,f=W,s=r>0?Ut:0,c=!1;const v=(g,m=!0)=>{c=!0,h(m,g)},h=(g,m)=>{if(f===(f=g))return;let b=!1;if(D&&l!==-1){if(r===0){const F=i.data;F===Mt?l=0:F===fr?l=1/0:(l=parseInt(F.substring(1)),l!==l&&(l=f?1/0:-1))}const L=l>r;!!f===L&&(i=Ii(),ke(i),We(!1),b=!0,l=-1)}f?(a?qr(a):m&&(a=Pt(()=>m(i))),o&&Kt(o,()=>{o=null})):(o?qr(o):m&&(o=Pt(()=>m(i,[r+1,l]))),a&&Kt(a,()=>{a=null})),b&&We(!0)};Jt(()=>{c=!1,t(v),c||h(null,null)},s),D&&(i=O)}function Xe(e,t,r,l,i){var a=e,o="",f;Jt(()=>{if(o===(o=t()??"")){D&&Ze();return}f!==void 0&&(Ee(f),f=void 0),o!==""&&(f=Pt(()=>{if(D){O.data;for(var s=Ze(),c=s;s!==null&&(s.nodeType!==8||s.data!=="");)c=s,s=Ce(s);if(s===null)throw At(),qe;Se(O,c),a=ke(s);return}var v=o+"",h=Qt(v);Se(we(h),h.lastChild),a.before(h)}))})}function nl(e,t,r,l,i){var f;D&&Ze();var a=(f=t.$$slots)==null?void 0:f[r],o=!1;a===!0&&(a=t.children,o=!0),a===void 0||a(e,o?()=>l:l)}function il(e,t){jt(()=>{var r=e.getRootNode(),l=r.host?r:r.head??r.ownerDocument.head;if(!l.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,l.appendChild(i)}})}const rn=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function ll(e,t,r){var l=""+e;if(r){for(var i in r)if(r[i])l=l?l+" "+i:i;else if(l.length)for(var a=i.length,o=0;(o=l.indexOf(i,o))>=0;){var f=o+a;(o===0||rn.includes(l[o-1]))&&(f===l.length||rn.includes(l[f]))?l=(o===0?"":l.substring(0,o))+l.substring(f+1):o=f}}return l===""?null:l}function al(e,t,r,l,i,a){var o=e.__className;if(D||o!==r){var f=ll(r,l,a);(!D||f!==e.getAttribute("class"))&&(f==null?e.removeAttribute("class"):e.className=f),e.__className=r}else if(a&&i!==a)for(var s in a){var c=!!a[s];(i==null||c!==!!i[s])&&e.classList.toggle(s,c)}return a}const ol=Symbol("is custom element"),sl=Symbol("is html");function nn(e){if(D){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var l=e.value;ue(e,"value",null),e.value=l}if(e.hasAttribute("checked")){var i=e.checked;ue(e,"checked",null),e.checked=i}}};e.__on_r=r,di(r),Kr()}}function fl(e,t){var r=ln(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function ue(e,t,r,l){var i=ln(e);D&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="loading"&&(e[li]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ul(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function ln(e){return e.__attributes??(e.__attributes={[ol]:e.nodeName.includes("-"),[sl]:e.namespaceURI===ri})}var an=new Map;function ul(e){var t=an.get(e.nodeName);if(t)return t;an.set(e.nodeName,t=[]);for(var r,l=e,i=Element.prototype;i!==l;){r=si(l);for(var a in r)r[a].set&&t.push(a);l=_r(l)}return t}function cl(e,t,r=t){Ji(e,"change",l=>{var i=l?e.defaultChecked:e.checked;r(i)}),(D&&e.defaultChecked!==e.checked||Ge(t)==null)&&r(e.checked),Gt(()=>{var l=t();e.checked=!!l})}function on(e,t){return e===t||(e==null?void 0:e[lt])===t}function sn(e={},t,r,l){return Zt(()=>{var i,a;return Gt(()=>{i=a,a=[],Ge(()=>{e!==r(...a)&&(t(e,...a),i&&on(r(...i),e)&&t(null,...i))})}),()=>{jt(()=>{a&&on(r(...a),e)&&t(null,...a)})}}),e}function fn(e){H===null&&Hr(),Wt(()=>{const t=Ge(e);if(typeof t=="function")return t})}function dl(e){H===null&&Hr(),fn(()=>()=>Ge(e))}let zt=!1;function vl(e){var t=zt;try{return zt=!1,[e(),zt]}finally{zt=t}}function R(e,t,r,l){var Ve;var i=(r&bt)!==0,a=!0,o=(r&Xn)!==0,f=(r&Qn)!==0,s=!1,c;o?[c,s]=vl(()=>e[t]):c=e[t];var v=lt in e||hr in e,h=o&&(((Ve=ze(e,t))==null?void 0:Ve.set)??(v&&t in e&&(M=>e[t]=M)))||void 0,g=l,m=!0,b=!1,L=()=>(b=!0,m&&(m=!1,f?g=Ge(l):g=l),g);c===void 0&&l!==void 0&&(h&&a&&wi(),c=L(),h&&h(c));var F;if(F=()=>{var M=e[t];return M===void 0?L():(m=!0,b=!1,M)},(r&Kn)===0)return F;if(h){var Z=e.$$legacy;return function(M,q){return arguments.length>0?((!q||Z||s)&&h(q?F():M),M):F()}}var V=!1,j=xr(c),G=Oe(()=>{var M=F(),q=d(j);return V?(V=!1,q):j.v=M});return i||(G.equals=Er),function(M,q){if(arguments.length>0){const $e=q?d(G):o?se(M):M;return G.equals($e)||(V=!0,z(j,$e),b&&g!==void 0&&(g=$e),Ge(()=>d(G))),M}return d(G)}}function hl(e){return new gl(e)}class gl{constructor(t){or(this,xe);or(this,ie);var a;var r=new Map,l=(o,f)=>{var s=xr(f);return r.set(o,s),s};const i=new Proxy({...t.props||{},$$events:{}},{get(o,f){return d(r.get(f)??l(f,Reflect.get(o,f)))},has(o,f){return f===hr?!0:(d(r.get(f)??l(f,Reflect.get(o,f))),Reflect.has(o,f))},set(o,f,s){return z(r.get(f)??l(f,s),s),Reflect.set(o,f,s)}});sr(this,ie,(t.hydrate?tl:en)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((a=t==null?void 0:t.props)!=null&&a.$$host)||t.sync===!1)&&x(),sr(this,xe,i.$$events);for(const o of Object.keys(K(this,ie)))o==="$set"||o==="$destroy"||o==="$on"||Ct(this,o,{get(){return K(this,ie)[o]},set(f){K(this,ie)[o]=f},enumerable:!0});K(this,ie).$set=o=>{Object.assign(i,o)},K(this,ie).$destroy=()=>{rl(K(this,ie))}}$set(t){K(this,ie).$set(t)}$on(t,r){K(this,xe)[t]=K(this,xe)[t]||[];const l=(...i)=>r.call(this,...i);return K(this,xe)[t].push(l),()=>{K(this,xe)[t]=K(this,xe)[t].filter(i=>i!==l)}}$destroy(){K(this,ie).$destroy()}}xe=new WeakMap,ie=new WeakMap;let un;typeof HTMLElement=="function"&&(un=class extends HTMLElement{constructor(t,r,l){super();ce(this,"$$ctor");ce(this,"$$s");ce(this,"$$c");ce(this,"$$cn",!1);ce(this,"$$d",{});ce(this,"$$r",!1);ce(this,"$$p_d",{});ce(this,"$$l",{});ce(this,"$$l_u",new Map);ce(this,"$$me");this.$$ctor=t,this.$$s=r,l&&this.attachShadow({mode:"open"})}addEventListener(t,r,l){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,l)}removeEventListener(t,r,l){if(super.removeEventListener(t,r,l),this.$$c){const i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return a=>{const o=document.createElement("slot");i!=="default"&&(o.name=i),ne(a,o)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},l=_l(this);for(const i of this.$$s)i in l&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=Ot(a,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=hl({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Bi(()=>{Gt(()=>{var i;this.$$r=!0;for(const a of kt(this.$$c)){if(!((i=this.$$p_d[a])!=null&&i.reflect))continue;this.$$d[a]=this.$$c[a];const o=Ot(a,this.$$d[a],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,o)}this.$$r=!1})});for(const i in this.$$l)for(const a of this.$$l[i]){const o=this.$$c.$on(i,a);this.$$l_u.set(a,o)}this.$$l={}}}attributeChangedCallback(t,r,l){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ot(t,l,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$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 kt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Ot(e,t,r,l){var a;const i=(a=r[e])==null?void 0:a.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!l||!r[e])return t;if(l==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function _l(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ml(e,t,r,l,i,a){let o=class extends un{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return kt(t).map(f=>(t[f].attribute||f).toLowerCase())}};return kt(t).forEach(f=>{Ct(o.prototype,f,{get(){return this.$$c&&f in this.$$c?this.$$c[f]:this.$$d[f]},set(s){var h;s=Ot(f,s,t),this.$$d[f]=s;var c=this.$$c;if(c){var v=(h=ze(c,f))==null?void 0:h.get;v?c[f]=s:c.$set({[f]:s})}}})}),l.forEach(f=>{Ct(o.prototype,f,{get(){var s;return(s=this.$$c)==null?void 0:s[f]}})}),e.element=o,o}const cn=new TextEncoder;function pl(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function wl(e,t="SHA-256",r=1e5){const l=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const i=await dn(l,e,t);return{algorithm:t,challenge:i,salt:l,signature:""}}async function dn(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 pl(await crypto.subtle.digest(r.toUpperCase(),cn.encode(e+t)))}function bl(e,t,r="SHA-256",l=1e6,i=0){const a=new AbortController,o=Date.now();return{promise:(async()=>{for(let s=i;s<=l;s+=1){if(a.signal.aborted)return null;if(await dn(t,s,r)===e)return{number:s,took:Date.now()-o}}return null})(),controller:a}}function yl(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function El(e){const t=atob(e),r=new Uint8Array(t.length);for(let l=0;l<t.length;l++)r[l]=t.charCodeAt(l);return r}function xl(e,t=12){const r=new Uint8Array(t);for(let l=0;l<t;l++)r[l]=e%256,e=Math.floor(e/256);return r}async function $l(e,t="",r=1e6,l=0){const i="AES-GCM",a=new AbortController,o=Date.now(),f=async()=>{for(let v=l;v<=r;v+=1){if(a.signal.aborted||!s||!c)return null;try{const h=await crypto.subtle.decrypt({name:i,iv:xl(v)},s,c);if(h)return{clearText:new TextDecoder().decode(h),took:Date.now()-o}}catch{}}return null};let s=null,c=null;try{c=El(e);const v=await crypto.subtle.digest("SHA-256",cn.encode(t));s=await crypto.subtle.importKey("raw",v,i,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:a}}return{promise:f(),controller:a}}var w=(e=>(e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(w||{}),kl=el('<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="svelte-ddsc3z"><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" class="svelte-ddsc3z"></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" class="altcha-spinner svelte-ddsc3z"></path></svg>'),Cl=ge('<span role="status" aria-live="polite" class="svelte-ddsc3z"><!></span> <input type="hidden" class="svelte-ddsc3z">',1),Al=ge('<span role="status" aria-live="polite" class="svelte-ddsc3z"><!></span>'),Rl=ge('<label class="svelte-ddsc3z"><!></label>'),Il=ge('<div class="svelte-ddsc3z"><a target="_blank" class="altcha-logo svelte-ddsc3z"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-ddsc3z"><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" class="svelte-ddsc3z"></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" class="svelte-ddsc3z"></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" class="svelte-ddsc3z"></path></svg></a></div>'),Sl=ge('<div class="svelte-ddsc3z"><!></div>'),Tl=ge('<div class="svelte-ddsc3z"><!></div>'),Nl=ge('<div class="altcha-error svelte-ddsc3z"><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" class="svelte-ddsc3z"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" class="svelte-ddsc3z"></path></svg> <!></div>'),Ll=ge('<div class="altcha-footer svelte-ddsc3z"><div class="svelte-ddsc3z"><!></div></div>'),Dl=ge('<div class="altcha-anchor-arrow svelte-ddsc3z"></div>'),Pl=ge('<!> <div class="altcha svelte-ddsc3z"><div class="altcha-main svelte-ddsc3z"><!> <div><input type="checkbox" class="svelte-ddsc3z"></div> <div class="altcha-label svelte-ddsc3z"><!></div> <!></div> <!> <!> <!></div>',1);const zl={hash:"svelte-ddsc3z",code:`.altcha.svelte-ddsc3z {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;text-align:left;}.altcha.svelte-ddsc3z:focus-within {border-color:var(--altcha-color-border-focus, currentColor);}.altcha[data-floating].svelte-ddsc3z {background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999;}.altcha[data-floating=top].svelte-ddsc3z .altcha-anchor-arrow:where(.svelte-ddsc3z) {border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto;}.altcha[data-floating=bottom].svelte-ddsc3z:focus-within::after {border-bottom-color:var(--altcha-color-border-focus, currentColor);}.altcha[data-floating=top].svelte-ddsc3z:focus-within::after {border-top-color:var(--altcha-color-border-focus, currentColor);}.altcha[data-floating].svelte-ddsc3z:not([data-state=unverified]) {display:block;}.altcha-anchor-arrow.svelte-ddsc3z {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.svelte-ddsc3z {align-items:center;display:flex;gap:0.4rem;padding:0.7rem;}.altcha-label.svelte-ddsc3z {flex-grow:1;}.altcha-label.svelte-ddsc3z label:where(.svelte-ddsc3z) {cursor:pointer;}.altcha-logo.svelte-ddsc3z {color:currentColor;opacity:0.3;}.altcha-logo.svelte-ddsc3z:hover {opacity:1;}.altcha-error.svelte-ddsc3z {color:var(--altcha-color-error-text, #f23939);display:flex;font-size:0.85rem;gap:0.3rem;padding:0 0.7rem 0.7rem;}.altcha-footer.svelte-ddsc3z {align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:0.75rem;opacity:0.4;padding:0.2rem 0.7rem;text-align:right;}.altcha-footer.svelte-ddsc3z:hover {opacity:1;}.altcha-footer.svelte-ddsc3z > :where(.svelte-ddsc3z):first-child {flex-grow:1;}.altcha-footer.svelte-ddsc3z a {color:currentColor;}.altcha-checkbox.svelte-ddsc3z {display:flex;align-items:center;height:24px;width:24px;}.altcha-checkbox.svelte-ddsc3z input:where(.svelte-ddsc3z) {width:18px;height:18px;margin:0;}.altcha-hidden.svelte-ddsc3z {display:none;}.altcha-spinner.svelte-ddsc3z {
|
|
3
|
-
|
|
1
|
+
(function(N,S){typeof exports=="object"&&typeof module<"u"?S(exports):typeof define=="function"&&define.amd?define(["exports"],S):(N=typeof globalThis<"u"?globalThis:N||self,S(N.altcha={}))})(this,function(N){"use strict";var aa=Object.defineProperty;var xi=N=>{throw TypeError(N)};var sa=(N,S,G)=>S in N?aa(N,S,{enumerable:!0,configurable:!0,writable:!0,value:G}):N[S]=G;var Ee=(N,S,G)=>sa(N,typeof S!="symbol"?S+"":S,G),Ai=(N,S,G)=>S.has(N)||xi("Cannot "+G);var ue=(N,S,G)=>(Ai(N,S,"read from private field"),G?G.call(N):S.get(N)),Or=(N,S,G)=>S.has(N)?xi("Cannot add the same private member more than once"):S instanceof WeakSet?S.add(N):S.set(N,G),Fr=(N,S,G,Ot)=>(Ai(N,S,"write to private field"),Ot?Ot.call(N,G):S.set(N,G),G);var jn,Oe,ge;var S=typeof document<"u"?document.currentScript:null;const G="5";typeof window<"u"&&((jn=window.__svelte??(window.__svelte={})).v??(jn.v=new Set)).add(G);const Ot=1,Ii=4,Ri=8,$i=16,Ni=1,Si=2,fr="[",Vr="[!",Mr="]",st={},oe=Symbol(),Ti="http://www.w3.org/1999/xhtml",Ur=!1,me=2,jr=4,Ft=8,cr=16,Se=32,et=64,Vt=128,ve=256,Mt=512,fe=1024,Te=2048,ut=4096,ft=8192,Ut=16384,zi=32768,dr=65536,Di=1<<19,qr=1<<20,Et=Symbol("$state"),Br=Symbol("legacy props"),Li=Symbol("");var Hr=Array.isArray,Pi=Array.prototype.indexOf,Oi=Array.from,jt=Object.keys,qt=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,Fi=Object.getOwnPropertyDescriptors,Vi=Object.prototype,Mi=Array.prototype,Yr=Object.getPrototypeOf;function Gr(e){for(var t=0;t<e.length;t++)e[t]()}function Ui(e,t,r=!1){return e===void 0?r?t():t:e}const ji=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let kt=[],Ct=[];function Zr(){var e=kt;kt=[],Gr(e)}function Wr(){var e=Ct;Ct=[],Gr(e)}function Bt(e){kt.length===0&&queueMicrotask(Zr),kt.push(e)}function qi(e){Ct.length===0&&ji(Wr),Ct.push(e)}function Jr(){kt.length>0&&Zr(),Ct.length>0&&Wr()}function Kr(e){return e===this.v}function Bi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function hr(e){return!Bi(e,this.v)}function Hi(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Yi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Gi(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Zi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Wi(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ji(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ki(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Xi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Qi(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function eo(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let to=!1;function ke(e,t){var r={f:0,v:e,reactions:null,equals:Kr,rv:0,wv:0};return r}function le(e){return ro(ke(e))}function Xr(e,t=!1){const r=ke(e);return t||(r.equals=hr),r}function ro(e){return T!==null&&!pe&&(T.f&me)!==0&&(Ce===null?uo([e]):Ce.push(e)),e}function w(e,t){return T!==null&&!pe&&Cn()&&(T.f&(me|cr))!==0&&(Ce===null||!Ce.includes(e))&&eo(),no(e,t)}function no(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=fn(),Qr(e,Te),D!==null&&(D.f&fe)!==0&&(D.f&(Se|et))===0&&(De===null?fo([e]):De.push(e))),t}function Qr(e,t){var r=e.reactions;if(r!==null)for(var o=r.length,i=0;i<o;i++){var l=r[i],s=l.f;(s&Te)===0&&(xe(l,t),(s&(fe|ve))!==0&&((s&me)!==0?Qr(l,ut):Qt(l)))}}function Ue(e){var t=me|Te,r=T!==null&&(T.f&me)!==0?T:null;return D===null||r!==null&&(r.f&ve)!==0?t|=ve:D.f|=qr,{ctx:ne,deps:null,effects:null,equals:Kr,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??D}}function io(e){const t=Ue(e);return t.equals=hr,t}function en(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Pe(t[r])}}function oo(e){for(var t=e.parent;t!==null;){if((t.f&me)===0)return t;t=t.parent}return null}function lo(e){var t,r=D;He(oo(e));try{en(e),t=dn(e)}finally{He(r)}return t}function tn(e){var t=lo(e),r=(Ye||(e.f&ve)!==0)&&e.deps!==null?ut:fe;xe(e,r),e.equals(t)||(e.v=t,e.wv=fn())}function Ht(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let L=!1;function ct(e){L=e}let P;function je(e){if(e===null)throw Ht(),st;return P=e}function dt(){return je(qe(P))}function Z(e){if(L){if(qe(P)!==null)throw Ht(),st;P=e}}function ao(){for(var e=0,t=P;;){if(t.nodeType===8){var r=t.data;if(r===Mr){if(e===0)return t;e-=1}else(r===fr||r===Vr)&&(e+=1)}var o=qe(t);t.remove(),t=o}}function V(e,t=null,r){if(typeof e!="object"||e===null||Et in e)return e;const o=Yr(e);if(o!==Vi&&o!==Mi)return e;var i=new Map,l=Hr(e),s=ke(0);l&&i.set("length",ke(e.length));var f;return new Proxy(e,{defineProperty(c,d,_){(!("value"in _)||_.configurable===!1||_.enumerable===!1||_.writable===!1)&&Ki();var h=i.get(d);return h===void 0?(h=ke(_.value),i.set(d,h)):w(h,V(_.value,f)),!0},deleteProperty(c,d){var _=i.get(d);if(_===void 0)d in c&&i.set(d,ke(oe));else{if(l&&typeof d=="string"){var h=i.get("length"),g=Number(d);Number.isInteger(g)&&g<h.v&&w(h,g)}w(_,oe),rn(s)}return!0},get(c,d,_){var x;if(d===Et)return e;var h=i.get(d),g=d in c;if(h===void 0&&(!g||(x=tt(c,d))!=null&&x.writable)&&(h=ke(V(g?c[d]:oe,f)),i.set(d,h)),h!==void 0){var p=a(h);return p===oe?void 0:p}return Reflect.get(c,d,_)},getOwnPropertyDescriptor(c,d){var _=Reflect.getOwnPropertyDescriptor(c,d);if(_&&"value"in _){var h=i.get(d);h&&(_.value=a(h))}else if(_===void 0){var g=i.get(d),p=g==null?void 0:g.v;if(g!==void 0&&p!==oe)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return _},has(c,d){var p;if(d===Et)return!0;var _=i.get(d),h=_!==void 0&&_.v!==oe||Reflect.has(c,d);if(_!==void 0||D!==null&&(!h||(p=tt(c,d))!=null&&p.writable)){_===void 0&&(_=ke(h?V(c[d],f):oe),i.set(d,_));var g=a(_);if(g===oe)return!1}return h},set(c,d,_,h){var B;var g=i.get(d),p=d in c;if(l&&d==="length")for(var x=_;x<g.v;x+=1){var O=i.get(x+"");O!==void 0?w(O,oe):x in c&&(O=ke(oe),i.set(x+"",O))}g===void 0?(!p||(B=tt(c,d))!=null&&B.writable)&&(g=ke(void 0),w(g,V(_,f)),i.set(d,g)):(p=g.v!==oe,w(g,V(_,f)));var M=Reflect.getOwnPropertyDescriptor(c,d);if(M!=null&&M.set&&M.set.call(h,_),!p){if(l&&typeof d=="string"){var Ie=i.get("length"),ae=Number(d);Number.isInteger(ae)&&ae>=Ie.v&&w(Ie,ae+1)}rn(s)}return!0},ownKeys(c){a(s);var d=Reflect.ownKeys(c).filter(g=>{var p=i.get(g);return p===void 0||p.v!==oe});for(var[_,h]of i)h.v!==oe&&!(_ in c)&&d.push(_);return d},setPrototypeOf(){Xi()}})}function rn(e,t=1){w(e,e.v+t)}var nn,on,ln,an;function vr(){if(nn===void 0){nn=window,on=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype;ln=tt(t,"firstChild").get,an=tt(t,"nextSibling").get,e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0,Text.prototype.__t=void 0}}function Yt(e=""){return document.createTextNode(e)}function ze(e){return ln.call(e)}function qe(e){return an.call(e)}function W(e,t){if(!L)return ze(e);var r=ze(P);return r===null&&(r=P.appendChild(Yt())),je(r),r}function xt(e,t){if(!L){var r=ze(e);return r instanceof Comment&&r.data===""?qe(r):r}return P}function J(e,t=1,r=!1){let o=L?P:e;for(var i;t--;)i=o,o=qe(o);if(!L)return o;var l=o==null?void 0:o.nodeType;if(r&&l!==3){var s=Yt();return o===null?i==null||i.after(s):o.before(s),je(s),s}return je(o),o}function so(e){e.textContent=""}let Gt=!1,Zt=!1,Wt=null,rt=!1,gr=!1;function sn(e){gr=e}let At=[],ua=[],T=null,pe=!1;function Be(e){T=e}let D=null;function He(e){D=e}let Ce=null;function uo(e){Ce=e}let re=null,ce=0,De=null;function fo(e){De=e}let un=1,Jt=0,Ye=!1;function fn(){return++un}function It(e){var h;var t=e.f;if((t&Te)!==0)return!0;if((t&ut)!==0){var r=e.deps,o=(t&ve)!==0;if(r!==null){var i,l,s=(t&Mt)!==0,f=o&&D!==null&&!Ye,c=r.length;if(s||f){var d=e,_=d.parent;for(i=0;i<c;i++)l=r[i],(s||!((h=l==null?void 0:l.reactions)!=null&&h.includes(d)))&&(l.reactions??(l.reactions=[])).push(d);s&&(d.f^=Mt),f&&_!==null&&(_.f&ve)===0&&(d.f^=ve)}for(i=0;i<c;i++)if(l=r[i],It(l)&&tn(l),l.wv>e.wv)return!0}(!o||D!==null&&!Ye)&&xe(e,fe)}return!1}function co(e,t){for(var r=t;r!==null;){if((r.f&Vt)!==0)try{r.fn(e);return}catch{r.f^=Vt}r=r.parent}throw Gt=!1,e}function ho(e){return(e.f&Ut)===0&&(e.parent===null||(e.parent.f&Vt)===0)}function Kt(e,t,r,o){if(Gt){if(r===null&&(Gt=!1),ho(t))throw e;return}r!==null&&(Gt=!0);{co(e,t);return}}function cn(e,t,r=!0){var o=e.reactions;if(o!==null)for(var i=0;i<o.length;i++){var l=o[i];(l.f&me)!==0?cn(l,t,!1):t===l&&(r?xe(l,Te):(l.f&fe)!==0&&xe(l,ut),Qt(l))}}function dn(e){var p;var t=re,r=ce,o=De,i=T,l=Ye,s=Ce,f=ne,c=pe,d=e.f;re=null,ce=0,De=null,Ye=(d&ve)!==0&&(pe||!rt||T===null),T=(d&(Se|et))===0?e:null,Ce=null,yn(e.ctx),pe=!1,Jt++;try{var _=(0,e.fn)(),h=e.deps;if(re!==null){var g;if(Xt(e,ce),h!==null&&ce>0)for(h.length=ce+re.length,g=0;g<re.length;g++)h[ce+g]=re[g];else e.deps=h=re;if(!Ye)for(g=ce;g<h.length;g++)((p=h[g]).reactions??(p.reactions=[])).push(e)}else h!==null&&ce<h.length&&(Xt(e,ce),h.length=ce);if(Cn()&&De!==null&&!pe&&h!==null&&(e.f&(me|ut|Te))===0)for(g=0;g<De.length;g++)cn(De[g],e);return i!==null&&Jt++,_}finally{re=t,ce=r,De=o,T=i,Ye=l,Ce=s,yn(f),pe=c}}function vo(e,t){let r=t.reactions;if(r!==null){var o=Pi.call(r,e);if(o!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[o]=r[i],r.pop())}}r===null&&(t.f&me)!==0&&(re===null||!re.includes(t))&&(xe(t,ut),(t.f&(ve|Mt))===0&&(t.f^=Mt),en(t),Xt(t,0))}function Xt(e,t){var r=e.deps;if(r!==null)for(var o=t;o<r.length;o++)vo(e,r[o])}function _r(e){var t=e.f;if((t&Ut)===0){xe(e,fe);var r=D,o=ne,i=rt;D=e,rt=!0;try{(t&cr)!==0?Co(e):gn(e),vn(e);var l=dn(e);e.teardown=typeof l=="function"?l:null,e.wv=un;var s=e.deps,f;Ur&&to&&e.f&Te}catch(c){Kt(c,e,r,o||e.ctx)}finally{rt=i,D=r}}}function go(){try{Zi()}catch(e){if(Wt!==null)Kt(e,Wt,null);else throw e}}function hn(){var e=rt;try{var t=0;for(rt=!0;At.length>0;){t++>1e3&&go();var r=At,o=r.length;At=[];for(var i=0;i<o;i++){var l=mo(r[i]);_o(l)}}}finally{Zt=!1,rt=e,Wt=null}}function _o(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var o=e[r];if((o.f&(Ut|ft))===0)try{It(o)&&(_r(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?_n(o):o.fn=null))}catch(i){Kt(i,o,null,o.ctx)}}}function Qt(e){Zt||(Zt=!0,queueMicrotask(hn));for(var t=Wt=e;t.parent!==null;){t=t.parent;var r=t.f;if((r&(et|Se))!==0){if((r&fe)===0)return;t.f^=fe}}At.push(t)}function mo(e){for(var t=[],r=e;r!==null;){var o=r.f,i=(o&(Se|et))!==0,l=i&&(o&fe)!==0;if(!l&&(o&ft)===0){if((o&jr)!==0)t.push(r);else if(i)r.f^=fe;else{var s=T;try{T=r,It(r)&&_r(r)}catch(d){Kt(d,r,null,r.ctx)}finally{T=s}}var f=r.first;if(f!==null){r=f;continue}}var c=r.parent;for(r=r.next;r===null&&c!==null;)r=c.next,c=c.parent}return t}function C(e){var t;for(Jr();At.length>0;)Zt=!0,hn(),Jr();return t}async function mr(){await Promise.resolve(),C()}function a(e){var t=e.f,r=(t&me)!==0;if(T!==null&&!pe){Ce!==null&&Ce.includes(e)&&Qi();var o=T.deps;e.rv<Jt&&(e.rv=Jt,re===null&&o!==null&&o[ce]===e?ce++:re===null?re=[e]:(!Ye||!re.includes(e))&&re.push(e))}else if(r&&e.deps===null&&e.effects===null){var i=e,l=i.parent;l!==null&&(l.f&ve)===0&&(i.f^=ve)}return r&&(i=e,It(i)&&tn(i)),e.v}function ht(e){var t=pe;try{return pe=!0,e()}finally{pe=t}}const po=-7169;function xe(e,t){e.f=e.f&po|t}function bo(e){D===null&&T===null&&Gi(),T!==null&&(T.f&ve)!==0&&D===null&&Yi(),gr&&Hi()}function wo(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function nt(e,t,r,o=!0){var i=D,l={ctx:ne,deps:null,nodes_start:null,nodes_end:null,f:e|Te,first:null,fn:t,last:null,next:null,parent:i,prev:null,teardown:null,transitions:null,wv:0};if(r)try{_r(l),l.f|=zi}catch(c){throw Pe(l),c}else t!==null&&Qt(l);var s=r&&l.deps===null&&l.first===null&&l.nodes_start===null&&l.teardown===null&&(l.f&(qr|Vt))===0;if(!s&&o&&(i!==null&&wo(l,i),T!==null&&(T.f&me)!==0)){var f=T;(f.effects??(f.effects=[])).push(l)}return l}function yo(e){const t=nt(Ft,null,!1);return xe(t,fe),t.teardown=e,t}function pr(e){bo();var t=D!==null&&(D.f&Se)!==0&&ne!==null&&!ne.m;if(t){var r=ne;(r.e??(r.e=[])).push({fn:e,effect:D,reaction:T})}else{var o=br(e);return o}}function Eo(e){const t=nt(et,e,!0);return()=>{Pe(t)}}function ko(e){const t=nt(et,e,!0);return(r={})=>new Promise(o=>{r.outro?Er(t,()=>{Pe(t),o(void 0)}):(Pe(t),o(void 0))})}function br(e){return nt(jr,e,!1)}function wr(e){return nt(Ft,e,!0)}function Le(e,t=[],r=Ue){const o=t.map(r);return yr(()=>e(...o.map(a)))}function yr(e,t=0){return nt(Ft|cr|t,e,!0)}function er(e,t=!0){return nt(Ft|Se,e,!0,t)}function vn(e){var t=e.teardown;if(t!==null){const r=gr,o=T;sn(!0),Be(null);try{t.call(null)}finally{sn(r),Be(o)}}}function gn(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var o=r.next;(r.f&et)!==0?r.parent=null:Pe(r,t),r=o}}function Co(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Se)===0&&Pe(t),t=r}}function Pe(e,t=!0){var r=!1;if((t||(e.f&Di)!==0)&&e.nodes_start!==null){for(var o=e.nodes_start,i=e.nodes_end;o!==null;){var l=o===i?null:qe(o);o.remove(),o=l}r=!0}gn(e,t&&!r),Xt(e,0),xe(e,Ut);var s=e.transitions;if(s!==null)for(const c of s)c.stop();vn(e);var f=e.parent;f!==null&&f.first!==null&&_n(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function _n(e){var t=e.parent,r=e.prev,o=e.next;r!==null&&(r.next=o),o!==null&&(o.prev=r),t!==null&&(t.first===e&&(t.first=o),t.last===e&&(t.last=r))}function Er(e,t){var r=[];mn(e,r,!0),xo(r,()=>{Pe(e),t&&t()})}function xo(e,t){var r=e.length;if(r>0){var o=()=>--r||t();for(var i of e)i.out(o)}else t()}function mn(e,t,r){if((e.f&ft)===0){if(e.f^=ft,e.transitions!==null)for(const s of e.transitions)(s.is_global||r)&&t.push(s);for(var o=e.first;o!==null;){var i=o.next,l=(o.f&dr)!==0||(o.f&Se)!==0;mn(o,t,l?r:!1),o=i}}}function pn(e){bn(e,!0)}function bn(e,t){if((e.f&ft)!==0){e.f^=ft,(e.f&fe)===0&&(e.f^=fe),It(e)&&(xe(e,Te),Qt(e));for(var r=e.first;r!==null;){var o=r.next,i=(r.f&dr)!==0||(r.f&Se)!==0;bn(r,i?t:!1),r=o}if(e.transitions!==null)for(const l of e.transitions)(l.is_global||t)&&l.in()}}function wn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let ne=null;function yn(e){ne=e}function En(e,t=!1,r){ne={p:ne,c:null,e:null,m:!1,s:e,x:null,l:null}}function kn(e){const t=ne;if(t!==null){e!==void 0&&(t.x=e);const s=t.e;if(s!==null){var r=D,o=T;t.e=null;try{for(var i=0;i<s.length;i++){var l=s[i];He(l.effect),Be(l.reaction),br(l.fn)}}finally{He(r),Be(o)}}ne=t.p,t.m=!0}return e||{}}function Cn(){return!0}const Ao=["touchstart","touchmove"];function Io(e){return Ao.includes(e)}function Ro(e,t){{const r=document.body;e.autofocus=!0,Bt(()=>{document.activeElement===r&&e.focus()})}}let xn=!1;function An(){xn||(xn=!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 In(e){var t=T,r=D;Be(null),He(null);try{return e()}finally{Be(t),He(r)}}function $o(e,t,r,o=r){e.addEventListener(t,()=>In(r));const i=e.__on_r;i?e.__on_r=()=>{i(),o(!0)}:e.__on_r=()=>o(!0),An()}const Rn=new Set,kr=new Set;function No(e,t,r,o={}){function i(l){if(o.capture||Rt.call(t,l),!l.cancelBubble)return In(()=>r==null?void 0:r.call(this,l))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Bt(()=>{t.addEventListener(e,i,o)}):t.addEventListener(e,i,o),i}function Ge(e,t,r,o,i){var l={capture:o,passive:i},s=No(e,t,r,l);(t===document.body||t===window||t===document)&&yo(()=>{t.removeEventListener(e,s,l)})}function So(e){for(var t=0;t<e.length;t++)Rn.add(e[t]);for(var r of kr)r(e)}function Rt(e){var ae;var t=this,r=t.ownerDocument,o=e.type,i=((ae=e.composedPath)==null?void 0:ae.call(e))||[],l=i[0]||e.target,s=0,f=e.__root;if(f){var c=i.indexOf(f);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var d=i.indexOf(t);if(d===-1)return;c<=d&&(s=c)}if(l=i[s]||e.target,l!==t){qt(e,"currentTarget",{configurable:!0,get(){return l||r}});var _=T,h=D;Be(null),He(null);try{for(var g,p=[];l!==null;){var x=l.assignedSlot||l.parentNode||l.host||null;try{var O=l["__"+o];if(O!=null&&(!l.disabled||e.target===l))if(Hr(O)){var[M,...Ie]=O;M.apply(l,[e,...Ie])}else O.call(l,e)}catch(B){g?p.push(B):g=B}if(e.cancelBubble||x===t||x===null)break;l=x}if(g){for(let B of p)queueMicrotask(()=>{throw B});throw g}}finally{e.__root=t,delete e.currentTarget,Be(_),He(h)}}}function Cr(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Ae(e,t){var r=D;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function be(e,t){var r=(t&Ni)!==0,o=(t&Si)!==0,i,l=!e.startsWith("<!>");return()=>{if(L)return Ae(P,null),P;i===void 0&&(i=Cr(l?e:"<!>"+e),r||(i=ze(i)));var s=o||on?document.importNode(i,!0):i.cloneNode(!0);if(r){var f=ze(s),c=s.lastChild;Ae(f,c)}else Ae(s,s);return s}}function tr(e,t,r="svg"){var o=!e.startsWith("<!>"),i=`<${r}>${o?e:"<!>"+e}</${r}>`,l;return()=>{if(L)return Ae(P,null),P;if(!l){var s=Cr(i),f=ze(s);l=ze(f)}var c=l.cloneNode(!0);return Ae(c,c),c}}function rr(){if(L)return Ae(P,null),P;var e=document.createDocumentFragment(),t=document.createComment(""),r=Yt();return e.append(t,r),Ae(t,r),e}function q(e,t){if(L){D.nodes_end=P,dt();return}e!==null&&e.before(t)}function To(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 $n(e,t){return Nn(e,t)}function zo(e,t){vr(),t.intro=t.intro??!1;const r=t.target,o=L,i=P;try{for(var l=ze(r);l&&(l.nodeType!==8||l.data!==fr);)l=qe(l);if(!l)throw st;ct(!0),je(l),dt();const s=Nn(e,{...t,anchor:l});if(P===null||P.nodeType!==8||P.data!==Mr)throw Ht(),st;return ct(!1),s}catch(s){if(s===st)return t.recover===!1&&Wi(),vr(),so(r),ct(!1),$n(e,t);throw s}finally{ct(o),je(i)}}const vt=new Map;function Nn(e,{target:t,anchor:r,props:o={},events:i,context:l,intro:s=!0}){vr();var f=new Set,c=h=>{for(var g=0;g<h.length;g++){var p=h[g];if(!f.has(p)){f.add(p);var x=Io(p);t.addEventListener(p,Rt,{passive:x});var O=vt.get(p);O===void 0?(document.addEventListener(p,Rt,{passive:x}),vt.set(p,1)):vt.set(p,O+1)}}};c(Oi(Rn)),kr.add(c);var d=void 0,_=ko(()=>{var h=r??t.appendChild(Yt());return er(()=>{if(l){En({});var g=ne;g.c=l}i&&(o.$$events=i),L&&Ae(h,null),d=e(h,o)||{},L&&(D.nodes_end=P),l&&kn()}),()=>{var x;for(var g of f){t.removeEventListener(g,Rt);var p=vt.get(g);--p===0?(document.removeEventListener(g,Rt),vt.delete(g)):vt.set(g,p)}kr.delete(c),h!==r&&((x=h.parentNode)==null||x.removeChild(h))}});return xr.set(d,_),d}let xr=new WeakMap;function Do(e,t){const r=xr.get(e);return r?(xr.delete(e),r(t)):Promise.resolve()}function K(e,t,[r,o]=[0,0]){L&&r===0&&dt();var i=e,l=null,s=null,f=oe,c=r>0?dr:0,d=!1;const _=(g,p=!0)=>{d=!0,h(p,g)},h=(g,p)=>{if(f===(f=g))return;let x=!1;if(L&&o!==-1){if(r===0){const M=i.data;M===fr?o=0:M===Vr?o=1/0:(o=parseInt(M.substring(1)),o!==o&&(o=f?1/0:-1))}const O=o>r;!!f===O&&(i=ao(),je(i),ct(!1),x=!0,o=-1)}f?(l?pn(l):p&&(l=er(()=>p(i))),s&&Er(s,()=>{s=null})):(s?pn(s):p&&(s=er(()=>p(i,[r+1,o]))),l&&Er(l,()=>{l=null})),x&&ct(!0)};yr(()=>{d=!1,t(_),d||h(null,null)},c),L&&(i=P)}function it(e,t,r,o,i){var l=e,s="",f;yr(()=>{if(s===(s=t()??"")){L&&dt();return}f!==void 0&&(Pe(f),f=void 0),s!==""&&(f=er(()=>{if(L){P.data;for(var c=dt(),d=c;c!==null&&(c.nodeType!==8||c.data!=="");)d=c,c=qe(c);if(c===null)throw Ht(),st;Ae(P,d),l=je(c);return}var _=s+"",h=Cr(_);Ae(ze(h),h.lastChild),l.before(h)}))})}function Lo(e,t,r,o,i){var f;L&&dt();var l=(f=t.$$slots)==null?void 0:f[r],s=!1;l===!0&&(l=t.children,s=!0),l===void 0||l(e,s?()=>o:o)}function Po(e,t){Bt(()=>{var r=e.getRootNode(),o=r.host?r:r.head??r.ownerDocument.head;if(!o.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,o.appendChild(i)}})}const Sn=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Oo(e,t,r){var o=""+e;if(r){for(var i in r)if(r[i])o=o?o+" "+i:i;else if(o.length)for(var l=i.length,s=0;(s=o.indexOf(i,s))>=0;){var f=s+l;(s===0||Sn.includes(o[s-1]))&&(f===o.length||Sn.includes(o[f]))?o=(s===0?"":o.substring(0,s))+o.substring(f+1):s=f}}return o===""?null:o}function Fo(e,t,r,o,i,l){var s=e.__className;if(L||s!==r){var f=Oo(r,o,l);(!L||f!==e.getAttribute("class"))&&(f==null?e.removeAttribute("class"):e.className=f),e.__className=r}else if(l&&i!==l)for(var c in l){var d=!!l[c];(i==null||d!==!!i[c])&&e.classList.toggle(c,d)}return l}const Vo=Symbol("is custom element"),Mo=Symbol("is html");function Tn(e){if(L){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var o=e.value;R(e,"value",null),e.value=o}if(e.hasAttribute("checked")){var i=e.checked;R(e,"checked",null),e.checked=i}}};e.__on_r=r,qi(r),An()}}function Uo(e,t){var r=zn(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function R(e,t,r,o){var i=zn(e);L&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="loading"&&(e[Li]=r),r==null?e.removeAttribute(t):typeof r!="string"&&jo(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function zn(e){return e.__attributes??(e.__attributes={[Vo]:e.nodeName.includes("-"),[Mo]:e.namespaceURI===Ti})}var Dn=new Map;function jo(e){var t=Dn.get(e.nodeName);if(t)return t;Dn.set(e.nodeName,t=[]);for(var r,o=e,i=Element.prototype;i!==o;){r=Fi(o);for(var l in r)r[l].set&&t.push(l);o=Yr(o)}return t}function qo(e,t,r=t){$o(e,"change",o=>{var i=o?e.defaultChecked:e.checked;r(i)}),(L&&e.defaultChecked!==e.checked||ht(t)==null)&&r(e.checked),wr(()=>{var o=t();e.checked=!!o})}function Ln(e,t){return e===t||(e==null?void 0:e[Et])===t}function nr(e={},t,r,o){return br(()=>{var i,l;return wr(()=>{i=l,l=[],ht(()=>{e!==r(...l)&&(t(e,...l),i&&Ln(r(...i),e)&&t(null,...i))})}),()=>{Bt(()=>{l&&Ln(r(...l),e)&&t(null,...l)})}}),e}function Pn(e){ne===null&&wn(),pr(()=>{const t=ht(e);if(typeof t=="function")return t})}function Bo(e){ne===null&&wn(),Pn(()=>()=>ht(e))}let ir=!1;function Ho(e){var t=ir;try{return ir=!1,[e(),ir]}finally{ir=t}}function A(e,t,r,o){var Ze;var i=(r&Ot)!==0,l=!0,s=(r&Ri)!==0,f=(r&$i)!==0,c=!1,d;s?[d,c]=Ho(()=>e[t]):d=e[t];var _=Et in e||Br in e,h=s&&(((Ze=tt(e,t))==null?void 0:Ze.set)??(_&&t in e&&(U=>e[t]=U)))||void 0,g=o,p=!0,x=!1,O=()=>(x=!0,p&&(p=!1,f?g=ht(o):g=o),g);d===void 0&&o!==void 0&&(h&&l&&Ji(),d=O(),h&&h(d));var M;if(M=()=>{var U=e[t];return U===void 0?O():(p=!0,x=!1,U)},(r&Ii)===0)return M;if(h){var Ie=e.$$legacy;return function(U,we){return arguments.length>0?((!we||Ie||c)&&h(we?M():U),U):M()}}var ae=!1,B=Xr(d),de=Ue(()=>{var U=M(),we=a(B);return ae?(ae=!1,we):B.v=U});return i||(de.equals=hr),function(U,we){if(arguments.length>0){const Fe=we?a(de):s?V(U):U;return de.equals(Fe)||(ae=!0,w(B,Fe),x&&g!==void 0&&(g=Fe),ht(()=>a(de))),U}return a(de)}}function Yo(e){return new Go(e)}class Go{constructor(t){Or(this,Oe);Or(this,ge);var l;var r=new Map,o=(s,f)=>{var c=Xr(f);return r.set(s,c),c};const i=new Proxy({...t.props||{},$$events:{}},{get(s,f){return a(r.get(f)??o(f,Reflect.get(s,f)))},has(s,f){return f===Br?!0:(a(r.get(f)??o(f,Reflect.get(s,f))),Reflect.has(s,f))},set(s,f,c){return w(r.get(f)??o(f,c),c),Reflect.set(s,f,c)}});Fr(this,ge,(t.hydrate?zo:$n)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((l=t==null?void 0:t.props)!=null&&l.$$host)||t.sync===!1)&&C(),Fr(this,Oe,i.$$events);for(const s of Object.keys(ue(this,ge)))s==="$set"||s==="$destroy"||s==="$on"||qt(this,s,{get(){return ue(this,ge)[s]},set(f){ue(this,ge)[s]=f},enumerable:!0});ue(this,ge).$set=s=>{Object.assign(i,s)},ue(this,ge).$destroy=()=>{Do(ue(this,ge))}}$set(t){ue(this,ge).$set(t)}$on(t,r){ue(this,Oe)[t]=ue(this,Oe)[t]||[];const o=(...i)=>r.call(this,...i);return ue(this,Oe)[t].push(o),()=>{ue(this,Oe)[t]=ue(this,Oe)[t].filter(i=>i!==o)}}$destroy(){ue(this,ge).$destroy()}}Oe=new WeakMap,ge=new WeakMap;let On;typeof HTMLElement=="function"&&(On=class extends HTMLElement{constructor(t,r,o){super();Ee(this,"$$ctor");Ee(this,"$$s");Ee(this,"$$c");Ee(this,"$$cn",!1);Ee(this,"$$d",{});Ee(this,"$$r",!1);Ee(this,"$$p_d",{});Ee(this,"$$l",{});Ee(this,"$$l_u",new Map);Ee(this,"$$me");this.$$ctor=t,this.$$s=r,o&&this.attachShadow({mode:"open"})}addEventListener(t,r,o){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,o)}removeEventListener(t,r,o){if(super.removeEventListener(t,r,o),this.$$c){const i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return l=>{const s=document.createElement("slot");i!=="default"&&(s.name=i),q(l,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},o=Zo(this);for(const i of this.$$s)i in o&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const l=this.$$g_p(i.name);l in this.$$d||(this.$$d[l]=or(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=Yo({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Eo(()=>{wr(()=>{var i;this.$$r=!0;for(const l of jt(this.$$c)){if(!((i=this.$$p_d[l])!=null&&i.reflect))continue;this.$$d[l]=this.$$c[l];const s=or(l,this.$$d[l],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,s)}this.$$r=!1})});for(const i in this.$$l)for(const l of this.$$l[i]){const s=this.$$c.$on(i,l);this.$$l_u.set(l,s)}this.$$l={}}}attributeChangedCallback(t,r,o){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=or(t,o,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$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 jt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function or(e,t,r,o){var l;const i=(l=r[e])==null?void 0:l.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!o||!r[e])return t;if(o==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Zo(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function Wo(e,t,r,o,i,l){let s=class extends On{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return jt(t).map(f=>(t[f].attribute||f).toLowerCase())}};return jt(t).forEach(f=>{qt(s.prototype,f,{get(){return this.$$c&&f in this.$$c?this.$$c[f]:this.$$d[f]},set(c){var h;c=or(f,c,t),this.$$d[f]=c;var d=this.$$c;if(d){var _=(h=tt(d,f))==null?void 0:h.get;_?d[f]=c:d.$set({[f]:c})}}})}),o.forEach(f=>{qt(s.prototype,f,{get(){var c;return(c=this.$$c)==null?void 0:c[f]}})}),e.element=s,s}const Fn=new TextEncoder;function Jo(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function Ko(e,t="SHA-256",r=1e5){const o=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const i=await Vn(o,e,t);return{algorithm:t,challenge:i,salt:o,signature:""}}async function Vn(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 Jo(await crypto.subtle.digest(r.toUpperCase(),Fn.encode(e+t)))}function Xo(e,t,r="SHA-256",o=1e6,i=0){const l=new AbortController,s=Date.now();return{promise:(async()=>{for(let c=i;c<=o;c+=1){if(l.signal.aborted)return null;if(await Vn(t,c,r)===e)return{number:c,took:Date.now()-s}}return null})(),controller:l}}function Mn(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Qo(e){const t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function el(e,t=12){const r=new Uint8Array(t);for(let o=0;o<t;o++)r[o]=e%256,e=Math.floor(e/256);return r}async function tl(e,t="",r=1e6,o=0){const i="AES-GCM",l=new AbortController,s=Date.now(),f=async()=>{for(let _=o;_<=r;_+=1){if(l.signal.aborted||!c||!d)return null;try{const h=await crypto.subtle.decrypt({name:i,iv:el(_)},c,d);if(h)return{clearText:new TextDecoder().decode(h),took:Date.now()-s}}catch{}}return null};let c=null,d=null;try{d=Qo(e);const _=await crypto.subtle.digest("SHA-256",Fn.encode(t));c=await crypto.subtle.importKey("raw",_,i,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:l}}return{promise:f(),controller:l}}var E=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(E||{}),te=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(te||{});globalThis.altchaPlugins=globalThis.altchaPlugins||[],globalThis.altchaI18n=globalThis.altchaI18n||{register:(e,t)=>{globalThis.altchaI18n[e]=t}};const rl={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.register("en",rl);const Ar=(e,t)=>{let r=io(()=>Ui(t==null?void 0:t(),24));var o=ll();Le(()=>{R(o,"width",a(r)),R(o,"height",a(r))}),q(e,o)};function nl(e,t){e.code==="Space"&&(e.preventDefault(),e.stopImmediatePropagation(),t())}function il(e,t){e.preventDefault(),t()}function ol(e,t,r,o,i,l,s,f){var c;[E.UNVERIFIED,E.ERROR,E.EXPIRED,E.CODE].includes(a(t))?r()!==!1&&((c=a(o))==null?void 0:c.reportValidity())===!1?w(i,!1):l()?s():f():w(i,!0)}var ll=tr('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="svelte-uo3tkz"><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" class="svelte-uo3tkz"></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" class="altcha-spinner svelte-uo3tkz"></path></svg>'),al=be('<input type="hidden" class="svelte-uo3tkz">'),sl=be('<div class="svelte-uo3tkz"><a target="_blank" class="altcha-logo svelte-uo3tkz" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-uo3tkz"><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" class="svelte-uo3tkz"></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" class="svelte-uo3tkz"></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" class="svelte-uo3tkz"></path></svg></a></div>'),ul=tr('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="svelte-uo3tkz"><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" class="svelte-uo3tkz"></path></svg>'),fl=tr('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="svelte-uo3tkz"><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" class="svelte-uo3tkz"></path></svg>'),cl=tr('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="svelte-uo3tkz"><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" class="svelte-uo3tkz"></path></svg>'),dl=be('<button type="button" class="altcha-code-challenge-audio svelte-uo3tkz"><!></button>'),hl=be('<audio hidden autoplay class="svelte-uo3tkz"><source class="svelte-uo3tkz"></audio>'),vl=be('<div class="altcha-code-challenge svelte-uo3tkz" role="dialog"><div class="altcha-code-challenge-arrow svelte-uo3tkz"></div> <form data-code-challenge-form="1" class="svelte-uo3tkz"><img class="altcha-code-challenge-image svelte-uo3tkz" alt=""> <input type="text" autocomplete="off" name="code" class="altcha-code-challenge-input svelte-uo3tkz" required> <div class="altcha-code-challenge-buttons svelte-uo3tkz"><div class="altcha-code-challenge-buttons-left svelte-uo3tkz"><!> <button type="button" class="altcha-code-challenge-reload svelte-uo3tkz"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="svelte-uo3tkz"><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" class="svelte-uo3tkz"></path></svg></button></div> <button type="submit" class="altcha-code-challenge-verify svelte-uo3tkz"><!> </button></div> <!></form></div>'),gl=be('<div class="svelte-uo3tkz"><!></div>'),_l=be('<div class="svelte-uo3tkz"><!></div>'),ml=be('<div class="altcha-error svelte-uo3tkz"><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" class="svelte-uo3tkz"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" class="svelte-uo3tkz"></path></svg> <!></div>'),pl=be('<div class="altcha-footer svelte-uo3tkz"><div class="svelte-uo3tkz"><!></div></div>'),bl=be('<div class="altcha-anchor-arrow svelte-uo3tkz"></div>'),wl=be('<!> <div class="altcha svelte-uo3tkz"><div class="altcha-main svelte-uo3tkz"><div><!> <input type="checkbox" class="svelte-uo3tkz"></div> <label class="altcha-label svelte-uo3tkz"><!></label> <!> <!> <!></div> <!> <!> <!></div>',1);const yl={hash:"svelte-uo3tkz",code:`.altcha.svelte-uo3tkz {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.svelte-uo3tkz:focus-within {border-color:var(--altcha-color-border-focus, currentColor);}.altcha[data-floating].svelte-uo3tkz {background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999;}.altcha[data-floating=top].svelte-uo3tkz .altcha-anchor-arrow:where(.svelte-uo3tkz) {border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto;}.altcha[data-floating=bottom].svelte-uo3tkz:focus-within::after {border-bottom-color:var(--altcha-color-border-focus, currentColor);}.altcha[data-floating=top].svelte-uo3tkz:focus-within::after {border-top-color:var(--altcha-color-border-focus, currentColor);}.altcha[data-floating].svelte-uo3tkz:not([data-state=unverified]) {display:block;}.altcha-anchor-arrow.svelte-uo3tkz {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.svelte-uo3tkz {align-items:center;display:flex;gap:0.4rem;padding:0.7rem;position:relative;}.altcha-code-challenge.svelte-uo3tkz {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, 0.2));padding:0.5rem;position:absolute;top:2.5rem;z-index:9999999;}.altcha-code-challenge.svelte-uo3tkz > form:where(.svelte-uo3tkz) {display:flex;flex-direction:column;gap:0.5rem;}.altcha-code-challenge-input.svelte-uo3tkz {border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:none;font-size:16px;padding:0.35rem;width:220px;}.altcha-code-challenge-input.svelte-uo3tkz:focus {outline:2px solid rgba(0, 0, 250, 0.2);}.altcha-code-challenge-input.svelte-uo3tkz:disabled {opacity:0.7;}.altcha-code-challenge-image.svelte-uo3tkz {border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px;}.altcha-code-challenge-audio.svelte-uo3tkz,
|
|
3
|
+
.altcha-code-challenge-reload.svelte-uo3tkz {background:#efefef;border:0;border-radius:3px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0.35rem;}.altcha-code-challenge-audio.svelte-uo3tkz:disabled,
|
|
4
|
+
.altcha-code-challenge-reload.svelte-uo3tkz:disabled {opacity:0.7;pointer-events:none;}.altcha-code-challenge-audio.svelte-uo3tkz > :where(.svelte-uo3tkz),
|
|
5
|
+
.altcha-code-challenge-reload.svelte-uo3tkz > :where(.svelte-uo3tkz) {height:20px;width:20px;}.altcha-code-challenge-buttons.svelte-uo3tkz {display:flex;justify-content:space-between;}.altcha-code-challenge-buttons-left.svelte-uo3tkz {display:flex;gap:0.25rem;}.altcha-code-challenge-verify.svelte-uo3tkz {align-items:center;background:blue;border:0;border-radius:3px;color:white;cursor:pointer;display:flex;gap:0.5rem;font-size:100%;padding:0.35rem 1rem;}.altcha-code-challenge-verify.svelte-uo3tkz:disabled {opacity:0.7;pointer-events:none;}.altcha-code-challenge-arrow.svelte-uo3tkz {border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:0.15rem;position:absolute;top:-12px;width:0;}.altcha[data-floating=top].svelte-uo3tkz .altcha-code-challenge:where(.svelte-uo3tkz) {top:-150px;}.altcha[data-floating=top].svelte-uo3tkz .altcha-code-challenge-arrow:where(.svelte-uo3tkz) {border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto;}.altcha-label.svelte-uo3tkz {cursor:pointer;flex-grow:1;}.altcha-logo.svelte-uo3tkz {color:currentColor;opacity:0.7;}.altcha-logo.svelte-uo3tkz:hover {opacity:1;}.altcha-error.svelte-uo3tkz {color:var(--altcha-color-error-text, #f23939);display:flex;font-size:0.85rem;gap:0.3rem;padding:0 0.7rem 0.7rem;}.altcha-footer.svelte-uo3tkz {align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:0.75rem;opacity:0.7;justify-content:end;padding:0.2rem 0.7rem;}.altcha-footer.svelte-uo3tkz:hover {opacity:1;}.altcha-footer.svelte-uo3tkz a {color:currentColor;}.altcha-checkbox.svelte-uo3tkz {display:flex;align-items:center;height:24px;width:24px;}.altcha-checkbox.svelte-uo3tkz input:where(.svelte-uo3tkz) {width:18px;height:18px;margin:0;}.altcha-checkbox-verifying.svelte-uo3tkz input:where(.svelte-uo3tkz) {appearance:none;pointer-events:none;height:0;width:0;}.altcha-spinner.svelte-uo3tkz {
|
|
6
|
+
animation: svelte-uo3tkz-altcha-spinner 0.75s infinite linear;transform-origin:center;}
|
|
4
7
|
|
|
5
|
-
@keyframes svelte-
|
|
8
|
+
@keyframes svelte-uo3tkz-altcha-spinner {
|
|
6
9
|
100% {
|
|
7
10
|
transform: rotate(360deg);
|
|
8
11
|
}
|
|
9
|
-
}`};function
|
|
10
|
-
`):$),_},{})}function jl(){const n=Ve()!==void 0?Ve().split(","):void 0;for(const u of globalThis.altchaPlugins)(!n||n.includes(u.pluginName))&&Le.push(new u({el:d(Y),clarify:ht,dispatch:dt,getConfiguration:Pn,getFloatingAnchor:zn,getState:On,log:T,reset:_t,solve:Ln,setState:je,setFloatingAnchor:Mn,verify:De}))}function T(...n){(f()||n.some(u=>u instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${Z()}]`,...n)}function ql(){[w.UNVERIFIED,w.ERROR,w.EXPIRED].includes(d(I))?q()!==!1&&(p==null?void 0:p.reportValidity())===!1?z(et,!1):G()?ht():De():z(et,!0)}function xn(n){const u=n.target;v()&&u&&!d(Y).contains(u)&&(d(I)===w.VERIFIED&&m()===!1||d(I)===w.VERIFIED&&m()==="focus"&&!(p!=null&&p.matches(":focus-within"))||r()==="off"&&d(I)===w.UNVERIFIED)&&Fn()}function $n(){v()&&d(I)!==w.UNVERIFIED&>()}function Bl(n){for(const u of Le)typeof u.onErrorChange=="function"&&u.onErrorChange(d(rt))}function kn(n){d(I)===w.UNVERIFIED?De():v()&&m()==="focus"&&d(I)===w.VERIFIED&&ir()}function Cn(n){p&&r()==="onsubmit"?d(I)===w.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),De().then(()=>{p==null||p.requestSubmit()})):d(I)!==w.VERIFIED&&(n.preventDefault(),n.stopPropagation(),d(I)===w.VERIFYING&&Rn()):p&&v()&&r()==="off"&&d(I)===w.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),ir())}function An(){_t()}function Rn(){d(I)===w.VERIFYING&&d(ae).waitAlert&&alert(d(ae).waitAlert)}function Hl(n){for(const u of Le)typeof u.onStateChange=="function"&&u.onStateChange(d(I));v()&&d(I)!==w.UNVERIFIED&&requestAnimationFrame(()=>{gt()}),z(et,d(I)===w.VERIFIED)}function In(){v()&>()}function Sn(n){return JSON.parse(n)}async function Yl(n){if(!Ne())throw new Error("Attribute verifyurl not set.");T("requesting server verification from",Ne());const u={payload:n};if(q()!==!1){const{blockedCountries:N,classifier:$,disableRules:y,email:J,expectedLanguages:P,expectedCountries:it,fields:pt,ipAddress:wt,text:la,timeZone:Zn}=Vl();u.blockedCountries=N,u.classifier=$,u.disableRules=y,u.email=J===!1?void 0:Ml(J),u.expectedCountries=it,u.expectedLanguages=P||(pn?[pn]:void 0),u.fields=pt===!1?void 0:Ul(pt),u.ipAddress=wt===!1?void 0:wt||"auto",u.text=la,u.timeZone=Zn===!1?void 0:Zn||yl()}const _=await fetch(Ne(),{body:JSON.stringify(u),headers:{"content-type":"application/json"},method:"POST"});if(_.status!==200)throw new Error(`Server responded with ${_.status}.`);const E=await _.json();if(E!=null&&E.payload&&z(Ue,se(E.payload)),dt("serververification",E),l()&&E.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}function nr(n){T("expire",n),_e&&(clearTimeout(_e),_e=null),n<1?En():_e=setTimeout(En,n)}function Tn(n){T("floating",n),v()!==n&&(d(Y).style.left="",d(Y).style.top=""),v(n===!0||n===""?"auto":n===!1||n==="false"?void 0:v()),v()?(r()||r("onsubmit"),document.addEventListener("scroll",$n),document.addEventListener("click",xn),window.addEventListener("resize",In)):r()==="onsubmit"&&r(void 0)}function Nn(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(!gn.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${gn.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 Ln(n){let u=null;if("Worker"in window){try{u=await Wl(n,n.maxNumber||n.maxnumber||V())}catch(_){T(_)}if((u==null?void 0:u.number)!==void 0||"obfuscated"in n)return{data:n,solution:u}}if("obfuscated"in n){const _=await $l(n.obfuscated,n.key,n.maxNumber||n.maxnumber);return{data:n,solution:await _.promise}}return{data:n,solution:await bl(n.challenge,n.salt,n.algorithm,n.maxNumber||n.maxnumber||V()).promise}}async function Wl(n,u=typeof le()=="number"?le():n.maxNumber||n.maxnumber||V(),_=Math.ceil(Qe())){const E=[];_=Math.min(16,u,Math.max(1,_));for(let y=0;y<_;y++)E.push(altchaCreateWorker(ct()));const N=Math.ceil(u/_),$=await Promise.all(E.map((y,J)=>{const P=J*N;return new Promise(it=>{y.addEventListener("message",pt=>{if(pt.data)for(const wt of E)wt!==y&&wt.postMessage({type:"abort"});it(pt.data)}),y.postMessage({payload:n,max:P+N,start:P,type:"work"})})}));for(const y of E)y.terminate();return $.find(y=>!!y)||null}async function ht(){if(!G()){je(w.ERROR);return}const n=Le.find(u=>u.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){je(w.ERROR),T("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in n&&typeof n.clarify=="function")return n.clarify()}function Dn(n){n.obfuscated!==void 0&&G(n.obfuscated),n.auto!==void 0&&(r(n.auto),r()==="onload"&&(G()?ht():De())),n.blockspam!==void 0&&l(!!n.blockspam),n.customfetch!==void 0&&o(n.customfetch),n.floatinganchor!==void 0&&h(n.floatinganchor),n.delay!==void 0&&s(n.delay),n.floatingoffset!==void 0&&g(n.floatingoffset),n.floating!==void 0&&Tn(n.floating),n.expire!==void 0&&(nr(n.expire),c(n.expire)),n.challenge&&(a(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),Nn(d(rr))),n.challengeurl!==void 0&&i(n.challengeurl),n.debug!==void 0&&f(!!n.debug),n.hidefooter!==void 0&&b(!!n.hidefooter),n.hidelogo!==void 0&&L(!!n.hidelogo),n.maxnumber!==void 0&&V(+n.maxnumber),n.mockerror!==void 0&&j(!!n.mockerror),n.name!==void 0&&Z(n.name),n.refetchonexpire!==void 0&&M(!!n.refetchonexpire),n.spamfilter!==void 0&&q(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&$e(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&le(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&Ne(n.verifyurl),n.workers!==void 0&&Qe(+n.workers),n.workerurl!==void 0&&ct(n.workerurl)}function Pn(){return{auto:r(),blockspam:l(),challengeurl:i(),debug:f(),delay:s(),expire:c(),floating:v(),floatinganchor:h(),floatingoffset:g(),hidefooter:b(),hidelogo:L(),name:Z(),maxnumber:V(),mockerror:j(),obfuscated:G(),refetchonexpire:M(),spamfilter:q(),strings:d(ae),test:le(),verifyurl:Ne(),workers:Qe(),workerurl:ct()}}function zn(){return tt}function Zl(n){return Le.find(u=>u.constructor.pluginName===n)}function On(){return d(I)}function Fn(){d(Y).style.display="none"}function gt(n=20){if(d(Y))if(tt||(tt=(h()?document.querySelector(h()):p==null?void 0:p.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||p),tt){const u=parseInt(g(),10)||12,_=tt.getBoundingClientRect(),E=d(Y).getBoundingClientRect(),N=document.documentElement.clientHeight,$=document.documentElement.clientWidth,y=v()==="auto"?_.bottom+E.height+u+n>N:v()==="top",J=Math.max(n,Math.min($-n-E.width,_.left+_.width/2-E.width/2));if(y?d(Y).style.top=`${_.top-(E.height+u)}px`:d(Y).style.top=`${_.bottom+u}px`,d(Y).style.left=`${J}px`,d(Y).setAttribute("data-floating",y?"top":"bottom"),d(vt)){const P=d(vt).getBoundingClientRect();d(vt).style.left=_.left-J+_.width/2-P.width/2+"px"}}else T("unable to find floating anchor element")}function _t(n=w.UNVERIFIED,u=null){_e&&(clearTimeout(_e),_e=null),z(et,!1),z(Ue,null),je(n,u)}function Mn(n){tt=n}function je(n,u=null){z(I,se(n)),z(rt,se(u)),dt("statechange",{payload:d(Ue),state:d(I)})}function ir(){d(Y).style.display="block",v()&>()}async function De(){return _t(w.VERIFYING),await new Promise(n=>setTimeout(n,s()||0)),Fl().then(n=>(Nn(n),T("challenge",n),Ln(n))).then(({data:n,solution:u})=>{if(T("solution",u),!u||n&&"challenge"in n&&!("clearText"in u))if((u==null?void 0:u.number)!==void 0&&"challenge"in n){if(Ne())return Yl(yn(n,u));z(Ue,se(yn(n,u))),T("payload",d(Ue))}else throw T("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}).then(()=>{je(w.VERIFIED),T("verified"),Mi().then(()=>{dt("verified",{payload:d(Ue)})})}).catch(n=>{T(n),je(w.ERROR,n.message)})}var Vn=Pl(),Un=Nr(Vn);nl(Un,t,"default",{});var mt=be(Un,2),lr=ee(mt),jn=ee(lr);{var Gl=n=>{var u=kl();ne(n,u)};Te(jn,n=>{d(I)===w.VERIFYING&&n(Gl)})}var Ft=be(jn,2);let qn;var nt=ee(Ft);nn(nt),nt.__change=ql,Q(Ft);var ar=be(Ft,2),Jl=ee(ar);{var Kl=n=>{var u=Cl(),_=Nr(u),E=ee(_);Xe(E,()=>d(ae).verified),Q(_);var N=be(_,2);nn(N),Je(()=>{ue(N,"name",Z()),fl(N,d(Ue))}),ne(n,u)},Xl=(n,u)=>{{var _=N=>{var $=Al(),y=ee($);Xe(y,()=>d(ae).verifying),Q($),ne(N,$)},E=N=>{var $=Rl(),y=ee($);Xe(y,()=>d(ae).label),Q($),Je(()=>ue($,"for",d(bn))),ne(N,$)};Te(n,N=>{d(I)===w.VERIFYING?N(_):N(E,!1)},u)}};Te(Jl,n=>{d(I)===w.VERIFIED?n(Kl):n(Xl,!1)})}Q(ar);var Ql=be(ar,2);{var ea=n=>{var u=Il(),_=ee(u);ue(_,"href",mn),Q(u),Je(()=>ue(_,"aria-label",d(ae).ariaLinkLabel)),ne(n,u)};Te(Ql,n=>{(L()!==!0||d(tr))&&n(ea)})}Q(lr);var Bn=be(lr,2);{var ta=n=>{var u=Nl(),_=be(ee(u),2);{var E=$=>{var y=Sl(),J=ee(y);Xe(J,()=>d(ae).expired),Q(y),Je(()=>ue(y,"title",d(rt))),ne($,y)},N=$=>{var y=Tl(),J=ee(y);Xe(J,()=>d(ae).error),Q(y),Je(()=>ue(y,"title",d(rt))),ne($,y)};Te(_,$=>{d(I)===w.EXPIRED?$(E):$(N,!1)})}Q(u),ne(n,u)};Te(Bn,n=>{(d(rt)||d(I)===w.EXPIRED)&&n(ta)})}var Hn=be(Bn,2);{var ra=n=>{var u=Ll(),_=ee(u),E=ee(_);Xe(E,()=>d(ae).footer),Q(_),Q(u),ne(n,u)};Te(Hn,n=>{d(ae).footer&&(b()!==!0||d(tr))&&n(ra)})}var na=be(Hn,2);{var ia=n=>{var u=Dl();sn(u,_=>z(vt,_),()=>d(vt)),ne(n,u)};Te(na,n=>{v()&&n(ia)})}return Q(mt),sn(mt,n=>z(Y,n),()=>d(Y)),Je(n=>{ue(mt,"data-state",d(I)),ue(mt,"data-floating",v()),qn=al(Ft,1,"altcha-checkbox svelte-ddsc3z",null,qn,n),ue(nt,"id",d(bn)),nt.required=r()!=="onsubmit"&&(!v()||r()!=="off")},[()=>({"altcha-hidden":d(I)===w.VERIFYING})]),Xi("invalid",nt,Rn),cl(nt,()=>d(et),n=>z(et,n)),ne(e,Vn),Zr({clarify:ht,configure:Dn,getConfiguration:Pn,getFloatingAnchor:zn,getPlugin:Zl,getState:On,hide:Fn,repositionFloating:gt,reset:_t,setFloatingAnchor:Mn,setState:je,show:ir,verify:De,get auto(){return r()},set auto(n=void 0){r(n),x()},get blockspam(){return l()},set blockspam(n=void 0){l(n),x()},get challengeurl(){return i()},set challengeurl(n=void 0){i(n),x()},get challengejson(){return a()},set challengejson(n=void 0){a(n),x()},get customfetch(){return o()},set customfetch(n=void 0){o(n),x()},get debug(){return f()},set debug(n=!1){f(n),x()},get delay(){return s()},set delay(n=0){s(n),x()},get expire(){return c()},set expire(n=void 0){c(n),x()},get floating(){return v()},set floating(n=void 0){v(n),x()},get floatinganchor(){return h()},set floatinganchor(n=void 0){h(n),x()},get floatingoffset(){return g()},set floatingoffset(n=void 0){g(n),x()},get floatingpersist(){return m()},set floatingpersist(n=!1){m(n),x()},get hidefooter(){return b()},set hidefooter(n=!1){b(n),x()},get hidelogo(){return L()},set hidelogo(n=!1){L(n),x()},get id(){return F()},set id(n=void 0){F(n),x()},get name(){return Z()},set name(n="altcha"){Z(n),x()},get maxnumber(){return V()},set maxnumber(n=1e6){V(n),x()},get mockerror(){return j()},set mockerror(n=!1){j(n),x()},get obfuscated(){return G()},set obfuscated(n=void 0){G(n),x()},get plugins(){return Ve()},set plugins(n=void 0){Ve(n),x()},get refetchonexpire(){return M()},set refetchonexpire(n=!0){M(n),x()},get spamfilter(){return q()},set spamfilter(n=!1){q(n),x()},get strings(){return $e()},set strings(n=void 0){$e(n),x()},get test(){return le()},set test(n=!1){le(n),x()},get verifyurl(){return Ne()},set verifyurl(n=void 0){Ne(n),x()},get workers(){return Qe()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){Qe(n),x()},get workerurl(){return ct()},set workerurl(n=void 0){ct(n),x()}})}Qi(["change"]),customElements.define("altcha-widget",ml(vn,{blockspam:{type:"Boolean"},debug:{type:"Boolean"},delay:{type:"Number"},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:{},customfetch:{},floating:{},floatinganchor:{},floatingpersist:{},id:{},name:{},obfuscated:{},plugins:{},spamfilter:{},strings:{},verifyurl:{},workerurl:{}},["default"],["clarify","configure","getConfiguration","getFloatingAnchor","getPlugin","getState","hide","repositionFloating","reset","setFloatingAnchor","setState","show","verify"],!1)),globalThis.altchaCreateWorker=e=>new Worker(new URL(e||"./worker.js",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:C&&C.tagName.toUpperCase()==="SCRIPT"&&C.src||new URL("altcha.umd.cjs",document.baseURI).href)),globalThis.altchaPlugins=globalThis.altchaPlugins||[],k.Altcha=vn,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
|
|
12
|
+
}`};function Un(e,t){var ki,Ci;En(t,!0),Po(e,yl);let r=A(t,"auto",7,void 0),o=A(t,"blockspam",7,void 0),i=A(t,"challengeurl",7,void 0),l=A(t,"challengejson",7,void 0),s=A(t,"credentials",7,void 0),f=A(t,"customfetch",7,void 0),c=A(t,"debug",7,!1),d=A(t,"delay",7,0),_=A(t,"expire",7,void 0),h=A(t,"floating",7,void 0),g=A(t,"floatinganchor",7,void 0),p=A(t,"floatingoffset",7,void 0),x=A(t,"floatingpersist",7,!1),O=A(t,"hidefooter",7,!1),M=A(t,"hidelogo",7,!1),Ie=A(t,"id",7,void 0),ae=A(t,"language",7,void 0),B=A(t,"name",7,"altcha"),de=A(t,"maxnumber",7,1e6),Ze=A(t,"mockerror",7,!1),U=A(t,"obfuscated",7,void 0),we=A(t,"plugins",7,void 0),Fe=A(t,"refetchonexpire",7,!0),ot=A(t,"sentinel",7,void 0),Re=A(t,"spamfilter",7,!1),gt=A(t,"strings",7,void 0),_e=A(t,"test",7,!1),he=A(t,"verifyurl",7,void 0),_t=A(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),$t=A(t,"workerurl",7,void 0);const qn=["SHA-256","SHA-384","SHA-512"],El="https://altcha.org/",We=(n,u)=>{t.$$host.dispatchEvent(new CustomEvent(n,{detail:u}))},Bn=(Ci=(ki=document.documentElement.lang)==null?void 0:ki.split("-"))==null?void 0:Ci[0],Ir=Ue(()=>{var n;return i()&&new URL(i(),location.origin).host.endsWith(".altcha.org")&&!!((n=i())!=null&&n.includes("apiKey=ckey_"))}),Rr=Ue(()=>l()?ii(l()):void 0),kl=Ue(()=>gt()?ii(gt()):{}),F=Ue(()=>({...Gn(),...a(kl)})),Hn=Ue(()=>Ie()||`${B()}_checkbox_${Math.round(Math.random()*1e8)}`);let Nt=le(!1),X=le(null),I=le(V(E.UNVERIFIED)),ie=le(void 0),St=le(null),Je=le(null),$r=le(null),mt=le(null),j=le(null),lt=le(null),$e=null,Q=le(null),at=le(!1),Ke=[],Nr=le(!1),Ve=le(null);pr(()=>{Pl(a(lt))}),pr(()=>{Ol(a(I))}),Bo(()=>{Cl(),a(j)&&(a(j).removeEventListener("submit",Qn),a(j).removeEventListener("reset",ei),a(j).removeEventListener("focusin",Xn),w(j,null)),$e&&(clearTimeout($e),$e=null),document.removeEventListener("click",Jn),document.removeEventListener("scroll",Kn),window.removeEventListener("resize",ni)}),Pn(()=>{var n;z("mounted","2.0.0-beta.2"),z("workers",_t()),Rl(),z("plugins",Ke.length?Ke.map(u=>u.constructor.pluginName).join(", "):"none"),_e()&&z("using test mode"),_()&&Sr(_()),r()!==void 0&&z("auto",r()),h()!==void 0&&li(h()),w(j,V((n=a(ie))==null?void 0:n.closest("form"))),a(j)&&(a(j).addEventListener("submit",Qn,{capture:!0}),a(j).addEventListener("reset",ei),(r()==="onfocus"||x()==="focus")&&a(j).addEventListener("focusin",Xn)),r()==="onload"&&(U()?Tt():Me()),a(Ir)&&(O()||M())&&z("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{We("load")})});function lr(n,u){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:u.number,salt:n.salt,signature:n.signature,test:_e()?!0:void 0,took:u.took}))}function Cl(){for(const n of Ke)n.destroy()}function Yn(){i()&&Fe()&&a(I)===E.VERIFIED?Me():pt(E.EXPIRED,a(F).expired)}async function xl(){var n;if(Ze())throw z("mocking error"),new Error("Mocked error.");if(a(Rr))return z("using provided json data"),a(Rr);if(_e())return z("generating test challenge",{test:_e()}),Ko(typeof _e()!="boolean"?+_e():void 0);{if(!i()&&a(j)){const k=a(j).getAttribute("action");k!=null&&k.includes("/form/")&&i(k+"/altcha")}if(!i())throw new Error("Attribute challengeurl not set.");z("fetching challenge from",i());let u=null,v=null;if(f())if(z("using customfetch"),typeof f()=="string"){if(u=globalThis[f()]||null,!u)throw new Error(`Custom fetch function not found: ${f()}`)}else u=f();const b={credentials:typeof s()=="boolean"?"include":s(),headers:Re()!==!1?{"x-altcha-spam-filter":"1"}:{}};if(u){if(v=await u(i(),b),!v||!(v instanceof Response))throw new Error("Custom fetch function did not return a response.")}else v=await fetch(i(),b);if(v.status!==200)throw new Error(`Server responded with ${v.status}.`);const m=v.headers.get("X-Altcha-Config"),$=await v.json(),y=new URLSearchParams((n=$.salt.split("?"))==null?void 0:n[1]),H=y.get("expires")||y.get("expire");if(H){const k=new Date(+H*1e3),Y=isNaN(k.getTime())?0:k.getTime()-Date.now();Y>0&&Sr(Y)}if(m)try{const k=JSON.parse(m);k&&typeof k=="object"&&(k.verifyurl&&(k.verifyurl=Wn(k.verifyurl)),ui(k))}catch(k){z("unable to configure from X-Altcha-Config",k)}return $}}function Al(n){var v,b;const u=(v=a(j))==null?void 0:v.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((b=u==null?void 0:u.value)==null?void 0:b.slice(u.value.indexOf("@")))||void 0}function Gn(n=[ae()||"",document.documentElement.lang||"",...navigator.languages]){const u=Object.keys(globalThis.altchaI18n).map(b=>b.toLowerCase()),v=n.reduce((b,m)=>(m=m.toLowerCase(),b||(globalThis.altchaI18n[m]?m:null)||u.find($=>m.split("-")[0]===$.split("-")[0])||null),null);return globalThis.altchaI18n[v||"en"]}function Il(){return Re()==="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 Re()=="object"?Re():{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 Zn(n){var v;return[...((v=a(j))==null?void 0:v.querySelectorAll(n!=null&&n.length?n.map(b=>`input[name="${b}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((b,m)=>{const $=m.name,y=m.value;return $&&y&&(b[$]=/\n/.test(y)?y.replace(new RegExp("(?<!\\r)\\n","g"),`\r
|
|
13
|
+
`):y),b},{})}function Wn(n){const u=new URL(i()||location.origin),v=new URL(n,u);return v.search||(v.search=u.search),v.toString()}function Rl(){const n=we()!==void 0?we().split(","):void 0;for(const u of globalThis.altchaPlugins)(!n||n.includes(u.pluginName))&&Ke.push(new u({el:a(ie),clarify:Tt,dispatch:We,getConfiguration:fi,getFloatingAnchor:ci,getState:di,log:z,reset:pt,solve:si,setState:Ne,setFloatingAnchor:vi,verify:Me}))}function z(...n){(c()||n.some(u=>u instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${B()}]`,...n)}function $l(){w(Q,V(te.PAUSED))}function Nl(n){w(Q,V(te.ERROR))}function Sl(){w(Q,V(te.READY))}function Tl(){w(Q,V(te.LOADING))}function zl(){w(Q,V(te.PLAYING))}function Dl(){w(Q,V(te.PAUSED))}function Ll(n){if(n.preventDefault(),n.stopPropagation(),a(X)){const u=new FormData(n.target);w(at,!0),oi(lr(a(X).challenge,a(X).solution),String(u.get("code"))).then(({reason:v,verified:b})=>{b?(w(X,null),Ne(E.VERIFIED),z("verified"),mr().then(()=>{var m;(m=a($r))==null||m.focus(),We("verified",{payload:a(Ve)})})):(pt(),w(lt,V(v||"Verification failed")))}).catch(v=>{w(X,null),Ne(E.ERROR,v),z("sentinel verification failed:",v)}).finally(()=>{w(at,!1)})}}function Jn(n){var v;const u=n.target;h()&&u&&!a(ie).contains(u)&&(a(I)===E.VERIFIED&&x()===!1||a(I)===E.VERIFIED&&x()==="focus"&&!((v=a(j))!=null&&v.matches(":focus-within"))||r()==="off"&&a(I)===E.UNVERIFIED)&&hi()}function Kn(){h()&&a(I)!==E.UNVERIFIED&&zt()}function Pl(n){for(const u of Ke)typeof u.onErrorChange=="function"&&u.onErrorChange(a(lt))}function Xn(n){a(I)===E.UNVERIFIED?Me():h()&&x()==="focus"&&a(I)===E.VERIFIED&&Tr()}function Qn(n){const u=n.target,v=n.submitter;u!=null&&u.hasAttribute("data-code-challenge-form")||(a(j)&&r()==="onsubmit"?a(I)===E.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),Me().then(()=>{var m;v&&["INPUT","BUTTON"].includes(v.tagName)&&v.getAttribute("name")?v.click():(m=a(j))==null||m.requestSubmit()})):a(I)!==E.VERIFIED&&(n.preventDefault(),n.stopPropagation(),a(I)===E.VERIFYING&&ti()):a(j)&&h()&&r()==="off"&&a(I)===E.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),Tr()))}function ei(){pt()}function ti(){a(I)===E.VERIFYING&&a(F).waitAlert&&alert(a(F).waitAlert)}function ri(){a(Je)?a(Je).paused?(a(Je).currentTime=0,a(Je).play()):a(Je).pause():(w(Nr,!0),requestAnimationFrame(()=>{var n;(n=a(Je))==null||n.play()}))}function Ol(n){for(const u of Ke)typeof u.onStateChange=="function"&&u.onStateChange(a(I));h()&&a(I)!==E.UNVERIFIED&&requestAnimationFrame(()=>{zt()}),w(Nt,a(I)===E.VERIFIED)}function ni(){h()&&zt()}function ii(n){return JSON.parse(n)}async function Fl(n){if(!he())throw new Error("Attribute verifyurl not set.");z("requesting server verification from",he());const u={payload:n};if(Re()!==!1){const{blockedCountries:m,classifier:$,disableRules:y,email:H,expectedLanguages:k,expectedCountries:Y,fields:se,ipAddress:Qe,text:Dr,timeZone:sr}=Il();u.blockedCountries=m,u.classifier=$,u.disableRules=y,u.email=H===!1?void 0:Al(H),u.expectedCountries=Y,u.expectedLanguages=k||(Bn?[Bn]:void 0),u.fields=se===!1?void 0:Zn(se),u.ipAddress=Qe===!1?void 0:Qe||"auto",u.text=Dr,u.timeZone=sr===!1?void 0:sr||Mn()}const v=await fetch(he(),{body:JSON.stringify(u),headers:{"content-type":"application/json"},method:"POST"});if(v.status!==200)throw new Error(`Server responded with ${v.status}.`);const b=await v.json();if(b!=null&&b.payload&&w(Ve,V(b.payload)),We("serververification",b),o()&&b.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}async function oi(n,u){if(!he())throw new Error("Attribute verifyurl not set.");z("requesting sentinel verification from",he());const v={code:u,payload:n};ot()&&(v.fields=ot().fields?Zn():void 0,v.timeZone=ot().timeZone?Mn():void 0);const b=await fetch(he(),{body:JSON.stringify(v),headers:{"content-type":"application/json"},method:"POST"});if(b.status!==200)throw new Error(`Server responded with ${b.status}.`);const m=await b.json();return m!=null&&m.payload&&w(Ve,V(m.payload)),We("sentinelverification",m),m}function Sr(n){z("expire",n),$e&&(clearTimeout($e),$e=null),n<1?Yn():$e=setTimeout(Yn,n)}function li(n){z("floating",n),h()!==n&&(a(ie).style.left="",a(ie).style.top=""),h(n===!0||n===""?"auto":n===!1||n==="false"?void 0:h()),h()?(r()||r("onsubmit"),document.addEventListener("scroll",Kn),document.addEventListener("click",Jn),window.addEventListener("resize",ni)):r()==="onsubmit"&&r(void 0)}function ai(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(!qn.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${qn.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 si(n){let u=null;if("Worker"in window){try{u=await Vl(n,n.maxNumber||n.maxnumber||de())}catch(v){z(v)}if((u==null?void 0:u.number)!==void 0||"obfuscated"in n)return{data:n,solution:u}}if("obfuscated"in n){const v=await tl(n.obfuscated,n.key,n.maxNumber||n.maxnumber);return{data:n,solution:await v.promise}}return{data:n,solution:await Xo(n.challenge,n.salt,n.algorithm,n.maxNumber||n.maxnumber||de()).promise}}async function Vl(n,u=typeof _e()=="number"?_e():n.maxNumber||n.maxnumber||de(),v=Math.ceil(_t())){const b=[];v=Math.min(16,u,Math.max(1,v));for(let y=0;y<v;y++)b.push(altchaCreateWorker($t()));const m=Math.ceil(u/v),$=await Promise.all(b.map((y,H)=>{const k=H*m;return new Promise(Y=>{y.addEventListener("message",se=>{if(se.data)for(const Qe of b)Qe!==y&&Qe.postMessage({type:"abort"});Y(se.data)}),y.postMessage({payload:n,max:k+m,start:k,type:"work"})})}));for(const y of b)y.terminate();return $.find(y=>!!y)||null}async function Tt(){if(!U()){Ne(E.ERROR);return}const n=Ke.find(u=>u.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){Ne(E.ERROR),z("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&&U(n.obfuscated),n.auto!==void 0&&(r(n.auto),r()==="onload"&&(U()?Tt():Me())),n.blockspam!==void 0&&o(!!n.blockspam),n.customfetch!==void 0&&f(n.customfetch),n.floatinganchor!==void 0&&g(n.floatinganchor),n.delay!==void 0&&d(n.delay),n.floatingoffset!==void 0&&p(n.floatingoffset),n.floating!==void 0&&li(n.floating),n.expire!==void 0&&(Sr(n.expire),_(n.expire)),n.challenge&&(l(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),ai(a(Rr))),n.challengeurl!==void 0&&i(n.challengeurl),n.debug!==void 0&&c(!!n.debug),n.hidefooter!==void 0&&O(!!n.hidefooter),n.hidelogo!==void 0&&M(!!n.hidelogo),n.language!==void 0&>(Gn([n.language])),n.maxnumber!==void 0&&de(+n.maxnumber),n.mockerror!==void 0&&Ze(!!n.mockerror),n.name!==void 0&&B(n.name),n.refetchonexpire!==void 0&&Fe(!!n.refetchonexpire),n.sentinel!==void 0&&typeof n.sentinel=="object"&&ot(n.sentinel),n.spamfilter!==void 0&&Re(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&>(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&_e(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&he(n.verifyurl),n.workers!==void 0&&_t(+n.workers),n.workerurl!==void 0&&$t(n.workerurl)}function fi(){return{auto:r(),blockspam:o(),challengeurl:i(),debug:c(),delay:d(),expire:_(),floating:h(),floatinganchor:g(),floatingoffset:p(),hidefooter:O(),hidelogo:M(),name:B(),maxnumber:de(),mockerror:Ze(),obfuscated:U(),refetchonexpire:Fe(),spamfilter:Re(),strings:a(F),test:_e(),verifyurl:he(),workers:_t(),workerurl:$t()}}function ci(){return a(mt)}function Ml(n){return Ke.find(u=>u.constructor.pluginName===n)}function di(){return a(I)}function hi(){a(ie).style.display="none"}function zt(n=20){var u;if(a(ie))if(a(mt)||w(mt,V((g()?document.querySelector(g()):(u=a(j))==null?void 0:u.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||a(j))),a(mt)){const v=parseInt(p(),10)||12,b=a(mt).getBoundingClientRect(),m=a(ie).getBoundingClientRect(),$=document.documentElement.clientHeight,y=document.documentElement.clientWidth,H=h()==="auto"?b.bottom+m.height+v+n>$:h()==="top",k=Math.max(n,Math.min(y-n-m.width,b.left+b.width/2-m.width/2));if(H?a(ie).style.top=`${b.top-(m.height+v)}px`:a(ie).style.top=`${b.bottom+v}px`,a(ie).style.left=`${k}px`,a(ie).setAttribute("data-floating",H?"top":"bottom"),a(St)){const Y=a(St).getBoundingClientRect();a(St).style.left=b.left-k+b.width/2-Y.width/2+"px"}}else z("unable to find floating anchor element")}function pt(n=E.UNVERIFIED,u=null){$e&&(clearTimeout($e),$e=null),w(Nt,!1),w(Ve,null),w(X,null),w(Nr,!1),w(Q,null),Ne(n,u)}function vi(n){w(mt,V(n))}function Ne(n,u=null){w(I,V(n)),w(lt,V(u)),We("statechange",{payload:a(Ve),state:a(I)})}function Tr(){a(ie).style.display="block",h()&&zt()}async function Me(){return pt(E.VERIFYING),await new Promise(n=>setTimeout(n,d()||0)),xl().then(n=>(ai(n),z("challenge",n),si(n))).then(({data:n,solution:u})=>{var v;if(z("solution",u),!u||n&&"challenge"in n&&!("clearText"in u))if((u==null?void 0:u.number)!==void 0&&"challenge"in n)if(he()&&"codeChallenge"in n)((v=document.activeElement)==null?void 0:v.tagName)==="INPUT"&&document.activeElement.blur(),w(X,V({challenge:n,solution:u}));else{if(he()&&ot()!==void 0)return oi(lr(n,u));if(he())return Fl(lr(n,u));w(Ve,V(lr(n,u))),z("payload",a(Ve))}else throw z("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}).then(()=>{a(X)?(Ne(E.CODE),mr().then(()=>{We("code",{codeChallenge:a(X)})})):(Ne(E.VERIFIED),z("verified"),mr().then(()=>{We("verified",{payload:a(Ve)})}))}).catch(n=>{z(n),Ne(E.ERROR,n.message)})}var gi=wl(),_i=xt(gi);Lo(_i,t,"default",{});var Dt=J(_i,2),zr=W(Dt),ar=W(zr);let mi;var pi=W(ar);{var Ul=n=>{Ar(n)};K(pi,n=>{a(I)===E.VERIFYING&&n(Ul)})}var Xe=J(pi,2);Tn(Xe),Xe.__change=[ol,I,Re,j,Nt,U,Tt,Me],nr(Xe,n=>w($r,n),()=>a($r)),Z(ar);var Lt=J(ar,2),jl=W(Lt);{var ql=n=>{var u=rr(),v=xt(u);it(v,()=>a(F).verified),q(n,u)},Bl=(n,u)=>{{var v=m=>{var $=rr(),y=xt($);it(y,()=>a(F).verifying),q(m,$)},b=(m,$)=>{{var y=k=>{var Y=rr(),se=xt(Y);it(se,()=>a(F).verificationRequired),q(k,Y)},H=k=>{var Y=rr(),se=xt(Y);it(se,()=>a(F).label),q(k,Y)};K(m,k=>{a(I)===E.CODE?k(y):k(H,!1)},$)}};K(n,m=>{a(I)===E.VERIFYING?m(v):m(b,!1)},u)}};K(jl,n=>{a(I)===E.VERIFIED?n(ql):n(Bl,!1)})}Z(Lt);var bi=J(Lt,2);{var Hl=n=>{var u=al();Tn(u),Le(()=>{R(u,"name",B()),Uo(u,a(Ve))}),q(n,u)};K(bi,n=>{a(I)===E.VERIFIED&&n(Hl)})}var wi=J(bi,2);{var Yl=n=>{var u=sl(),v=W(u);R(v,"href",El),Z(u),Le(()=>R(v,"aria-label",a(F).ariaLinkLabel)),q(n,u)};K(wi,n=>{(M()!==!0||a(Ir))&&n(Yl)})}var Gl=J(wi,2);{var Zl=n=>{var u=vl(),v=J(W(u),2),b=W(v),m=J(b,2);Ro(m),m.__keydown=[nl,ri];var $=J(m,2),y=W($),H=W(y);{var k=ye=>{var ee=dl();ee.__click=ri;var ur=W(ee);{var Pt=bt=>{Ar(bt,()=>20)},ta=(bt,ra)=>{{var na=wt=>{var Lr=ul();q(wt,Lr)},ia=(wt,Lr)=>{{var oa=yt=>{var Pr=fl();q(yt,Pr)},la=yt=>{var Pr=cl();q(yt,Pr)};K(wt,yt=>{a(Q)===te.PLAYING?yt(oa):yt(la,!1)},Lr)}};K(bt,wt=>{a(Q)===te.ERROR?wt(na):wt(ia,!1)},ra)}};K(ur,bt=>{a(Q)===te.LOADING?bt(Pt):bt(ta,!1)})}Z(ee),Le(()=>{R(ee,"title",a(F).getAudioChallenge),ee.disabled=a(Q)===te.LOADING||a(Q)===te.ERROR||a(at),R(ee,"aria-label",a(Q)===te.LOADING?a(F).loading:a(F).getAudioChallenge)}),q(ye,ee)};K(H,ye=>{a(X).challenge.codeChallenge.audio&&ye(k)})}var Y=J(H,2);Y.__click=[il,Me],Z(y);var se=J(y,2),Qe=W(se);{var Dr=ye=>{Ar(ye,()=>16)};K(Qe,ye=>{a(at)&&ye(Dr)})}var sr=J(Qe);Z(se),Z($);var Ql=J($,2);{var ea=ye=>{var ee=hl(),ur=W(ee);Z(ee),nr(ee,Pt=>w(Je,Pt),()=>a(Je)),Le(Pt=>R(ur,"src",Pt),[()=>Wn(a(X).challenge.codeChallenge.audio)]),Ge("loadstart",ee,Tl),Ge("canplay",ee,Sl),Ge("pause",ee,Dl),Ge("playing",ee,zl),Ge("ended",ee,$l),Ge("error",ur,Nl),q(ye,ee)};K(Ql,ye=>{a(X).challenge.codeChallenge.audio&&a(Nr)&&ye(ea)})}Z(v),Z(u),Le(()=>{R(u,"aria-label",a(F).verificationRequired),R(b,"src",a(X).challenge.codeChallenge.image),R(m,"minlength",a(X).challenge.codeChallenge.length||1),R(m,"maxlength",a(X).challenge.codeChallenge.length),R(m,"placeholder",a(F).enterCode),R(m,"aria-label",a(Q)===te.LOADING?a(F).loading:a(Q)===te.PLAYING?"":a(F).enterCodeAria),R(m,"aria-live",a(Q)?"assertive":"polite"),R(m,"aria-busy",a(Q)===te.LOADING),m.disabled=a(at),R(Y,"aria-label",a(F).reload),R(Y,"title",a(F).reload),Y.disabled=a(at),se.disabled=a(at),R(se,"aria-label",a(F).verify),To(sr,` ${a(F).verify??""}`)}),Ge("submit",v,Ll,!0),q(n,u)};K(Gl,n=>{var u;(u=a(X))!=null&&u.challenge.codeChallenge&&n(Zl)})}Z(zr);var yi=J(zr,2);{var Wl=n=>{var u=ml(),v=J(W(u),2);{var b=$=>{var y=gl(),H=W(y);it(H,()=>a(F).expired),Z(y),Le(()=>R(y,"title",a(lt))),q($,y)},m=$=>{var y=_l(),H=W(y);it(H,()=>a(F).error),Z(y),Le(()=>R(y,"title",a(lt))),q($,y)};K(v,$=>{a(I)===E.EXPIRED?$(b):$(m,!1)})}Z(u),q(n,u)};K(yi,n=>{(a(lt)||a(I)===E.EXPIRED)&&n(Wl)})}var Ei=J(yi,2);{var Jl=n=>{var u=pl(),v=W(u),b=W(v);it(b,()=>a(F).footer),Z(v),Z(u),q(n,u)};K(Ei,n=>{a(F).footer&&(O()!==!0||a(Ir))&&n(Jl)})}var Kl=J(Ei,2);{var Xl=n=>{var u=bl();nr(u,v=>w(St,v),()=>a(St)),q(n,u)};K(Kl,n=>{h()&&n(Xl)})}return Z(Dt),nr(Dt,n=>w(ie,n),()=>a(ie)),Le(n=>{var u;R(Dt,"data-state",a(I)),R(Dt,"data-floating",h()),mi=Fo(ar,1,"altcha-checkbox svelte-uo3tkz",null,mi,n),R(Xe,"id",a(Hn)),Xe.required=r()!=="onsubmit"&&(!h()||r()!=="off"),R(Xe,"aria-hidden",a(I)===E.VERIFYING),R(Lt,"for",a(Hn)),R(Lt,"aria-hidden",!!((u=a(X))!=null&&u.challenge.codeChallenge))},[()=>({"altcha-checkbox-verifying":a(I)===E.VERIFYING})]),Ge("invalid",Xe,ti),qo(Xe,()=>a(Nt),n=>w(Nt,n)),q(e,gi),kn({clarify:Tt,configure:ui,getConfiguration:fi,getFloatingAnchor:ci,getPlugin:Ml,getState:di,hide:hi,repositionFloating:zt,reset:pt,setFloatingAnchor:vi,setState:Ne,show:Tr,verify:Me,get auto(){return r()},set auto(n=void 0){r(n),C()},get blockspam(){return o()},set blockspam(n=void 0){o(n),C()},get challengeurl(){return i()},set challengeurl(n=void 0){i(n),C()},get challengejson(){return l()},set challengejson(n=void 0){l(n),C()},get credentials(){return s()},set credentials(n=void 0){s(n),C()},get customfetch(){return f()},set customfetch(n=void 0){f(n),C()},get debug(){return c()},set debug(n=!1){c(n),C()},get delay(){return d()},set delay(n=0){d(n),C()},get expire(){return _()},set expire(n=void 0){_(n),C()},get floating(){return h()},set floating(n=void 0){h(n),C()},get floatinganchor(){return g()},set floatinganchor(n=void 0){g(n),C()},get floatingoffset(){return p()},set floatingoffset(n=void 0){p(n),C()},get floatingpersist(){return x()},set floatingpersist(n=!1){x(n),C()},get hidefooter(){return O()},set hidefooter(n=!1){O(n),C()},get hidelogo(){return M()},set hidelogo(n=!1){M(n),C()},get id(){return Ie()},set id(n=void 0){Ie(n),C()},get language(){return ae()},set language(n=void 0){ae(n),C()},get name(){return B()},set name(n="altcha"){B(n),C()},get maxnumber(){return de()},set maxnumber(n=1e6){de(n),C()},get mockerror(){return Ze()},set mockerror(n=!1){Ze(n),C()},get obfuscated(){return U()},set obfuscated(n=void 0){U(n),C()},get plugins(){return we()},set plugins(n=void 0){we(n),C()},get refetchonexpire(){return Fe()},set refetchonexpire(n=!0){Fe(n),C()},get sentinel(){return ot()},set sentinel(n=void 0){ot(n),C()},get spamfilter(){return Re()},set spamfilter(n=!1){Re(n),C()},get strings(){return gt()},set strings(n=void 0){gt(n),C()},get test(){return _e()},set test(n=!1){_e(n),C()},get verifyurl(){return he()},set verifyurl(n=void 0){he(n),C()},get workers(){return _t()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){_t(n),C()},get workerurl(){return $t()},set workerurl(n=void 0){$t(n),C()}})}So(["change","keydown","click"]),customElements.define("altcha-widget",Wo(Un,{blockspam:{type:"Boolean"},debug:{type:"Boolean"},delay:{type:"Number"},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:{},plugins:{},sentinel:{},spamfilter:{},strings:{},verifyurl:{},workerurl:{}},["default"],["clarify","configure","getConfiguration","getFloatingAnchor","getPlugin","getState","hide","repositionFloating","reset","setFloatingAnchor","setState","show","verify"],!1)),globalThis.altchaCreateWorker=e=>new Worker(new URL(e||"./worker.js",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:S&&S.tagName.toUpperCase()==="SCRIPT"&&S.src||new URL("altcha.umd.cjs",document.baseURI).href)),N.Altcha=Un,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|