altcha 1.5.0 → 1.5.1
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/dist/altcha.js +184 -319
- package/dist/altcha.umd.cjs +4 -142
- package/dist_external/altcha.js +214 -211
- package/dist_external/altcha.umd.cjs +3 -3
- package/package.json +3 -1
package/dist/altcha.umd.cjs
CHANGED
|
@@ -1,142 +1,4 @@
|
|
|
1
|
-
(function(k,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(k=typeof globalThis<"u"?globalThis:k||self,A(k.altcha={}))})(this,function(k){"use strict";var
|
|
2
|
-
`,U=typeof self<"u"&&self.Blob&&new Blob([A],{type:"text/javascript;charset=utf-8"});function bt(e){let t;try{if(t=U&&(self.URL||self.webkitURL).createObjectURL(U),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(A),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}const li="5";typeof window<"u"&&((xn=window.__svelte??(window.__svelte={})).v??(xn.v=new Set)).add(li);const si=1,fi=4,ui=8,ci=16,di=1,hi=2,Mt="[",ur="[!",cr="]",He={},J=Symbol(),vi="http://www.w3.org/1999/xhtml",dr=!1;function hr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var vr=Array.isArray,gi=Array.prototype.indexOf,_i=Array.from,yt=Object.keys,Et=Object.defineProperty,Pe=Object.getOwnPropertyDescriptor,mi=Object.getOwnPropertyDescriptors,pi=Object.prototype,wi=Array.prototype,gr=Object.getPrototypeOf,_r=Object.isExtensible;function mr(e){for(var t=0;t<e.length;t++)e[t]()}const ue=2,pr=4,xt=8,Ut=16,we=32,Oe=64,$t=128,ee=256,kt=512,K=1024,ve=2048,Fe=4096,We=8192,Ct=16384,bi=32768,jt=65536,yi=1<<19,wr=1<<20,Vt=1<<21,rt=Symbol("$state"),br=Symbol("legacy props"),Ei=Symbol("");function xi(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function $i(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ki(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ci(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ai(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ri(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ii(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Si(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ti(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function At(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let P=!1;function Ye(e){P=e}let O;function $e(e){if(e===null)throw At(),He;return O=e}function Ge(){return $e(Ce(O))}function te(e){if(P){if(Ce(O)!==null)throw At(),He;O=e}}function Ni(){for(var e=0,t=O;;){if(t.nodeType===8){var r=t.data;if(r===cr){if(e===0)return t;e-=1}else(r===Mt||r===ur)&&(e+=1)}var i=Ce(t);t.remove(),t=i}}let Li=!1;function ke(e){if(typeof e!="object"||e===null||rt in e)return e;const t=gr(e);if(t!==pi&&t!==wi)return e;var r=new Map,i=vr(e),o=z(0),a=R,l=s=>{var f=R;_e(a);var d=s();return _e(f),d};return i&&r.set("length",z(e.length)),new Proxy(e,{defineProperty(s,f,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Ii();var v=r.get(f);return v===void 0?(v=l(()=>z(d.value)),r.set(f,v)):F(v,l(()=>ke(d.value))),!0},deleteProperty(s,f){var d=r.get(f);if(d===void 0)f in s&&(r.set(f,l(()=>z(J))),Bt(o));else{if(i&&typeof f=="string"){var v=r.get("length"),h=Number(f);Number.isInteger(h)&&h<v.v&&F(v,h)}F(d,J),Bt(o)}return!0},get(s,f,d){var m;if(f===rt)return e;var v=r.get(f),h=f in s;if(v===void 0&&(!h||(m=Pe(s,f))!=null&&m.writable)&&(v=l(()=>z(ke(h?s[f]:J))),r.set(f,v)),v!==void 0){var g=c(v);return g===J?void 0:g}return Reflect.get(s,f,d)},getOwnPropertyDescriptor(s,f){var d=Reflect.getOwnPropertyDescriptor(s,f);if(d&&"value"in d){var v=r.get(f);v&&(d.value=c(v))}else if(d===void 0){var h=r.get(f),g=h==null?void 0:h.v;if(h!==void 0&&g!==J)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return d},has(s,f){var g;if(f===rt)return!0;var d=r.get(f),v=d!==void 0&&d.v!==J||Reflect.has(s,f);if(d!==void 0||I!==null&&(!v||(g=Pe(s,f))!=null&&g.writable)){d===void 0&&(d=l(()=>z(v?ke(s[f]):J)),r.set(f,d));var h=c(d);if(h===J)return!1}return v},set(s,f,d,v){var B;var h=r.get(f),g=f in s;if(i&&f==="length")for(var m=d;m<h.v;m+=1){var C=r.get(m+"");C!==void 0?F(C,J):m in s&&(C=l(()=>z(J)),r.set(m+"",C))}h===void 0?(!g||(B=Pe(s,f))!=null&&B.writable)&&(h=l(()=>z(void 0)),F(h,l(()=>ke(d))),r.set(f,h)):(g=h.v!==J,F(h,l(()=>ke(d))));var D=Reflect.getOwnPropertyDescriptor(s,f);if(D!=null&&D.set&&D.set.call(v,d),!g){if(i&&typeof f=="string"){var j=r.get("length"),G=Number(f);Number.isInteger(G)&&G>=j.v&&F(j,G+1)}Bt(o)}return!0},ownKeys(s){c(o);var f=Reflect.ownKeys(s).filter(h=>{var g=r.get(h);return g===void 0||g.v!==J});for(var[d,v]of r)v.v!==J&&!(d in s)&&f.push(d);return f},setPrototypeOf(){Si()}})}function Bt(e,t=1){F(e,e.v+t)}var yr,Er,xr,$r;function qt(){if(yr===void 0){yr=window,Er=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;xr=Pe(t,"firstChild").get,$r=Pe(t,"nextSibling").get,_r(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),_r(r)&&(r.__t=void 0)}}function Ht(e=""){return document.createTextNode(e)}function ie(e){return xr.call(e)}function Ce(e){return $r.call(e)}function re(e,t){if(!P)return ie(e);var r=ie(O);return r===null&&(r=O.appendChild(Ht())),$e(r),r}function kr(e,t){if(!P){var r=ie(e);return r instanceof Comment&&r.data===""?Ce(r):r}return O}function be(e,t=1,r=!1){let i=P?O:e;for(var o;t--;)o=i,i=Ce(i);if(!P)return i;var a=i==null?void 0:i.nodeType;if(r&&a!==3){var l=Ht();return i===null?o==null||o.after(l):i.before(l),$e(l),l}return $e(i),i}function Di(e){e.textContent=""}function Cr(e){return e===this.v}function Pi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ar(e){return!Pi(e,this.v)}function Wt(e){var t=ue|ve,r=R!==null&&(R.f&ue)!==0?R:null;return I===null||r!==null&&(r.f&ee)!==0?t|=ee:I.f|=wr,{ctx:Y,deps:null,effects:null,equals:Cr,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??I}}function nt(e){const t=Wt(e);return Hr(t),t}function Rr(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Ae(t[r])}}function Oi(e){for(var t=e.parent;t!==null;){if((t.f&ue)===0)return t;t=t.parent}return null}function Ir(e){var t,r=I;Re(Oi(e));try{Rr(e),t=Jr(e)}finally{Re(r)}return t}function Sr(e){var t=Ir(e),r=(Ie||(e.f&ee)!==0)&&e.deps!==null?Fe:K;ce(e,r),e.equals(t)||(e.v=t,e.wv=Yr())}function Fi(e){I===null&&R===null&&ki(),R!==null&&(R.f&ee)!==0&&I===null&&$i(),at&&xi()}function Mi(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,i=!0){var o=I,a={ctx:Y,deps:null,nodes_start:null,nodes_end:null,f:e|ve,first:null,fn:t,last:null,next:null,parent:o,prev:null,teardown:null,transitions:null,wv:0};if(r)try{zt(a),a.f|=bi}catch(f){throw Ae(a),f}else t!==null&&Dt(a);var l=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&(wr|$t))===0;if(!l&&i&&(o!==null&&Mi(a,o),R!==null&&(R.f&ue)!==0)){var s=R;(s.effects??(s.effects=[])).push(a)}return a}function Tr(e){const t=Me(xt,null,!1);return ce(t,K),t.teardown=e,t}function Yt(e){Fi();var t=I!==null&&(I.f&we)!==0&&Y!==null&&!Y.m;if(t){var r=Y;(r.e??(r.e=[])).push({fn:e,effect:I,reaction:R})}else{var i=Gt(e);return i}}function Ui(e){const t=Me(Oe,e,!0);return()=>{Ae(t)}}function ji(e){const t=Me(Oe,e,!0);return(r={})=>new Promise(i=>{r.outro?Kt(t,()=>{Ae(t),i(void 0)}):(Ae(t),i(void 0))})}function Gt(e){return Me(pr,e,!1)}function Zt(e){return Me(xt,e,!0)}function Ue(e,t=[],r=Wt){const i=t.map(r);return Nr(()=>e(...i.map(c)))}function Nr(e,t=0){return Me(xt|Ut|t,e,!0)}function Jt(e,t=!0){return Me(xt|we,e,!0,t)}function Lr(e){var t=e.teardown;if(t!==null){const r=at,i=R;qr(!0),_e(null);try{t.call(null)}finally{qr(r),_e(i)}}}function Dr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var i=r.next;(r.f&Oe)!==0?r.parent=null:Ae(r,t),r=i}}function Vi(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&we)===0&&Ae(t),t=r}}function Ae(e,t=!0){var r=!1;(t||(e.f&yi)!==0)&&e.nodes_start!==null&&(Pr(e.nodes_start,e.nodes_end),r=!0),Dr(e,t&&!r),Lt(e,0),ce(e,Ct);var i=e.transitions;if(i!==null)for(const a of i)a.stop();Lr(e);var o=e.parent;o!==null&&o.first!==null&&Or(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Pr(e,t){for(;e!==null;){var r=e===t?null:Ce(e);e.remove(),e=r}}function Or(e){var t=e.parent,r=e.prev,i=e.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=r))}function Kt(e,t){var r=[];Fr(e,r,!0),Bi(r,()=>{Ae(e),t&&t()})}function Bi(e,t){var r=e.length;if(r>0){var i=()=>--r||t();for(var o of e)o.out(i)}else t()}function Fr(e,t,r){if((e.f&We)===0){if(e.f^=We,e.transitions!==null)for(const l of e.transitions)(l.is_global||r)&&t.push(l);for(var i=e.first;i!==null;){var o=i.next,a=(i.f&jt)!==0||(i.f&we)!==0;Fr(i,t,a?r:!1),i=o}}}function Mr(e){Ur(e,!0)}function Ur(e,t){if((e.f&We)!==0){e.f^=We,(e.f&K)===0&&(e.f^=K),st(e)&&(ce(e,ve),Dt(e));for(var r=e.first;r!==null;){var i=r.next,o=(r.f&jt)!==0||(r.f&we)!==0;Ur(r,o?t:!1),r=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}const qi=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let it=[],ot=[];function jr(){var e=it;it=[],mr(e)}function Vr(){var e=ot;ot=[],mr(e)}function Br(e){it.length===0&&queueMicrotask(jr),it.push(e)}function Hi(e){ot.length===0&&qi(Vr),ot.push(e)}function Wi(){it.length>0&&jr(),ot.length>0&&Vr()}let Rt=!1,It=!1,St=null,je=!1,at=!1;function qr(e){at=e}let lt=[],_a=[],R=null,ge=!1;function _e(e){R=e}let I=null;function Re(e){I=e}let H=null;function Hr(e){R!==null&&R.f&Vt&&(H===null?H=[e]:H.push(e))}let W=null,ne=0,oe=null;function Yi(e){oe=e}let Wr=1,Tt=0,Ie=!1;function Yr(){return++Wr}function st(e){var h;var t=e.f;if((t&ve)!==0)return!0;if((t&Fe)!==0){var r=e.deps,i=(t&ee)!==0;if(r!==null){var o,a,l=(t&kt)!==0,s=i&&I!==null&&!Ie,f=r.length;if(l||s){var d=e,v=d.parent;for(o=0;o<f;o++)a=r[o],(l||!((h=a==null?void 0:a.reactions)!=null&&h.includes(d)))&&(a.reactions??(a.reactions=[])).push(d);l&&(d.f^=kt),s&&v!==null&&(v.f&ee)===0&&(d.f^=ee)}for(o=0;o<f;o++)if(a=r[o],st(a)&&Sr(a),a.wv>e.wv)return!0}(!i||I!==null&&!Ie)&&ce(e,K)}return!1}function Gi(e,t){for(var r=t;r!==null;){if((r.f&$t)!==0)try{r.fn(e);return}catch{r.f^=$t}r=r.parent}throw Rt=!1,e}function Gr(e){return(e.f&Ct)===0&&(e.parent===null||(e.parent.f&$t)===0)}function Nt(e,t,r,i){if(Rt){if(r===null&&(Rt=!1),Gr(t))throw e;return}if(r!==null&&(Rt=!0),Gi(e,t),Gr(t))throw e}function Zr(e,t,r=!0){var i=e.reactions;if(i!==null)for(var o=0;o<i.length;o++){var a=i[o];H!=null&&H.includes(e)||((a.f&ue)!==0?Zr(a,t,!1):t===a&&(r?ce(a,ve):(a.f&K)!==0&&ce(a,Fe),Dt(a)))}}function Jr(e){var m;var t=W,r=ne,i=oe,o=R,a=Ie,l=H,s=Y,f=ge,d=e.f;W=null,ne=0,oe=null,Ie=(d&ee)!==0&&(ge||!je||R===null),R=(d&(we|Oe))===0?e:null,H=null,en(e.ctx),ge=!1,Tt++,e.f|=Vt;try{var v=(0,e.fn)(),h=e.deps;if(W!==null){var g;if(Lt(e,ne),h!==null&&ne>0)for(h.length=ne+W.length,g=0;g<W.length;g++)h[ne+g]=W[g];else e.deps=h=W;if(!Ie)for(g=ne;g<h.length;g++)((m=h[g]).reactions??(m.reactions=[])).push(e)}else h!==null&&ne<h.length&&(Lt(e,ne),h.length=ne);if(nn()&&oe!==null&&!ge&&h!==null&&(e.f&(ue|Fe|ve))===0)for(g=0;g<oe.length;g++)Zr(oe[g],e);return o!==null&&o!==e&&(Tt++,oe!==null&&(i===null?i=oe:i.push(...oe))),v}finally{W=t,ne=r,oe=i,R=o,Ie=a,H=l,en(s),ge=f,e.f^=Vt}}function Zi(e,t){let r=t.reactions;if(r!==null){var i=gi.call(r,e);if(i!==-1){var o=r.length-1;o===0?r=t.reactions=null:(r[i]=r[o],r.pop())}}r===null&&(t.f&ue)!==0&&(W===null||!W.includes(t))&&(ce(t,Fe),(t.f&(ee|kt))===0&&(t.f^=kt),Rr(t),Lt(t,0))}function Lt(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)Zi(e,r[i])}function zt(e){var t=e.f;if((t&Ct)===0){ce(e,K);var r=I,i=Y,o=je;I=e,je=!0;try{(t&Ut)!==0?Vi(e):Dr(e),Lr(e);var a=Jr(e);e.teardown=typeof a=="function"?a:null,e.wv=Wr;var l=e.deps,s;dr&&Li&&e.f&ve}catch(f){Nt(f,e,r,i||e.ctx)}finally{je=o,I=r}}}function Ji(){try{Ci()}catch(e){if(St!==null)Nt(e,St,null);else throw e}}function Kr(){var e=je;try{var t=0;for(je=!0;lt.length>0;){t++>1e3&&Ji();var r=lt,i=r.length;lt=[];for(var o=0;o<i;o++){var a=zi(r[o]);Ki(a)}ft.clear()}}finally{It=!1,je=e,St=null}}function Ki(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var i=e[r];if((i.f&(Ct|We))===0)try{st(i)&&(zt(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?Or(i):i.fn=null))}catch(o){Nt(o,i,null,i.ctx)}}}function Dt(e){It||(It=!0,queueMicrotask(Kr));for(var t=St=e;t.parent!==null;){t=t.parent;var r=t.f;if((r&(Oe|we))!==0){if((r&K)===0)return;t.f^=K}}lt.push(t)}function zi(e){for(var t=[],r=e;r!==null;){var i=r.f,o=(i&(we|Oe))!==0,a=o&&(i&K)!==0;if(!a&&(i&We)===0){if((i&pr)!==0)t.push(r);else if(o)r.f^=K;else try{st(r)&&zt(r)}catch(f){Nt(f,r,null,r.ctx)}var l=r.first;if(l!==null){r=l;continue}}var s=r.parent;for(r=r.next;r===null&&s!==null;)r=s.next,s=s.parent}return t}function E(e){for(var t;;){if(Wi(),lt.length===0)return t;It=!0,Kr()}}async function Xi(){await Promise.resolve(),E()}function c(e){var t=e.f,r=(t&ue)!==0;if(R!==null&&!ge){if(!(H!=null&&H.includes(e))){var i=R.deps;e.rv<Tt&&(e.rv=Tt,W===null&&i!==null&&i[ne]===e?ne++:W===null?W=[e]:(!Ie||!W.includes(e))&&W.push(e))}}else if(r&&e.deps===null&&e.effects===null){var o=e,a=o.parent;a!==null&&(a.f&ee)===0&&(o.f^=ee)}return r&&(o=e,st(o)&&Sr(o)),at&&ft.has(e)?ft.get(e):e.v}function Ze(e){var t=ge;try{return ge=!0,e()}finally{ge=t}}const Qi=-7169;function ce(e,t){e.f=e.f&Qi|t}const ft=new Map;function zr(e,t){var r={f:0,v:e,reactions:null,equals:Cr,rv:0,wv:0};return r}function z(e,t){const r=zr(e);return Hr(r),r}function Xr(e,t=!1){const r=zr(e);return t||(r.equals=Ar),r}function F(e,t,r=!1){R!==null&&!ge&&nn()&&(R.f&(ue|Ut))!==0&&!(H!=null&&H.includes(e))&&Ti();let i=r?ke(t):t;return eo(e,i)}function eo(e,t){if(!e.equals(t)){var r=e.v;at?ft.set(e,t):ft.set(e,r),e.v=t,(e.f&ue)!==0&&((e.f&ve)!==0&&Ir(e),ce(e,(e.f&ee)===0?K:Fe)),e.wv=Yr(),Qr(e,ve),I!==null&&(I.f&K)!==0&&(I.f&(we|Oe))===0&&(oe===null?Yi([e]):oe.push(e))}return t}function Qr(e,t){var r=e.reactions;if(r!==null)for(var i=r.length,o=0;o<i;o++){var a=r[o],l=a.f;(l&ve)===0&&(ce(a,t),(l&(K|ee))!==0&&((l&ue)!==0?Qr(a,Fe):Dt(a)))}}let Y=null;function en(e){Y=e}function tn(e,t=!1,r){var i=Y={p:Y,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};Tr(()=>{i.d=!0})}function rn(e){const t=Y;if(t!==null){e!==void 0&&(t.x=e);const l=t.e;if(l!==null){var r=I,i=R;t.e=null;try{for(var o=0;o<l.length;o++){var a=l[o];Re(a.effect),_e(a.reaction),Gt(a.fn)}}finally{Re(r),_e(i)}}Y=t.p,t.m=!0}return e||{}}function nn(){return!0}const to=["touchstart","touchmove"];function ro(e){return to.includes(e)}let on=!1;function an(){on||(on=!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 ln(e){var t=R,r=I;_e(null),Re(null);try{return e()}finally{_e(t),Re(r)}}function no(e,t,r,i=r){e.addEventListener(t,()=>ln(r));const o=e.__on_r;o?e.__on_r=()=>{o(),i(!0)}:e.__on_r=()=>i(!0),an()}const sn=new Set,Xt=new Set;function io(e,t,r,i={}){function o(a){if(i.capture||ut.call(t,a),!a.cancelBubble)return ln(()=>r==null?void 0:r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Br(()=>{t.addEventListener(e,o,i)}):t.addEventListener(e,o,i),o}function oo(e,t,r,i,o){var a={capture:i,passive:o},l=io(e,t,r,a);(t===document.body||t===window||t===document)&&Tr(()=>{t.removeEventListener(e,l,a)})}function ao(e){for(var t=0;t<e.length;t++)sn.add(e[t]);for(var r of Xt)r(e)}function ut(e){var B;var t=this,r=t.ownerDocument,i=e.type,o=((B=e.composedPath)==null?void 0:B.call(e))||[],a=o[0]||e.target,l=0,s=e.__root;if(s){var f=o.indexOf(s);if(f!==-1&&(t===document||t===window)){e.__root=t;return}var d=o.indexOf(t);if(d===-1)return;f<=d&&(l=f)}if(a=o[l]||e.target,a!==t){Et(e,"currentTarget",{configurable:!0,get(){return a||r}});var v=R,h=I;_e(null),Re(null);try{for(var g,m=[];a!==null;){var C=a.assignedSlot||a.parentNode||a.host||null;try{var D=a["__"+i];if(D!=null&&(!a.disabled||e.target===a))if(vr(D)){var[j,...G]=D;j.apply(a,[e,...G])}else D.call(a,e)}catch(X){g?m.push(X):g=X}if(e.cancelBubble||C===t||C===null)break;a=C}if(g){for(let X of m)queueMicrotask(()=>{throw X});throw g}}finally{e.__root=t,delete e.currentTarget,_e(v),Re(h)}}}function Qt(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Se(e,t){var r=I;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function me(e,t){var r=(t&di)!==0,i=(t&hi)!==0,o,a=!e.startsWith("<!>");return()=>{if(P)return Se(O,null),O;o===void 0&&(o=Qt(a?e:"<!>"+e),r||(o=ie(o)));var l=i||Er?document.importNode(o,!0):o.cloneNode(!0);if(r){var s=ie(l),f=l.lastChild;Se(s,f)}else Se(l,l);return l}}function lo(e,t,r="svg"){var i=!e.startsWith("<!>"),o=`<${r}>${i?e:"<!>"+e}</${r}>`,a;return()=>{if(P)return Se(O,null),O;if(!a){var l=Qt(o),s=ie(l);a=ie(s)}var f=a.cloneNode(!0);return Se(f,f),f}}function ae(e,t){if(P){I.nodes_end=O,Ge();return}e!==null&&e.before(t)}function fn(e,t){return un(e,t)}function so(e,t){qt(),t.intro=t.intro??!1;const r=t.target,i=P,o=O;try{for(var a=ie(r);a&&(a.nodeType!==8||a.data!==Mt);)a=Ce(a);if(!a)throw He;Ye(!0),$e(a),Ge();const l=un(e,{...t,anchor:a});if(O===null||O.nodeType!==8||O.data!==cr)throw At(),He;return Ye(!1),l}catch(l){if(l===He)return t.recover===!1&&Ai(),qt(),Di(r),Ye(!1),fn(e,t);throw l}finally{Ye(i),$e(o)}}const Je=new Map;function un(e,{target:t,anchor:r,props:i={},events:o,context:a,intro:l=!0}){qt();var s=new Set,f=h=>{for(var g=0;g<h.length;g++){var m=h[g];if(!s.has(m)){s.add(m);var C=ro(m);t.addEventListener(m,ut,{passive:C});var D=Je.get(m);D===void 0?(document.addEventListener(m,ut,{passive:C}),Je.set(m,1)):Je.set(m,D+1)}}};f(_i(sn)),Xt.add(f);var d=void 0,v=ji(()=>{var h=r??t.appendChild(Ht());return Jt(()=>{if(a){tn({});var g=Y;g.c=a}o&&(i.$$events=o),P&&Se(h,null),d=e(h,i)||{},P&&(I.nodes_end=O),a&&rn()}),()=>{var C;for(var g of s){t.removeEventListener(g,ut);var m=Je.get(g);--m===0?(document.removeEventListener(g,ut),Je.delete(g)):Je.set(g,m)}Xt.delete(f),h!==r&&((C=h.parentNode)==null||C.removeChild(h))}});return er.set(d,v),d}let er=new WeakMap;function fo(e,t){const r=er.get(e);return r?(er.delete(e),r(t)):Promise.resolve()}function Te(e,t,[r,i]=[0,0]){P&&r===0&&Ge();var o=e,a=null,l=null,s=J,f=r>0?jt:0,d=!1;const v=(g,m=!0)=>{d=!0,h(m,g)},h=(g,m)=>{if(s===(s=g))return;let C=!1;if(P&&i!==-1){if(r===0){const j=o.data;j===Mt?i=0:j===ur?i=1/0:(i=parseInt(j.substring(1)),i!==i&&(i=s?1/0:-1))}const D=i>r;!!s===D&&(o=Ni(),$e(o),Ye(!1),C=!0,i=-1)}s?(a?Mr(a):m&&(a=Jt(()=>m(o))),l&&Kt(l,()=>{l=null})):(l?Mr(l):m&&(l=Jt(()=>m(o,[r+1,i]))),a&&Kt(a,()=>{a=null})),C&&Ye(!0)};Nr(()=>{d=!1,t(v),d||h(null,null)},f),P&&(o=O)}function Ke(e,t,r=!1,i=!1,o=!1){var a=e,l="";Ue(()=>{var s=I;if(l===(l=t()??"")){P&&Ge();return}if(s.nodes_start!==null&&(Pr(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),l!==""){if(P){O.data;for(var f=Ge(),d=f;f!==null&&(f.nodeType!==8||f.data!=="");)d=f,f=Ce(f);if(f===null)throw At(),He;Se(O,d),a=$e(f);return}var v=l+"";r?v=`<svg>${v}</svg>`:i&&(v=`<math>${v}</math>`);var h=Qt(v);if((r||i)&&(h=ie(h)),Se(ie(h),h.lastChild),r||i)for(;ie(h);)a.before(ie(h));else a.before(h)}})}function uo(e,t,r,i,o){var s;P&&Ge();var a=(s=t.$$slots)==null?void 0:s[r],l=!1;a===!0&&(a=t.children,l=!0),a===void 0||a(e,l?()=>i:i)}const cn=[...`
|
|
3
|
-
\r\f \v\uFEFF`];function co(e,t,r){var i=""+e;if(r){for(var o in r)if(r[o])i=i?i+" "+o:o;else if(i.length)for(var a=o.length,l=0;(l=i.indexOf(o,l))>=0;){var s=l+a;(l===0||cn.includes(i[l-1]))&&(s===i.length||cn.includes(i[s]))?i=(l===0?"":i.substring(0,l))+i.substring(s+1):l=s}}return i===""?null:i}function ho(e,t,r,i,o,a){var l=e.__className;if(P||l!==r||l===void 0){var s=co(r,i,a);(!P||s!==e.getAttribute("class"))&&(s==null?e.removeAttribute("class"):e.className=s),e.__className=r}else if(a&&o!==a)for(var f in a){var d=!!a[f];(o==null||d!==!!o[f])&&e.classList.toggle(f,d)}return a}const vo=Symbol("is custom element"),go=Symbol("is html");function dn(e){if(P){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;de(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var o=e.checked;de(e,"checked",null),e.checked=o}}};e.__on_r=r,Hi(r),an()}}function _o(e,t){var r=hn(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function de(e,t,r,i){var o=hn(e);P&&(o[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||o[t]!==(o[t]=r)&&(t==="loading"&&(e[Ei]=r),r==null?e.removeAttribute(t):typeof r!="string"&&mo(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function hn(e){return e.__attributes??(e.__attributes={[vo]:e.nodeName.includes("-"),[go]:e.namespaceURI===vi})}var vn=new Map;function mo(e){var t=vn.get(e.nodeName);if(t)return t;vn.set(e.nodeName,t=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=mi(i);for(var a in r)r[a].set&&t.push(a);i=gr(i)}return t}function po(e,t,r=t){no(e,"change",i=>{var o=i?e.defaultChecked:e.checked;r(o)}),(P&&e.defaultChecked!==e.checked||Ze(t)==null)&&r(e.checked),Zt(()=>{var i=t();e.checked=!!i})}function gn(e,t){return e===t||(e==null?void 0:e[rt])===t}function _n(e={},t,r,i){return Gt(()=>{var o,a;return Zt(()=>{o=a,a=[],Ze(()=>{e!==r(...a)&&(t(e,...a),o&&gn(r(...o),e)&&t(null,...o))})}),()=>{Br(()=>{a&&gn(r(...a),e)&&t(null,...a)})}}),e}function mn(e){Y===null&&hr(),Yt(()=>{const t=Ze(e);if(typeof t=="function")return t})}function wo(e){Y===null&&hr(),mn(()=>()=>Ze(e))}let Pt=!1;function bo(e){var t=Pt;try{return Pt=!1,[e(),Pt]}finally{Pt=t}}function pn(e){var t;return((t=e.ctx)==null?void 0:t.d)??!1}function S(e,t,r,i){var Ve;var o=(r&si)!==0,a=!0,l=(r&ui)!==0,s=(r&ci)!==0,f=!1,d;l?[d,f]=bo(()=>e[t]):d=e[t];var v=rt in e||br in e,h=l&&(((Ve=Pe(e,t))==null?void 0:Ve.set)??(v&&t in e&&(M=>e[t]=M)))||void 0,g=i,m=!0,C=!1,D=()=>(C=!0,m&&(m=!1,s?g=Ze(i):g=i),g);d===void 0&&i!==void 0&&(h&&a&&Ri(),d=D(),h&&h(d));var j;if(j=()=>{var M=e[t];return M===void 0?D():(m=!0,C=!1,M)},(r&fi)===0)return j;if(h){var G=e.$$legacy;return function(M,q){return arguments.length>0?((!q||G||f)&&h(q?j():M),M):j()}}var B=!1,X=Xr(d),V=Wt(()=>{var M=j(),q=c(X);return B?(B=!1,q):X.v=M});return l&&c(V),o||(V.equals=Ar),function(M,q){if(arguments.length>0){const Ee=q?c(V):l?ke(M):M;if(!V.equals(Ee)){if(B=!0,F(X,Ee),C&&g!==void 0&&(g=Ee),pn(V))return M;Ze(()=>c(V))}return M}return pn(V)?V.v:c(V)}}function yo(e){return new Eo(e)}class Eo{constructor(t){sr(this,ye);sr(this,le);var a;var r=new Map,i=(l,s)=>{var f=Xr(s);return r.set(l,f),f};const o=new Proxy({...t.props||{},$$events:{}},{get(l,s){return c(r.get(s)??i(s,Reflect.get(l,s)))},has(l,s){return s===br?!0:(c(r.get(s)??i(s,Reflect.get(l,s))),Reflect.has(l,s))},set(l,s,f){return F(r.get(s)??i(s,f),f),Reflect.set(l,s,f)}});fr(this,le,(t.hydrate?so:fn)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((a=t==null?void 0:t.props)!=null&&a.$$host)||t.sync===!1)&&E(),fr(this,ye,o.$$events);for(const l of Object.keys(Q(this,le)))l==="$set"||l==="$destroy"||l==="$on"||Et(this,l,{get(){return Q(this,le)[l]},set(s){Q(this,le)[l]=s},enumerable:!0});Q(this,le).$set=l=>{Object.assign(o,l)},Q(this,le).$destroy=()=>{fo(Q(this,le))}}$set(t){Q(this,le).$set(t)}$on(t,r){Q(this,ye)[t]=Q(this,ye)[t]||[];const i=(...o)=>r.call(this,...o);return Q(this,ye)[t].push(i),()=>{Q(this,ye)[t]=Q(this,ye)[t].filter(o=>o!==i)}}$destroy(){Q(this,le).$destroy()}}ye=new WeakMap,le=new WeakMap;let wn;typeof HTMLElement=="function"&&(wn=class extends HTMLElement{constructor(t,r,i){super();he(this,"$$ctor");he(this,"$$s");he(this,"$$c");he(this,"$$cn",!1);he(this,"$$d",{});he(this,"$$r",!1);he(this,"$$p_d",{});he(this,"$$l",{});he(this,"$$l_u",new Map);he(this,"$$me");this.$$ctor=t,this.$$s=r,i&&this.attachShadow({mode:"open"})}addEventListener(t,r,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const o=this.$$c.$on(t,r);this.$$l_u.set(r,o)}super.addEventListener(t,r,i)}removeEventListener(t,r,i){if(super.removeEventListener(t,r,i),this.$$c){const o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return a=>{const l=document.createElement("slot");o!=="default"&&(l.name=o),ae(a,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},i=xo(this);for(const o of this.$$s)o in i&&(o==="default"&&!this.$$d.children?(this.$$d.children=t(o),r.default=!0):r[o]=t(o));for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=Ot(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=yo({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Ui(()=>{Zt(()=>{var o;this.$$r=!0;for(const a of yt(this.$$c)){if(!((o=this.$$p_d[a])!=null&&o.reflect))continue;this.$$d[a]=this.$$c[a];const l=Ot(a,this.$$d[a],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,l)}this.$$r=!1})});for(const o in this.$$l)for(const a of this.$$l[o]){const l=this.$$c.$on(o,a);this.$$l_u.set(a,l)}this.$$l={}}}attributeChangedCallback(t,r,i){var o;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ot(t,i,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$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 yt(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,i){var a;const o=(a=r[e])==null?void 0:a.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(o){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(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function xo(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function $o(e,t,r,i,o,a){let l=class extends wn{constructor(){super(e,r,o),this.$$p_d=t}static get observedAttributes(){return yt(t).map(s=>(t[s].attribute||s).toLowerCase())}};return yt(t).forEach(s=>{Et(l.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(f){var h;f=Ot(s,f,t),this.$$d[s]=f;var d=this.$$c;if(d){var v=(h=Pe(d,s))==null?void 0:h.get;v?d[s]=f:d.$set({[s]:f})}}})}),i.forEach(s=>{Et(l.prototype,s,{get(){var f;return(f=this.$$c)==null?void 0:f[s]}})}),e.element=l,l}const bn=new TextEncoder;function ko(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function Co(e,t="SHA-256",r=1e5){const i=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const o=await yn(i,e,t);return{algorithm:t,challenge:o,salt:i,signature:""}}async function yn(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 ko(await crypto.subtle.digest(r.toUpperCase(),bn.encode(e+t)))}function Ao(e,t,r="SHA-256",i=1e6,o=0){const a=new AbortController,l=Date.now();return{promise:(async()=>{for(let f=o;f<=i;f+=1){if(a.signal.aborted)return null;if(await yn(t,f,r)===e)return{number:f,took:Date.now()-l}}return null})(),controller:a}}function Ro(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Io(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function So(e,t=12){const r=new Uint8Array(t);for(let i=0;i<t;i++)r[i]=e%256,e=Math.floor(e/256);return r}async function To(e,t="",r=1e6,i=0){const o="AES-GCM",a=new AbortController,l=Date.now(),s=async()=>{for(let v=i;v<=r;v+=1){if(a.signal.aborted||!f||!d)return null;try{const h=await crypto.subtle.decrypt({name:o,iv:So(v)},f,d);if(h)return{clearText:new TextDecoder().decode(h),took:Date.now()-l}}catch{}}return null};let f=null,d=null;try{d=Io(e);const v=await crypto.subtle.digest("SHA-256",bn.encode(t));f=await crypto.subtle.importKey("raw",v,o,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:a}}return{promise:s(),controller:a}}var w=(e=>(e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(w||{}),No=lo('<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor" class="altcha-spinner"></path></svg>'),Lo=me('<span role="status" aria-live="polite"><!></span> <input type="hidden">',1),Do=me('<span role="status" aria-live="polite"><!></span>'),Po=me("<label><!></label>"),Oo=me('<div><a target="_blank" class="altcha-logo"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>'),Fo=me("<div><!></div>"),Mo=me("<div><!></div>"),Uo=me('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'),jo=me('<div class="altcha-footer"><div><!></div></div>'),Vo=me('<div class="altcha-anchor-arrow"></div>'),Bo=me('<!> <div class="altcha"><div class="altcha-main"><!> <div><input type="checkbox"></div> <div class="altcha-label"><!></div> <!></div> <!> <!> <!></div>',1);function En(e,t){var ri,ni;tn(t,!0);let r=S(t,"auto",7,void 0),i=S(t,"blockspam",7,void 0),o=S(t,"challengeurl",7,void 0),a=S(t,"challengejson",7,void 0),l=S(t,"customfetch",7,void 0),s=S(t,"debug",7,!1),f=S(t,"delay",7,0),d=S(t,"expire",7,void 0),v=S(t,"floating",7,void 0),h=S(t,"floatinganchor",7,void 0),g=S(t,"floatingoffset",7,void 0),m=S(t,"floatingpersist",7,!1),C=S(t,"hidefooter",7,!1),D=S(t,"hidelogo",7,!1),j=S(t,"id",7,void 0),G=S(t,"name",7,"altcha"),B=S(t,"maxnumber",7,1e6),X=S(t,"mockerror",7,!1),V=S(t,"obfuscated",7,void 0),Ve=S(t,"plugins",7,void 0),M=S(t,"refetchonexpire",7,!0),q=S(t,"spamfilter",7,!1),Ee=S(t,"strings",7,void 0),se=S(t,"test",7,!1),Ne=S(t,"verifyurl",7,void 0),ze=S(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),ct=S(t,"workerurl",7,void 0);const $n=["SHA-256","SHA-384","SHA-512"],kn="Visit Altcha.org",Cn="https://altcha.org/",dt=(n,u)=>{t.$$host.dispatchEvent(new CustomEvent(n,{detail:u}))},An=(ni=(ri=document.documentElement.lang)==null?void 0:ri.split("-"))==null?void 0:ni[0],tr=nt(()=>{var n;return o()&&new URL(o(),location.origin).host.endsWith(".altcha.org")&&!!((n=o())!=null&&n.includes("apiKey=ckey_"))}),rr=nt(()=>a()?jn(a()):void 0),Rn=nt(()=>Ee()?jn(Ee()):{}),fe=nt(()=>{var n;return{ariaLinkLabel:kn,error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:`Protected by <a href="${Cn}" target="_blank" aria-label="${((n=c(Rn))==null?void 0:n.ariaLinkLabel)||kn}">ALTCHA</a>`,label:"I'm not a robot",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait.",...c(Rn)}}),In=nt(()=>`${j()||G()}_checkbox`);let Xe=z(!1),T=z(ke(w.UNVERIFIED)),Z=z(void 0),ht=z(null),Qe=null,p=null,et=z(null),pe=null,Le=[],Be=z(null);Yt(()=>{Xo(c(et))}),Yt(()=>{Qo(c(T))}),wo(()=>{Wo(),p&&(p.removeEventListener("submit",On),p.removeEventListener("reset",Fn),p.removeEventListener("focusin",Pn),p=null),pe&&(clearTimeout(pe),pe=null),document.removeEventListener("click",Ln),document.removeEventListener("scroll",Dn),window.removeEventListener("resize",Un)}),mn(()=>{var n;N("mounted","1.5.0"),N("workers",ze()),Ko(),N("plugins",Le.length?Le.map(u=>u.constructor.pluginName).join(", "):"none"),se()&&N("using test mode"),d()&&nr(d()),r()!==void 0&&N("auto",r()),v()!==void 0&&Vn(v()),p=(n=c(Z))==null?void 0:n.closest("form"),p&&(p.addEventListener("submit",On,{capture:!0}),p.addEventListener("reset",Fn),(r()==="onfocus"||m()==="focus")&&p.addEventListener("focusin",Pn)),r()==="onload"&&(V()?vt():De()),c(tr)&&(C()||D())&&N("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{dt("load")})});function Sn(n,u){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:u.number,salt:n.salt,signature:n.signature,test:se()?!0:void 0,took:u.took}))}function Wo(){for(const n of Le)n.destroy()}function Tn(){o()&&M()&&c(T)===w.VERIFIED?De():_t(w.EXPIRED,c(fe).expired)}async function Yo(){var n;if(X())throw N("mocking error"),new Error("Mocked error.");if(c(rr))return N("using provided json data"),c(rr);if(se())return N("generating test challenge",{test:se()}),Co(typeof se()!="boolean"?+se():void 0);{if(!o()&&p){const $=p.getAttribute("action");$!=null&&$.includes("/form/")&&o($+"/altcha")}if(!o())throw new Error("Attribute challengeurl not set.");N("fetching challenge from",o());const u={headers:q()!==!1?{"x-altcha-spam-filter":"1"}:{}},_=await Nn()(o(),u);if(!_||!(_ instanceof Response))throw new Error("Fetch function did not return a response.");if(_.status!==200)throw new Error(`Server responded with ${_.status}.`);const y=_.headers.get("X-Altcha-Config"),L=await _.json(),x=new URLSearchParams((n=L.salt.split("?"))==null?void 0:n[1]),b=x.get("expires")||x.get("expire");if(b){const $=new Date(+b*1e3),xe=isNaN($.getTime())?0:$.getTime()-Date.now();xe>0&&nr(xe)}if(y)try{const $=JSON.parse(y);$&&typeof $=="object"&&("sentinel"in $?alert("This version of the widget is not compatible with Sentinel. Upgrade to version 2.x.x."):($.verifyurl&&($.verifyurl=new URL($.verifyurl,new URL(o())).toString()),Hn($)))}catch($){N("unable to configure from X-Altcha-Config",$)}return L}}function Go(n){var _;const u=p==null?void 0:p.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((_=u==null?void 0:u.value)==null?void 0:_.slice(u.value.indexOf("@")))||void 0}function Nn(){let n=fetch;if(l())if(N("using customfetch"),typeof l()=="string"){if(n=globalThis[l()]||null,!n)throw new Error(`Custom fetch function not found: ${l()}`)}else n=l();return n}function Zo(){return q()==="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 q()=="object"?q():{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 Jo(n){return[...(p==null?void 0:p.querySelectorAll(n!=null&&n.length?n.map(_=>`input[name="${_}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((_,y)=>{const L=y.name,x=y.value;return L&&x&&(_[L]=/\n/.test(x)?x.replace(new RegExp("(?<!\\r)\\n","g"),`\r
|
|
4
|
-
`):x),_},{})}function Ko(){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:c(Z),clarify:vt,dispatch:dt,getConfiguration:Wn,getFloatingAnchor:Yn,getState:Gn,log:N,reset:_t,solve:qn,setState:qe,setFloatingAnchor:Jn,verify:De}))}function N(...n){(s()||n.some(u=>u instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${G()}]`,...n)}function zo(){[w.UNVERIFIED,w.ERROR,w.EXPIRED].includes(c(T))?q()!==!1&&(p==null?void 0:p.reportValidity())===!1?F(Xe,!1):V()?vt():De():F(Xe,!0)}function Ln(n){const u=n.target;v()&&u&&!c(Z).contains(u)&&(c(T)===w.VERIFIED&&m()===!1||c(T)===w.VERIFIED&&m()==="focus"&&!(p!=null&&p.matches(":focus-within"))||r()==="off"&&c(T)===w.UNVERIFIED)&&Zn()}function Dn(){v()&&c(T)!==w.UNVERIFIED&>()}function Xo(n){for(const u of Le)typeof u.onErrorChange=="function"&&u.onErrorChange(c(et))}function Pn(n){c(T)===w.UNVERIFIED?De():v()&&m()==="focus"&&c(T)===w.VERIFIED&&ir()}function On(n){p&&r()==="onsubmit"?c(T)===w.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),De().then(()=>{p==null||p.requestSubmit()})):c(T)!==w.VERIFIED&&(n.preventDefault(),n.stopPropagation(),c(T)===w.VERIFYING&&Mn()):p&&v()&&r()==="off"&&c(T)===w.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),ir())}function Fn(){_t()}function Mn(){c(T)===w.VERIFYING&&c(fe).waitAlert&&alert(c(fe).waitAlert)}function Qo(n){for(const u of Le)typeof u.onStateChange=="function"&&u.onStateChange(c(T));v()&&c(T)!==w.UNVERIFIED&&requestAnimationFrame(()=>{gt()}),F(Xe,c(T)===w.VERIFIED)}function Un(){v()&>()}function jn(n){return JSON.parse(n)}async function ea(n){if(!Ne())throw new Error("Attribute verifyurl not set.");N("requesting server verification from",Ne());const u={payload:n};if(q()!==!1){const{blockedCountries:L,classifier:x,disableRules:b,email:$,expectedLanguages:xe,expectedCountries:lr,fields:pt,ipAddress:wt,text:ha,timeZone:ii}=Zo();u.blockedCountries=L,u.classifier=x,u.disableRules=b,u.email=$===!1?void 0:Go($),u.expectedCountries=lr,u.expectedLanguages=xe||(An?[An]:void 0),u.fields=pt===!1?void 0:Jo(pt),u.ipAddress=wt===!1?void 0:wt||"auto",u.text=ha,u.timeZone=ii===!1?void 0:ii||Ro()}const _=await Nn()(Ne(),{body:JSON.stringify(u),headers:{"content-type":"application/json"},method:"POST"});if(!_||!(_ instanceof Response))throw new Error("Fetch function did not return a response.");if(_.status!==200)throw new Error(`Server responded with ${_.status}.`);const y=await _.json();if(y!=null&&y.payload&&F(Be,y.payload,!0),dt("serververification",y),i()&&y.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}function nr(n){N("expire",n),pe&&(clearTimeout(pe),pe=null),n<1?Tn():pe=setTimeout(Tn,n)}function Vn(n){N("floating",n),v()!==n&&(c(Z).style.left="",c(Z).style.top=""),v(n===!0||n===""?"auto":n===!1||n==="false"?void 0:v()),v()?(r()||r("onsubmit"),document.addEventListener("scroll",Dn),document.addEventListener("click",Ln),window.addEventListener("resize",Un)):r()==="onsubmit"&&r(void 0)}function Bn(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(!$n.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${$n.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 qn(n){let u=null;if("Worker"in window){try{u=await ta(n,n.maxNumber||n.maxnumber||B())}catch(_){N(_)}if((u==null?void 0:u.number)!==void 0||"obfuscated"in n)return{data:n,solution:u}}if("obfuscated"in n){const _=await To(n.obfuscated,n.key,n.maxNumber||n.maxnumber);return{data:n,solution:await _.promise}}return{data:n,solution:await Ao(n.challenge,n.salt,n.algorithm,n.maxNumber||n.maxnumber||B()).promise}}async function ta(n,u=typeof se()=="number"?se():n.maxNumber||n.maxnumber||B(),_=Math.ceil(ze())){const y=[];_=Math.min(16,u,Math.max(1,_));for(let b=0;b<_;b++)y.push(altchaCreateWorker(ct()));const L=Math.ceil(u/_),x=await Promise.all(y.map((b,$)=>{const xe=$*L;return new Promise(lr=>{b.addEventListener("message",pt=>{if(pt.data)for(const wt of y)wt!==b&&wt.postMessage({type:"abort"});lr(pt.data)}),b.postMessage({payload:n,max:xe+L,start:xe,type:"work"})})}));for(const b of y)b.terminate();return x.find(b=>!!b)||null}async function vt(){if(!V()){qe(w.ERROR);return}const n=Le.find(u=>u.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){qe(w.ERROR),N("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in n&&typeof n.clarify=="function")return n.clarify()}function Hn(n){n.obfuscated!==void 0&&V(n.obfuscated),n.auto!==void 0&&(r(n.auto),r()==="onload"&&(V()?vt():De())),n.blockspam!==void 0&&i(!!n.blockspam),n.customfetch!==void 0&&l(n.customfetch),n.floatinganchor!==void 0&&h(n.floatinganchor),n.delay!==void 0&&f(n.delay),n.floatingoffset!==void 0&&g(n.floatingoffset),n.floating!==void 0&&Vn(n.floating),n.expire!==void 0&&(nr(n.expire),d(n.expire)),n.challenge&&(a(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),Bn(c(rr))),n.challengeurl!==void 0&&o(n.challengeurl),n.debug!==void 0&&s(!!n.debug),n.hidefooter!==void 0&&C(!!n.hidefooter),n.hidelogo!==void 0&&D(!!n.hidelogo),n.maxnumber!==void 0&&B(+n.maxnumber),n.mockerror!==void 0&&X(!!n.mockerror),n.name!==void 0&&G(n.name),n.refetchonexpire!==void 0&&M(!!n.refetchonexpire),n.spamfilter!==void 0&&q(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&Ee(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&se(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&Ne(n.verifyurl),n.workers!==void 0&&ze(+n.workers),n.workerurl!==void 0&&ct(n.workerurl)}function Wn(){return{auto:r(),blockspam:i(),challengeurl:o(),debug:s(),delay:f(),expire:d(),floating:v(),floatinganchor:h(),floatingoffset:g(),hidefooter:C(),hidelogo:D(),name:G(),maxnumber:B(),mockerror:X(),obfuscated:V(),refetchonexpire:M(),spamfilter:q(),strings:c(fe),test:se(),verifyurl:Ne(),workers:ze(),workerurl:ct()}}function Yn(){return Qe}function ra(n){return Le.find(u=>u.constructor.pluginName===n)}function Gn(){return c(T)}function Zn(){c(Z).style.display="none"}function gt(n=20){if(c(Z))if(Qe||(Qe=(h()?document.querySelector(h()):p==null?void 0:p.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||p),Qe){const u=parseInt(g(),10)||12,_=Qe.getBoundingClientRect(),y=c(Z).getBoundingClientRect(),L=document.documentElement.clientHeight,x=document.documentElement.clientWidth,b=v()==="auto"?_.bottom+y.height+u+n>L:v()==="top",$=Math.max(n,Math.min(x-n-y.width,_.left+_.width/2-y.width/2));if(b?c(Z).style.top=`${_.top-(y.height+u)}px`:c(Z).style.top=`${_.bottom+u}px`,c(Z).style.left=`${$}px`,c(Z).setAttribute("data-floating",b?"top":"bottom"),c(ht)){const xe=c(ht).getBoundingClientRect();c(ht).style.left=_.left-$+_.width/2-xe.width/2+"px"}}else N("unable to find floating anchor element")}function _t(n=w.UNVERIFIED,u=null){pe&&(clearTimeout(pe),pe=null),F(Xe,!1),F(Be,null),qe(n,u)}function Jn(n){Qe=n}function qe(n,u=null){F(T,n,!0),F(et,u,!0),dt("statechange",{payload:c(Be),state:c(T)})}function ir(){c(Z).style.display="block",v()&>()}async function De(){return _t(w.VERIFYING),await new Promise(n=>setTimeout(n,f()||0)),Yo().then(n=>(Bn(n),N("challenge",n),qn(n))).then(({data:n,solution:u})=>{if(N("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 ea(Sn(n,u));F(Be,Sn(n,u),!0),N("payload",c(Be))}else throw N("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}).then(()=>{qe(w.VERIFIED),N("verified"),Xi().then(()=>{dt("verified",{payload:c(Be)})})}).catch(n=>{N(n),qe(w.ERROR,n.message)})}var Kn=Bo(),zn=kr(Kn);uo(zn,t,"default",{});var mt=be(zn,2),or=re(mt),Xn=re(or);{var na=n=>{var u=No();ae(n,u)};Te(Xn,n=>{c(T)===w.VERIFYING&&n(na)})}var Ft=be(Xn,2);let Qn;var tt=re(Ft);dn(tt),tt.__change=zo,te(Ft);var ar=be(Ft,2),ia=re(ar);{var oa=n=>{var u=Lo(),_=kr(u),y=re(_);Ke(y,()=>c(fe).verified),te(_);var L=be(_,2);dn(L),Ue(()=>{de(L,"name",G()),_o(L,c(Be))}),ae(n,u)},aa=(n,u)=>{{var _=L=>{var x=Do(),b=re(x);Ke(b,()=>c(fe).verifying),te(x),ae(L,x)},y=L=>{var x=Po(),b=re(x);Ke(b,()=>c(fe).label),te(x),Ue(()=>de(x,"for",c(In))),ae(L,x)};Te(n,L=>{c(T)===w.VERIFYING?L(_):L(y,!1)},u)}};Te(ia,n=>{c(T)===w.VERIFIED?n(oa):n(aa,!1)})}te(ar);var la=be(ar,2);{var sa=n=>{var u=Oo(),_=re(u);de(_,"href",Cn),te(u),Ue(()=>de(_,"aria-label",c(fe).ariaLinkLabel)),ae(n,u)};Te(la,n=>{(D()!==!0||c(tr))&&n(sa)})}te(or);var ei=be(or,2);{var fa=n=>{var u=Uo(),_=be(re(u),2);{var y=x=>{var b=Fo(),$=re(b);Ke($,()=>c(fe).expired),te(b),Ue(()=>de(b,"title",c(et))),ae(x,b)},L=x=>{var b=Mo(),$=re(b);Ke($,()=>c(fe).error),te(b),Ue(()=>de(b,"title",c(et))),ae(x,b)};Te(_,x=>{c(T)===w.EXPIRED?x(y):x(L,!1)})}te(u),ae(n,u)};Te(ei,n=>{(c(et)||c(T)===w.EXPIRED)&&n(fa)})}var ti=be(ei,2);{var ua=n=>{var u=jo(),_=re(u),y=re(_);Ke(y,()=>c(fe).footer),te(_),te(u),ae(n,u)};Te(ti,n=>{c(fe).footer&&(C()!==!0||c(tr))&&n(ua)})}var ca=be(ti,2);{var da=n=>{var u=Vo();_n(u,_=>F(ht,_),()=>c(ht)),ae(n,u)};Te(ca,n=>{v()&&n(da)})}return te(mt),_n(mt,n=>F(Z,n),()=>c(Z)),Ue(n=>{de(mt,"data-state",c(T)),de(mt,"data-floating",v()),Qn=ho(Ft,1,"altcha-checkbox",null,Qn,n),de(tt,"id",c(In)),tt.required=r()!=="onsubmit"&&(!v()||r()!=="off")},[()=>({"altcha-hidden":c(T)===w.VERIFYING})]),oo("invalid",tt,Mn),po(tt,()=>c(Xe),n=>F(Xe,n)),ae(e,Kn),rn({clarify:vt,configure:Hn,getConfiguration:Wn,getFloatingAnchor:Yn,getPlugin:ra,getState:Gn,hide:Zn,repositionFloating:gt,reset:_t,setFloatingAnchor:Jn,setState:qe,show:ir,verify:De,get auto(){return r()},set auto(n=void 0){r(n),E()},get blockspam(){return i()},set blockspam(n=void 0){i(n),E()},get challengeurl(){return o()},set challengeurl(n=void 0){o(n),E()},get challengejson(){return a()},set challengejson(n=void 0){a(n),E()},get customfetch(){return l()},set customfetch(n=void 0){l(n),E()},get debug(){return s()},set debug(n=!1){s(n),E()},get delay(){return f()},set delay(n=0){f(n),E()},get expire(){return d()},set expire(n=void 0){d(n),E()},get floating(){return v()},set floating(n=void 0){v(n),E()},get floatinganchor(){return h()},set floatinganchor(n=void 0){h(n),E()},get floatingoffset(){return g()},set floatingoffset(n=void 0){g(n),E()},get floatingpersist(){return m()},set floatingpersist(n=!1){m(n),E()},get hidefooter(){return C()},set hidefooter(n=!1){C(n),E()},get hidelogo(){return D()},set hidelogo(n=!1){D(n),E()},get id(){return j()},set id(n=void 0){j(n),E()},get name(){return G()},set name(n="altcha"){G(n),E()},get maxnumber(){return B()},set maxnumber(n=1e6){B(n),E()},get mockerror(){return X()},set mockerror(n=!1){X(n),E()},get obfuscated(){return V()},set obfuscated(n=void 0){V(n),E()},get plugins(){return Ve()},set plugins(n=void 0){Ve(n),E()},get refetchonexpire(){return M()},set refetchonexpire(n=!0){M(n),E()},get spamfilter(){return q()},set spamfilter(n=!1){q(n),E()},get strings(){return Ee()},set strings(n=void 0){Ee(n),E()},get test(){return se()},set test(n=!1){se(n),E()},get verifyurl(){return Ne()},set verifyurl(n=void 0){Ne(n),E()},get workers(){return ze()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){ze(n),E()},get workerurl(){return ct()},set workerurl(n=void 0){ct(n),E()}})}ao(["change"]),customElements.define("altcha-widget",$o(En,{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));const qo=`.altcha {
|
|
5
|
-
background: var(--altcha-color-base, transparent);
|
|
6
|
-
border: var(--altcha-border-width, 1px) solid
|
|
7
|
-
var(--altcha-color-border, #a0a0a0);
|
|
8
|
-
border-radius: var(--altcha-border-radius, 3px);
|
|
9
|
-
color: var(--altcha-color-text, currentColor);
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
max-width: var(--altcha-max-width, 260px);
|
|
13
|
-
position: relative;
|
|
14
|
-
text-align: left;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.altcha:focus-within {
|
|
18
|
-
border-color: var(--altcha-color-border-focus, currentColor);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.altcha[data-floating] {
|
|
22
|
-
background: var(--altcha-color-base, white);
|
|
23
|
-
display: none;
|
|
24
|
-
filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.2));
|
|
25
|
-
left: -100%;
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: -100%;
|
|
28
|
-
width: var(--altcha-max-width, 260px);
|
|
29
|
-
z-index: 999999;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.altcha[data-floating="top"] .altcha-anchor-arrow {
|
|
33
|
-
border-bottom-color: transparent;
|
|
34
|
-
border-top-color: var(--altcha-color-border, #a0a0a0);
|
|
35
|
-
bottom: -12px;
|
|
36
|
-
top: auto;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.altcha[data-floating="bottom"]:focus-within::after {
|
|
40
|
-
border-bottom-color: var(--altcha-color-border-focus, currentColor);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.altcha[data-floating="top"]:focus-within::after {
|
|
44
|
-
border-top-color: var(--altcha-color-border-focus, currentColor);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.altcha[data-floating]:not([data-state="unverified"]) {
|
|
48
|
-
display: block;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.altcha-anchor-arrow {
|
|
52
|
-
border: 6px solid transparent;
|
|
53
|
-
border-bottom-color: var(--altcha-color-border, #a0a0a0);
|
|
54
|
-
content: '';
|
|
55
|
-
height: 0;
|
|
56
|
-
left: 12px;
|
|
57
|
-
position: absolute;
|
|
58
|
-
top: -12px;
|
|
59
|
-
width: 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.altcha-main {
|
|
63
|
-
align-items: center;
|
|
64
|
-
display: flex;
|
|
65
|
-
gap: 0.4rem;
|
|
66
|
-
padding: 0.7rem;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.altcha-label {
|
|
70
|
-
flex-grow: 1;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.altcha-label label {
|
|
74
|
-
cursor: pointer;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.altcha-logo {
|
|
78
|
-
color: currentColor;
|
|
79
|
-
opacity: 0.3;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.altcha-logo:hover {
|
|
83
|
-
opacity: 1;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.altcha-error {
|
|
87
|
-
color: var(--altcha-color-error-text, #f23939);
|
|
88
|
-
display: flex;
|
|
89
|
-
font-size: 0.85rem;
|
|
90
|
-
gap: 0.3rem;
|
|
91
|
-
padding: 0 0.7rem 0.7rem;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.altcha-footer {
|
|
95
|
-
align-items: center;
|
|
96
|
-
background-color: var(--altcha-color-footer-bg, transparent);
|
|
97
|
-
display: flex;
|
|
98
|
-
font-size: 0.75rem;
|
|
99
|
-
opacity: 0.4;
|
|
100
|
-
padding: 0.2rem 0.7rem;
|
|
101
|
-
text-align: right;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.altcha-footer:hover {
|
|
105
|
-
opacity: 1;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.altcha-footer > *:first-child {
|
|
109
|
-
flex-grow: 1;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.altcha-footer a {
|
|
113
|
-
color: currentColor;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.altcha-checkbox {
|
|
117
|
-
display: flex;
|
|
118
|
-
align-items: center;
|
|
119
|
-
height: 24px;
|
|
120
|
-
width: 24px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.altcha-checkbox input {
|
|
124
|
-
width: 18px;
|
|
125
|
-
height: 18px;
|
|
126
|
-
margin: 0;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.altcha-hidden {
|
|
130
|
-
display: none;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.altcha-spinner {
|
|
134
|
-
animation: altcha-spinner 0.75s infinite linear;
|
|
135
|
-
transform-origin: center;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
@keyframes altcha-spinner {
|
|
139
|
-
100% {
|
|
140
|
-
transform: rotate(360deg);
|
|
141
|
-
}
|
|
142
|
-
}`;function Ho(e,t="__altcha-css"){if(!document.getElementById(t)){const r=document.createElement("style");r.id=t,r.textContent=e,document.head.appendChild(r)}}globalThis.altchaCreateWorker=e=>e?new Worker(new URL(e)):new bt,globalThis.altchaPlugins=globalThis.altchaPlugins||[],Ho(qo),k.Altcha=En,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(k,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(k=typeof globalThis<"u"?globalThis:k||self,A(k.altcha={}))})(this,function(k){"use strict";var ga=Object.defineProperty;var oi=k=>{throw TypeError(k)};var _a=(k,A,U)=>A in k?ga(k,A,{enumerable:!0,configurable:!0,writable:!0,value:U}):k[A]=U;var he=(k,A,U)=>_a(k,typeof A!="symbol"?A+"":A,U),ai=(k,A,U)=>A.has(k)||oi("Cannot "+U);var Q=(k,A,U)=>(ai(k,A,"read from private field"),U?U.call(k):A.get(k)),sr=(k,A,U)=>A.has(k)?oi("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(k):A.set(k,U),fr=(k,A,U,bt)=>(ai(k,A,"write to private field"),bt?bt.call(k,U):A.set(k,U),U);var xn,ye,le;const A=`(function(){"use strict";const d=new TextEncoder;function p(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function b(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return p(await crypto.subtle.digest(r.toUpperCase(),d.encode(e+t)))}function w(e,t,r="SHA-256",n=1e6,s=0){const o=new AbortController,a=Date.now();return{promise:(async()=>{for(let c=s;c<=n;c+=1){if(o.signal.aborted)return null;if(await b(t,c,r)===e)return{number:c,took:Date.now()-a}}return null})(),controller:o}}function h(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function g(e,t=12){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e%256,e=Math.floor(e/256);return r}async function m(e,t="",r=1e6,n=0){const s="AES-GCM",o=new AbortController,a=Date.now(),l=async()=>{for(let u=n;u<=r;u+=1){if(o.signal.aborted||!c||!y)return null;try{const f=await crypto.subtle.decrypt({name:s,iv:g(u)},c,y);if(f)return{clearText:new TextDecoder().decode(f),took:Date.now()-a}}catch{}}return null};let c=null,y=null;try{y=h(e);const u=await crypto.subtle.digest("SHA-256",d.encode(t));c=await crypto.subtle.importKey("raw",u,s,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:l(),controller:o}}let i;onmessage=async e=>{const{type:t,payload:r,start:n,max:s}=e.data;let o=null;if(t==="abort")i==null||i.abort(),i=void 0;else if(t==="work"){if("obfuscated"in r){const{key:a,obfuscated:l}=r||{};o=await m(l,a,s,n)}else{const{algorithm:a,challenge:l,salt:c}=r||{};o=w(l,c,a,s,n)}i=o.controller,o.promise.then(a=>{self.postMessage(a&&{...a,worker:!0})})}}})();
|
|
2
|
+
`,U=typeof self<"u"&&self.Blob&&new Blob([A],{type:"text/javascript;charset=utf-8"});function bt(e){let t;try{if(t=U&&(self.URL||self.webkitURL).createObjectURL(U),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(A),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}const li="5";typeof window<"u"&&((xn=window.__svelte??(window.__svelte={})).v??(xn.v=new Set)).add(li);const si=1,fi=4,ui=8,ci=16,di=1,hi=2,Mt="[",ur="[!",cr="]",He={},J=Symbol(),vi="http://www.w3.org/1999/xhtml",dr=!1;function hr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var vr=Array.isArray,gi=Array.prototype.indexOf,_i=Array.from,yt=Object.keys,Et=Object.defineProperty,Pe=Object.getOwnPropertyDescriptor,mi=Object.getOwnPropertyDescriptors,pi=Object.prototype,wi=Array.prototype,gr=Object.getPrototypeOf,_r=Object.isExtensible;function mr(e){for(var t=0;t<e.length;t++)e[t]()}const ue=2,pr=4,xt=8,Ut=16,we=32,Oe=64,$t=128,ee=256,kt=512,K=1024,ve=2048,Fe=4096,We=8192,Ct=16384,bi=32768,jt=65536,yi=1<<19,wr=1<<20,Vt=1<<21,rt=Symbol("$state"),br=Symbol("legacy props"),Ei=Symbol("");function xi(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function $i(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ki(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ci(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ai(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ri(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ii(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Si(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ti(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function At(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let P=!1;function Ye(e){P=e}let O;function $e(e){if(e===null)throw At(),He;return O=e}function Ge(){return $e(Ce(O))}function te(e){if(P){if(Ce(O)!==null)throw At(),He;O=e}}function Ni(){for(var e=0,t=O;;){if(t.nodeType===8){var r=t.data;if(r===cr){if(e===0)return t;e-=1}else(r===Mt||r===ur)&&(e+=1)}var i=Ce(t);t.remove(),t=i}}let Li=!1;function ke(e){if(typeof e!="object"||e===null||rt in e)return e;const t=gr(e);if(t!==pi&&t!==wi)return e;var r=new Map,i=vr(e),o=z(0),a=R,l=s=>{var f=R;_e(a);var d=s();return _e(f),d};return i&&r.set("length",z(e.length)),new Proxy(e,{defineProperty(s,f,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Ii();var v=r.get(f);return v===void 0?(v=l(()=>z(d.value)),r.set(f,v)):F(v,l(()=>ke(d.value))),!0},deleteProperty(s,f){var d=r.get(f);if(d===void 0)f in s&&(r.set(f,l(()=>z(J))),Bt(o));else{if(i&&typeof f=="string"){var v=r.get("length"),h=Number(f);Number.isInteger(h)&&h<v.v&&F(v,h)}F(d,J),Bt(o)}return!0},get(s,f,d){var m;if(f===rt)return e;var v=r.get(f),h=f in s;if(v===void 0&&(!h||(m=Pe(s,f))!=null&&m.writable)&&(v=l(()=>z(ke(h?s[f]:J))),r.set(f,v)),v!==void 0){var g=c(v);return g===J?void 0:g}return Reflect.get(s,f,d)},getOwnPropertyDescriptor(s,f){var d=Reflect.getOwnPropertyDescriptor(s,f);if(d&&"value"in d){var v=r.get(f);v&&(d.value=c(v))}else if(d===void 0){var h=r.get(f),g=h==null?void 0:h.v;if(h!==void 0&&g!==J)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return d},has(s,f){var g;if(f===rt)return!0;var d=r.get(f),v=d!==void 0&&d.v!==J||Reflect.has(s,f);if(d!==void 0||I!==null&&(!v||(g=Pe(s,f))!=null&&g.writable)){d===void 0&&(d=l(()=>z(v?ke(s[f]):J)),r.set(f,d));var h=c(d);if(h===J)return!1}return v},set(s,f,d,v){var B;var h=r.get(f),g=f in s;if(i&&f==="length")for(var m=d;m<h.v;m+=1){var C=r.get(m+"");C!==void 0?F(C,J):m in s&&(C=l(()=>z(J)),r.set(m+"",C))}h===void 0?(!g||(B=Pe(s,f))!=null&&B.writable)&&(h=l(()=>z(void 0)),F(h,l(()=>ke(d))),r.set(f,h)):(g=h.v!==J,F(h,l(()=>ke(d))));var D=Reflect.getOwnPropertyDescriptor(s,f);if(D!=null&&D.set&&D.set.call(v,d),!g){if(i&&typeof f=="string"){var j=r.get("length"),G=Number(f);Number.isInteger(G)&&G>=j.v&&F(j,G+1)}Bt(o)}return!0},ownKeys(s){c(o);var f=Reflect.ownKeys(s).filter(h=>{var g=r.get(h);return g===void 0||g.v!==J});for(var[d,v]of r)v.v!==J&&!(d in s)&&f.push(d);return f},setPrototypeOf(){Si()}})}function Bt(e,t=1){F(e,e.v+t)}var yr,Er,xr,$r;function qt(){if(yr===void 0){yr=window,Er=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;xr=Pe(t,"firstChild").get,$r=Pe(t,"nextSibling").get,_r(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),_r(r)&&(r.__t=void 0)}}function Ht(e=""){return document.createTextNode(e)}function ie(e){return xr.call(e)}function Ce(e){return $r.call(e)}function re(e,t){if(!P)return ie(e);var r=ie(O);return r===null&&(r=O.appendChild(Ht())),$e(r),r}function kr(e,t){if(!P){var r=ie(e);return r instanceof Comment&&r.data===""?Ce(r):r}return O}function be(e,t=1,r=!1){let i=P?O:e;for(var o;t--;)o=i,i=Ce(i);if(!P)return i;var a=i==null?void 0:i.nodeType;if(r&&a!==3){var l=Ht();return i===null?o==null||o.after(l):i.before(l),$e(l),l}return $e(i),i}function Di(e){e.textContent=""}function Cr(e){return e===this.v}function Pi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ar(e){return!Pi(e,this.v)}function Wt(e){var t=ue|ve,r=R!==null&&(R.f&ue)!==0?R:null;return I===null||r!==null&&(r.f&ee)!==0?t|=ee:I.f|=wr,{ctx:Y,deps:null,effects:null,equals:Cr,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??I}}function nt(e){const t=Wt(e);return Hr(t),t}function Rr(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Ae(t[r])}}function Oi(e){for(var t=e.parent;t!==null;){if((t.f&ue)===0)return t;t=t.parent}return null}function Ir(e){var t,r=I;Re(Oi(e));try{Rr(e),t=Jr(e)}finally{Re(r)}return t}function Sr(e){var t=Ir(e),r=(Ie||(e.f&ee)!==0)&&e.deps!==null?Fe:K;ce(e,r),e.equals(t)||(e.v=t,e.wv=Yr())}function Fi(e){I===null&&R===null&&ki(),R!==null&&(R.f&ee)!==0&&I===null&&$i(),at&&xi()}function Mi(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,i=!0){var o=I,a={ctx:Y,deps:null,nodes_start:null,nodes_end:null,f:e|ve,first:null,fn:t,last:null,next:null,parent:o,prev:null,teardown:null,transitions:null,wv:0};if(r)try{zt(a),a.f|=bi}catch(f){throw Ae(a),f}else t!==null&&Dt(a);var l=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&(wr|$t))===0;if(!l&&i&&(o!==null&&Mi(a,o),R!==null&&(R.f&ue)!==0)){var s=R;(s.effects??(s.effects=[])).push(a)}return a}function Tr(e){const t=Me(xt,null,!1);return ce(t,K),t.teardown=e,t}function Yt(e){Fi();var t=I!==null&&(I.f&we)!==0&&Y!==null&&!Y.m;if(t){var r=Y;(r.e??(r.e=[])).push({fn:e,effect:I,reaction:R})}else{var i=Gt(e);return i}}function Ui(e){const t=Me(Oe,e,!0);return()=>{Ae(t)}}function ji(e){const t=Me(Oe,e,!0);return(r={})=>new Promise(i=>{r.outro?Kt(t,()=>{Ae(t),i(void 0)}):(Ae(t),i(void 0))})}function Gt(e){return Me(pr,e,!1)}function Zt(e){return Me(xt,e,!0)}function Ue(e,t=[],r=Wt){const i=t.map(r);return Nr(()=>e(...i.map(c)))}function Nr(e,t=0){return Me(xt|Ut|t,e,!0)}function Jt(e,t=!0){return Me(xt|we,e,!0,t)}function Lr(e){var t=e.teardown;if(t!==null){const r=at,i=R;qr(!0),_e(null);try{t.call(null)}finally{qr(r),_e(i)}}}function Dr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var i=r.next;(r.f&Oe)!==0?r.parent=null:Ae(r,t),r=i}}function Vi(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&we)===0&&Ae(t),t=r}}function Ae(e,t=!0){var r=!1;(t||(e.f&yi)!==0)&&e.nodes_start!==null&&(Pr(e.nodes_start,e.nodes_end),r=!0),Dr(e,t&&!r),Lt(e,0),ce(e,Ct);var i=e.transitions;if(i!==null)for(const a of i)a.stop();Lr(e);var o=e.parent;o!==null&&o.first!==null&&Or(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function Pr(e,t){for(;e!==null;){var r=e===t?null:Ce(e);e.remove(),e=r}}function Or(e){var t=e.parent,r=e.prev,i=e.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=r))}function Kt(e,t){var r=[];Fr(e,r,!0),Bi(r,()=>{Ae(e),t&&t()})}function Bi(e,t){var r=e.length;if(r>0){var i=()=>--r||t();for(var o of e)o.out(i)}else t()}function Fr(e,t,r){if((e.f&We)===0){if(e.f^=We,e.transitions!==null)for(const l of e.transitions)(l.is_global||r)&&t.push(l);for(var i=e.first;i!==null;){var o=i.next,a=(i.f&jt)!==0||(i.f&we)!==0;Fr(i,t,a?r:!1),i=o}}}function Mr(e){Ur(e,!0)}function Ur(e,t){if((e.f&We)!==0){e.f^=We,(e.f&K)===0&&(e.f^=K),st(e)&&(ce(e,ve),Dt(e));for(var r=e.first;r!==null;){var i=r.next,o=(r.f&jt)!==0||(r.f&we)!==0;Ur(r,o?t:!1),r=i}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}const qi=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let it=[],ot=[];function jr(){var e=it;it=[],mr(e)}function Vr(){var e=ot;ot=[],mr(e)}function Br(e){it.length===0&&queueMicrotask(jr),it.push(e)}function Hi(e){ot.length===0&&qi(Vr),ot.push(e)}function Wi(){it.length>0&&jr(),ot.length>0&&Vr()}let Rt=!1,It=!1,St=null,je=!1,at=!1;function qr(e){at=e}let lt=[],ma=[],R=null,ge=!1;function _e(e){R=e}let I=null;function Re(e){I=e}let H=null;function Hr(e){R!==null&&R.f&Vt&&(H===null?H=[e]:H.push(e))}let W=null,ne=0,oe=null;function Yi(e){oe=e}let Wr=1,Tt=0,Ie=!1;function Yr(){return++Wr}function st(e){var h;var t=e.f;if((t&ve)!==0)return!0;if((t&Fe)!==0){var r=e.deps,i=(t&ee)!==0;if(r!==null){var o,a,l=(t&kt)!==0,s=i&&I!==null&&!Ie,f=r.length;if(l||s){var d=e,v=d.parent;for(o=0;o<f;o++)a=r[o],(l||!((h=a==null?void 0:a.reactions)!=null&&h.includes(d)))&&(a.reactions??(a.reactions=[])).push(d);l&&(d.f^=kt),s&&v!==null&&(v.f&ee)===0&&(d.f^=ee)}for(o=0;o<f;o++)if(a=r[o],st(a)&&Sr(a),a.wv>e.wv)return!0}(!i||I!==null&&!Ie)&&ce(e,K)}return!1}function Gi(e,t){for(var r=t;r!==null;){if((r.f&$t)!==0)try{r.fn(e);return}catch{r.f^=$t}r=r.parent}throw Rt=!1,e}function Gr(e){return(e.f&Ct)===0&&(e.parent===null||(e.parent.f&$t)===0)}function Nt(e,t,r,i){if(Rt){if(r===null&&(Rt=!1),Gr(t))throw e;return}if(r!==null&&(Rt=!0),Gi(e,t),Gr(t))throw e}function Zr(e,t,r=!0){var i=e.reactions;if(i!==null)for(var o=0;o<i.length;o++){var a=i[o];H!=null&&H.includes(e)||((a.f&ue)!==0?Zr(a,t,!1):t===a&&(r?ce(a,ve):(a.f&K)!==0&&ce(a,Fe),Dt(a)))}}function Jr(e){var m;var t=W,r=ne,i=oe,o=R,a=Ie,l=H,s=Y,f=ge,d=e.f;W=null,ne=0,oe=null,Ie=(d&ee)!==0&&(ge||!je||R===null),R=(d&(we|Oe))===0?e:null,H=null,en(e.ctx),ge=!1,Tt++,e.f|=Vt;try{var v=(0,e.fn)(),h=e.deps;if(W!==null){var g;if(Lt(e,ne),h!==null&&ne>0)for(h.length=ne+W.length,g=0;g<W.length;g++)h[ne+g]=W[g];else e.deps=h=W;if(!Ie)for(g=ne;g<h.length;g++)((m=h[g]).reactions??(m.reactions=[])).push(e)}else h!==null&&ne<h.length&&(Lt(e,ne),h.length=ne);if(nn()&&oe!==null&&!ge&&h!==null&&(e.f&(ue|Fe|ve))===0)for(g=0;g<oe.length;g++)Zr(oe[g],e);return o!==null&&o!==e&&(Tt++,oe!==null&&(i===null?i=oe:i.push(...oe))),v}finally{W=t,ne=r,oe=i,R=o,Ie=a,H=l,en(s),ge=f,e.f^=Vt}}function Zi(e,t){let r=t.reactions;if(r!==null){var i=gi.call(r,e);if(i!==-1){var o=r.length-1;o===0?r=t.reactions=null:(r[i]=r[o],r.pop())}}r===null&&(t.f&ue)!==0&&(W===null||!W.includes(t))&&(ce(t,Fe),(t.f&(ee|kt))===0&&(t.f^=kt),Rr(t),Lt(t,0))}function Lt(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)Zi(e,r[i])}function zt(e){var t=e.f;if((t&Ct)===0){ce(e,K);var r=I,i=Y,o=je;I=e,je=!0;try{(t&Ut)!==0?Vi(e):Dr(e),Lr(e);var a=Jr(e);e.teardown=typeof a=="function"?a:null,e.wv=Wr;var l=e.deps,s;dr&&Li&&e.f&ve}catch(f){Nt(f,e,r,i||e.ctx)}finally{je=o,I=r}}}function Ji(){try{Ci()}catch(e){if(St!==null)Nt(e,St,null);else throw e}}function Kr(){var e=je;try{var t=0;for(je=!0;lt.length>0;){t++>1e3&&Ji();var r=lt,i=r.length;lt=[];for(var o=0;o<i;o++){var a=zi(r[o]);Ki(a)}ft.clear()}}finally{It=!1,je=e,St=null}}function Ki(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var i=e[r];if((i.f&(Ct|We))===0)try{st(i)&&(zt(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?Or(i):i.fn=null))}catch(o){Nt(o,i,null,i.ctx)}}}function Dt(e){It||(It=!0,queueMicrotask(Kr));for(var t=St=e;t.parent!==null;){t=t.parent;var r=t.f;if((r&(Oe|we))!==0){if((r&K)===0)return;t.f^=K}}lt.push(t)}function zi(e){for(var t=[],r=e;r!==null;){var i=r.f,o=(i&(we|Oe))!==0,a=o&&(i&K)!==0;if(!a&&(i&We)===0){if((i&pr)!==0)t.push(r);else if(o)r.f^=K;else try{st(r)&&zt(r)}catch(f){Nt(f,r,null,r.ctx)}var l=r.first;if(l!==null){r=l;continue}}var s=r.parent;for(r=r.next;r===null&&s!==null;)r=s.next,s=s.parent}return t}function E(e){for(var t;;){if(Wi(),lt.length===0)return t;It=!0,Kr()}}async function Xi(){await Promise.resolve(),E()}function c(e){var t=e.f,r=(t&ue)!==0;if(R!==null&&!ge){if(!(H!=null&&H.includes(e))){var i=R.deps;e.rv<Tt&&(e.rv=Tt,W===null&&i!==null&&i[ne]===e?ne++:W===null?W=[e]:(!Ie||!W.includes(e))&&W.push(e))}}else if(r&&e.deps===null&&e.effects===null){var o=e,a=o.parent;a!==null&&(a.f&ee)===0&&(o.f^=ee)}return r&&(o=e,st(o)&&Sr(o)),at&&ft.has(e)?ft.get(e):e.v}function Ze(e){var t=ge;try{return ge=!0,e()}finally{ge=t}}const Qi=-7169;function ce(e,t){e.f=e.f&Qi|t}const ft=new Map;function zr(e,t){var r={f:0,v:e,reactions:null,equals:Cr,rv:0,wv:0};return r}function z(e,t){const r=zr(e);return Hr(r),r}function Xr(e,t=!1){const r=zr(e);return t||(r.equals=Ar),r}function F(e,t,r=!1){R!==null&&!ge&&nn()&&(R.f&(ue|Ut))!==0&&!(H!=null&&H.includes(e))&&Ti();let i=r?ke(t):t;return eo(e,i)}function eo(e,t){if(!e.equals(t)){var r=e.v;at?ft.set(e,t):ft.set(e,r),e.v=t,(e.f&ue)!==0&&((e.f&ve)!==0&&Ir(e),ce(e,(e.f&ee)===0?K:Fe)),e.wv=Yr(),Qr(e,ve),I!==null&&(I.f&K)!==0&&(I.f&(we|Oe))===0&&(oe===null?Yi([e]):oe.push(e))}return t}function Qr(e,t){var r=e.reactions;if(r!==null)for(var i=r.length,o=0;o<i;o++){var a=r[o],l=a.f;(l&ve)===0&&(ce(a,t),(l&(K|ee))!==0&&((l&ue)!==0?Qr(a,Fe):Dt(a)))}}let Y=null;function en(e){Y=e}function tn(e,t=!1,r){var i=Y={p:Y,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};Tr(()=>{i.d=!0})}function rn(e){const t=Y;if(t!==null){e!==void 0&&(t.x=e);const l=t.e;if(l!==null){var r=I,i=R;t.e=null;try{for(var o=0;o<l.length;o++){var a=l[o];Re(a.effect),_e(a.reaction),Gt(a.fn)}}finally{Re(r),_e(i)}}Y=t.p,t.m=!0}return e||{}}function nn(){return!0}const to=["touchstart","touchmove"];function ro(e){return to.includes(e)}let on=!1;function an(){on||(on=!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 ln(e){var t=R,r=I;_e(null),Re(null);try{return e()}finally{_e(t),Re(r)}}function no(e,t,r,i=r){e.addEventListener(t,()=>ln(r));const o=e.__on_r;o?e.__on_r=()=>{o(),i(!0)}:e.__on_r=()=>i(!0),an()}const sn=new Set,Xt=new Set;function io(e,t,r,i={}){function o(a){if(i.capture||ut.call(t,a),!a.cancelBubble)return ln(()=>r==null?void 0:r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Br(()=>{t.addEventListener(e,o,i)}):t.addEventListener(e,o,i),o}function oo(e,t,r,i,o){var a={capture:i,passive:o},l=io(e,t,r,a);(t===document.body||t===window||t===document)&&Tr(()=>{t.removeEventListener(e,l,a)})}function ao(e){for(var t=0;t<e.length;t++)sn.add(e[t]);for(var r of Xt)r(e)}function ut(e){var B;var t=this,r=t.ownerDocument,i=e.type,o=((B=e.composedPath)==null?void 0:B.call(e))||[],a=o[0]||e.target,l=0,s=e.__root;if(s){var f=o.indexOf(s);if(f!==-1&&(t===document||t===window)){e.__root=t;return}var d=o.indexOf(t);if(d===-1)return;f<=d&&(l=f)}if(a=o[l]||e.target,a!==t){Et(e,"currentTarget",{configurable:!0,get(){return a||r}});var v=R,h=I;_e(null),Re(null);try{for(var g,m=[];a!==null;){var C=a.assignedSlot||a.parentNode||a.host||null;try{var D=a["__"+i];if(D!=null&&(!a.disabled||e.target===a))if(vr(D)){var[j,...G]=D;j.apply(a,[e,...G])}else D.call(a,e)}catch(X){g?m.push(X):g=X}if(e.cancelBubble||C===t||C===null)break;a=C}if(g){for(let X of m)queueMicrotask(()=>{throw X});throw g}}finally{e.__root=t,delete e.currentTarget,_e(v),Re(h)}}}function Qt(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Se(e,t){var r=I;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function me(e,t){var r=(t&di)!==0,i=(t&hi)!==0,o,a=!e.startsWith("<!>");return()=>{if(P)return Se(O,null),O;o===void 0&&(o=Qt(a?e:"<!>"+e),r||(o=ie(o)));var l=i||Er?document.importNode(o,!0):o.cloneNode(!0);if(r){var s=ie(l),f=l.lastChild;Se(s,f)}else Se(l,l);return l}}function lo(e,t,r="svg"){var i=!e.startsWith("<!>"),o=`<${r}>${i?e:"<!>"+e}</${r}>`,a;return()=>{if(P)return Se(O,null),O;if(!a){var l=Qt(o),s=ie(l);a=ie(s)}var f=a.cloneNode(!0);return Se(f,f),f}}function ae(e,t){if(P){I.nodes_end=O,Ge();return}e!==null&&e.before(t)}function fn(e,t){return un(e,t)}function so(e,t){qt(),t.intro=t.intro??!1;const r=t.target,i=P,o=O;try{for(var a=ie(r);a&&(a.nodeType!==8||a.data!==Mt);)a=Ce(a);if(!a)throw He;Ye(!0),$e(a),Ge();const l=un(e,{...t,anchor:a});if(O===null||O.nodeType!==8||O.data!==cr)throw At(),He;return Ye(!1),l}catch(l){if(l===He)return t.recover===!1&&Ai(),qt(),Di(r),Ye(!1),fn(e,t);throw l}finally{Ye(i),$e(o)}}const Je=new Map;function un(e,{target:t,anchor:r,props:i={},events:o,context:a,intro:l=!0}){qt();var s=new Set,f=h=>{for(var g=0;g<h.length;g++){var m=h[g];if(!s.has(m)){s.add(m);var C=ro(m);t.addEventListener(m,ut,{passive:C});var D=Je.get(m);D===void 0?(document.addEventListener(m,ut,{passive:C}),Je.set(m,1)):Je.set(m,D+1)}}};f(_i(sn)),Xt.add(f);var d=void 0,v=ji(()=>{var h=r??t.appendChild(Ht());return Jt(()=>{if(a){tn({});var g=Y;g.c=a}o&&(i.$$events=o),P&&Se(h,null),d=e(h,i)||{},P&&(I.nodes_end=O),a&&rn()}),()=>{var C;for(var g of s){t.removeEventListener(g,ut);var m=Je.get(g);--m===0?(document.removeEventListener(g,ut),Je.delete(g)):Je.set(g,m)}Xt.delete(f),h!==r&&((C=h.parentNode)==null||C.removeChild(h))}});return er.set(d,v),d}let er=new WeakMap;function fo(e,t){const r=er.get(e);return r?(er.delete(e),r(t)):Promise.resolve()}function Te(e,t,[r,i]=[0,0]){P&&r===0&&Ge();var o=e,a=null,l=null,s=J,f=r>0?jt:0,d=!1;const v=(g,m=!0)=>{d=!0,h(m,g)},h=(g,m)=>{if(s===(s=g))return;let C=!1;if(P&&i!==-1){if(r===0){const j=o.data;j===Mt?i=0:j===ur?i=1/0:(i=parseInt(j.substring(1)),i!==i&&(i=s?1/0:-1))}const D=i>r;!!s===D&&(o=Ni(),$e(o),Ye(!1),C=!0,i=-1)}s?(a?Mr(a):m&&(a=Jt(()=>m(o))),l&&Kt(l,()=>{l=null})):(l?Mr(l):m&&(l=Jt(()=>m(o,[r+1,i]))),a&&Kt(a,()=>{a=null})),C&&Ye(!0)};Nr(()=>{d=!1,t(v),d||h(null,null)},f),P&&(o=O)}function Ke(e,t,r=!1,i=!1,o=!1){var a=e,l="";Ue(()=>{var s=I;if(l===(l=t()??"")){P&&Ge();return}if(s.nodes_start!==null&&(Pr(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),l!==""){if(P){O.data;for(var f=Ge(),d=f;f!==null&&(f.nodeType!==8||f.data!=="");)d=f,f=Ce(f);if(f===null)throw At(),He;Se(O,d),a=$e(f);return}var v=l+"";r?v=`<svg>${v}</svg>`:i&&(v=`<math>${v}</math>`);var h=Qt(v);if((r||i)&&(h=ie(h)),Se(ie(h),h.lastChild),r||i)for(;ie(h);)a.before(ie(h));else a.before(h)}})}function uo(e,t,r,i,o){var s;P&&Ge();var a=(s=t.$$slots)==null?void 0:s[r],l=!1;a===!0&&(a=t.children,l=!0),a===void 0||a(e,l?()=>i:i)}const cn=[...`
|
|
3
|
+
\r\f \v\uFEFF`];function co(e,t,r){var i=""+e;if(r){for(var o in r)if(r[o])i=i?i+" "+o:o;else if(i.length)for(var a=o.length,l=0;(l=i.indexOf(o,l))>=0;){var s=l+a;(l===0||cn.includes(i[l-1]))&&(s===i.length||cn.includes(i[s]))?i=(l===0?"":i.substring(0,l))+i.substring(s+1):l=s}}return i===""?null:i}function ho(e,t,r,i,o,a){var l=e.__className;if(P||l!==r||l===void 0){var s=co(r,i,a);(!P||s!==e.getAttribute("class"))&&(s==null?e.removeAttribute("class"):e.className=s),e.__className=r}else if(a&&o!==a)for(var f in a){var d=!!a[f];(o==null||d!==!!o[f])&&e.classList.toggle(f,d)}return a}const vo=Symbol("is custom element"),go=Symbol("is html");function dn(e){if(P){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;de(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var o=e.checked;de(e,"checked",null),e.checked=o}}};e.__on_r=r,Hi(r),an()}}function _o(e,t){var r=hn(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function de(e,t,r,i){var o=hn(e);P&&(o[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||o[t]!==(o[t]=r)&&(t==="loading"&&(e[Ei]=r),r==null?e.removeAttribute(t):typeof r!="string"&&mo(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function hn(e){return e.__attributes??(e.__attributes={[vo]:e.nodeName.includes("-"),[go]:e.namespaceURI===vi})}var vn=new Map;function mo(e){var t=vn.get(e.nodeName);if(t)return t;vn.set(e.nodeName,t=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=mi(i);for(var a in r)r[a].set&&t.push(a);i=gr(i)}return t}function po(e,t,r=t){no(e,"change",i=>{var o=i?e.defaultChecked:e.checked;r(o)}),(P&&e.defaultChecked!==e.checked||Ze(t)==null)&&r(e.checked),Zt(()=>{var i=t();e.checked=!!i})}function gn(e,t){return e===t||(e==null?void 0:e[rt])===t}function _n(e={},t,r,i){return Gt(()=>{var o,a;return Zt(()=>{o=a,a=[],Ze(()=>{e!==r(...a)&&(t(e,...a),o&&gn(r(...o),e)&&t(null,...o))})}),()=>{Br(()=>{a&&gn(r(...a),e)&&t(null,...a)})}}),e}function mn(e){Y===null&&hr(),Yt(()=>{const t=Ze(e);if(typeof t=="function")return t})}function wo(e){Y===null&&hr(),mn(()=>()=>Ze(e))}let Pt=!1;function bo(e){var t=Pt;try{return Pt=!1,[e(),Pt]}finally{Pt=t}}function pn(e){var t;return((t=e.ctx)==null?void 0:t.d)??!1}function S(e,t,r,i){var Ve;var o=(r&si)!==0,a=!0,l=(r&ui)!==0,s=(r&ci)!==0,f=!1,d;l?[d,f]=bo(()=>e[t]):d=e[t];var v=rt in e||br in e,h=l&&(((Ve=Pe(e,t))==null?void 0:Ve.set)??(v&&t in e&&(M=>e[t]=M)))||void 0,g=i,m=!0,C=!1,D=()=>(C=!0,m&&(m=!1,s?g=Ze(i):g=i),g);d===void 0&&i!==void 0&&(h&&a&&Ri(),d=D(),h&&h(d));var j;if(j=()=>{var M=e[t];return M===void 0?D():(m=!0,C=!1,M)},(r&fi)===0)return j;if(h){var G=e.$$legacy;return function(M,q){return arguments.length>0?((!q||G||f)&&h(q?j():M),M):j()}}var B=!1,X=Xr(d),V=Wt(()=>{var M=j(),q=c(X);return B?(B=!1,q):X.v=M});return l&&c(V),o||(V.equals=Ar),function(M,q){if(arguments.length>0){const Ee=q?c(V):l?ke(M):M;if(!V.equals(Ee)){if(B=!0,F(X,Ee),C&&g!==void 0&&(g=Ee),pn(V))return M;Ze(()=>c(V))}return M}return pn(V)?V.v:c(V)}}function yo(e){return new Eo(e)}class Eo{constructor(t){sr(this,ye);sr(this,le);var a;var r=new Map,i=(l,s)=>{var f=Xr(s);return r.set(l,f),f};const o=new Proxy({...t.props||{},$$events:{}},{get(l,s){return c(r.get(s)??i(s,Reflect.get(l,s)))},has(l,s){return s===br?!0:(c(r.get(s)??i(s,Reflect.get(l,s))),Reflect.has(l,s))},set(l,s,f){return F(r.get(s)??i(s,f),f),Reflect.set(l,s,f)}});fr(this,le,(t.hydrate?so:fn)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((a=t==null?void 0:t.props)!=null&&a.$$host)||t.sync===!1)&&E(),fr(this,ye,o.$$events);for(const l of Object.keys(Q(this,le)))l==="$set"||l==="$destroy"||l==="$on"||Et(this,l,{get(){return Q(this,le)[l]},set(s){Q(this,le)[l]=s},enumerable:!0});Q(this,le).$set=l=>{Object.assign(o,l)},Q(this,le).$destroy=()=>{fo(Q(this,le))}}$set(t){Q(this,le).$set(t)}$on(t,r){Q(this,ye)[t]=Q(this,ye)[t]||[];const i=(...o)=>r.call(this,...o);return Q(this,ye)[t].push(i),()=>{Q(this,ye)[t]=Q(this,ye)[t].filter(o=>o!==i)}}$destroy(){Q(this,le).$destroy()}}ye=new WeakMap,le=new WeakMap;let wn;typeof HTMLElement=="function"&&(wn=class extends HTMLElement{constructor(t,r,i){super();he(this,"$$ctor");he(this,"$$s");he(this,"$$c");he(this,"$$cn",!1);he(this,"$$d",{});he(this,"$$r",!1);he(this,"$$p_d",{});he(this,"$$l",{});he(this,"$$l_u",new Map);he(this,"$$me");this.$$ctor=t,this.$$s=r,i&&this.attachShadow({mode:"open"})}addEventListener(t,r,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const o=this.$$c.$on(t,r);this.$$l_u.set(r,o)}super.addEventListener(t,r,i)}removeEventListener(t,r,i){if(super.removeEventListener(t,r,i),this.$$c){const o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return a=>{const l=document.createElement("slot");o!=="default"&&(l.name=o),ae(a,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},i=xo(this);for(const o of this.$$s)o in i&&(o==="default"&&!this.$$d.children?(this.$$d.children=t(o),r.default=!0):r[o]=t(o));for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=Ot(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=yo({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Ui(()=>{Zt(()=>{var o;this.$$r=!0;for(const a of yt(this.$$c)){if(!((o=this.$$p_d[a])!=null&&o.reflect))continue;this.$$d[a]=this.$$c[a];const l=Ot(a,this.$$d[a],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,l)}this.$$r=!1})});for(const o in this.$$l)for(const a of this.$$l[o]){const l=this.$$c.$on(o,a);this.$$l_u.set(a,l)}this.$$l={}}}attributeChangedCallback(t,r,i){var o;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ot(t,i,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$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 yt(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,i){var a;const o=(a=r[e])==null?void 0:a.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(o){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(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function xo(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function $o(e,t,r,i,o,a){let l=class extends wn{constructor(){super(e,r,o),this.$$p_d=t}static get observedAttributes(){return yt(t).map(s=>(t[s].attribute||s).toLowerCase())}};return yt(t).forEach(s=>{Et(l.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(f){var h;f=Ot(s,f,t),this.$$d[s]=f;var d=this.$$c;if(d){var v=(h=Pe(d,s))==null?void 0:h.get;v?d[s]=f:d.$set({[s]:f})}}})}),i.forEach(s=>{Et(l.prototype,s,{get(){var f;return(f=this.$$c)==null?void 0:f[s]}})}),e.element=l,l}const bn=new TextEncoder;function ko(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function Co(e,t="SHA-256",r=1e5){const i=Date.now().toString(16);e||(e=Math.round(Math.random()*r));const o=await yn(i,e,t);return{algorithm:t,challenge:o,salt:i,signature:""}}async function yn(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 ko(await crypto.subtle.digest(r.toUpperCase(),bn.encode(e+t)))}function Ao(e,t,r="SHA-256",i=1e6,o=0){const a=new AbortController,l=Date.now();return{promise:(async()=>{for(let f=o;f<=i;f+=1){if(a.signal.aborted)return null;if(await yn(t,f,r)===e)return{number:f,took:Date.now()-l}}return null})(),controller:a}}function Ro(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Io(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function So(e,t=12){const r=new Uint8Array(t);for(let i=0;i<t;i++)r[i]=e%256,e=Math.floor(e/256);return r}async function To(e,t="",r=1e6,i=0){const o="AES-GCM",a=new AbortController,l=Date.now(),s=async()=>{for(let v=i;v<=r;v+=1){if(a.signal.aborted||!f||!d)return null;try{const h=await crypto.subtle.decrypt({name:o,iv:So(v)},f,d);if(h)return{clearText:new TextDecoder().decode(h),took:Date.now()-l}}catch{}}return null};let f=null,d=null;try{d=Io(e);const v=await crypto.subtle.digest("SHA-256",bn.encode(t));f=await crypto.subtle.importKey("raw",v,o,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:a}}return{promise:s(),controller:a}}var w=(e=>(e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(w||{}),No=lo('<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor" class="altcha-spinner"></path></svg>'),Lo=me('<span role="status" aria-live="polite"><!></span> <input type="hidden">',1),Do=me('<span role="status" aria-live="polite"><!></span>'),Po=me("<label><!></label>"),Oo=me('<div><a target="_blank" class="altcha-logo"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>'),Fo=me("<div><!></div>"),Mo=me("<div><!></div>"),Uo=me('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'),jo=me('<div class="altcha-footer"><div><!></div></div>'),Vo=me('<div class="altcha-anchor-arrow"></div>'),Bo=me('<!> <div class="altcha"><div class="altcha-main"><!> <div><input type="checkbox"></div> <div class="altcha-label"><!></div> <!></div> <!> <!> <!></div>',1);function En(e,t){var ri,ni;tn(t,!0);let r=S(t,"auto",7,void 0),i=S(t,"blockspam",7,void 0),o=S(t,"challengeurl",7,void 0),a=S(t,"challengejson",7,void 0),l=S(t,"customfetch",7,void 0),s=S(t,"debug",7,!1),f=S(t,"delay",7,0),d=S(t,"expire",7,void 0),v=S(t,"floating",7,void 0),h=S(t,"floatinganchor",7,void 0),g=S(t,"floatingoffset",7,void 0),m=S(t,"floatingpersist",7,!1),C=S(t,"hidefooter",7,!1),D=S(t,"hidelogo",7,!1),j=S(t,"id",7,void 0),G=S(t,"name",7,"altcha"),B=S(t,"maxnumber",7,1e6),X=S(t,"mockerror",7,!1),V=S(t,"obfuscated",7,void 0),Ve=S(t,"plugins",7,void 0),M=S(t,"refetchonexpire",7,!0),q=S(t,"spamfilter",7,!1),Ee=S(t,"strings",7,void 0),se=S(t,"test",7,!1),Ne=S(t,"verifyurl",7,void 0),ze=S(t,"workers",23,()=>Math.min(16,navigator.hardwareConcurrency||8)),ct=S(t,"workerurl",7,void 0);const $n=["SHA-256","SHA-384","SHA-512"],kn="Visit Altcha.org",Cn="https://altcha.org/",dt=(n,u)=>{t.$$host.dispatchEvent(new CustomEvent(n,{detail:u}))},An=(ni=(ri=document.documentElement.lang)==null?void 0:ri.split("-"))==null?void 0:ni[0],tr=nt(()=>{var n;return o()&&new URL(o(),location.origin).host.endsWith(".altcha.org")&&!!((n=o())!=null&&n.includes("apiKey=ckey_"))}),rr=nt(()=>a()?jn(a()):void 0),Rn=nt(()=>Ee()?jn(Ee()):{}),fe=nt(()=>{var n;return{ariaLinkLabel:kn,error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:`Protected by <a href="${Cn}" target="_blank" aria-label="${((n=c(Rn))==null?void 0:n.ariaLinkLabel)||kn}">ALTCHA</a>`,label:"I'm not a robot",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait.",...c(Rn)}}),In=nt(()=>`${j()||G()}_checkbox`);let Xe=z(!1),T=z(ke(w.UNVERIFIED)),Z=z(void 0),ht=z(null),Qe=null,p=null,et=z(null),pe=null,Le=[],Be=z(null);Yt(()=>{Xo(c(et))}),Yt(()=>{Qo(c(T))}),wo(()=>{Wo(),p&&(p.removeEventListener("submit",On),p.removeEventListener("reset",Fn),p.removeEventListener("focusin",Pn),p=null),pe&&(clearTimeout(pe),pe=null),document.removeEventListener("click",Ln),document.removeEventListener("scroll",Dn),window.removeEventListener("resize",Un)}),mn(()=>{var n;N("mounted","1.5.1"),N("workers",ze()),Ko(),N("plugins",Le.length?Le.map(u=>u.constructor.pluginName).join(", "):"none"),se()&&N("using test mode"),d()&&nr(d()),r()!==void 0&&N("auto",r()),v()!==void 0&&Vn(v()),p=(n=c(Z))==null?void 0:n.closest("form"),p&&(p.addEventListener("submit",On,{capture:!0}),p.addEventListener("reset",Fn),(r()==="onfocus"||m()==="focus")&&p.addEventListener("focusin",Pn)),r()==="onload"&&(V()?vt():De()),c(tr)&&(C()||D())&&N("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."),requestAnimationFrame(()=>{dt("load")})});function Sn(n,u){return btoa(JSON.stringify({algorithm:n.algorithm,challenge:n.challenge,number:u.number,salt:n.salt,signature:n.signature,test:se()?!0:void 0,took:u.took}))}function Wo(){for(const n of Le)n.destroy()}function Tn(){o()&&M()&&c(T)===w.VERIFIED?De():_t(w.EXPIRED,c(fe).expired)}async function Yo(){var n;if(X())throw N("mocking error"),new Error("Mocked error.");if(c(rr))return N("using provided json data"),c(rr);if(se())return N("generating test challenge",{test:se()}),Co(typeof se()!="boolean"?+se():void 0);{if(!o()&&p){const $=p.getAttribute("action");$!=null&&$.includes("/form/")&&o($+"/altcha")}if(!o())throw new Error("Attribute challengeurl not set.");N("fetching challenge from",o());const u={headers:q()!==!1?{"x-altcha-spam-filter":"1"}:{}},_=await Nn()(o(),u);if(!_||!(_ instanceof Response))throw new Error("Fetch function did not return a response.");if(_.status!==200)throw new Error(`Server responded with ${_.status}.`);const y=_.headers.get("X-Altcha-Config"),L=await _.json(),x=new URLSearchParams((n=L.salt.split("?"))==null?void 0:n[1]),b=x.get("expires")||x.get("expire");if(b){const $=new Date(+b*1e3),xe=isNaN($.getTime())?0:$.getTime()-Date.now();xe>0&&nr(xe)}if(y)try{const $=JSON.parse(y);$&&typeof $=="object"&&("sentinel"in $?alert("This version of the widget is not compatible with Sentinel. Upgrade to version 2.x.x."):($.verifyurl&&($.verifyurl=new URL($.verifyurl,new URL(o())).toString()),Hn($)))}catch($){N("unable to configure from X-Altcha-Config",$)}return L}}function Go(n){var _;const u=p==null?void 0:p.querySelector(typeof n=="string"?`input[name="${n}"]`:'input[type="email"]:not([data-no-spamfilter])');return((_=u==null?void 0:u.value)==null?void 0:_.slice(u.value.indexOf("@")))||void 0}function Nn(){let n=fetch;if(l())if(N("using customfetch"),typeof l()=="string"){if(n=globalThis[l()]||null,!n)throw new Error(`Custom fetch function not found: ${l()}`)}else n=l();return n}function Zo(){return q()==="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 q()=="object"?q():{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 Jo(n){return[...(p==null?void 0:p.querySelectorAll(n!=null&&n.length?n.map(_=>`input[name="${_}"]`).join(", "):'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'))||[]].reduce((_,y)=>{const L=y.name,x=y.value;return L&&x&&(_[L]=/\n/.test(x)?x.replace(new RegExp("(?<!\\r)\\n","g"),`\r
|
|
4
|
+
`):x),_},{})}function Ko(){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:c(Z),clarify:vt,dispatch:dt,getConfiguration:Wn,getFloatingAnchor:Yn,getState:Gn,log:N,reset:_t,solve:qn,setState:qe,setFloatingAnchor:Jn,verify:De}))}function N(...n){(s()||n.some(u=>u instanceof Error))&&console[n[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${G()}]`,...n)}function zo(){[w.UNVERIFIED,w.ERROR,w.EXPIRED].includes(c(T))?q()!==!1&&(p==null?void 0:p.reportValidity())===!1?F(Xe,!1):V()?vt():De():F(Xe,!0)}function Ln(n){const u=n.target;v()&&u&&!c(Z).contains(u)&&(c(T)===w.VERIFIED&&m()===!1||c(T)===w.VERIFIED&&m()==="focus"&&!(p!=null&&p.matches(":focus-within"))||r()==="off"&&c(T)===w.UNVERIFIED)&&Zn()}function Dn(){v()&&c(T)!==w.UNVERIFIED&>()}function Xo(n){for(const u of Le)typeof u.onErrorChange=="function"&&u.onErrorChange(c(et))}function Pn(n){c(T)===w.UNVERIFIED?De():v()&&m()==="focus"&&c(T)===w.VERIFIED&&ir()}function On(n){p&&r()==="onsubmit"?c(T)===w.UNVERIFIED?(n.preventDefault(),n.stopPropagation(),De().then(()=>{ta()})):c(T)!==w.VERIFIED&&(n.preventDefault(),n.stopPropagation(),c(T)===w.VERIFYING&&Mn()):p&&v()&&r()==="off"&&c(T)===w.UNVERIFIED&&(n.preventDefault(),n.stopPropagation(),ir())}function Fn(){_t()}function Mn(){c(T)===w.VERIFYING&&c(fe).waitAlert&&alert(c(fe).waitAlert)}function Qo(n){for(const u of Le)typeof u.onStateChange=="function"&&u.onStateChange(c(T));v()&&c(T)!==w.UNVERIFIED&&requestAnimationFrame(()=>{gt()}),F(Xe,c(T)===w.VERIFIED)}function Un(){v()&>()}function jn(n){return JSON.parse(n)}async function ea(n){if(!Ne())throw new Error("Attribute verifyurl not set.");N("requesting server verification from",Ne());const u={payload:n};if(q()!==!1){const{blockedCountries:L,classifier:x,disableRules:b,email:$,expectedLanguages:xe,expectedCountries:lr,fields:pt,ipAddress:wt,text:va,timeZone:ii}=Zo();u.blockedCountries=L,u.classifier=x,u.disableRules=b,u.email=$===!1?void 0:Go($),u.expectedCountries=lr,u.expectedLanguages=xe||(An?[An]:void 0),u.fields=pt===!1?void 0:Jo(pt),u.ipAddress=wt===!1?void 0:wt||"auto",u.text=va,u.timeZone=ii===!1?void 0:ii||Ro()}const _=await Nn()(Ne(),{body:JSON.stringify(u),headers:{"content-type":"application/json"},method:"POST"});if(!_||!(_ instanceof Response))throw new Error("Fetch function did not return a response.");if(_.status!==200)throw new Error(`Server responded with ${_.status}.`);const y=await _.json();if(y!=null&&y.payload&&F(Be,y.payload,!0),dt("serververification",y),i()&&y.classification==="BAD")throw new Error("SpamFilter returned negative classification.")}function ta(){p&&"requestSubmit"in p?p.requestSubmit():p!=null&&p.reportValidity()&&p.submit()}function nr(n){N("expire",n),pe&&(clearTimeout(pe),pe=null),n<1?Tn():pe=setTimeout(Tn,n)}function Vn(n){N("floating",n),v()!==n&&(c(Z).style.left="",c(Z).style.top=""),v(n===!0||n===""?"auto":n===!1||n==="false"?void 0:v()),v()?(r()||r("onsubmit"),document.addEventListener("scroll",Dn),document.addEventListener("click",Ln),window.addEventListener("resize",Un)):r()==="onsubmit"&&r(void 0)}function Bn(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(!$n.includes(n.algorithm.toUpperCase()))throw new Error(`Unknown algorithm value. Allowed values: ${$n.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 qn(n){let u=null;if("Worker"in window){try{u=await ra(n,n.maxNumber||n.maxnumber||B())}catch(_){N(_)}if((u==null?void 0:u.number)!==void 0||"obfuscated"in n)return{data:n,solution:u}}if("obfuscated"in n){const _=await To(n.obfuscated,n.key,n.maxNumber||n.maxnumber);return{data:n,solution:await _.promise}}return{data:n,solution:await Ao(n.challenge,n.salt,n.algorithm,n.maxNumber||n.maxnumber||B()).promise}}async function ra(n,u=typeof se()=="number"?se():n.maxNumber||n.maxnumber||B(),_=Math.ceil(ze())){const y=[];_=Math.min(16,u,Math.max(1,_));for(let b=0;b<_;b++)y.push(altchaCreateWorker(ct()));const L=Math.ceil(u/_),x=await Promise.all(y.map((b,$)=>{const xe=$*L;return new Promise(lr=>{b.addEventListener("message",pt=>{if(pt.data)for(const wt of y)wt!==b&&wt.postMessage({type:"abort"});lr(pt.data)}),b.postMessage({payload:n,max:xe+L,start:xe,type:"work"})})}));for(const b of y)b.terminate();return x.find(b=>!!b)||null}async function vt(){if(!V()){qe(w.ERROR);return}const n=Le.find(u=>u.constructor.pluginName==="obfuscation");if(!n||!("clarify"in n)){qe(w.ERROR),N("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");return}if("clarify"in n&&typeof n.clarify=="function")return n.clarify()}function Hn(n){n.obfuscated!==void 0&&V(n.obfuscated),n.auto!==void 0&&(r(n.auto),r()==="onload"&&(V()?vt():De())),n.blockspam!==void 0&&i(!!n.blockspam),n.customfetch!==void 0&&l(n.customfetch),n.floatinganchor!==void 0&&h(n.floatinganchor),n.delay!==void 0&&f(n.delay),n.floatingoffset!==void 0&&g(n.floatingoffset),n.floating!==void 0&&Vn(n.floating),n.expire!==void 0&&(nr(n.expire),d(n.expire)),n.challenge&&(a(typeof n.challenge=="string"?n.challenge:JSON.stringify(n.challenge)),Bn(c(rr))),n.challengeurl!==void 0&&o(n.challengeurl),n.debug!==void 0&&s(!!n.debug),n.hidefooter!==void 0&&C(!!n.hidefooter),n.hidelogo!==void 0&&D(!!n.hidelogo),n.maxnumber!==void 0&&B(+n.maxnumber),n.mockerror!==void 0&&X(!!n.mockerror),n.name!==void 0&&G(n.name),n.refetchonexpire!==void 0&&M(!!n.refetchonexpire),n.spamfilter!==void 0&&q(typeof n.spamfilter=="object"?n.spamfilter:!!n.spamfilter),n.strings&&Ee(typeof n.strings=="string"?n.strings:JSON.stringify(n.strings)),n.test!==void 0&&se(typeof n.test=="number"?n.test:!!n.test),n.verifyurl!==void 0&&Ne(n.verifyurl),n.workers!==void 0&&ze(+n.workers),n.workerurl!==void 0&&ct(n.workerurl)}function Wn(){return{auto:r(),blockspam:i(),challengeurl:o(),debug:s(),delay:f(),expire:d(),floating:v(),floatinganchor:h(),floatingoffset:g(),hidefooter:C(),hidelogo:D(),name:G(),maxnumber:B(),mockerror:X(),obfuscated:V(),refetchonexpire:M(),spamfilter:q(),strings:c(fe),test:se(),verifyurl:Ne(),workers:ze(),workerurl:ct()}}function Yn(){return Qe}function na(n){return Le.find(u=>u.constructor.pluginName===n)}function Gn(){return c(T)}function Zn(){c(Z).style.display="none"}function gt(n=20){if(c(Z))if(Qe||(Qe=(h()?document.querySelector(h()):p==null?void 0:p.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])'))||p),Qe){const u=parseInt(g(),10)||12,_=Qe.getBoundingClientRect(),y=c(Z).getBoundingClientRect(),L=document.documentElement.clientHeight,x=document.documentElement.clientWidth,b=v()==="auto"?_.bottom+y.height+u+n>L:v()==="top",$=Math.max(n,Math.min(x-n-y.width,_.left+_.width/2-y.width/2));if(b?c(Z).style.top=`${_.top-(y.height+u)}px`:c(Z).style.top=`${_.bottom+u}px`,c(Z).style.left=`${$}px`,c(Z).setAttribute("data-floating",b?"top":"bottom"),c(ht)){const xe=c(ht).getBoundingClientRect();c(ht).style.left=_.left-$+_.width/2-xe.width/2+"px"}}else N("unable to find floating anchor element")}function _t(n=w.UNVERIFIED,u=null){pe&&(clearTimeout(pe),pe=null),F(Xe,!1),F(Be,null),qe(n,u)}function Jn(n){Qe=n}function qe(n,u=null){F(T,n,!0),F(et,u,!0),dt("statechange",{payload:c(Be),state:c(T)})}function ir(){c(Z).style.display="block",v()&>()}async function De(){return _t(w.VERIFYING),await new Promise(n=>setTimeout(n,f()||0)),Yo().then(n=>(Bn(n),N("challenge",n),qn(n))).then(({data:n,solution:u})=>{if(N("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 ea(Sn(n,u));F(Be,Sn(n,u),!0),N("payload",c(Be))}else throw N("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."),new Error("Unexpected result returned.")}).then(()=>{qe(w.VERIFIED),N("verified"),Xi().then(()=>{dt("verified",{payload:c(Be)})})}).catch(n=>{N(n),qe(w.ERROR,n.message)})}var Kn=Bo(),zn=kr(Kn);uo(zn,t,"default",{});var mt=be(zn,2),or=re(mt),Xn=re(or);{var ia=n=>{var u=No();ae(n,u)};Te(Xn,n=>{c(T)===w.VERIFYING&&n(ia)})}var Ft=be(Xn,2);let Qn;var tt=re(Ft);dn(tt),tt.__change=zo,te(Ft);var ar=be(Ft,2),oa=re(ar);{var aa=n=>{var u=Lo(),_=kr(u),y=re(_);Ke(y,()=>c(fe).verified),te(_);var L=be(_,2);dn(L),Ue(()=>{de(L,"name",G()),_o(L,c(Be))}),ae(n,u)},la=(n,u)=>{{var _=L=>{var x=Do(),b=re(x);Ke(b,()=>c(fe).verifying),te(x),ae(L,x)},y=L=>{var x=Po(),b=re(x);Ke(b,()=>c(fe).label),te(x),Ue(()=>de(x,"for",c(In))),ae(L,x)};Te(n,L=>{c(T)===w.VERIFYING?L(_):L(y,!1)},u)}};Te(oa,n=>{c(T)===w.VERIFIED?n(aa):n(la,!1)})}te(ar);var sa=be(ar,2);{var fa=n=>{var u=Oo(),_=re(u);de(_,"href",Cn),te(u),Ue(()=>de(_,"aria-label",c(fe).ariaLinkLabel)),ae(n,u)};Te(sa,n=>{(D()!==!0||c(tr))&&n(fa)})}te(or);var ei=be(or,2);{var ua=n=>{var u=Uo(),_=be(re(u),2);{var y=x=>{var b=Fo(),$=re(b);Ke($,()=>c(fe).expired),te(b),Ue(()=>de(b,"title",c(et))),ae(x,b)},L=x=>{var b=Mo(),$=re(b);Ke($,()=>c(fe).error),te(b),Ue(()=>de(b,"title",c(et))),ae(x,b)};Te(_,x=>{c(T)===w.EXPIRED?x(y):x(L,!1)})}te(u),ae(n,u)};Te(ei,n=>{(c(et)||c(T)===w.EXPIRED)&&n(ua)})}var ti=be(ei,2);{var ca=n=>{var u=jo(),_=re(u),y=re(_);Ke(y,()=>c(fe).footer),te(_),te(u),ae(n,u)};Te(ti,n=>{c(fe).footer&&(C()!==!0||c(tr))&&n(ca)})}var da=be(ti,2);{var ha=n=>{var u=Vo();_n(u,_=>F(ht,_),()=>c(ht)),ae(n,u)};Te(da,n=>{v()&&n(ha)})}return te(mt),_n(mt,n=>F(Z,n),()=>c(Z)),Ue(n=>{de(mt,"data-state",c(T)),de(mt,"data-floating",v()),Qn=ho(Ft,1,"altcha-checkbox",null,Qn,n),de(tt,"id",c(In)),tt.required=r()!=="onsubmit"&&(!v()||r()!=="off")},[()=>({"altcha-hidden":c(T)===w.VERIFYING})]),oo("invalid",tt,Mn),po(tt,()=>c(Xe),n=>F(Xe,n)),ae(e,Kn),rn({clarify:vt,configure:Hn,getConfiguration:Wn,getFloatingAnchor:Yn,getPlugin:na,getState:Gn,hide:Zn,repositionFloating:gt,reset:_t,setFloatingAnchor:Jn,setState:qe,show:ir,verify:De,get auto(){return r()},set auto(n=void 0){r(n),E()},get blockspam(){return i()},set blockspam(n=void 0){i(n),E()},get challengeurl(){return o()},set challengeurl(n=void 0){o(n),E()},get challengejson(){return a()},set challengejson(n=void 0){a(n),E()},get customfetch(){return l()},set customfetch(n=void 0){l(n),E()},get debug(){return s()},set debug(n=!1){s(n),E()},get delay(){return f()},set delay(n=0){f(n),E()},get expire(){return d()},set expire(n=void 0){d(n),E()},get floating(){return v()},set floating(n=void 0){v(n),E()},get floatinganchor(){return h()},set floatinganchor(n=void 0){h(n),E()},get floatingoffset(){return g()},set floatingoffset(n=void 0){g(n),E()},get floatingpersist(){return m()},set floatingpersist(n=!1){m(n),E()},get hidefooter(){return C()},set hidefooter(n=!1){C(n),E()},get hidelogo(){return D()},set hidelogo(n=!1){D(n),E()},get id(){return j()},set id(n=void 0){j(n),E()},get name(){return G()},set name(n="altcha"){G(n),E()},get maxnumber(){return B()},set maxnumber(n=1e6){B(n),E()},get mockerror(){return X()},set mockerror(n=!1){X(n),E()},get obfuscated(){return V()},set obfuscated(n=void 0){V(n),E()},get plugins(){return Ve()},set plugins(n=void 0){Ve(n),E()},get refetchonexpire(){return M()},set refetchonexpire(n=!0){M(n),E()},get spamfilter(){return q()},set spamfilter(n=!1){q(n),E()},get strings(){return Ee()},set strings(n=void 0){Ee(n),E()},get test(){return se()},set test(n=!1){se(n),E()},get verifyurl(){return Ne()},set verifyurl(n=void 0){Ne(n),E()},get workers(){return ze()},set workers(n=Math.min(16,navigator.hardwareConcurrency||8)){ze(n),E()},get workerurl(){return ct()},set workerurl(n=void 0){ct(n),E()}})}ao(["change"]),customElements.define("altcha-widget",$o(En,{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));const qo='@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative;text-align:left}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem}.altcha-label{flex-grow:1}.altcha-label label{cursor:pointer}.altcha-logo{color:currentColor;opacity:.3}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.4;padding:.2rem .7rem;text-align:right}.altcha-footer>:first-child{flex-grow:1}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;height:24px;width:24px}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-hidden{display:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}';function Ho(e,t="__altcha-css"){if(!document.getElementById(t)){const r=document.createElement("style");r.id=t,r.textContent=e,document.head.appendChild(r)}}globalThis.altchaCreateWorker=e=>e?new Worker(new URL(e)):new bt,globalThis.altchaPlugins=globalThis.altchaPlugins||[],Ho(qo),k.Altcha=En,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
|