1var Zu=Object.defineProperty;var Da=Z=>{throw TypeError(Z)};var Ju=(Z,z,ue)=>z in Z?Zu(Z,z,{enumerable:!0,configurable:!0,writable:!0,value:ue}):Z[z]=ue;var O=(Z,z,ue)=>Ju(Z,typeof z!="symbol"?z+"":z,ue),Yi=(Z,z,ue)=>z.has(Z)||Da("Cannot "+ue);var d=(Z,z,ue)=>(Yi(Z,z,"read from private field"),ue?ue.call(Z):z.get(Z)),N=(Z,z,ue)=>z.has(Z)?Da("Cannot add the same private member more than once"):z instanceof WeakSet?z.add(Z):z.set(Z,ue),R=(Z,z,ue,Ie)=>(Yi(Z,z,"write to private field"),Ie?Ie.call(Z,ue):z.set(Z,ue),ue),j=(Z,z,ue)=>(Yi(Z,z,"access private method"),ue);import{g as zu}from"./vendor-pusher-BP0LjfyK.js";function Ku(Z,z){for(var ue=0;ue<z.length;ue++){const Ie=z[ue];if(typeof Ie!="string"&&!Array.isArray(Ie)){for(const zt in Ie)if(zt!=="default"&&!(zt in Z)){const Ft=Object.getOwnPropertyDescriptor(Ie,zt);Ft&&Object.defineProperty(Z,zt,Ft.get?Ft:{enumerable:!0,get:()=>Ie[zt]})}}}return Object.freeze(Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"}))}var Fa={},Va;function Qu(){var ya,kr,Wt,lr,Tr,Ar,ur,Ir,Lt,en,Ge,tn,Zt,bt,wt,Or,Rr,W,qi,dn,Bi,Ua,ja,Gn,Xu,Wi,Nr,Ye,rn,Xe,fr,De,Qe,Pe,qe,Nt,cr,Jt,Pr,nn,on,xt,Dn,ne,Ha,Ga,Ya,Zi,Yn,qn,Ji,zi,ba,wa,ut,Mt,ft,dr,an,Fn,Pi,Dt,et;if(Va)return Fa;Va=1;const Z=!1;var z=Array.isArray,ue=Array.prototype.indexOf,Ie=Array.prototype.includes,zt=Array.from,Ft=Object.keys,xr=Object.defineProperty,pr=Object.getOwnPropertyDescriptor,Ba=Object.getOwnPropertyDescriptors,Wa=Object.prototype,Za=Array.prototype,Ki=Object.getPrototypeOf,Xi=Object.isExtensible;const Vt=()=>{};function Ja(e){for(var t=0;t<e.length;t++)e[t]()}function Qi(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const we=2,_r=4,hn=8,Bn=1<<24,it=16,dt=32,Tt=64,Wn=128,We=512,pe=1024,ye=2048,ht=4096,Ze=8192,ot=16384,Ut=32768,Zn=1<<25,jt=65536,vn=1<<17,za=1<<18,Kt=1<<19,Ka=1<<20,Xt=65536,gn=1<<21,mr=1<<22,Ht=1<<23,yr=Symbol("$state"),Xa=Symbol("legacy props"),Qa=Symbol(""),pn=Symbol("attributes"),Jn=Symbol("class"),zn=Symbol("style"),Mr=Symbol("text"),Dr=Symbol("form reset"),_n=new class extends Error{constructor(){super(...arguments);O(this,"name","StaleReactionError");O(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Fr=!!((ya=globalThis.document)!=null&&ya.contentType)&&globalThis.document.contentType.includes("xml"),Vr=3,Ur=8;function eo(e){return e===this.v}function to(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function es(e){return!to(e,this.v)}function ts(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function rs(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ns(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function is(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function os(e){throw new Error("https://svelte.dev/e/effect_orphan")}function as(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ss(){throw new Error("https://svelte.dev/e/hydration_failed")}function ls(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function us(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fs(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function cs(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}let ds=!1;const hs=1,vs=2,Kn="[",ro="[!",no="[?",io="]",Qt={},ve=Symbol("uninitialized"),oo="http://www.w3.org/1999/xhtml",gs="http://www.w3.org/2000/svg",ps="http://www.w3.org/1998/Math/MathML",_s="@attach";let Ne=null;function br(e){Ne=e}function At(e,t=!1,r){Ne={p:Ne,i:!1,c:null,e:null,s:e,x:null,r:x,l:null}}function It(e){var t=Ne,r=t.e;if(r!==null){t.e=null;for(var n of r)Ho(n)}return e!==void 0&&(t.x=e),t.i=!0,Ne=t.p,e??{}}function ao(){return!0}let er=[];function so(){var e=er;er=[],Ja(e)}function Ot(e){if(er.length===0&&!Yr){var t=er;queueMicrotask(()=>{t===er&&so()})}er.push(e)}function ms(){for(;er.length>0;)so()}function ys(){console.warn("https://svelte.dev/e/derived_inert")}function jr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function bs(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ws(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let D=!1;function vt(e){D=e}let F;function Oe(e){if(e===null)throw jr(),Qt;return F=e}function tr(){return Oe(pt(F))}function re(e){if(D){if(pt(F)!==null)throw jr(),Qt;F=e}}function Xn(e=1){if(D){for(var t=e,r=F;t--;)r=pt(r);F=r}}function Qn(e=!0){for(var t=0,r=F;;){if(r.nodeType===Ur){var n=r.data;if(n===io){if(t===0)return r;t-=1}
1else(n===Kn||n===ro||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=pt(r);e&&r.remove(),r=i}}function lo(e){if(!e||e.nodeType!==Ur)throw jr(),Qt;return e.data}function Rt(e){if(typeof e!="object"||e===null||yr in e)return e;const t=Ki(e);if(t!==Wa&&t!==Za)return e;var r=new Map,n=z(e),i=U(0),a=or,l=s=>{if(or===a)return s();var c=H,f=or;Je(null),Mo(a);var v=s();return Je(c),Mo(f),v};return n&&r.set("length",U(e.length)),new Proxy(e,{defineProperty(s,c,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&ls();var v=r.get(c);return v===void 0?l(()=>{var g=U(f.value);return r.set(c,g),g}):S(v,f.value,!0),!0},deleteProperty(s,c){var f=r.get(c);if(f===void 0){if(c in s){const v=l(()=>U(ve));r.set(c,v),Br(i)}}else S(f,ve),Br(i);return!0},get(s,c,f){var _;if(c===yr)return e;var v=r.get(c),g=c in s;if(v===void 0&&(!g||(_=pr(s,c))!=null&&_.writable)&&(v=l(()=>{var m=Rt(g?s[c]:ve),C=U(m);return C}),r.set(c,v)),v!==void 0){var h=o(v);return h===ve?void 0:h}return Reflect.get(s,c,f)},getOwnPropertyDescriptor(s,c){var f=Reflect.getOwnPropertyDescriptor(s,c);if(f&&"value"in f){var v=r.get(c);v&&(f.value=o(v))}else if(f===void 0){var g=r.get(c),h=g==null?void 0:g.v;if(g!==void 0&&h!==ve)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return f},has(s,c){var h;if(c===yr)return!0;var f=r.get(c),v=f!==void 0&&f.v!==ve||Reflect.has(s,c);if(f!==void 0||x!==null&&(!v||(h=pr(s,c))!=null&&h.writable)){f===void 0&&(f=l(()=>{var _=v?Rt(s[c]):ve,m=U(_);return m}),r.set(c,f));var g=o(f);if(g===ve)return!1}return v},set(s,c,f,v){var ce;var g=r.get(c),h=c in s;if(n&&c==="length")for(var _=f;_<g.v;_+=1){var m=r.get(_+"");m!==void 0?S(m,ve):_ in s&&(m=l(()=>U(ve)),r.set(_+"",m))}if(g===void 0)(!h||(ce=pr(s,c))!=null&&ce.writable)&&(g=l(()=>U(void 0)),S(g,Rt(f)),r.set(c,g));else{h=g.v!==ve;var C=l(()=>Rt(f));S(g,C)}var L=Reflect.getOwnPropertyDescriptor(s,c);if(L!=null&&L.set&&L.set.call(v,f),!h){if(n&&typeof c=="string"){var A=r.get("length"),X=Number(c);Number.isInteger(X)&&X>=A.v&&S(A,X+1)}Br(i)}return!0},ownKeys(s){o(i);var c=Reflect.ownKeys(s).filter(g=>{var h=r.get(g);return h===void 0||h.v!==ve});for(var[f,v]of r)v.v!==ve&&!(f in s)&&c.push(f);return c},setPrototypeOf(){us()}})}function uo(e){try{if(e!==null&&typeof e=="object"&&yr in e)return e[yr]}catch{}return e}function Es(e,t){return Object.is(uo(e),uo(t))}var rr,ei,fo,co,ho;function ti(){if(rr===void 0){rr=window,ei=document,fo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;co=pr(t,"firstChild").get,ho=pr(t,"nextSibling").get,Xi(e)&&(e[Jn]=void 0,e[pn]=null,e[zn]=void 0,e.__e=void 0),Xi(r)&&(r[Mr]=void 0)}}function gt(e=""){return document.createTextNode(e)}function Ue(e){return co.call(e)}function pt(e){return ho.call(e)}function fe(e,t){if(!D)return Ue(e);var r=Ue(F);if(r===null)r=F.appendChild(gt());else if(t&&r.nodeType!==Vr){var n=gt();return r==null||r.before(n),Oe(n),n}return t&&mn(r),Oe(r),r}function wr(e,t=!1){if(!D){var r=Ue(e);return r instanceof Comment&&r.data===""?pt(r):r}if(t){if((F==null?void 0:F.nodeType)!==Vr){var n=gt();return F==null||F.before(n),Oe(n),n}mn(F)}return F}function ae(e,t=1,r=!1){let n=D?F:e;for(var i;t--;)i=n,n=pt(n);if(!D)return n;if(r){if((n==null?void 0:n.nodeType)!==Vr){var a=gt();return n===null?i==null||i.after(a):n.before(a),Oe(a),a}mn(n)}return Oe(n),n}function Cs(e){e.textContent=""}function ri(e,t,r){return document.createElementNS(t??oo,e,void 0)}function mn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Vr;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function vo(e){var t=x;if(t===null)return H.f|=Ht,e;if((t.f&Ut)===0&&(t.f&_r)===0)throw e;Gt(e,t)}function Gt(e,t){for(;t!==null;){if((t.f&Wn)!==0){if((t.f&Ut)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}const Ss=-7169;
1function he(e,t){e.f=e.f&Ss|t}function ni(e){(e.f&We)!==0||e.deps===null?he(e,pe):he(e,ht)}function go(e){if(e!==null)for(const t of e)(t.f&we)===0||(t.f&Xt)===0||(t.f^=Xt,go(t.deps))}function po(e,t,r){(e.f&ye)!==0?t.add(e):(e.f&ht)!==0&&r.add(e),go(e.deps),he(e,pe)}function _o(e,t,r){if(e==null)return t(void 0),Vt;const n=Jr(()=>e.subscribe(t,r));return n.unsubscribe?()=>n.unsubscribe():n}const Er=[];function $s(e,t=Vt){let r=null;const n=new Set;function i(s){if(to(e,s)&&(e=s,r)){const c=!Er.length;for(const f of n)f[1](),Er.push(f,e);if(c){for(let f=0;f<Er.length;f+=2)Er[f][0](Er[f+1]);Er.length=0}}}function a(s){i(s(e))}function l(s,c=Vt){const f=[s,c];return n.add(f),n.size===1&&(r=t(i,a)||Vt),s(e),()=>{n.delete(f),n.size===0&&r&&(r(),r=null)}}return{set:i,update:a,subscribe:l}}function Hr(e){let t;return _o(e,r=>t=r)(),t}let ii=Symbol("unmounted");function mo(e,t,r){const n=r[t]??(r[t]={store:null,source:Io(void 0),unsubscribe:Vt});if(n.store!==e&&!(ii in r))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=Vt;else{var i=!0;n.unsubscribe=_o(e,a=>{i?n.source.v=a:S(n.source,a)}),i=!1}return e&&ii in r?Hr(e):o(n.source)}function ks(){const e={};function t(){kn(()=>{for(var r in e)e[r].unsubscribe();xr(e,ii,{enumerable:!1,value:!0})})}return[e,t]}let oi=null,Cr=null,k=null,Gr=null,Ee=null,ai=null,Yr=!1,si=!1,Sr=null,yn=null;var yo=0;let Ts=1;const Mn=class Mn{constructor(){N(this,W);O(this,"id",Ts++);N(this,kr,!1);O(this,"linked",!0);N(this,Wt,null);N(this,lr,null);O(this,"async_deriveds",new Map);O(this,"current",new Map);O(this,"previous",new Map);O(this,"unblocked",new Set);N(this,Tr,new Set);N(this,Ar,new Set);N(this,ur,new Set);N(this,Ir,0);N(this,Lt,new Map);N(this,en,null);N(this,Ge,[]);N(this,tn,[]);N(this,Zt,new Set);N(this,bt,new Set);N(this,wt,new Map);N(this,Or,new Set);O(this,"is_fork",!1);N(this,Rr,!1)}skip_effect(t){d(this,wt).has(t)||d(this,wt).set(t,{d:[],m:[]}),d(this,Or).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=d(this,wt).get(t);if(n){d(this,wt).delete(t);for(var i of n.d)he(i,ye),r(i);for(i of n.m)he(i,ht),r(i)}d(this,Or).add(t)}capture(t,r,n=!1){t.v!==ve&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Ht)===0&&(this.current.set(t,[r,n]),Ee==null||Ee.set(t,r)),this.is_fork||(t.v=r)}activate(){k=this}deactivate(){k=null,Ee=null}flush(){try{si=!0,k=this,j(this,W,dn).call(this)}finally{yo=0,ai=null,Sr=null,yn=null,si=!1,k=null,Ee=null,nr.clear()}}discard(){for(const t of d(this,Ar))t(this);d(this,Ar).clear(),d(this,ur).clear(),j(this,W,Nr).call(this)}register_created_effect(t){d(this,tn).push(t)}increment(t,r){if(R(this,Ir,d(this,Ir)+1),t){let n=d(this,Lt).get(r)??0;d(this,Lt).set(r,n+1)}}decrement(t,r){if(R(this,Ir,d(this,Ir)-1),t){let n=d(this,Lt).get(r)??0;n===1?d(this,Lt).delete(r):d(this,Lt).set(r,n-1)}d(this,Rr)||(R(this,Rr,!0),Ot(()=>{R(this,Rr,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)d(this,Zt).add(n);for(const n of r)d(this,bt).add(n);t.clear(),r.clear()}oncommit(t){d(this,Tr).add(t)}ondiscard(t){d(this,Ar).add(t)}on_fork_commit(t){d(this,ur).add(t)}run_fork_commit_callbacks(){for(const t of d(this,ur))t(this);d(this,ur).clear()}settled(){return(d(this,en)??R(this,en,Qi())).promise}static ensure(){var t;if(k===null){const r=k=new Mn;j(t=r,W,Wi).call(t),!si&&!Yr&&Ot(()=>{d(r,kr)||r.flush()})}return k}apply(){{Ee=null;return}}schedule(t){var i;if(ai=t,(i=t.b)!=null&&i.is_pending&&(t.f&(_r|hn|Bn))!==0&&(t.f&Ut)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(Sr!==null&&r===x&&(H===null||(H.f&we)===0))return;if((n&(Tt|dt))!==0){if((n&pe)===0)return;r.f^=pe}}d(this,Ge).push(r)}};kr=new WeakMap,Wt=new WeakMap,lr=new WeakMap,Tr=new WeakMap,Ar=new WeakMap,ur=new WeakMap,Ir=new WeakMap,Lt=new WeakMap,en=new WeakMap,Ge=new WeakMap,tn=new WeakMap,Zt=new WeakMap,bt=new WeakMap,wt=new WeakMap,Or=new WeakMap,Rr=new WeakMap,W=new WeakSet,qi=function(){if(this.is_fork)return!0;for(const n of d(this,Lt).keys()){for(var t=n,r=!1;t.parent!==null;){if(d(this,wt).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},dn=function(){var c,f,v,g;if(R(this,kr,!0),yo++>1e3&&(j(this,W,Nr).call(this),As()),!j(this,W,qi).call(this)){for(const h of d(this,Zt))d(this,bt).delete(h),he(h,ye),this.schedule(h);for(const h of d(this,bt))he(h,ht),this.schedule(h)}const t=d(this,Ge);R(this,Ge,[]),this.apply();var r=Sr=[],n=[],i=yn=[];for(const h of t)try{j(this,W,Bi).call(this,h,r,n)}catch(_){throw Co(h),_}if(k=null,i.length>0){var a=Mn.ensure();for(const h of i)a.schedule(h)}if(Sr=null,yn=null,j(this,W,qi).call(this)){j(this,W,Gn).call(this,n),j(this,W,Gn).call(this,r);for(const[h,_]of d(this,wt))Eo(h,_);i.length>0&&j(c=k,W,dn).call(c);return}const l=j(this,W,Ua).call(this);if(l){j(f=l,W,ja).call(f,this);return}d(this,Zt).clear(),d(this,bt).clear();for(const h of d(this,Tr))h(this);d(this,Tr).clear(),Gr=this,bo(n),bo(r),Gr=null,(v=d(this,en))==null||v.resolve();var s=k;if(this.linked&&d(this,Ir)===0&&j(this,W,Nr).call(this),d(this,Ge).length>0){s===null&&(s=this,j(this,W,Wi).call(this));const h=s;d(h,Ge).push(...d(this,Ge).filter(_=>!d(h,Ge).includes(_)))}s!==null&&j(g=s,W,dn).call(g)},Bi=function(t,r,n){t.f^=pe;for(var i=t.first;i!==null;){var a=i.f,l=(a&(dt|Tt))!==0,s=l&&(a&pe)!==0,c=s||(a&Ze)!==0||d(this,wt).has(i);if(!c&&i.fn!==null){l?i.f^=pe:(a&_r)!==0?r.push(i):Wr(i)&&((a&it)!==0&&d(this,bt).add(i),$r(i));var f=i.first;if(f!==null){i=f;continue}}for(;i!==null;){var v=i.next;if(v!==null){i=v;break}i=i.parent}}},Ua=function(){for(var t=d(this,Wt);t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=d(t,Wt)}return null},ja=function(t){var n;for(const[i,a]of t.current)!this.previous.has(i)&&t.previous.has(i)&&this.previous.set(i,t.previous.get(i)),this.current.set(i,a);for(const[i,a]of t.async_deriveds){const l=this.async_deriveds.get(i);l&&a.promise.then(l.resolve)}const r=i=>{var a=i.reactions;if(a!==null)for(const c of a){var l=c.f;if((l&we)!==0)r(c);else{var s=c;l&(mr|it)&&!this.async_deriveds.has(s)&&(d(this,bt).delete(s),he(s,ye),this.schedule(s))}}};for(const i of this.current.keys())r(i);this.oncommit(()=>t.discard()),j(n=t,W,Nr).call(n),k=this,j(this,W,dn).call(this)},Gn=function(t){for(var r=0;r<t.length;r+=1)po(t[r],d(this,Zt),d(this,bt))},Xu=function(){var v;j(this,W,Nr).call(this);for(let g=oi;g!==null;g=d(g,lr)){var t=g.id<this.id,r=[];for(const[h,[_,m]]of this.current){if(g.current.has(h)){var n=g.current.get(h)[0];if(t&&_!==n)g.current.set(h,[_,m]);else continue}r.push(h)}if(t)for(const[h,_]of this.async_deriveds){const m=g.async_deriveds.get(h);m&&_.promise.then(m.resolve)}if(d(g,kr)){var i=[...g.current.keys()].filter(h=>!this.current.has(h));if(i.length===0)t&&g.discard();else if(r.length>0){if(t)for(const h of d(this,Or))g.unskip_effect(h,_=>{var m;(_.f&(it|mr))!==0?g.schedule(_):j(m=g,W,Gn).call(m,[_])});g.activate();var a=new Set,l=new Map;for(var s of r)wo(s,i,a,l);l=new Map;var c=[...g.current.keys()].filter(h=>this.current.has(h)?this.current.get(h)[0]!==h.v:!0);if(c.length>0)for(const h of d(this,tn))(h.f&(ot|Ze|vn))===0&&li(h,c,l)&&((h.f&(mr|it))!==0?(he(h,ye),g.schedule(h)):d(g,Zt).add(h));if(d(g,Ge).length>0){g.apply();for(var f of d(g,Ge))j(v=g,W,Bi).call(v,f,[],[]);R(g,Ge,[])}g.deactivate()}}}},Wi=function(){Cr===null?oi=Cr=this:(R(Cr,lr,this),R(this,Wt,Cr)),Cr=this},Nr=function(){var t=d(this,Wt),r=d(this,lr);t===null?oi=r:R(t,lr,r),r===null?Cr=t:R(r,Wt,t),this.linked=!1};let Yt=Mn;function ee(e){var t=Yr;Yr=!0;try{for(var r;;){if(ms(),k===null)return r;k.flush()}}finally{Yr=t}}function As(){try{as()}catch(e){Gt(e,ai)}}let at=null;function bo(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(ot|Ze))===0&&Wr(n)&&(at=new Set,$r(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Bo(n),(at==null?void 0:at.size)>0)){nr.clear();for(const i of at){if((i.f&(ot|Ze))!==0)continue;const a=[i];let l=i.parent;for(;l!==null;)at.has(l)&&(at.delete(l),a.push(l)),l=l.parent;for(let s=a.length-1;s>=0;s--){const c=a[s];(c.f&(ot|Ze))===0&&$r(c)}}at.clear()}}at=null}}function wo(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const a=i.f;(a&we)!==0?wo(i,t,r,n):(a&(mr|it))!==0&&(a&ye)===0&&li(i,t,n)&&(he(i,ye),ui(i))}}function li(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(Ie.call(t,i))return!0;
1if((i.f&we)!==0&&li(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function ui(e){k.schedule(e)}function Eo(e,t){if(!((e.f&dt)!==0&&(e.f&pe)!==0)){(e.f&ye)!==0?t.d.push(e):(e.f&ht)!==0&&t.m.push(e),he(e,pe);for(var r=e.first;r!==null;)Eo(r,t),r=r.next}}function Co(e){he(e,pe);for(var t=e.first;t!==null;)Co(t),t=t.next}function Is(e){let t=0,r=qr(0),n;return()=>{di()&&(o(r),Tn(()=>(t===0&&(n=Jr(()=>e(()=>Br(r)))),t+=1,()=>{Ot(()=>{t-=1,t===0&&(n==null||n(),n=void 0,Br(r))})})))}}var Os=jt|Kt;function Rs(e,t,r,n){new Ps(e,t,r,n)}class Ps{constructor(t,r,n,i){N(this,ne);O(this,"parent");O(this,"is_pending",!1);O(this,"transform_error");N(this,Ye);N(this,rn,D?F:null);N(this,Xe);N(this,fr);N(this,De);N(this,Qe,null);N(this,Pe,null);N(this,qe,null);N(this,Nt,null);N(this,cr,0);N(this,Jt,0);N(this,Pr,!1);N(this,nn,new Set);N(this,on,new Set);N(this,xt,null);N(this,Dn,Is(()=>(R(this,xt,qr(d(this,cr))),()=>{R(this,xt,null)})));var a;R(this,Ye,t),R(this,Xe,r),R(this,fr,l=>{var s=x;s.b=this,s.f|=Wn,n(l)}),this.parent=x.b,this.transform_error=i??((a=this.parent)==null?void 0:a.transform_error)??(l=>l),R(this,De,zr(()=>{if(D){const l=d(this,rn);tr();const s=l.data===ro;if(l.data.startsWith(no)){const f=JSON.parse(l.data.slice(no.length));j(this,ne,Ga).call(this,f)}else s?j(this,ne,Ya).call(this):j(this,ne,Ha).call(this)}else j(this,ne,Zi).call(this)},Os)),D&&R(this,Ye,F)}defer_effect(t){po(t,d(this,nn),d(this,on))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!d(this,Xe).pending}update_pending_count(t,r){j(this,ne,Ji).call(this,t,r),R(this,cr,d(this,cr)+t),!(!d(this,xt)||d(this,Pr))&&(R(this,Pr,!0),Ot(()=>{R(this,Pr,!1),d(this,xt)&&Cn(d(this,xt),d(this,cr))}))}get_effect_pending(){return d(this,Dn).call(this),o(d(this,xt))}error(t){if(!d(this,Xe).onerror&&!d(this,Xe).failed)throw t;k!=null&&k.is_fork?(d(this,Qe)&&k.skip_effect(d(this,Qe)),d(this,Pe)&&k.skip_effect(d(this,Pe)),d(this,qe)&&k.skip_effect(d(this,qe)),k.on_fork_commit(()=>{j(this,ne,zi).call(this,t)})):j(this,ne,zi).call(this,t)}}Ye=new WeakMap,rn=new WeakMap,Xe=new WeakMap,fr=new WeakMap,De=new WeakMap,Qe=new WeakMap,Pe=new WeakMap,qe=new WeakMap,Nt=new WeakMap,cr=new WeakMap,Jt=new WeakMap,Pr=new WeakMap,nn=new WeakMap,on=new WeakMap,xt=new WeakMap,Dn=new WeakMap,ne=new WeakSet,Ha=function(){try{R(this,Qe,mt(()=>d(this,fr).call(this,d(this,Ye))))}catch(t){this.error(t)}},Ga=function(t){const r=d(this,Xe).failed;r&&R(this,qe,mt(()=>{r(d(this,Ye),()=>t,()=>()=>{})}))},Ya=function(){const t=d(this,Xe).pending;t&&(this.is_pending=!0,R(this,Pe,mt(()=>t(d(this,Ye)))),Ot(()=>{var r=R(this,Nt,document.createDocumentFragment()),n=gt();r.append(n),R(this,Qe,j(this,ne,qn).call(this,()=>mt(()=>d(this,fr).call(this,n)))),d(this,Jt)===0&&(d(this,Ye).before(r),R(this,Nt,null),Kr(d(this,Pe),()=>{R(this,Pe,null)}),j(this,ne,Yn).call(this,k))}))},Zi=function(){try{if(this.is_pending=this.has_pending_snippet(),R(this,Jt,0),R(this,cr,0),R(this,Qe,mt(()=>{d(this,fr).call(this,d(this,Ye))})),d(this,Jt)>0){var t=R(this,Nt,document.createDocumentFragment());Jo(d(this,Qe),t);const r=d(this,Xe).pending;R(this,Pe,mt(()=>r(d(this,Ye))))}else j(this,ne,Yn).call(this,k)}catch(r){this.error(r)}},Yn=function(t){this.is_pending=!1,t.transfer_effects(d(this,nn),d(this,on))},qn=function(t){var r=x,n=H,i=Ne;_t(d(this,De)),Je(d(this,De)),br(d(this,De).ctx);try{return Yt.ensure(),t()}catch(a){return vo(a),null}finally{_t(r),Je(n),br(i)}},Ji=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&j(n=this.parent,ne,Ji).call(n,t,r);return}R(this,Jt,d(this,Jt)+t),d(this,Jt)===0&&(j(this,ne,Yn).call(this,r),d(this,Pe)&&Kr(d(this,Pe),()=>{R(this,Pe,null)}),d(this,Nt)&&(d(this,Ye).before(d(this,Nt)),R(this,Nt,null)))},zi=function(t){d(this,Qe)&&(Ce(d(this,Qe)),R(this,Qe,null)),d(this,Pe)&&(Ce(d(this,Pe)),R(this,Pe,null)),d(this,qe)&&(Ce(d(this,qe)),R(this,qe,null)),D&&(Oe(d(this,rn)),Xn(),Oe(Qn()));var r=d(this,Xe).onerror;let n=d(this,Xe).failed;var i=!1,a=!1;const l=()=>{if(i){ws();return}i=!0,a&&cs(),d(this,qe)!==null&&Kr(d(this,qe),()=>{R(this,qe,null)}),j(this,ne,qn).call(this,()=>{j(this,ne,Zi).call(this)})},s=c=>{try{a=!0,r==null||r(c,l),a=!1}catch(f){Gt(f,d(this,De)&&d(this,De).parent)}n&&R(this,qe,j(this,ne,qn).call(this,()=>{try{return mt(()=>{var f=x;f.b=this,f.f|=Wn,n(d(this,Ye),()=>c,()=>l)}
1)}catch(f){return Gt(f,d(this,De).parent),null}}))};Ot(()=>{var c;try{c=this.transform_error(t)}catch(f){Gt(f,d(this,De)&&d(this,De).parent);return}c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(s,f=>Gt(f,d(this,De)&&d(this,De).parent)):s(c)})};function So(e,t,r,n){const i=fi;var a=e.filter(h=>!h.settled);if(r.length===0&&a.length===0){n(t.map(i));return}var l=x,s=Ls(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(h=>h.promise)):null;function f(h){if((l.f&ot)===0){s();try{n(h)}catch(_){Gt(_,l)}bn()}}var v=$o();if(r.length===0){c.then(()=>f(t.map(i))).finally(v);return}function g(){Promise.all(r.map(h=>Ns(h))).then(h=>f([...t.map(i),...h])).catch(h=>Gt(h,l)).finally(v)}c?c.then(()=>{s(),g(),bn()}):g()}function Ls(){var e=x,t=H,r=Ne,n=k;return function(a=!0){_t(e),Je(t),br(r),a&&(e.f&ot)===0&&(n==null||n.activate(),n==null||n.apply())}}function bn(e=!0){_t(null),Je(null),br(null),e&&(k==null||k.deactivate())}function $o(){var e=x,t=e.b,r=k,n=t.is_rendered();return t.update_pending_count(1,r),r.increment(n,e),()=>{t.update_pending_count(-1,r),r.decrement(n,e)}}function fi(e){var t=we|ye;return x!==null&&(x.f|=Kt),{ctx:Ne,deps:null,effects:null,equals:eo,f:t,fn:e,reactions:null,rv:0,v:ve,wv:0,parent:x,ac:null}}const wn=Symbol("obsolete");function Ns(e,t,r){let n=x;n===null&&rs();var i=void 0,a=qr(ve),l=!H,s=new Set;return Bs(()=>{var _;var c=x,f=Qi();i=f.promise;try{Promise.resolve(e()).then(f.resolve,m=>{m!==_n&&f.reject(m)}).finally(bn)}catch(m){f.reject(m),bn()}var v=k;if(l){if((c.f&Ut)!==0)var g=$o();if(n.b.is_rendered())(_=v.async_deriveds.get(c))==null||_.reject(wn);else for(const m of s.values())m.reject(wn);s.add(f),v.async_deriveds.set(c,f)}const h=(m,C=void 0)=>{g==null||g(),s.delete(f),C!==wn&&(v.activate(),C?(a.f|=Ht,Cn(a,C)):((a.f&Ht)!==0&&(a.f^=Ht),Cn(a,m)),v.deactivate())};f.promise.then(h,m=>h(null,m||"unknown"))}),kn(()=>{for(const c of s)c.reject(wn)}),new Promise(c=>{function f(v){function g(){v===i?c(a):f(i)}v.then(g,g)}f(i)})}function Re(e){const t=fi(e);return No(t),t}function xs(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Ce(t[r])}}function ci(e){var t,r=x,n=e.parent;if(!Pt&&n!==null&&e.v!==ve&&(n.f&(ot|Ze))!==0)return ys(),e.v;_t(n);try{e.f&=~Xt,xs(e),t=Vo(e)}finally{_t(r)}return t}function ko(e){var t=ci(e);if(!e.equals(t)&&(e.wv=Do(),(!(k!=null&&k.is_fork)||e.deps===null)&&(k!==null?(k.capture(e,t,!0),Gr==null||Gr.capture(e,t,!0)):e.v=t,e.deps===null))){he(e,pe);return}Pt||(Ee!==null?(di()||k!=null&&k.is_fork)&&Ee.set(e,t):ni(e))}function Ms(e){var t,r;if(e.effects!==null)for(const n of e.effects)(n.teardown||n.ac)&&((t=n.teardown)==null||t.call(n),(r=n.ac)==null||r.abort(_n),n.fn!==null&&(n.teardown=Vt),n.ac=null,Zr(n,0),vi(n))}function To(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&$r(t)}let En=new Set;const nr=new Map;let Ao=!1;function qr(e,t){var r={f:0,v:e,reactions:null,equals:eo,rv:0,wv:0};return r}function U(e,t){const r=qr(e);return No(r),r}function Io(e,t=!1,r=!0){const n=qr(e);return t||(n.equals=es),n}function S(e,t,r=!1){H!==null&&(!st||(H.f&vn)!==0)&&ao()&&(H.f&(we|it|mr|vn))!==0&&(ze===null||!Ie.call(ze,e))&&fs();let n=r?Rt(t):t;return Cn(e,n,yn)}function Cn(e,t,r=null){if(!e.equals(t)){nr.set(e,Pt?t:e.v);var n=Yt.ensure();if(n.capture(e,t),(e.f&we)!==0){const i=e;(e.f&ye)!==0&&ci(i),Ee===null&&ni(i)}e.wv=Do(),Oo(e,ye,r),x!==null&&(x.f&pe)!==0&&(x.f&(dt|Tt))===0&&(Ke===null?Us([e]):Ke.push(e)),!n.is_fork&&En.size>0&&!Ao&&Ds()}return t}function Ds(){Ao=!1;for(const e of En){(e.f&pe)!==0&&he(e,ht);let t;try{t=Wr(e)}catch{t=!0}t&&$r(e)}En.clear()}function Br(e){S(e,e.v+1)}function Oo(e,t,r){var n=e.reactions;if(n!==null)for(var i=n.length,a=0;a<i;a++){var l=n[a],s=l.f,c=(s&ye)===0;if(c&&he(l,t),(s&vn)!==0)En.add(l);else if((s&we)!==0){var f=l;Ee==null||Ee.delete(f),(s&Xt)===0&&(s&We&&(x===null||(x.f&gn)===0)&&(l.f|=Xt),Oo(f,ht,r))}else if(c){var v=l;(s&it)!==0&&at!==null&&at.add(v),r!==null?r.push(v):ui(v)}}}function Fs(e,t){if(t){const r=document.body;e.autofocus=!0,Ot(()=>{document.activeElement===r&&e.focus()})}}let Ro=!1;function Po(){Ro||(Ro=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r[Dr])==null||t.call(r)})},{capture:!0}))}function Sn(e){var t=H,r=x;Je(null),_t(null);try{return e()}finally{Je(t),_t(r)}}function Vs(e,t,r,n=r){e.addEventListener(t,()=>Sn(r));const i=e[Dr];i?e[Dr]=()=>{i(),n(!0)}:e[Dr]=()=>n(!0),Po()}let $n=!1,Pt=!1;function Lo(e){Pt=e}let H=null,st=!1;function Je(e){H=e}let x=null;function _t(e){x=e}let ze=null;function No(e){H!==null&&(ze===null?ze=[e]:ze.push(e))}let xe=null,je=0,Ke=null;function Us(e){Ke=e}let xo=1,ir=0,or=ir;function Mo(e){or=e}function Do(){return++xo}function Wr(e){var t=e.f;if((t&ye)!==0)return!0;
vendor: 4,204 bytes, line 1
1if(t&we&&(e.f&=~Xt),(t&ht)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var a=r[i];if(Wr(a)&&ko(a),a.wv>e.wv)return!0}(t&We)!==0&&Ee===null&&he(e,pe)}return!1}function Fo(e,t,r=!0){var n=e.reactions;if(n!==null&&!(ze!==null&&Ie.call(ze,e)))for(var i=0;i<n.length;i++){var a=n[i];(a.f&we)!==0?Fo(a,t,!1):t===a&&(r?he(a,ye):(a.f&pe)!==0&&he(a,ht),ui(a))}}function Vo(e){var C;var t=xe,r=je,n=Ke,i=H,a=ze,l=Ne,s=st,c=or,f=e.f;xe=null,je=0,Ke=null,H=(f&(dt|Tt))===0?e:null,ze=null,br(e.ctx),st=!1,or=++ir,e.ac!==null&&(Sn(()=>{e.ac.abort(_n)}),e.ac=null);try{e.f|=gn;var v=e.fn,g=v();e.f|=Ut;var h=e.deps,_=k==null?void 0:k.is_fork;if(xe!==null){var m;if(_||Zr(e,je),h!==null&&je>0)for(h.length=je+xe.length,m=0;m<xe.length;m++)h[je+m]=xe[m];else e.deps=h=xe;if(di()&&(e.f&We)!==0)for(m=je;m<h.length;m++)((C=h[m]).reactions??(C.reactions=[])).push(e)}else!_&&h!==null&&je<h.length&&(Zr(e,je),h.length=je);if(ao()&&Ke!==null&&!st&&h!==null&&(e.f&(we|ht|ye))===0)for(m=0;m<Ke.length;m++)Fo(Ke[m],e);if(i!==null&&i!==e){if(ir++,i.deps!==null)for(let L=0;L<r;L+=1)i.deps[L].rv=ir;if(t!==null)for(const L of t)L.rv=ir;Ke!==null&&(n===null?n=Ke:n.push(...Ke))}return(e.f&Ht)!==0&&(e.f^=Ht),g}catch(L){return vo(L)}finally{e.f^=gn,xe=t,je=r,Ke=n,H=i,ze=a,br(l),st=s,or=c}}function js(e,t){let r=t.reactions;if(r!==null){var n=ue.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&we)!==0&&(xe===null||!Ie.call(xe,t))){var a=t;(a.f&We)!==0&&(a.f^=We,a.f&=~Xt),a.v!==ve&&ni(a),Ms(a),Zr(a,0)}}function Zr(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)js(e,r[n])}function $r(e){var t=e.f;if((t&ot)===0){he(e,pe);var r=x,n=$n;x=e,$n=!0;try{(t&(it|Bn))!==0?Ws(e):vi(e),Yo(e);var i=Vo(e);e.teardown=typeof i=="function"?i:null,e.wv=xo;var a;Z&&ds&&(e.f&ye)!==0&&e.deps}finally{$n=n,x=r}}}async function ar(){await Promise.resolve(),ee()}function o(e){var t=e.f,r=(t&we)!==0;if(H!==null&&!st){var n=x!==null&&(x.f&ot)!==0;if(!n&&(ze===null||!Ie.call(ze,e))){var i=H.deps;if((H.f&gn)!==0)e.rv<ir&&(e.rv=ir,xe===null&&i!==null&&i[je]===e?je++:xe===null?xe=[e]:xe.push(e));else{(H.deps??(H.deps=[])).push(e);var a=e.reactions;a===null?e.reactions=[H]:Ie.call(a,H)||a.push(H)}}}if(Pt&&nr.has(e))return nr.get(e);if(r){var l=e;if(Pt){var s=l.v;return((l.f&pe)===0&&l.reactions!==null||jo(l))&&(s=ci(l)),nr.set(l,s),s}var c=(l.f&We)===0&&!st&&H!==null&&($n||(H.f&We)!==0),f=(l.f&Ut)===0;Wr(l)&&(c&&(l.f|=We),ko(l)),c&&!f&&(To(l),Uo(l))}if(Ee!=null&&Ee.has(e))return Ee.get(e);if((e.f&Ht)!==0)throw e.v;return e.v}function Uo(e){if(e.f|=We,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&we)!==0&&(t.f&We)===0&&(To(t),Uo(t))}function jo(e){if(e.v===ve)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(nr.has(t)||(t.f&we)!==0&&jo(t))return!0;return!1}function Jr(e){var t=st;try{return st=!0,e()}finally{st=t}}function Hs(e){x===null&&(H===null&&os(),is()),Pt&&ns()}function Gs(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function lt(e,t){var r=x;r!==null&&(r.f&Ze)!==0&&(e|=Ze);var n={ctx:Ne,deps:null,nodes:null,f:e|ye|We,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};k==null||k.register_created_effect(n);var i=n;if((e&_r)!==0)Sr!==null?Sr.push(n):Yt.ensure().schedule(n);else if(t!==null){try{$r(n)}catch(l){throw Ce(n),l}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Kt)===0&&(i=i.first,(e&it)!==0&&(e&jt)!==0&&i!==null&&(i.f|=jt))}if(i!==null&&(i.parent=r,r!==null&&Gs(i,r),H!==null&&(H.f&we)!==0&&(e&Tt)===0)){var a=H;(a.effects??(a.effects=[])).push(i)}return n}function di(){return H!==null&&!st}function kn(e){const t=lt(hn,null);return he(t,pe),t.teardown=e,t}function Me(e){Hs();var t=x.f,r=!H&&(t&dt)!==0&&(t&Ut)===0;if(r){var n=Ne;(n.e??(n.e=[])).push(e)}else return Ho(e)}function Ho(e){return lt(_r|Ka,e)}function Ys(e){Yt.ensure();const t=lt(Tt|Kt,e);return()=>{Ce(t)}}function qs(e){Yt.ensure();const t=lt(Tt|Kt,e);return(r={})=>new Promise(n=>{r.outro?Kr(t,()=>{Ce(t),n(void 0)}):(Ce(t),n(void 0))})}function hi(e){return lt(_r,e)}function Bs(e){return lt(mr|Kt,e)}function Tn(e,t=0){return lt(hn|t,e)}
1function $e(e,t=[],r=[],n=[]){So(n,t,r,i=>{lt(hn,()=>e(...i.map(o)))})}function zr(e,t=0){var r=lt(it|t,e);return r}function Go(e,t=0){var r=lt(Bn|t,e);return r}function mt(e){return lt(dt|Kt,e)}function Yo(e){var t=e.teardown;if(t!==null){const r=Pt,n=H;Lo(!0),Je(null);try{t.call(null)}finally{Lo(r),Je(n)}}}function vi(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Sn(()=>{i.abort(_n)});var n=r.next;(r.f&Tt)!==0?r.parent=null:Ce(r,t),r=n}}function Ws(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&dt)===0&&Ce(t),t=r}}function Ce(e,t=!0){var r=!1;(t||(e.f&za)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(qo(e.nodes.start,e.nodes.end),r=!0),he(e,Zn),vi(e,t&&!r),Zr(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const a of n)a.stop();Yo(e),e.f^=Zn,e.f|=ot;var i=e.parent;i!==null&&i.first!==null&&Bo(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function qo(e,t){for(;e!==null;){var r=e===t?null:pt(e);e.remove(),e=r}}function Bo(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Kr(e,t,r=!0){var n=[];Wo(e,n,!0);var i=()=>{r&&Ce(e),t&&t()},a=n.length;if(a>0){var l=()=>--a||i();for(var s of n)s.out(l)}else i()}function Wo(e,t,r){if((e.f&Ze)===0){e.f^=Ze;var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)(s.is_global||r)&&t.push(s);for(var i=e.first;i!==null;){var a=i.next;if((i.f&Tt)===0){var l=(i.f&jt)!==0||(i.f&dt)!==0&&(e.f&it)!==0;Wo(i,t,l?r:!1)}i=a}}}function Zs(e){Zo(e,!0)}function Zo(e,t){if((e.f&Ze)!==0){e.f^=Ze,(e.f&pe)===0&&(he(e,ye),Yt.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&jt)!==0||(r.f&dt)!==0;Zo(r,i?t:!1),r=n}var a=e.nodes&&e.nodes.t;if(a!==null)for(const l of a)(l.is_global||t)&&l.in()}}function Jo(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:pt(r);t.append(r),r=i}}function zo(e){const t={get:r=>Hr(t.store)[r],set:(r,n)=>{typeof r=="string"?Object.assign(Hr(t.store),{[r]:n}):Object.assign(Hr(t.store),r),t.store.set(Hr(t.store))},store:$s(e)};return t}globalThis.$altcha=globalThis.$altcha||{algorithms:new Map,defaults:zo({}),i18n:zo({}),instances:new Set,plugins:new Set};const Js={ariaLinkLabel:"Altcha (official website)",cancel:"Cancel",enterCode:"Enter code",enterCodeAria:"Enter code you hear. Press Space to play audio.",enterCodeFromImage:"To proceed, please enter the code from the image below.",error:"Verification failed. Try again later.",expired:"Verification expired. Try again.",footer:'Protected by <a href="https://altcha.org/" tabindex="-1" target="_blank" aria-label="Altcha (official website)">ALTCHA</a>',getAudioChallenge:"Get an audio challenge",label:"I'm not a robot",loading:"Loading...",reload:"Reload",verify:"Verify",verificationRequired:"Verification required!",verified:"Verified",verifying:"Verifying...",waitAlert:"Verifying... please wait."};globalThis.$altcha.i18n.set("en",Js);const zs="5";typeof window<"u"&&((ba=window.__svelte??(window.__svelte={})).v??(ba.v=new Set)).add(zs);const sr=Symbol("events"),Ko=new Set,gi=new Set;function Xo(e,t,r,n={}){function i(a){if(n.capture||pi.call(t,a),!a.cancelBubble)return Sn(()=>r==null?void 0:r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ot(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function _e(e,t,r,n,i){var a={capture:n,passive:i},l=Xo(e,t,r,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&kn(()=>{t.removeEventListener(e,l,a)})}function An(e,t,r){(t[sr]??(t[sr]={}))[e]=r}function In(e){for(var t=0;t<e.length;t++)Ko.add(e[t]);for(var r of gi)r(e)}let Qo=null;function pi(e){var L,A;var t=this,r=t.ownerDocument,n=e.type,i=((L=e.composedPath)==null?void 0:L.call(e))||[],a=i[0]||e.target;Qo=e;var l=0,s=Qo===e&&e[sr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[sr]=t;return}var f=i.indexOf(t);if(f===-1)return;c<=f&&(l=c)}if(a=i[l]||e.target,a!==t){xr(e,"currentTarget",{configurable:!0,get(){return a||r}});var v=H,g=x;Je(null),_t(null);try{for(var h,_=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var C=(A=a[sr])==null?void 0:A[n];C!=null&&(!a.disabled||e.target===a)&&C.call(a,e)}catch(X){h?_.push(X):h=X}if(e.cancelBubble||m===t||m===null)break;a=m}if(h){for(let X of _)queueMicrotask(()=>{throw X});throw h}}finally{e[sr]=t,delete e.currentTarget,Je(v),_t(g)}}}const _i=((wa=globalThis==null?void 0:globalThis.window)==null?void 0:wa.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ks(e){return(_i==null?void 0:_i.createHTML(e))??e}function ea(e){var t=ri("template");return t.innerHTML=Ks(e.replaceAll("<!>","<!---->")),t.content}function He(e,t){var r=x;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function se(e,t){var r=(t&hs)!==0,n=(t&vs)!==0,i,a=!e.startsWith("<!>");return()=>{if(D)return He(F,null),F;i===void 0&&(i=ea(a?e:"<!>"+e),r||(i=Ue(i)));var l=n||fo?document.importNode(i,!0):i.cloneNode(!0);if(r){var s=Ue(l),c=l.lastChild;
1He(s,c)}else He(l,l);return l}}function Xs(e,t,r="svg"){var n=!e.startsWith("<!>"),i=`<${r}>${n?e:"<!>"+e}</${r}>`,a;return()=>{if(D)return He(F,null),F;if(!a){var l=ea(i),s=Ue(l);a=Ue(s)}var c=a.cloneNode(!0);return He(c,c),c}}function mi(e,t){return Xs(e,t,"svg")}function On(e=""){if(!D){var t=gt(e+"");return He(t,t),t}var r=F;return r.nodeType!==Vr?(r.before(r=gt()),Oe(r)):mn(r),He(r,r),r}function ta(){if(D)return He(F,null),F;var e=document.createDocumentFragment(),t=document.createComment(""),r=gt();return e.append(t,r),He(t,r),e}function G(e,t){if(D){var r=x;((r.f&Ut)===0||r.nodes.end===null)&&(r.nodes.end=F),tr();return}e!==null&&e.before(t)}function Qs(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const el=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function tl(e){return el.includes(e)}const rl={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function nl(e){return e=e.toLowerCase(),rl[e]??e}const il=["touchstart","touchmove"];function ol(e){return il.includes(e)}function yt(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[Mr]??(e[Mr]=e.nodeValue))&&(e[Mr]=r,e.nodeValue=`${r}`)}function ra(e,t){return na(e,t)}function al(e,t){ti(),t.intro=t.intro??!1;const r=t.target,n=D,i=F;try{for(var a=Ue(r);a&&(a.nodeType!==Ur||a.data!==Kn);)a=pt(a);if(!a)throw Qt;vt(!0),Oe(a);const l=na(e,{...t,anchor:a});return vt(!1),l}catch(l){if(l instanceof Error&&l.message.split(` 2`).some(s=>s.startsWith("https://svelte.dev/e/")))throw l;return l!==Qt&&console.warn("Failed to hydrate: ",l),t.recover===!1&&ss(),ti(),Cs(r),vt(!1),ra(e,t)}finally{vt(n),Oe(i)}}const Rn=new Map;function na(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:l=!0,transformError:s}){ti();var c=void 0,f=qs(()=>{var v=r??t.appendChild(gt());Rs(v,{pending:()=>{}},_=>{At({});var m=Ne;if(a&&(m.c=a),i&&(n.$$events=i),D&&He(_,null),c=e(_,n)||{},D&&(x.nodes.end=F,F===null||F.nodeType!==Ur||F.data!==io))throw jr(),Qt;It()},s);var g=new Set,h=_=>{for(var m=0;m<_.length;m++){var C=_[m];if(!g.has(C)){g.add(C);var L=ol(C);for(const ce of[t,document]){var A=Rn.get(ce);A===void 0&&(A=new Map,Rn.set(ce,A));var X=A.get(C);X===void 0?(ce.addEventListener(C,pi,{passive:L}),A.set(C,1)):A.set(C,X+1)}}}};return h(zt(Ko)),gi.add(h),()=>{var L;for(var _ of g)for(const A of[t,document]){var m=Rn.get(A),C=m.get(_);--C==0?(A.removeEventListener(_,pi),m.delete(_),m.size===0&&Rn.delete(A)):m.set(_,C)}gi.delete(h),v!==r&&((L=v.parentNode)==null||L.removeChild(v))}});return yi.set(c,f),c}let yi=new WeakMap;function sl(e,t){const r=yi.get(e);return r?(yi.delete(e),r(t)):Promise.resolve()}class Pn{constructor(t,r=!0){O(this,"anchor");N(this,ut,new Map);N(this,Mt,new Map);N(this,ft,new Map);N(this,dr,new Set);N(this,an,!0);N(this,Fn,t=>{if(d(this,ut).has(t)){var r=d(this,ut).get(t),n=d(this,Mt).get(r);if(n)Zs(n),d(this,dr).delete(r);else{var i=d(this,ft).get(r);i&&(d(this,Mt).set(r,i.effect),d(this,ft).delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[a,l]of d(this,ut)){if(d(this,ut).delete(a),a===t)break;const s=d(this,ft).get(l);s&&(Ce(s.effect),d(this,ft).delete(l))}for(const[a,l]of d(this,Mt)){if(a===r||d(this,dr).has(a))continue;const s=()=>
2{if(Array.from(d(this,ut).values()).includes(a)){var f=document.createDocumentFragment();Jo(l,f),f.append(gt()),d(this,ft).set(a,{effect:l,fragment:f})}else Ce(l);d(this,dr).delete(a),d(this,Mt).delete(a)};d(this,an)||!n?(d(this,dr).add(a),Kr(l,s,!1)):s()}}});N(this,Pi,t=>{d(this,ut).delete(t);const r=Array.from(d(this,ut).values());for(const[n,i]of d(this,ft))r.includes(n)||(Ce(i.effect),d(this,ft).delete(n))});this.anchor=t,R(this,an,r)}ensure(t,r){var n=k;r&&!d(this,Mt).has(t)&&!d(this,ft).has(t)&&d(this,Mt).set(t,mt(()=>r(this.anchor))),d(this,ut).set(n,t),D&&(this.anchor=F),d(this,Fn).call(this,n)}}ut=new WeakMap,Mt=new WeakMap,ft=new WeakMap,dr=new WeakMap,an=new WeakMap,Fn=new WeakMap,Pi=new WeakMap;function ll(e,t,...r){var n=new Pn(e);zr(()=>{const i=t()??null;n.ensure(i,i&&(a=>i(a,...r)))},jt)}function bi(e){Ne===null&&ts(),Me(()=>{const t=Jr(e);if(typeof t=="function")return t})}function me(e,t,r=!1){var n;D&&(n=F,tr());var i=new Pn(e),a=r?jt:0;function l(s,c){if(D){var f=lo(n);if(s!==parseInt(f.substring(1))){var v=Qn();Oe(v),i.anchor=v,vt(!1),i.ensure(s,c),vt(!0);return}}i.ensure(s,c)}zr(()=>{var s=!1;t((c,f=0)=>{s=!0,l(f,c)}),s||l(-1,null)},a)}const ul=Symbol("NaN");function fl(e,t,r){D&&tr();var n=new Pn(e);zr(()=>{var i=t();i!==i&&(i=ul),n.ensure(i,r)})}function ia(e,t,r=!1,n=!1,i=!1,a=!1){var l=e,s="";if(r){var c=e;D&&(l=Oe(Ue(c)))}$e(()=>{var f=x;if(s===(s=t()??"")){D&&tr();return}if(r&&!D){f.nodes=null,c.innerHTML=s,s!==""&&He(Ue(c),c.lastChild);return}if(f.nodes!==null&&(qo(f.nodes.start,f.nodes.end),f.nodes=null),s!==""){if(D){F.data;for(var v=tr(),g=v;v!==null&&(v.nodeType!==Ur||v.data!=="");)g=v,v=pt(v);if(v===null)throw jr(),Qt;He(F,g),l=Oe(v);return}var h=n?gs:i?ps:void 0,_=ri(n?"svg":i?"math":"template",h);_.innerHTML=s;var m=n||i?_:_.content;if(He(Ue(m),m.lastChild),n||i)for(;Ue(m);)l.before(Ue(m));else l.before(m)}})}function cl(e,t,r){var n;D&&(n=F,tr());var i=new Pn(e);zr(()=>{var a=t()??null;if(D){var l=lo(n),s=l===Kn,c=a!==null;if(s!==c){var f=Qn();Oe(f),i.anchor=f,vt(!1),i.ensure(a,a&&(v=>r(v,a))),vt(!0);return}}i.ensure(a,a&&(v=>r(v,a)))},jt)}function dl(e,t){var r=void 0,n;Go(()=>{r!==(r=t())&&(n&&(Ce(n),n=null),r&&(n=mt(()=>{hi(()=>r(e))})))})}function oa(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=oa(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function hl(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=oa(e))&&(n&&(n+=" "),n+=t);return n}function vl(e){return typeof e=="object"?hl(e):e??""}const aa=[...` 3\r\f \v\uFEFF`];function gl(e,t,r){var n=e==null?"":""+e;if(r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var a=i.length,l=0;(l=n.indexOf(i,l))>=0;){var s=l+a;(l===0||aa.includes(n[l-1]))&&(s===n.length||aa.includes(n[s]))?n=(l===0?"":n.substring(0,l))+n.substring(s+1):l=s}}return n===""?null:n}function sa(e,t=!1){var r=t?" !important;":";",n="";for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==""&&(n+=" "+i+": "+a+r)}return n}function wi(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function pl(e,t){if(t){var r="",n,i;if(Array.isArray(t)?(n=t[0],i=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,s=!1,c=[];n&&c.push(...Object.keys(n).map(wi)),i&&c.push(...Object.keys(i).map(wi));var f=0,v=-1;const C=e.length;for(var g=0;g<C;g++){var h=e[g];if(s?h==="/"&&e[g-1]==="*"&&(s=!1):a?a===h&&(a=!1):h==="/"&&e[g+1]==="*"?s=!0:h==='"'||h==="'"?a=h:h==="("?l++:h===")"&&l--,!s&&a===!1&&l===0){if(h===":"&&v===-1)v=g;else if(h===";"||g===C-1){if(v!==-1){var _=wi(e.substring(f,v).trim());if(!c.includes(_)){h!==";"&&g++;var m=e.substring(f,g).trim();r+=" "+m+";"}}f=g+1,v=-1}}}}return n&&(r+=sa(n)),i&&(r+=sa(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function _l(e,t,r,n,i,a){var l=e[Jn];if(D||l!==r||l===void 0){var s=gl(r,n,a);(!D||s!==e.getAttribute("class"))&&(s==null?e.removeAttribute("class"):t?e.className=s:e.setAttribute("class",s)),e[Jn]=r}else if(a&&i!==a)for(var c in a){var f=!!a[c];(i==null||f!==!!i[c])&&e.classList.toggle(c,f)}return a}function Ei(e,t={},r,n){for(var i in r){var a=r[i];t[i]!==a&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,n))}}function ml(e,t,r,n){var i=e[zn];if(D||i!==t){var a=pl(t,n);(!D||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e[zn]=t}else n&&(Array.isArray(n)?(Ei(e,r==null?void 0:r[0],n[0]),Ei(e,r==null?void 0:r[1],n[1],"important")):Ei(e,r,n));return n}function Ci(e,t,r=!1){if(e.multiple){if(t==null)return;if(!z(t))return bs();
3for(var n of e.options)n.selected=t.includes(la(n));return}for(n of e.options){var i=la(n);if(Es(i,t)){n.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function yl(e){var t=new MutationObserver(()=>{Ci(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),kn(()=>{t.disconnect()})}function la(e){return"__value"in e?e.__value:e.value}const Xr=Symbol("class"),Qr=Symbol("style"),ua=Symbol("is custom element"),fa=Symbol("is html"),bl=Fr?"link":"LINK",wl=Fr?"input":"INPUT",El=Fr?"option":"OPTION",Cl=Fr?"select":"SELECT",Sl=Fr?"progress":"PROGRESS";function Si(e){if(D){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;J(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;J(e,"checked",null),e.checked=i}}};e[Dr]=r,Ot(r),Po()}}function $l(e,t){var r=$i(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==Sl)||(e.value=t??"")}function kl(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function J(e,t,r,n){var i=$i(e);D&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===bl)||i[t]!==(i[t]=r)&&(t==="loading"&&(e[Qa]=r),r==null?e.removeAttribute(t):typeof r!="string"&&da(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Tl(e,t,r,n,i=!1,a=!1){if(D&&i&&e.nodeName===wl){var l=e,s=l.type==="checkbox"?"defaultChecked":"defaultValue";s in r||Si(l)}var c=$i(e),f=c[ua],v=!c[fa];let g=D&&f;g&&vt(!1);var h=t||{},_=e.nodeName===El;for(var m in t)m in r||(r[m]=null);r.class?r.class=vl(r.class):r[Xr]&&(r.class=null),r[Qr]&&(r.style??(r.style=null));var C=da(e);for(const q in r){let T=r[q];if(_&&q==="value"&&T==null){e.value=e.__value="",h[q]=T;continue}if(q==="class"){var L=e.namespaceURI==="http://www.w3.org/1999/xhtml";_l(e,L,T,n,t==null?void 0:t[Xr],r[Xr]),h[q]=T,h[Xr]=r[Xr];continue}if(q==="style"){ml(e,T,t==null?void 0:t[Qr],r[Qr]),h[q]=T,h[Qr]=r[Qr];continue}var A=h[q];if(!(T===A&&!(T===void 0&&e.hasAttribute(q)))){h[q]=T;var X=q[0]+q[1];if(X!=="$$")if(X==="on"){const ie={},Le="$$"+q;let M=q.slice(2);var ce=tl(M);if(Qs(M)&&(M=M.slice(0,-7),ie.capture=!0),!ce&&A){if(T!=null)continue;e.removeEventListener(M,h[Le],ie),h[Le]=null}if(ce)An(M,e,T),In([M]);else if(T!=null){let ge=function(Et){h[q].call(this,Et)};h[Le]=Xo(M,e,ge,ie)}}else if(q==="style")J(e,q,T);else if(q==="autofocus")Fs(e,!!T);else if(!f&&(q==="__value"||q==="value"&&T!=null))e.value=e.__value=T;else if(q==="selected"&&_)kl(e,T);else{var Y=q;v||(Y=nl(Y));var ke=Y==="defaultValue"||Y==="defaultChecked";if(T==null&&!f&&!ke)if(c[q]=null,Y==="value"||Y==="checked"){let ie=e;const Le=t===void 0;if(Y==="value"){let M=ie.defaultValue;ie.removeAttribute(Y),ie.defaultValue=M,ie.value=ie.__value=Le?M:null}else{let M=ie.defaultChecked;ie.removeAttribute(Y),ie.defaultChecked=M,ie.checked=Le?M:!1}}else e.removeAttribute(q);else ke||C.includes(Y)&&(f||typeof T!="string")?(e[Y]=T,Y in c&&(c[Y]=ve)):typeof T!="function"&&J(e,Y,T)}}}return g&&vt(!0),h}function Ln(e,t,r=[],n=[],i=[],a,l=!1,s=!1){So(i,r,n,c=>{var f=void 0,v={},g=e.nodeName===Cl,h=!1;if(Go(()=>{var m=t(...c.map(o)),C=Tl(e,f,m,a,l,s);h&&g&&"value"in m&&Ci(e,m.value);for(let A of Object.getOwnPropertySymbols(v))m[A]||Ce(v[A]);for(let A of Object.getOwnPropertySymbols(m)){var L=m[A];A.description===_s&&(!f||L!==f[A])&&(v[A]&&Ce(v[A]),v[A]=mt(()=>dl(e,()=>L))),C[A]=L}f=C}),g){var _=e;hi(()=>{Ci(_,f.value,!0),yl(_)})}h=!0})}function $i(e){return e[pn]??(e[pn]={[ua]:e.nodeName.includes("-"),[fa]:e.namespaceURI===oo})}var ca=new Map;function da(e){var t=e.getAttribute("is")||e.nodeName,r=ca.get(t);if(r)return r;ca.set(t,r=[]);for(var n,i=e,a=Element.prototype;a!==i;){n=Ba(i);for(var l in n)n[l].set&&l!=="innerHTML"&&l!=="textContent"&&l!=="innerText"&&r.push(l);i=Ki(i)}return r}function Al(e,t,r=t){var n=new WeakSet;Vs(e,"input",async i=>{var a=i?e.defaultValue:e.value;if(a=ki(e)?Ti(a):a,r(a),k!==null&&n.add(k),await ar(),a!==(a=t())){var l=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??"",s!==null){var f=e.value.length;l===s&&s===c&&f>c?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=l,e.selectionEnd=Math.min(s,f))}}}),(D&&e.defaultValue!==e.value||Jr(t)==null&&e.value)&&(r(ki(e)?Ti(e.value):e.value),k!==null&&n.add(k)),Tn(()=>{var i=t();if(e===document.activeElement){var a=k;if(n.has(a))return}ki(e)&&i===Ti(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function ki(e){var t=e.type;return t==="number"||t==="range"}function Ti(e){return e===""?null:+e}function Ai(e,t){return e===t||(e==null?void 0:e[yr])===t}function qt(e={},t,r,n){var i=Ne.r,a=x;return hi(()=>{var l,s;return Tn(()=>{l=s,s=[],Jr(()=>{Ai(r(...s),e)||(t(e,...s),l&&Ai(r(...l),e)&&t(null,...l))})}),()=>{let c=a;for(;c!==i&&c.parent!==null&&c.parent.f&Zn;)c=c.parent;const f=()=>{s&&Ai(r(...s),e)&&t(null,...s)},v=c.teardown;c.teardown=()=>{f(),v==null||v()}}}),e}const Il={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function Nn(e,t,r){return new Proxy({props:e,exclude:t},Il)}function le(e,t,r,n){var i=n,a=!0,l=()=>(a&&(a=!1,i=n),i),s;
vendor: 4,500 bytes, line 3
3s=e[t],s===void 0&&n!==void 0&&(s=l());var c;c=()=>{var h=e[t];return h===void 0?l():(a=!0,h)};var f=!1,v=fi(()=>(f=!1,c())),g=x;return(function(h,_){if(arguments.length>0){const m=_?o(v):h;return S(v,m),f=!0,i!==void 0&&(i=m),h}return Pt&&f||(g.f&ot)!==0?v.v:o(v)})}function Ol(e){return new Rl(e)}class Rl{constructor(t){N(this,Dt);N(this,et);var a;var r=new Map,n=(l,s)=>{var c=Io(s,!1,!1);return r.set(l,c),c};const i=new Proxy({...t.props||{},$$events:{}},{get(l,s){return o(r.get(s)??n(s,Reflect.get(l,s)))},has(l,s){return s===Xa?!0:(o(r.get(s)??n(s,Reflect.get(l,s))),Reflect.has(l,s))},set(l,s,c){return S(r.get(s)??n(s,c),c),Reflect.set(l,s,c)}});R(this,et,(t.hydrate?al:ra)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!((a=t==null?void 0:t.props)!=null&&a.$$host)||t.sync===!1)&&ee(),R(this,Dt,i.$$events);for(const l of Object.keys(d(this,et)))l==="$set"||l==="$destroy"||l==="$on"||xr(this,l,{get(){return d(this,et)[l]},set(s){d(this,et)[l]=s},enumerable:!0});d(this,et).$set=l=>{Object.assign(i,l)},d(this,et).$destroy=()=>{sl(d(this,et))}}$set(t){d(this,et).$set(t)}$on(t,r){d(this,Dt)[t]=d(this,Dt)[t]||[];const n=(...i)=>r.call(this,...i);return d(this,Dt)[t].push(n),()=>{d(this,Dt)[t]=d(this,Dt)[t].filter(i=>i!==n)}}$destroy(){d(this,et).$destroy()}}Dt=new WeakMap,et=new WeakMap;let ha=class{};typeof HTMLElement=="function"&&(ha=class extends HTMLElement{constructor(t,r,n){super();O(this,"$$ctor");O(this,"$$s");O(this,"$$c");O(this,"$$cn",!1);O(this,"$$d",{});O(this,"$$r",!1);O(this,"$$p_d",{});O(this,"$$l",{});O(this,"$$l_u",new Map);O(this,"$$me");O(this,"$$shadowRoot",null);this.$$ctor=t,this.$$s=r,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){const i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return a=>{const l=ri("slot");i!=="default"&&(l.name=i),G(a,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=Pl(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=xn(a,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=Ol({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Ys(()=>{Tn(()=>{var i;this.$$r=!0;for(const a of Ft(this.$$c)){if(!((i=this.$$p_d[a])!=null&&i.reflect))continue;this.$$d[a]=this.$$c[a];const l=xn(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 i in this.$$l)for(const a of this.$$l[i]){const l=this.$$c.$on(i,a);this.$$l_u.set(a,l)}this.$$l={}}}attributeChangedCallback(t,r,n){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=xn(t,n,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Ft(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function xn(e,t,r,n){var a;const i=(a=r[e])==null?void 0:a.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Pl(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function Bt(e,t,r,n,i,a){let l=class extends ha{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return Ft(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Ft(t).forEach(s=>{xr(l.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(c){var g;c=xn(s,c,t),this.$$d[s]=c;var f=this.$$c;if(f){var v=(g=pr(f,s))==null?void 0:g.get;v?f[s]=c:f.$set({[s]:c})}}})}
3),n.forEach(s=>{xr(l.prototype,s,{get(){var c;return(c=this.$$c)==null?void 0:c[s]}})}),e.element=l,l}var Ll=se('<div class="altcha-checkbox"><input/> <svg aria-hidden="true" width="12" height="9" viewBox="0 0 12 9"><polyline points="1 5 4 8 11 1"></polyline></svg> <div class="altcha-spinner altcha-checkbox-spinner" aria-hidden="true"></div></div>');function va(e,t){At(t,!0);let r=le(t,"loading"),n=Nn(t,["$$slots","$$events","$$legacy","$$host","loading"]),i;function a(){i==null||i.click()}var l={get loading(){return r()},set loading(v){r(v),ee()}},s=Ll(),c=fe(s);Ln(c,()=>({type:"checkbox",...n}),void 0,void 0,void 0,void 0,!0),qt(c,v=>i=v,()=>i);var f=ae(c,2);return Xn(2),re(s),$e(()=>J(s,"data-loading",r())),An("click",f,a),G(e,s),It(l)}In(["click"]),Bt(va,{loading:{}},[],[],{mode:"open"});var Nl=se('<div class="altcha-checkbox-native"><input/> <div class="altcha-spinner altcha-checkbox-native-spinner"></div></div>');function ga(e,t){At(t,!0);let r=le(t,"loading"),n=Nn(t,["$$slots","$$events","$$legacy","$$host","loading"]);var i={get loading(){return r()},set loading(s){r(s),ee()}},a=Nl(),l=fe(a);return Ln(l,()=>({type:"checkbox",...n}),void 0,void 0,void 0,void 0,!0),Xn(2),re(a),$e(()=>J(a,"data-loading",r())),G(e,a),It(i)}Bt(ga,{loading:{}},[],[],{mode:"open"});var xl=se('<div><a target="_blank" class="altcha-logo" aria-hidden="true" tabindex="-1"><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>');function Ii(e,t){At(t,!0);let r=le(t,"strings");const n="https://altcha.org";var i={get strings(){return r()},set strings(s){r(s),ee()}},a=xl(),l=fe(a);
3return J(l,"href",n),re(a),$e(()=>J(l,"aria-label",r().ariaLinkLabel)),G(e,a),It(i)}Bt(Ii,{strings:{}},[],[],{mode:"open"});var Ml=se('<div class="altcha-footer"><p></p> <!></div>');function Oi(e,t){At(t,!0);let r=le(t,"logo"),n=le(t,"strings");var i={get logo(){return r()},set logo(f){r(f),ee()},get strings(){return n()},set strings(f){n(f),ee()}},a=Ml(),l=fe(a);ia(l,()=>n().footer,!0),re(l);var s=ae(l,2);{var c=f=>{Ii(f,{get strings(){return n()}})};me(s,f=>{r()&&f(c)})}return re(a),G(e,a),It(i)}Bt(Oi,{logo:{},strings:{}},[],[],{mode:"open"});var Dl=se('<div class="altcha-switch"><input/> <div class="altcha-switch-toggle"><div class="altcha-spinner altcha-switch-spinner"></div></div></div>');function pa(e,t){At(t,!0);let r=le(t,"loading"),n=Nn(t,["$$slots","$$events","$$legacy","$$host","loading"]),i;function a(){i==null||i.click()}var l={get loading(){return r()},set loading(v){r(v),ee()}},s=Dl(),c=fe(s);Ln(c,()=>({type:"checkbox",...n}),void 0,void 0,void 0,void 0,!0),qt(c,v=>i=v,()=>i);var f=ae(c,2);return re(s),$e(()=>J(s,"data-loading",r())),An("click",f,a),G(e,s),It(l)}In(["click"]),Bt(pa,{loading:{}},[],[],{mode:"open"});var Se=(e=>(e.ERROR="error",e.LOADING="loading",e.PLAYING="playing",e.PAUSED="paused",e.READY="ready",e))(Se||{}),B=(e=>(e.CODE="code",e.ERROR="error",e.VERIFIED="verified",e.VERIFYING="verifying",e.UNVERIFIED="unverified",e.EXPIRED="expired",e))(B||{}),Fl=se('<div class="altcha-code-challenge-title"> </div>'),Vl=se('<div class="altcha-spinner"></div>'),Ul=mi('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'),jl=mi('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'),Hl=mi('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'),Gl=se('<button type="button" class="altcha-button altcha-button-secondary"><!></button>'),Yl=se('<audio hidden="" autoplay=""></audio>'),ql=se('<div class="altcha-code-challenge"><form data-code-challenge="true"><!> <div class="altcha-code-challenge-text"> </div> <img class="altcha-code-challenge-image" alt=""/> <div class="altcha-code-challenge-row"><input type="text" class="altcha-input" autocomplete="off" name="" required=""/> <!> <button type="button" class="altcha-button altcha-button-secondary"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <div class="altcha-code-challenge-buttons"><button type="submit" class="altcha-button"> </button> <button type="button" class="altcha-button altcha-button-secondary"> </button></div></form> <!></div>');function _a(e,t){At(t,!0);let r=le(t,"audioUrl"),n=le(t,"codeChallenge"),i=le(t,"config"),a=le(t,"imageUrl"),l=le(t,"onCancel"),s=le(t,"onReload"),c=le(t,"onSubmit"),f=le(t,"strings"),v=U(void 0),g=U(void 0),h=U(void 0),_=U(!1),m=U(""),C=U(!1);
3bi(()=>(i().disableAutoFocus||ar().then(()=>{var E;(E=o(h))==null||E.focus()}),()=>{o(g)&&(o(g).pause(),S(g,void 0))}));function L(){S(v,Se.PAUSED,!0)}function A(E){S(v,Se.ERROR,!0)}function X(){S(v,Se.READY,!0)}function ce(){S(v,Se.LOADING,!0)}function Y(){S(v,Se.PLAYING,!0)}function ke(){S(v,Se.PAUSED,!0)}function q(E){var K;E.code==="Space"?(E.preventDefault(),E.stopPropagation(),ie()):E.code==="Escape"&&(E.preventDefault(),E.stopPropagation(),(K=l())==null||K())}function T(E){var K;E.preventDefault(),E.stopPropagation(),(K=c())==null||K(o(m))}function ie(){o(g)?o(v)===Se.LOADING||(o(g).paused?(r()&&o(g).src!==r()&&(o(g).src=r()),o(g).currentTime=0,o(g).play()):o(g).pause()):(S(C,!0),requestAnimationFrame(()=>{o(g)&&r()&&(o(g).src=r(),o(g).play())}))}var Le={get audioUrl(){return r()},set audioUrl(E){r(E),ee()},get codeChallenge(){return n()},set codeChallenge(E){n(E),ee()},get config(){return i()},set config(E){i(E),ee()},get imageUrl(){return a()},set imageUrl(E){a(E),ee()},get onCancel(){return l()},set onCancel(E){l(E),ee()},get onReload(){return s()},set onReload(E){s(E),ee()},get onSubmit(){return c()},set onSubmit(E){c(E),ee()},get strings(){return f()},set strings(E){f(E),ee()}},M=ql(),ge=fe(M),Et=fe(ge);{var Be=E=>{var K=Fl(),gr=fe(K,!0);re(K),$e(()=>yt(gr,f().verificationRequired)),G(E,K)};me(Et,E=>{i().codeChallengeDisplay!=="standard"&&E(Be)})}var Fe=ae(Et,2),de=fe(Fe,!0);re(Fe);var Ct=ae(Fe,2),$=ae(Ct,2),Q=fe($);Si(Q),Q.disabled=o(_),qt(Q,E=>S(h,E),()=>o(h));var Te=ae(Q,2);{var y=E=>{var K=Gl(),gr=fe(K);{var Ni=Ve=>{var St=Vl();G(Ve,St)},fn=Ve=>{var St=Ul();G(Ve,St)},xi=Ve=>{var St=jl();G(Ve,St)},Mi=Ve=>{var St=Hl();G(Ve,St)};me(gr,Ve=>{o(v)===Se.LOADING?Ve(Ni):o(v)===Se.ERROR?Ve(fn,1):o(v)===Se.PLAYING?Ve(xi,2):Ve(Mi,-1)})}re(K),$e(()=>{J(K,"title",f().getAudioChallenge),K.disabled=o(v)===Se.LOADING||o(v)===Se.ERROR,J(K,"aria-label",o(v)===Se.LOADING?f().loading:f().getAudioChallenge)}),_e("click",K,()=>ie(),!0),G(E,K)};me(Te,E=>{n().audio&&E(y)})}var hr=ae(Te,2);re($);var Vn=ae($,2),tt=fe(Vn),Li=fe(tt,!0);re(tt);var vr=ae(tt,2),sn=fe(vr,!0);re(vr),re(Vn),re(ge);var ln=ae(ge,2);{var un=E=>{var K=Yl();qt(K,gr=>S(g,gr),()=>o(g)),_e("error",K,A),_e("loadstart",K,ce),_e("canplay",K,X),_e("pause",K,ke),_e("playing",K,Y),_e("ended",K,L),G(E,K)};me(ln,E=>{o(C)&&E(un)})}return re(M),$e(()=>{yt(de,f().enterCodeFromImage),J(Ct,"src",a()),J(Q,"minlength",n().length||1),J(Q,"maxlength",n().length),J(Q,"placeholder",f().enterCode),J(Q,"aria-label",o(v)===Se.LOADING?f().loading:o(v)===Se.PLAYING?"":f().enterCodeAria),J(Q,"aria-live",o(v)?"assertive":"polite"),J(Q,"aria-busy",o(v)===Se.LOADING),J(hr,"title",f().reload),J(hr,"aria-label",f().reload),J(tt,"aria-label",f().verify),yt(Li,f().verify),J(vr,"aria-label",f().cancel),yt(sn,f().cancel)}),_e("submit",ge,T,!0),An("keydown",Q,q),Al(Q,()=>o(m),E=>S(m,E)),_e("click",hr,()=>{var E;return(E=s())==null?void 0:E()},!0),_e("click",vr,()=>{var E;return(E=l())==null?void 0:E()},!0),G(e,M),It(Le)}In(["keydown"]),Bt(_a,{audioUrl:{},codeChallenge:{},config:{},imageUrl:{},onCancel:{},onReload:{},onSubmit:{},strings:{}},[],[],{mode:"open"});var Bl=se('<div class="altcha-popover-backdrop" data-backdrop=""></div>'),Wl=se('<div class="altcha-popover-arrow"></div>'),Zl=se('<div role="button" class="altcha-popover-close">×</div>'),Jl=se('<!> <div><!> <!> <div class="altcha-popover-content"><!></div></div>',1);function Ri(e,t){At(t,!0);let r=le(t,"anchor"),n=le(t,"children"),i=le(t,"display",7,"standard"),a=le(t,"backdrop",7,!1),l=le(t,"onClickOutside"),s=le(t,"onClickOutsideDelay",7,600),c=le(t,"onClose"),f=le(t,"placement",7,"auto"),v=le(t,"updateUISignal"),g=le(t,"variant",7,"neutral"),h=Nn(t,["$$slots","$$events","$$legacy","$$host","anchor","children","display","backdrop","onClickOutside","onClickOutsideDelay","onClose","placement","updateUISignal","variant"]),_=U(void 0),m=U(void 0),C=U(!1),L=U(0);Me(()=>{f()!=="auto"&&S(C,f()==="top")}),Me(()=>{v()&&ke()}),bi(()=>{const $=i()==="bottomsheet"||i()==="overlay";return $&&(o(m)&&document.body.append(o(m)),o(_)&&document.body.append(o(_))),ke(),ar().then(()=>{S(L,Date.now(),!0)}),()=>{$&&(o(m)&&document.body.removeChild(o(m)),o(_)&&document.body.removeChild(o(_)))}});function A(){var $;($=c())==null||$()}function X($){var Te,y;const Q=$.target;!((Te=o(_))!=null&&Te.contains(Q))&&(!s()||o(L)+s()<Date.now())&&((y=l())==null||y())}function ce(){ke()}function Y(){ke()}
3function ke(){if(r()&&f()==="auto"&&o(_)){const $=r().getBoundingClientRect(),Te=document.documentElement.clientHeight-($.top+$.height)<o(_).clientHeight;o(C)!==Te&&S(C,Te)}}var q={get anchor(){return r()},set anchor($){r($),ee()},get children(){return n()},set children($){n($),ee()},get display(){return i()},set display($="standard"){i($),ee()},get backdrop(){return a()},set backdrop($=!1){a($),ee()},get onClickOutside(){return l()},set onClickOutside($){l($),ee()},get onClickOutsideDelay(){return s()},set onClickOutsideDelay($=600){s($),ee()},get onClose(){return c()},set onClose($){c($),ee()},get placement(){return f()},set placement($="auto"){f($),ee()},get updateUISignal(){return v()},set updateUISignal($){v($),ee()},get variant(){return g()},set variant($="neutral"){g($),ee()}},T=Jl();_e("click",rr,X,!0),_e("resize",rr,ce),_e("scroll",rr,Y);var ie=wr(T);{var Le=$=>{var Q=Bl();qt(Q,Te=>S(m,Te),()=>o(m)),G($,Q)};me(ie,$=>{a()&&$(Le)})}var M=ae(ie,2);Ln(M,()=>({...h,class:`altcha-popover ${(t.class||"")??""}`,"data-popover":!0,"data-variant":g(),"data-top":o(C),"data-display":i()}));var ge=fe(M);{var Et=$=>{var Q=Wl();G($,Q)};me(ge,$=>{i()==="standard"&&$(Et)})}var Be=ae(ge,2);{var Fe=$=>{var Q=Zl();_e("click",Q,A,!0),G($,Q)};me(Be,$=>{i()!=="standard"&&$(Fe)})}var de=ae(Be,2),Ct=fe(de);return ll(Ct,()=>n()??Vt),re(de),re(M),qt(M,$=>S(_,$),()=>o(_)),G(e,T),It(q)}Bt(Ri,{anchor:{},children:{},display:{},backdrop:{},onClickOutside:{},onClickOutsideDelay:{},onClose:{},placement:{},updateUISignal:{},variant:{}},[],[],{mode:"open"});function zl(e){return Array.from(new Uint8Array(e)).map(t=>t.toString(16).padStart(2,"0")).join("")}async function ma(e){var h;const{challenge:t,concurrency:r=navigator.hardwareConcurrency,controller:n=new AbortController,createWorker:i,onOutOfMemory:a=_=>_>1?Math.floor(_/2):0,counterMode:l,timeout:s=9e4}=e,c=Math.min(16,Math.max(1,r)),f=[],v=()=>{for(const _ of f)_.terminate()};for(let _=0;_<c;_++)f.push(await i(t.parameters.algorithm));let g=null;try{g=await Promise.race(f.map((_,m)=>(n.signal.addEventListener("abort",()=>{_.postMessage({type:"abort"})}),new Promise((C,L)=>{_.addEventListener("error",A=>{L(A)}),_.addEventListener("message",A=>{if(A.data){for(const X of f)X!==_&&X.postMessage({type:"abort"});if(A.data.error)return L(new Error(A.data.error))}C(A.data)}),_.postMessage({challenge:t,counterMode:l,counterStart:m,counterStep:c,timeout:s,type:"work"})}))))}catch(_){if(_ instanceof Error&&!!((h=_==null?void 0:_.message)!=null&&h.includes("Out of memory"))&&a){v();const C=a(c);if(C)return ma({...e,challenge:t,controller:n,concurrency:C,createWorker:i})}throw _}finally{v()}return n.signal.aborted?null:g||null}class Kl{constructor(t={}){O(this,"TAG_CODES",{INPUT:1,TEXTAREA:2,SELECT:3,BUTTON:4,A:5,DETAILS:6,SUMMARY:7,IFRAME:8,VIDEO:9,AUDIO:10});O(this,"maxSamples");O(this,"sampleInterval");O(this,"target");O(this,"focusStartTime",0);O(this,"focusInteraction",0);O(this,"focusInteractionTimer",null);O(this,"lastPointerSample",0);O(this,"lastTouchSample",0);O(this,"lastScrollSample",0);O(this,"pendingPointer",null);O(this,"pendingTouch",null);O(this,"focus",[]);O(this,"pointer",[]);O(this,"scroll",[]);O(this,"touch",[]);O(this,"onFocus",t=>{if(this.focusInteraction===2)return;const r=t.target;if(!(r instanceof Element))return;const n=performance.now();this.focusStartTime===0&&(this.focusStartTime=n),this.focus.push([Math.round(n-this.focusStartTime),r.tabIndex,this.TAG_CODES[r.tagName]??0,this.focusInteraction?1:0]),this.evict(this.focus)});O(this,"onInteraction",t=>{this.focusInteraction="keyCode"in t?1:2,this.focusInteractionTimer&&clearTimeout(this.focusInteractionTimer),this.focusInteractionTimer=setTimeout(()=>{this.focusInteraction=0},100)});O(this,"onPointer",t=>{if(t.pointerType==="touch")return;const r=t.timeStamp||performance.now();this.pendingPointer=[Math.round(t.clientX),Math.round(t.clientY),Math.round(r)],r-this.lastPointerSample>=this.sampleInterval&&(this.pointer.push(this.pendingPointer),this.lastPointerSample=r,this.pendingPointer=null,this.evict(this.pointer))});O(this,"onScroll",()=>{const t=performance.now();t-this.lastScrollSample<this.sampleInterval||(this.scroll.push([Math.round(window.scrollY),Math.round(t)]),this.lastScrollSample=t,this.evict(this.scroll))});O(this,"onTouchMove",t=>{const r=t.timeStamp||performance.now(),n=t.touches[0];n&&(this.pendingTouch=[Math.round(n.clientX),Math.round(n.clientY),Math.round(r),Math.round(n.force*1e3)/1e3,Math.round(n.radiusX||0),Math.round(n.radiusY||0)],r-this.lastTouchSample>=this.sampleInterval&&(this.touch.push(this.pendingTouch),this.lastTouchSample=r,this.pendingTouch=null,this.evict(this.touch)))});const{maxSamples:r=60,sampleInterval:n=50,target:i=window}=t;this.maxSamples=r,this.sampleInterval=n,this.target=i,this.attach()}destroy(){const t={capture:!0};this.target.removeEventListener("focusin",this.onFocus,t),this.target.removeEventListener("keydown",this.onInteraction,t),this.target.removeEventListener("pointerdown",this.onInteraction,t),this.target.removeEventListener("pointermove",this.onPointer,t),this.target.removeEventListener("scroll",this.onScroll,t),this.target.removeEventListener("touchmove",this.onTouchMove,t)}export(){return{focus:this.focus,maxTouchPoints:navigator.maxTouchPoints||0,pointer:this.pointer,scroll:this.scroll,t
3ime:Date.now(),touch:this.touch}}attach(){const t={passive:!0,capture:!0};this.target.addEventListener("focusin",this.onFocus,t),this.target.addEventListener("keydown",this.onInteraction,t),this.target.addEventListener("pointerdown",this.onInteraction,t),this.target.addEventListener("pointermove",this.onPointer,t),this.target.addEventListener("scroll",this.onScroll,t),this.target.addEventListener("touchmove",this.onTouchMove,t)}evict(t){t.length>this.maxSamples&&t.splice(0,t.length-this.maxSamples)}}var Xl=se('<div class="altcha-overlay-backdrop" data-backdrop=""></div>'),Ql=se('<div class="altcha-overlay-content"></div>'),eu=se('<div role="button" class="altcha-overlay-close">×</div> <!>',1),tu=se('<div class="altcha-floating-arrow"></div>'),ru=se('<input type="hidden"/>'),nu=se('<div class="altcha-error">Secure context (HTTPS) required.</div>'),iu=se('<div class="altcha-error"> </div>'),ou=se('<div class="altcha-error"> </div>'),au=se("<!> <!>",1),su=se('<!> <div class="altcha"><!> <div class="altcha-main"><div><div class="altcha-checkbox-wrap"><!> <label><!></label></div> <!></div> <!> <!> <!></div> <!></div>',1);function lu(e,t){At(t,!0);const r=()=>mo(v,"$altchaDefaults",i),n=()=>mo(m,"$altchaI18nStore",i),[i,a]=ks(),l='input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])',s='input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])',c=["ar","fa","he","ur"],{isSecureContext:f}=globalThis,{store:v}=globalThis.$altcha.defaults,g=navigator.hardwareConcurrency||2,h=navigator.deviceMemory||0,_=h&&h<=4?Math.min(4,g):g,m=globalThis.$altcha.i18n.store,C=t.$$host,L=(u,p)=>{ar().then(()=>{C==null||C.dispatchEvent(new CustomEvent(u,{detail:p}))})};let A=null,X=U(Rt(new URL(location.origin))),ce=U(!1),Y=U(null),ke=U(null),q=U(null),T=U(Rt(B.UNVERIFIED)),ie=U(void 0),Le=U(void 0),M=U(null),ge=U(void 0),Et=U(null),Be=U(null),Fe=U(null),de=U(null),Ct=U(Rt([])),$=U(0),Q=U(Rt({})),Te=U(!0);const y=Re(()=>({fetch:(u,p)=>fetch(u,p),audioChallengeLanguage:"",auto:"off",barPlacement:"bottom",challenge:"",codeChallenge:null,codeChallengeDisplay:"standard",credentials:null,debug:!1,disableAutoFocus:!1,display:"standard",floatingAnchor:"",floatingOffset:8,floatingPersist:!1,floatingPlacement:"auto",hideFooter:!1,hideLogo:!1,humanInteractionSignature:!0,language:"",mockError:!1,minDuration:500,overlayContent:"",name:"altcha",popoverPlacement:"auto",retryOnOutOfMemoryError:!0,setCookie:null,serverVerificationFields:!1,serverVerificationTimeZone:!1,test:!1,timeout:9e4,type:"checkbox",validationMessage:"",verifyFunction:null,verifyUrl:"",workers:_,...r(),...o(Q)})),hr=Re(()=>`altcha-checkbox-${t.id||Math.floor(Math.random()*1e12).toString(16)}`),Vn=Re(()=>cu(o(y).type)),tt=Re(()=>o(y).auto),Li=Re(()=>o(T)===B.VERIFYING),vr=Re(()=>!o(y).hideFooter),sn=Re(()=>!o(y).hideLogo&&o(y).display!=="bar"),ln=Re(()=>du(n(),[o(y).language,document.documentElement.lang,...navigator.languages])),un=Re(()=>c.includes(o(ln).language)?"rtl":void 0),E=Re(()=>({...o(ln).strings})),K=Re(()=>{var u,p,w;return(p=(u=o(Y))==null?void 0:u.audio)!=null&&p.match(/^(https?:)?\//)?Un(o(Y).audio,o(X),{language:o(y).audioChallengeLanguage||o(ln).language}).toString():(w=o(Y))==null?void 0:w.audio}),gr=Re(()=>{var u,p,w;return(p=(u=o(Y))==null?void 0:u.image)!=null&&p.match(/^(https?:)?\//)?Un(o(Y).image,o(X)):(w=o(Y))==null?void 0:w.image});Me(()=>{cn({auto:t.auto,challenge:t.challenge,display:t.display,language:t.language,name:t.name,type:t.type,workers:t.workers})}),Me(()=>{t.theme?C==null||C.setAttribute("theme",t.theme):C==null||C.removeAttribute("theme")}),Me(()=>{if(t.configuration)try{cn(JSON.parse(t.configuration))}catch{te("unable to parse the `configuration` attribute (JSON expected)")}}),Me(()=>{o(q)!==o(y).display&&jn(o(y).display)}),Me(()=>{o(ce)&&o(T)===B.VERIFYING&&S(ce,!1)}),Me(()=>{!o(ce)&&o(T)===B.VERIFIED&&S(ce,!0)}),Me(()=>{if(!o(ce)){const u=Di();u&&u.checked&&(u.checked=!1)}}),Me(()=>{var u;o(T)===B.VERIFIED&&((u=Di())==null||u.setCustomValidity(""))}),Me(()=>{if(o(tt)==="onload"){const u=setTimeout(()=>{Lr()},1);return()=>{u&&clearTimeout(u)}}}),Me(()=>{o(Be)&&te("error:",o(Be))}),Me(()=>{o(de)&&o(y).setCookie&&ku(o(de),o(y).setCookie)}),bi(()=>{var u,p,w,b;return te("mounted","3.2.2"),C&&globalThis.$altcha.instances.add(C),S(M,(u=
3o(ge))==null?void 0:u.closest("form"),!0),(p=o(M))==null||p.addEventListener("reset",Sa),(w=o(M))==null||w.addEventListener("submit",$a,{capture:!0}),(b=o(M))==null||b.addEventListener("focusin",Ca),Ni(),o(y).humanInteractionSignature&&(te("human interaction signature enabled"),A=new Kl),L("load"),f||te("secure context (HTTPS) required"),()=>{var P,I,V;xi(),C&&globalThis.$altcha.instances.delete(C),o(Fe)&&clearTimeout(o(Fe)),(P=o(M))==null||P.removeEventListener("reset",Sa),(I=o(M))==null||I.removeEventListener("submit",$a,{capture:!0}),(V=o(M))==null||V.removeEventListener("focusin",Ca),A==null||A.destroy()}});function Ni(){S(Ct,[...globalThis.$altcha.plugins].map(u=>new u(C)),!0),te("activating plugins",o(Ct).map(u=>u.constructor.name));for(const u of o(Ct))u.activate()}async function fn(u,...p){let w;for(const b of o(Ct))w=await b[u].call(b,...p);return w}function xi(){for(const u of o(Ct))u.destroy()}function Mi(u){const[p,w]=u.salt.split("?"),b={};if(w)try{Object.assign(b,Object.fromEntries(new URLSearchParams(w).entries()))}catch{}const P={codeChallenge:u.codeChallenge,parameters:{algorithm:u.algorithm,cost:1,data:b,expiresAt:b!=null&&b.expires?parseInt(b.expires,10):void 0,keyLength:u.algorithm==="SHA-512"?64:u.algorithm==="SHA-384"?48:32,nonce:zl(new TextEncoder().encode(u.salt)),keyPrefix:u.challenge,salt:""},signature:u.signature};return Object.defineProperties(P,{_originalSalt:{enumerable:!1,value:u.salt,writable:!1},_version:{enumerable:!1,value:1,writable:!1}}),P}function Ve(u,p){return{algorithm:u.parameters.algorithm,challenge:u.parameters.keyPrefix,number:p.counter,salt:"_originalSalt"in u?u._originalSalt:u.parameters.nonce,signature:u.signature,took:p.time||0}}async function St(u){await new Promise(p=>setTimeout(p,u))}async function Ea(u=o(y).challenge,p){const w=await fn("onFetchChallenge",u);let b=null;if(w!==void 0)return w;if(typeof u=="string")if(u.startsWith("{")){te("parsing JSON challenge");try{b=JSON.parse(u)}catch{throw new Error("Unable to parse JSON challenge.")}}else{te("fetching challenge from",(p==null?void 0:p.method)||"GET",u),S(X,new URL(u,location.origin),!0);const P=await o(y).fetch(u,{credentials:o(y).credentials||void 0,...p});await Ta(P);const I=P.headers.get("x-altcha-config");I&&Cu(I);const V=await P.json();if(V&&"his"in V&&V.his){if(te("requested HIS"),!A)throw new Error("Server requested HIS data but collector is disabled.");return Ea(Un(V.his.url,o(X)),{body:JSON.stringify({his:A.export()}),headers:{"content-type":"application/json"},method:"POST"})}V&&"hisResult"in V&&V.hisResult&&te("HIS result",V.hisResult),b=V}else if(u&&typeof u=="object")try{b=JSON.parse(JSON.stringify(u))}catch{throw new Error("Unable to parse JSON challenge.")}if(uu(b)&&(b=Mi(b)),!fu(b))throw new Error("Challenge validation failed.");return b}function uu(u){return typeof u=="object"&&"challenge"in u}function fu(u){return!!u&&typeof u=="object"&&"parameters"in u&&!!u.parameters&&typeof u.parameters=="object"&&"algorithm"in u.parameters&&"nonce"in u.parameters&&"salt"in u.parameters&&"keyPrefix"in u.parameters}function Di(){return document.getElementById(o(hr))}function cu(u){switch(u){case"checkbox":return va;case"switch":return pa;case"native":default:return ga}}function du(u,p){const w=Object.keys(u).map(P=>P.toLowerCase());let b=p.reduce((P,I)=>(I=I.toLowerCase(),P||(u[I]?I:null)||w.find(V=>I.split("-")[0]===V.split("-")[0])||null),null);return u[b||""]||(b="en"),{language:b,strings:u[b]}}function hu(u){switch(u){case"bar":return o(y).barPlacement||"bottom";case"floating":return o(y).floatingPlacement||"auto";default:return}}function vu(u){var w;return[...((w=o(M))==null?void 0:w.querySelectorAll(l))||[]].reduce((b,P)=>{const I=P.name,V=P.value;return I&&V&&(b[I]=/\n/.test(V)?V.replace(new RegExp("(?<!\\r)\\n","g"),`\r 4`):V),b},{})}function gu(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Un(u,p,w){const b=new URL(u,p);if(b.search||(b.search=p.search),w)for(const P in w)w[P]!==void 0&&w[P]!==null&&b.searchParams.set(P,w[P]);return b.toString()}function pu(u){!o(ce)&&u.currentTarget.checked?(u.preventDefault(),u.currentTarget.checked=!1,o(T)!==B.VERIFYING&&Lr()):u.currentTarget.checked||(u.preventDefault(),rt())}function _u(u){o(T)===B.VERIFYING?u.currentTarget.setCustomValidity(o(E).waitAlert):o(y).validationMessage&&u.currentTarget.setCustomValidity(o(y).validationMessage)}function mu(){jn(o(y).display),rt()}function yu(){Hn()}function bu(u){const p=u.target;o(y).display==="floating"&&p&&!(C!=null&&C.contains(p))&&!p.hasAttribute("data-backdrop")&&!p.closest("[data-popover]")&&o(T)!==B.VERIFIED&&!o(y).floatingPersist&&Fi()}function Ca(u){o(tt)==="onfocus"&&o(T)===B.UNVERIFIED&&Lr()}function Sa(){jn(o(y).display),rt()}function $a(u){const p=u.target;(p==null?void 0:p.getAttribute("data-code-challenge"))!=="true"&&o(tt)==="onsubmit"&&o(T)===B.UNVERIFIED&&(u.preventDefault(),u.stopPropagation(),S(Et,u.submitter,!0),Vi(),Lr().then(w=>
4{w&&!o(Y)&&ar().then(()=>{ka(o(Et))})}))}function wu(u){u.persisted&&(jn(o(y).display),rt())}function Eu(){Hn()}function Cu(u){var p,w;try{const b=JSON.parse(u);b&&typeof b=="object"&&cn({serverVerificationFields:(p=b==null?void 0:b.sentinel)==null?void 0:p.fields,serverVerificationTimeZone:(w=b==null?void 0:b.sentinel)==null?void 0:w.timeZone,verifyUrl:b.verifyurl,...b})}catch(b){te("unable to configure from x-altcha-config header",b)}}function Su(u=20){var be;if(!o(ge))return;const p=o(y).floatingPlacement;if(!o(Le)&&(S(Le,(o(y).floatingAnchor instanceof HTMLElement?o(y).floatingAnchor:o(y).floatingAnchor?document.querySelector(o(y).floatingAnchor):(be=o(M))==null?void 0:be.querySelector(s))||o(M),!0),!o(Le))){te("unable to find floating anchor element");return}const w=parseInt(o(y).floatingOffset,10)||12,b=o(Le).getBoundingClientRect(),P=o(ge).getBoundingClientRect(),I=document.documentElement.clientHeight,V=document.documentElement.clientWidth,Ae=!p||p==="auto"?b.bottom+P.height+w+u>I:p==="top",oe=Math.max(u,Math.min(V-u-P.width,b.left+b.width/2-P.width/2));if(o(ge).style.setProperty("--altcha-floating-left",`${oe}px`),o(ge).style.setProperty("--altcha-floating-top",Ae?`${b.top-(P.height+w)}px`:`${b.bottom+w}px`),o(ge).setAttribute("data-floating-position",Ae?"top":"bottom"),o(ie)){const kt=o(ie).getBoundingClientRect();o(ie).style.left=b.left-oe+b.width/2-kt.width/2+"px"}}async function $u(u,p){const w=await fn("onRequestServerVerification",u,p);if(w!==void 0)return w;if(te("requesting server verification from",o(y).verifyUrl),!o(y).verifyUrl)throw new Error("Parameter verifyUrl must be set for server verification.");const b=await o(y).fetch(Un(o(y).verifyUrl,o(X)),{body:JSON.stringify({code:p,fields:o(y).serverVerificationFields?vu():void 0,payload:u,timeZone:o(y).serverVerificationTimeZone?gu():void 0}),credentials:o(y).credentials||void 0,headers:{"Content-Type":"application/json"},method:"POST"});await Ta(b);const P=await b.json();return P&&typeof P=="object"&&"payload"in P&&P.payload&&L("serververification",P),P}function ka(u){var p;o(M)&&"requestSubmit"in o(M)?o(M).requestSubmit(u):(p=o(M))!=null&&p.reportValidity()&&(u?u.click():o(M).submit())}function ku(u,p={}){const{domain:w,name:b=o(y).name,maxAge:P,path:I,sameSite:V,secure:Ae}=p;let oe=`${encodeURIComponent(b)}=${encodeURIComponent(u)}`;w&&(oe+=`; Domain=${w}`),P!=null&&(oe+=`; Max-Age=${P}`),I&&(oe+=`; Path=${I}`),V&&(oe+=`; SameSite=${V}`),Ae&&(oe+="; Secure"),document.cookie=oe}function jn(u){switch(u){case"bar":case"floating":case"overlay":Fi(),(!o(tt)||o(tt)==="off")&&(o(Q).auto="onsubmit");break;case"standard":Vi()}o(q)!==u&&S(q,u,!0)}function Tu(u){o(Fe)&&clearTimeout(o(Fe));const p=()=>{o(T)!==B.UNVERIFIED?(S(ce,!1),nt(B.EXPIRED)):rt(),L("expired")},w=u*1e3-Date.now();w>=1?S(Fe,setTimeout(p,w),!0):p()}async function Ta(u){var w;if(u.status>=400){if((w=u.headers.get("content-type"))!=null&&w.includes("/json")){let b;try{b=await u.json()}catch{}if(b&&"error"in b)throw new Error(`Server responded with ${u.status} - ${b.error}`)}throw new Error(`Server responded with ${u.status}.`)}const p=u.headers.get("content-type");if(!p||!p.includes("/json"))throw new Error(`Server responded with invalid content-type. Expected application/json, received ${p}.`)}async function Aa(u){var w;if(!o(de)){nt(B.ERROR,"Cannot verify code challenge without PoW payload.");return}nt(B.VERIFYING);let p=null;if(o(y).verifyUrl)p=await $u(o(de),u);else if(o(y).verifyFunction)p=await o(y).verifyFunction(o(de),u);else{nt(B.ERROR,"Parameter verifyUrl is required for code challenge verification.");return}p!=null&&p.payload&&(S(de,p.payload,!0),te("server payload",o(de))),(p==null?void 0:p.verified)===!0?(te("verified"),nt(B.VERIFIED),L("verified",{payload:o(de)}),o(tt)==="onsubmit"&&ar().then(()=>{ka(o(Et))})):nt(B.ERROR,(p==null?void 0:p.reason)||"Verification failed."),o(y).disableAutoFocus||(w=Di())==null||w.focus()}function cn(u){Object.assign(o(Q),{...Object.fromEntries(Object.entries(u).filter(([p,w])=>w!==void 0))})}function Au(){return{...o(y)}}function Iu(){return o(T)}function Fi(){S(Te,!1)}function te(...u){(o(y).debug||u.some(p=>p instanceof Error))&&console[u[0]instanceof Error?"error":"log"]("ALTCHA",`[name=${o(y).name}]`,...u)}function rt(u=B.UNVERIFIED,p=null){S(ce,!1),S(Be,p,!0),S(de,null),o(ke)&&o(ke).abort(),o(Fe)&&(clearTimeout(o(Fe)),S(Fe,null)),nt(u)}function nt(u,p=null){S(T,u,!0),S(Be,p,!0),L("statechange",{payload:o(de),state:o(T)})}function Vi(){S(Te,!0),ar().then(()=>{Hn()})}function Hn(){switch(o(y).display){case"floating":return Su()}S($,o($)+1)}async function Lr(u={}){var be,kt;const{concurrency:p=Math.max(1,o(y).workers),controller:w=new AbortController,minDuration:b=o(y).minDuration}=u,P=performance.now();let I=null,V=null,Ae=!1;const oe=await fn("onVerify",u);if(oe!==void 0)return oe;
4rt(B.VERIFYING),S(ke,w,!0);try{if(!f)throw new Error("Secure context (HTTPS) required.");if(o(y).mockError)throw new Error("Mock error.");if(o(y).test)return te("running test mode with null challenge"),await St(Math.max(0,b-(performance.now()-P))),(be=o(ke))!=null&&be.signal.aborted?(rt(),null):(S(de,btoa(JSON.stringify({challenge:null,solution:null,test:!0})),!0),te("verified"),nt(B.VERIFIED),L("verified",{payload:o(de)}),{payload:o(de)});if(I=await Ea(),!I)throw new Error("Failed to fetch challenge.");te("challenge",I),"configuration"in I&&(te("re-configuring from challenge",I.configuration),cn(I.configuration)),I.parameters.expiresAt&&Tu(I.parameters.expiresAt),Ae="_version"in I&&I._version===1;const ct=globalThis.$altcha.algorithms.get(I.parameters.algorithm);if(!ct)throw new Error(`Unsupported algorithm ${I.parameters.algorithm}.`);if(V=await ma({challenge:I,concurrency:p,controller:w,createWorker:ct,counterMode:Ae?"string":"uint32",onOutOfMemory:xa=>{if(te("out of memory error received"),L("outofmemory"),o(y).retryOnOutOfMemoryError&&xa>1){const Ma=Math.floor(xa/2);return te(`retrying with ${Ma} workers...`),Ma}},timeout:o(y).timeout}),(kt=o(ke))!=null&&kt.signal.aborted)return rt(),null;if(!V)throw new Error("Failed to find solution.");te("solution",V),await St(Math.max(0,b-(performance.now()-P))),S(Y,I.codeChallenge||o(y).codeChallenge||null,!0),Ae?S(de,btoa(JSON.stringify(Ve(I,V))),!0):S(de,btoa(JSON.stringify({challenge:{parameters:I.parameters,signature:I.signature},solution:V})),!0),o(Y)?(te("requesting code verification"),nt(B.CODE),L("codechallenge",{codeChallenge:o(Y)})):o(y).verifyUrl?await Aa():(te("verified"),nt(B.VERIFIED),L("verified",{payload:o(de)}))}catch(ct){return te("verification failed",ct),nt(B.ERROR,String(ct)),null}finally{S(ke,null)}return{challenge:I,payload:o(de),solution:V}}var Ou={configure:cn,getConfiguration:Au,getState:Iu,hide:Fi,log:te,reset:rt,setState:nt,show:Vi,updateUI:Hn,verify:Lr},Ia=su();_e("scroll",ei,yu),_e("click",ei,bu),_e("pageshow",rr,wu),_e("resize",rr,Eu);var Oa=wr(Ia);{var Ru=u=>{var p=Xl();G(u,p)};me(Oa,u=>{o(y).display==="overlay"&&o(Te)&&u(Ru)})}var $t=ae(Oa,2),Ra=fe($t);{var Pu=u=>{var p=eu(),w=wr(p),b=ae(w,2);{var P=I=>{var V=Ql();ia(V,()=>{var Ae;return(Ae=document.querySelector(o(y).overlayContent))==null?void 0:Ae.innerHTML},!0),re(V),G(I,V)};me(b,I=>{o(y).overlayContent&&I(P)})}_e("click",w,mu,!0),G(u,p)};me(Ra,u=>{o(y).display==="overlay"&&o(Te)&&u(Pu)})}var Ui=ae(Ra,2),ji=fe(Ui),Hi=fe(ji),Pa=fe(Hi);{let u=Re(()=>o(y).display==="standard"&&o(tt)!=="onsubmit"||o(T)===B.VERIFYING);cl(Pa,()=>o(Vn),(p,w)=>{w(p,{get id(){return o(hr)},name:"",get required(){return o(u)},get loading(){return o(Li)},get checked(){return o(ce)},onchange:pu,oninvalid:_u})})}var Gi=ae(Pa,2),Lu=fe(Gi);{var Nu=u=>{var p=On();$e(()=>yt(p,o(E).verificationRequired)),G(u,p)},xu=u=>{var p=On();$e(()=>yt(p,o(E).verifying)),G(u,p)},Mu=u=>{var p=On();$e(()=>yt(p,o(E).verified)),G(u,p)},Du=u=>{var p=On();$e(()=>yt(p,o(E).label)),G(u,p)};me(Lu,u=>{o(T)===B.CODE&&o(Y)?u(Nu):o(T)===B.VERIFYING?u(xu,1):o(T)===B.VERIFIED?u(Mu,2):u(Du,-1)})}re(Gi),re(Hi);var Fu=ae(Hi,2);{var Vu=u=>{Ii(u,{get strings(){return o(E)}})};me(Fu,u=>{o(sn)&&u(Vu)})}re(ji);var La=ae(ji,2);{var Uu=u=>{{let p=Re(()=>o(y).display==="bar"&&o(sn));Oi(u,{get logo(){return o(p)},get strings(){return o(E)}})}};me(La,u=>{o(vr)&&u(Uu)})}var Na=ae(La,2);{var ju=u=>{var p=tu();qt(p,w=>S(ie,w),()=>o(ie)),G(u,p)};me(Na,u=>{o(y).display==="floating"&&u(ju)})}var Hu=ae(Na,2);{var Gu=u=>{var p=ru();Si(p),$e(()=>{J(p,"name",o(y).name),$l(p,o(de))}),G(u,p)};me(Hu,u=>{o(y).setCookie||u(Gu)})}re(Ui);var Yu=ae(Ui,2);{var qu=u=>{Ri(u,{get anchor(){return o(ge)},onClickOutside:()=>{f&&rt()},get placement(){return o(y).popoverPlacement},role:"alert",variant:"error",get dir(){return o(un)},get updateUISignal(){return o($)},children:(p,w)=>{var b=ta(),P=wr(b);{var I=oe=>{var be=nu();G(oe,be)},V=oe=>{var be=iu(),kt=fe(be,!0);re(be),$e(()=>yt(kt,o(E).expired)),G(oe,be)},Ae=oe=>{var be=ou(),kt=fe(be,!0);re(be),$e(()=>{J(be,"title",o(Be)),yt(kt,o(E).error)}),G(oe,be)};me(P,oe=>{!o(Be)&&!f?oe(I):!o(Be)&&o(T)===B.EXPIRED?oe(V,1):oe(Ae,-1)})}G(p,b)},$$slots:{default:!0}})},Bu=u=>{var p=ta(),w=wr(p);fl(w,()=>o(Y),b=>{{let P=Re(()=>o(y).codeChallengeDisplay!=="standard");Ri(b,{get anchor(){return o(ge)},get backdrop(){return o(P)},get display(){return o(y).codeChallengeDisplay},onClose:()=>{rt()},get placement(){return o(y).popoverPlacement},role:"dialog",get"aria-label"(){return o(E).verificationRequired},get dir(){return o(un)},get updateUISignal(){return o($)},children:(I,V)=>{var Ae=au(),oe=wr(Ae);_a(oe,{get audioUrl(){return o(K)},get imageUrl(){return o(gr)},onCancel:()=>rt(),onReload:()=>Lr(),onSubmit:ct=>
4Aa(ct),get codeChallenge(){return o(Y)},get config(){return o(y)},get strings(){return o(E)}});var be=ae(oe,2);{var kt=ct=>{Oi(ct,{get logo(){return o(sn)},get strings(){return o(E)}})};me(be,ct=>{o(vr)&&o(y).codeChallengeDisplay!=="standard"&&ct(kt)})}G(I,Ae)},$$slots:{default:!0}})}}),G(u,p)};me(Yu,u=>{o(Be)||o(T)===B.EXPIRED||!f?u(qu):o(Y)&&o(T)===B.CODE&&u(Bu,1)})}re($t),qt($t,u=>S(ge,u),()=>o(ge)),$e(u=>{J($t,"data-state",o(T)),J($t,"data-display",o(y).display||void 0),J($t,"data-placement",u),J($t,"data-visible",o(Te)||void 0),J($t,"dir",o(un)),J(Gi,"for",o(hr)),$t.dir=$t.dir},[()=>hu(o(y).display)]),G(e,Ia);var Wu=It(Ou);return a(),Wu}return typeof window<"u"&&window.customElements&&!customElements.get("altcha-widget")&&customElements.define("altcha-widget",Bt(lu,{auto:{type:"String"},challenge:{type:"String"},configuration:{type:"String"},display:{type:"String"},language:{type:"String"},name:{type:"String"},theme:{type:"String"},type:{type:"String"},workers:{type:"Number"}},[],["configure","getConfiguration","getState","hide","log","reset","setState","show","updateUI","verify"])),Fa}var qa=Qu();const ef=zu(qa),of=Ku({__proto__:null,default:ef},[qa]);export{of as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.