@hotosm/hanko-auth 0.5.2 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,13 +6,13 @@ var HankoAuth=function(Y){"use strict";/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:Ji,defineProperty:Yi,getOwnPropertyDescriptor:Qi,getOwnPropertyNames:Gi,getOwnPropertySymbols:Xi,getPrototypeOf:ea}=Object,Xe=globalThis,vo=Xe.trustedTypes,ta=vo?vo.emptyScript:"",Tn=Xe.reactiveElementPolyfillSupport,wt=(o,e)=>o,Jt={toAttribute(o,e){switch(e){case Boolean:o=o?ta:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Un=(o,e)=>!Ji(o,e),_o={attribute:!0,type:String,converter:Jt,reflect:!1,useDefault:!1,hasChanged:Un};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Xe.litPropertyMetadata??(Xe.litPropertyMetadata=new WeakMap);let ht=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=_o){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);i!==void 0&&Yi(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:r}=Qi(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:i,set(s){const c=i==null?void 0:i.call(this);r==null||r.call(this,s),this.requestUpdate(e,c,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??_o}static _$Ei(){if(this.hasOwnProperty(wt("elementProperties")))return;const e=ea(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(wt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(wt("properties"))){const t=this.properties,n=[...Gi(t),...Xi(t)];for(const i of n)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[n,i]of t)this.elementProperties.set(n,i)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const i=this._$Eu(t,n);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)t.unshift(go(i))}else e!==void 0&&t.push(go(e));return t}static _$Eu(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Zi(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var n;return(n=t.hostConnected)==null?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var n;return(n=t.hostDisconnected)==null?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){var r;const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){const s=(((r=n.converter)==null?void 0:r.toAttribute)!==void 0?n.converter:Jt).toAttribute(t,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,t){var r,s;const n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const c=n.getPropertyOptions(i),u=typeof c.converter=="function"?{fromAttribute:c.converter}:((r=c.converter)==null?void 0:r.fromAttribute)!==void 0?c.converter:Jt;this._$Em=i;const l=u.fromAttribute(t,c.type);this[i]=l??((s=this._$Ej)==null?void 0:s.get(i))??l,this._$Em=null}}requestUpdate(e,t,n,i=!1,r){var s;if(e!==void 0){const c=this.constructor;if(i===!1&&(r=this[e]),n??(n=c.getPropertyOptions(e)),!((n.hasChanged??Un)(r,t)||n.useDefault&&n.reflect&&r===((s=this._$Ej)==null?void 0:s.get(e))&&!this.hasAttribute(c._$Eu(e,n))))return;this.C(e,t,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:i,wrapped:r},s){n&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,s??t??this[e]),r!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,s]of i){const{wrapped:c}=s,u=this[r];c!==!0||this._$AL.has(r)||u===void 0||this.C(r,void 0,s,u)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostUpdate)==null?void 0:r.call(i)}),this.update(t)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(n=>{var i;return(i=n.hostUpdated)==null?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};ht.elementStyles=[],ht.shadowRootOptions={mode:"open"},ht[wt("elementProperties")]=new Map,ht[wt("finalized")]=new Map,Tn==null||Tn({ReactiveElement:ht}),(Xe.reactiveElementVersions??(Xe.reactiveElementVersions=[])).push("2.1.2");/**
9
+ */const{is:Ji,defineProperty:Yi,getOwnPropertyDescriptor:Qi,getOwnPropertyNames:Gi,getOwnPropertySymbols:Xi,getPrototypeOf:ea}=Object,Xe=globalThis,vo=Xe.trustedTypes,ta=vo?vo.emptyScript:"",Tn=Xe.reactiveElementPolyfillSupport,kt=(o,e)=>o,Jt={toAttribute(o,e){switch(e){case Boolean:o=o?ta:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Un=(o,e)=>!Ji(o,e),_o={attribute:!0,type:String,converter:Jt,reflect:!1,useDefault:!1,hasChanged:Un};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Xe.litPropertyMetadata??(Xe.litPropertyMetadata=new WeakMap);let ht=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=_o){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);i!==void 0&&Yi(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:r}=Qi(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:i,set(s){const c=i==null?void 0:i.call(this);r==null||r.call(this,s),this.requestUpdate(e,c,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??_o}static _$Ei(){if(this.hasOwnProperty(kt("elementProperties")))return;const e=ea(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(kt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(kt("properties"))){const t=this.properties,n=[...Gi(t),...Xi(t)];for(const i of n)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[n,i]of t)this.elementProperties.set(n,i)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const i=this._$Eu(t,n);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)t.unshift(go(i))}else e!==void 0&&t.push(go(e));return t}static _$Eu(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Zi(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var n;return(n=t.hostConnected)==null?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var n;return(n=t.hostDisconnected)==null?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){var r;const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){const s=(((r=n.converter)==null?void 0:r.toAttribute)!==void 0?n.converter:Jt).toAttribute(t,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,t){var r,s;const n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const c=n.getPropertyOptions(i),u=typeof c.converter=="function"?{fromAttribute:c.converter}:((r=c.converter)==null?void 0:r.fromAttribute)!==void 0?c.converter:Jt;this._$Em=i;const l=u.fromAttribute(t,c.type);this[i]=l??((s=this._$Ej)==null?void 0:s.get(i))??l,this._$Em=null}}requestUpdate(e,t,n,i=!1,r){var s;if(e!==void 0){const c=this.constructor;if(i===!1&&(r=this[e]),n??(n=c.getPropertyOptions(e)),!((n.hasChanged??Un)(r,t)||n.useDefault&&n.reflect&&r===((s=this._$Ej)==null?void 0:s.get(e))&&!this.hasAttribute(c._$Eu(e,n))))return;this.C(e,t,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:i,wrapped:r},s){n&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,s??t??this[e]),r!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,s]of i){const{wrapped:c}=s,u=this[r];c!==!0||this._$AL.has(r)||u===void 0||this.C(r,void 0,s,u)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostUpdate)==null?void 0:r.call(i)}),this.update(t)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(n=>{var i;return(i=n.hostUpdated)==null?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};ht.elementStyles=[],ht.shadowRootOptions={mode:"open"},ht[kt("elementProperties")]=new Map,ht[kt("finalized")]=new Map,Tn==null||Tn({ReactiveElement:ht}),(Xe.reactiveElementVersions??(Xe.reactiveElementVersions=[])).push("2.1.2");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const kt=globalThis,yo=o=>o,Yt=kt.trustedTypes,bo=Yt?Yt.createPolicy("lit-html",{createHTML:o=>o}):void 0,wo="$lit$",et=`lit$${Math.random().toFixed(9).slice(2)}$`,ko="?"+et,na=`<${ko}>`,ot=document,St=()=>ot.createComment(""),At=o=>o===null||typeof o!="object"&&typeof o!="function",$n=Array.isArray,oa=o=>$n(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Dn=`[
13
+ */const wt=globalThis,yo=o=>o,Yt=wt.trustedTypes,bo=Yt?Yt.createPolicy("lit-html",{createHTML:o=>o}):void 0,ko="$lit$",et=`lit$${Math.random().toFixed(9).slice(2)}$`,wo="?"+et,na=`<${wo}>`,ot=document,St=()=>ot.createComment(""),At=o=>o===null||typeof o!="object"&&typeof o!="function",$n=Array.isArray,oa=o=>$n(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Dn=`[
14
14
  \f\r]`,Ct=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,So=/-->/g,Ao=/>/g,it=RegExp(`>|${Dn}(?:([^\\s"'>=/]+)(${Dn}*=${Dn}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Co=/'/g,xo=/"/g,Po=/^(?:script|style|textarea|title)$/i,ia=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),fe=ia(1),pt=Symbol.for("lit-noChange"),Ce=Symbol.for("lit-nothing"),Eo=new WeakMap,at=ot.createTreeWalker(ot,129);function Oo(o,e){if(!$n(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return bo!==void 0?bo.createHTML(e):e}const aa=(o,e)=>{const t=o.length-1,n=[];let i,r=e===2?"<svg>":e===3?"<math>":"",s=Ct;for(let c=0;c<t;c++){const u=o[c];let l,d,h=-1,v=0;for(;v<u.length&&(s.lastIndex=v,d=s.exec(u),d!==null);)v=s.lastIndex,s===Ct?d[1]==="!--"?s=So:d[1]!==void 0?s=Ao:d[2]!==void 0?(Po.test(d[2])&&(i=RegExp("</"+d[2],"g")),s=it):d[3]!==void 0&&(s=it):s===it?d[0]===">"?(s=i??Ct,h=-1):d[1]===void 0?h=-2:(h=s.lastIndex-d[2].length,l=d[1],s=d[3]===void 0?it:d[3]==='"'?xo:Co):s===xo||s===Co?s=it:s===So||s===Ao?s=Ct:(s=it,i=void 0);const f=s===it&&o[c+1].startsWith("/>")?" ":"";r+=s===Ct?u+na:h>=0?(n.push(l),u.slice(0,h)+wo+u.slice(h)+et+f):u+et+(h===-2?c:f)}return[Oo(o,r+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]};let Ln=class Ki{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let r=0,s=0;const c=e.length-1,u=this.parts,[l,d]=aa(e,t);if(this.el=Ki.createElement(l,n),at.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=at.nextNode())!==null&&u.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const h of i.getAttributeNames())if(h.endsWith(wo)){const v=d[s++],f=i.getAttribute(h).split(et),k=/([.?@])?(.*)/.exec(v);u.push({type:1,index:r,name:k[2],strings:f,ctor:k[1]==="."?sa:k[1]==="?"?ca:k[1]==="@"?la:Qt}),i.removeAttribute(h)}else h.startsWith(et)&&(u.push({type:6,index:r}),i.removeAttribute(h));if(Po.test(i.tagName)){const h=i.textContent.split(et),v=h.length-1;if(v>0){i.textContent=Yt?Yt.emptyScript:"";for(let f=0;f<v;f++)i.append(h[f],St()),at.nextNode(),u.push({type:2,index:++r});i.append(h[v],St())}}}else if(i.nodeType===8)if(i.data===ko)u.push({type:2,index:r});else{let h=-1;for(;(h=i.data.indexOf(et,h+1))!==-1;)u.push({type:7,index:r}),h+=et.length-1}r++}}static createElement(e,t){const n=ot.createElement("template");return n.innerHTML=e,n}};function mt(o,e,t=o,n){var s,c;if(e===pt)return e;let i=n!==void 0?(s=t._$Co)==null?void 0:s[n]:t._$Cl;const r=At(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==r&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),r===void 0?i=void 0:(i=new r(o),i._$AT(o,t,n)),n!==void 0?(t._$Co??(t._$Co=[]))[n]=i:t._$Cl=i),i!==void 0&&(e=mt(o,i._$AS(o,e.values),i,n)),e}let ra=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,i=((e==null?void 0:e.creationScope)??ot).importNode(t,!0);at.currentNode=i;let r=at.nextNode(),s=0,c=0,u=n[0];for(;u!==void 0;){if(s===u.index){let l;u.type===2?l=new Nn(r,r.nextSibling,this,e):u.type===1?l=new u.ctor(r,u.name,u.strings,this,e):u.type===6&&(l=new da(r,this,e)),this._$AV.push(l),u=n[++c]}s!==(u==null?void 0:u.index)&&(r=at.nextNode(),s++)}return at.currentNode=ot,i}p(e){let t=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},Nn=class Wi{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,t,n,i){this.type=2,this._$AH=Ce,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=mt(this,e,t),At(e)?e===Ce||e==null||e===""?(this._$AH!==Ce&&this._$AR(),this._$AH=Ce):e!==this._$AH&&e!==pt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):oa(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Ce&&At(this._$AH)?this._$AA.nextSibling.data=e:this.T(ot.createTextNode(e)),this._$AH=e}$(e){var r;const{values:t,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=Ln.createElement(Oo(n.h,n.h[0]),this.options)),n);if(((r=this._$AH)==null?void 0:r._$AD)===i)this._$AH.p(t);else{const s=new ra(i,this),c=s.u(this.options);s.p(t),this.T(c),this._$AH=s}}_$AC(e){let t=Eo.get(e.strings);return t===void 0&&Eo.set(e.strings,t=new Ln(e)),t}k(e){$n(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const r of e)i===t.length?t.push(n=new Wi(this.O(St()),this.O(St()),this,this.options)):n=t[i],n._$AI(r),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var n;for((n=this._$AP)==null?void 0:n.call(this,!1,!0,t);e!==this._$AB;){const i=yo(e).nextSibling;yo(e).remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}},Qt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,i,r){this.type=1,this._$AH=Ce,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Ce}_$AI(e,t=this,n,i){const r=this.strings;let s=!1;if(r===void 0)e=mt(this,e,t,0),s=!At(e)||e!==this._$AH&&e!==pt,s&&(this._$AH=e);else{const c=e;let u,l;for(e=r[0],u=0;u<r.length-1;u++)l=mt(this,c[n+u],t,u),l===pt&&(l=this._$AH[u]),s||(s=!At(l)||l!==this._$AH[u]),l===Ce?e=Ce:e!==Ce&&(e+=(l??"")+r[u+1]),this._$AH[u]=l}s&&!i&&this.j(e)}j(e){e===Ce?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},sa=class extends Qt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Ce?void 0:e}},ca=class extends Qt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Ce)}},la=class extends Qt{constructor(e,t,n,i,r){super(e,t,n,i,r),this.type=5}_$AI(e,t=this){if((e=mt(this,e,t,0)??Ce)===pt)return;const n=this._$AH,i=e===Ce&&n!==Ce||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==Ce&&(n===Ce||i);i&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;typeof this._$AH=="function"?this._$AH.call(((t=this.options)==null?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}},da=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){mt(this,e)}};const Mn=kt.litHtmlPolyfillSupport;Mn==null||Mn(Ln,Nn),(kt.litHtmlVersions??(kt.litHtmlVersions=[])).push("3.3.2");const ua=(o,e,t)=>{const n=(t==null?void 0:t.renderBefore)??e;let i=n._$litPart$;if(i===void 0){const r=(t==null?void 0:t.renderBefore)??null;n._$litPart$=i=new Nn(e.insertBefore(St(),r),r,void 0,t??{})}return i._$AI(o),i};/**
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Co=/'/g,xo=/"/g,Po=/^(?:script|style|textarea|title)$/i,ia=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),fe=ia(1),pt=Symbol.for("lit-noChange"),Ce=Symbol.for("lit-nothing"),Eo=new WeakMap,at=ot.createTreeWalker(ot,129);function Oo(o,e){if(!$n(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return bo!==void 0?bo.createHTML(e):e}const aa=(o,e)=>{const t=o.length-1,n=[];let i,r=e===2?"<svg>":e===3?"<math>":"",s=Ct;for(let c=0;c<t;c++){const u=o[c];let l,d,h=-1,v=0;for(;v<u.length&&(s.lastIndex=v,d=s.exec(u),d!==null);)v=s.lastIndex,s===Ct?d[1]==="!--"?s=So:d[1]!==void 0?s=Ao:d[2]!==void 0?(Po.test(d[2])&&(i=RegExp("</"+d[2],"g")),s=it):d[3]!==void 0&&(s=it):s===it?d[0]===">"?(s=i??Ct,h=-1):d[1]===void 0?h=-2:(h=s.lastIndex-d[2].length,l=d[1],s=d[3]===void 0?it:d[3]==='"'?xo:Co):s===xo||s===Co?s=it:s===So||s===Ao?s=Ct:(s=it,i=void 0);const f=s===it&&o[c+1].startsWith("/>")?" ":"";r+=s===Ct?u+na:h>=0?(n.push(l),u.slice(0,h)+ko+u.slice(h)+et+f):u+et+(h===-2?c:f)}return[Oo(o,r+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]};let Ln=class Ki{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let r=0,s=0;const c=e.length-1,u=this.parts,[l,d]=aa(e,t);if(this.el=Ki.createElement(l,n),at.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=at.nextNode())!==null&&u.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const h of i.getAttributeNames())if(h.endsWith(ko)){const v=d[s++],f=i.getAttribute(h).split(et),w=/([.?@])?(.*)/.exec(v);u.push({type:1,index:r,name:w[2],strings:f,ctor:w[1]==="."?sa:w[1]==="?"?ca:w[1]==="@"?la:Qt}),i.removeAttribute(h)}else h.startsWith(et)&&(u.push({type:6,index:r}),i.removeAttribute(h));if(Po.test(i.tagName)){const h=i.textContent.split(et),v=h.length-1;if(v>0){i.textContent=Yt?Yt.emptyScript:"";for(let f=0;f<v;f++)i.append(h[f],St()),at.nextNode(),u.push({type:2,index:++r});i.append(h[v],St())}}}else if(i.nodeType===8)if(i.data===wo)u.push({type:2,index:r});else{let h=-1;for(;(h=i.data.indexOf(et,h+1))!==-1;)u.push({type:7,index:r}),h+=et.length-1}r++}}static createElement(e,t){const n=ot.createElement("template");return n.innerHTML=e,n}};function mt(o,e,t=o,n){var s,c;if(e===pt)return e;let i=n!==void 0?(s=t._$Co)==null?void 0:s[n]:t._$Cl;const r=At(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==r&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),r===void 0?i=void 0:(i=new r(o),i._$AT(o,t,n)),n!==void 0?(t._$Co??(t._$Co=[]))[n]=i:t._$Cl=i),i!==void 0&&(e=mt(o,i._$AS(o,e.values),i,n)),e}let ra=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,i=((e==null?void 0:e.creationScope)??ot).importNode(t,!0);at.currentNode=i;let r=at.nextNode(),s=0,c=0,u=n[0];for(;u!==void 0;){if(s===u.index){let l;u.type===2?l=new Nn(r,r.nextSibling,this,e):u.type===1?l=new u.ctor(r,u.name,u.strings,this,e):u.type===6&&(l=new da(r,this,e)),this._$AV.push(l),u=n[++c]}s!==(u==null?void 0:u.index)&&(r=at.nextNode(),s++)}return at.currentNode=ot,i}p(e){let t=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},Nn=class Wi{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,t,n,i){this.type=2,this._$AH=Ce,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=mt(this,e,t),At(e)?e===Ce||e==null||e===""?(this._$AH!==Ce&&this._$AR(),this._$AH=Ce):e!==this._$AH&&e!==pt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):oa(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Ce&&At(this._$AH)?this._$AA.nextSibling.data=e:this.T(ot.createTextNode(e)),this._$AH=e}$(e){var r;const{values:t,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=Ln.createElement(Oo(n.h,n.h[0]),this.options)),n);if(((r=this._$AH)==null?void 0:r._$AD)===i)this._$AH.p(t);else{const s=new ra(i,this),c=s.u(this.options);s.p(t),this.T(c),this._$AH=s}}_$AC(e){let t=Eo.get(e.strings);return t===void 0&&Eo.set(e.strings,t=new Ln(e)),t}k(e){$n(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const r of e)i===t.length?t.push(n=new Wi(this.O(St()),this.O(St()),this,this.options)):n=t[i],n._$AI(r),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var n;for((n=this._$AP)==null?void 0:n.call(this,!1,!0,t);e!==this._$AB;){const i=yo(e).nextSibling;yo(e).remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}},Qt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,i,r){this.type=1,this._$AH=Ce,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Ce}_$AI(e,t=this,n,i){const r=this.strings;let s=!1;if(r===void 0)e=mt(this,e,t,0),s=!At(e)||e!==this._$AH&&e!==pt,s&&(this._$AH=e);else{const c=e;let u,l;for(e=r[0],u=0;u<r.length-1;u++)l=mt(this,c[n+u],t,u),l===pt&&(l=this._$AH[u]),s||(s=!At(l)||l!==this._$AH[u]),l===Ce?e=Ce:e!==Ce&&(e+=(l??"")+r[u+1]),this._$AH[u]=l}s&&!i&&this.j(e)}j(e){e===Ce?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},sa=class extends Qt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Ce?void 0:e}},ca=class extends Qt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Ce)}},la=class extends Qt{constructor(e,t,n,i,r){super(e,t,n,i,r),this.type=5}_$AI(e,t=this){if((e=mt(this,e,t,0)??Ce)===pt)return;const n=this._$AH,i=e===Ce&&n!==Ce||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==Ce&&(n===Ce||i);i&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;typeof this._$AH=="function"?this._$AH.call(((t=this.options)==null?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}},da=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){mt(this,e)}};const Mn=wt.litHtmlPolyfillSupport;Mn==null||Mn(Ln,Nn),(wt.litHtmlVersions??(wt.litHtmlVersions=[])).push("3.3.2");const ua=(o,e,t)=>{const n=(t==null?void 0:t.renderBefore)??e;let i=n._$litPart$;if(i===void 0){const r=(t==null?void 0:t.renderBefore)??null;n._$litPart$=i=new Nn(e.insertBefore(St(),r),r,void 0,t??{})}return i._$AI(o),i};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
@@ -40,9 +40,9 @@ var HankoAuth=function(Y){"use strict";/**
40
40
  * @license
41
41
  * Copyright 2021 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
- */const ya=fa(class extends ga{constructor(){super(...arguments),this.key=Ce}render(o,e){return this.key=o,e}update(o,[e,t]){return e!==this.key&&(_a(o),this.key=e),t}});/*! For license information please see elements.js.LICENSE.txt */var ba={7(o,e,t){(function(n,i,r){function s(w,E){return[w,!w||w.endsWith("/")?"":"/",E,".json"].join("")}function c(w,E){let O=w;return E&&Object.keys(E).forEach(M=>{const z=E[M],F=new RegExp(`{${M}}`,"gm");O=O.replace(F,z.toString())}),O}function u(w,E,O){let M=w[E];if(!M)return O;const z=O.split(".");let F="";do{F+=z.shift();const V=M[F];V===void 0||typeof V!="object"&&z.length?z.length?F+=".":M=O:(M=V,F="")}while(z.length);return M}var l=Object.defineProperty,d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,f=(w,E,O)=>E in w?l(w,E,{enumerable:!0,configurable:!0,writable:!0,value:O}):w[E]=O,k=(w,E,O)=>new Promise((M,z)=>{var F=N=>{try{ee(O.next(N))}catch(ge){z(ge)}},V=N=>{try{ee(O.throw(N))}catch(ge){z(ge)}},ee=N=>N.done?M(N.value):Promise.resolve(N.value).then(F,V);ee((O=O.apply(w,E)).next())});let A={};const C={root:"",lang:"en",fallbackLang:"en"};function $(w,E){w=Object.assign({},C,w),A=E||A;const[O,M]=r.useState(w.lang),[z,F]=r.useState(A),[V,ee]=r.useState(!1),N=r.useCallback(_e=>k(null,null,function*(){if(!z[_e]){ee(!1);try{const ue=s(w.root,_e),de=yield fetch(ue);A[_e]=yield de.json()}catch(ue){console.error(`Failed to load language data for ${_e}:`,ue)}finally{F(((ue,de)=>{for(var re in de||(de={}))h.call(de,re)&&f(ue,re,de[re]);if(d)for(var re of d(de))v.call(de,re)&&f(ue,re,de[re]);return ue})({},A)),ee(!0)}}}),[z,w.root]);r.useEffect(()=>{k(null,null,function*(){yield N(w.fallbackLang),yield N(O)})},[O,N,w.fallbackLang]);const ge=r.useMemo(()=>(_e,ue)=>{if(!Object.prototype.hasOwnProperty.call(z,O))return _e;let de=u(z,O,_e);return de===_e&&O!==w.fallbackLang&&(de=u(z,w.fallbackLang,_e)),c(de,ue)},[z,O,w.fallbackLang]);return{lang:O,setLang:M,t:ge,isReady:V}}const K=i.createContext(null);n.TranslateContext=K,n.TranslateProvider=w=>{const{t:E,setLang:O,lang:M,isReady:z}=$({root:w.root||"assets",lang:w.lang||"en",fallbackLang:w.fallbackLang||"en"},w.translations);return i.h(K.Provider,{value:{t:E,setLang:O,lang:M,isReady:z}},w.children)},n.format=c,n.getResourceUrl=s,n.getValue=u,Object.defineProperty(n,"__esModule",{value:!0})})(e,t(616),t(78))},616(o,e,t){t.r(e),t.d(e,{Component:()=>ee,Fragment:()=>V,cloneElement:()=>qe,createContext:()=>ho,createElement:()=>M,createRef:()=>F,h:()=>M,hydrate:()=>Wt,isValidElement:()=>s,options:()=>i,render:()=>dt,toChildArray:()=>Me});var n,i,r,s,c,u,l,d,h,v,f,k,A,C={},$=[],K=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w=Array.isArray;function E(m,p){for(var _ in p)m[_]=p[_];return m}function O(m){m&&m.parentNode&&m.parentNode.removeChild(m)}function M(m,p,_){var P,T,y,L={};for(y in p)y=="key"?P=p[y]:y=="ref"?T=p[y]:L[y]=p[y];if(arguments.length>2&&(L.children=arguments.length>3?n.call(arguments,2):_),typeof m=="function"&&m.defaultProps!=null)for(y in m.defaultProps)L[y]===void 0&&(L[y]=m.defaultProps[y]);return z(m,L,P,T,null)}function z(m,p,_,P,T){var y={type:m,props:p,key:_,ref:P,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:T??++r,__i:-1,__u:0};return T==null&&i.vnode!=null&&i.vnode(y),y}function F(){return{current:null}}function V(m){return m.children}function ee(m,p){this.props=m,this.context=p}function N(m,p){if(p==null)return m.__?N(m.__,m.__i+1):null;for(var _;p<m.__k.length;p++)if((_=m.__k[p])!=null&&_.__e!=null)return _.__e;return typeof m.type=="function"?N(m):null}function ge(m){var p,_;if((m=m.__)!=null&&m.__c!=null){for(m.__e=m.__c.base=null,p=0;p<m.__k.length;p++)if((_=m.__k[p])!=null&&_.__e!=null){m.__e=m.__c.base=_.__e;break}return ge(m)}}function _e(m){(!m.__d&&(m.__d=!0)&&c.push(m)&&!ue.__r++||u!=i.debounceRendering)&&((u=i.debounceRendering)||l)(ue)}function ue(){for(var m,p,_,P,T,y,L,j=1;c.length;)c.length>j&&c.sort(d),m=c.shift(),j=c.length,m.__d&&(_=void 0,P=void 0,T=(P=(p=m).__v).__e,y=[],L=[],p.__P&&((_=E({},P)).__v=P.__v+1,i.vnode&&i.vnode(_),D(p.__P,_,P,p.__n,p.__P.namespaceURI,32&P.__u?[T]:null,y,T??N(P),!!(32&P.__u),L),_.__v=P.__v,_.__.__k[_.__i]=_,q(y,_,L),P.__e=P.__=null,_.__e!=T&&ge(_)));ue.__r=0}function de(m,p,_,P,T,y,L,j,pe,R,ie){var S,be,B,Te,Ke,Ue,ve,me=P&&P.__k||$,nt=p.length;for(pe=re(_,p,me,pe,nt),S=0;S<nt;S++)(B=_.__k[S])!=null&&(be=B.__i==-1?C:me[B.__i]||C,B.__i=S,Ue=D(m,B,be,T,y,L,j,pe,R,ie),Te=B.__e,B.ref&&be.ref!=B.ref&&(be.ref&&se(be.ref,null,B),ie.push(B.ref,B.__c||Te,B)),Ke==null&&Te!=null&&(Ke=Te),(ve=!!(4&B.__u))||be.__k===B.__k?pe=ye(B,pe,m,ve):typeof B.type=="function"&&Ue!==void 0?pe=Ue:Te&&(pe=Te.nextSibling),B.__u&=-7);return _.__e=Ke,pe}function re(m,p,_,P,T){var y,L,j,pe,R,ie=_.length,S=ie,be=0;for(m.__k=new Array(T),y=0;y<T;y++)(L=p[y])!=null&&typeof L!="boolean"&&typeof L!="function"?(typeof L=="string"||typeof L=="number"||typeof L=="bigint"||L.constructor==String?L=m.__k[y]=z(null,L,null,null,null):w(L)?L=m.__k[y]=z(V,{children:L},null,null,null):L.constructor===void 0&&L.__b>0?L=m.__k[y]=z(L.type,L.props,L.key,L.ref?L.ref:null,L.__v):m.__k[y]=L,pe=y+be,L.__=m,L.__b=m.__b+1,j=null,(R=L.__i=ct(L,_,pe,S))!=-1&&(S--,(j=_[R])&&(j.__u|=2)),j==null||j.__v==null?(R==-1&&(T>ie?be--:T<ie&&be++),typeof L.type!="function"&&(L.__u|=4)):R!=pe&&(R==pe-1?be--:R==pe+1?be++:(R>pe?be--:be++,L.__u|=4))):m.__k[y]=null;if(S)for(y=0;y<ie;y++)(j=_[y])!=null&&!(2&j.__u)&&(j.__e==P&&(P=N(j)),Ie(j,j));return P}function ye(m,p,_,P){var T,y;if(typeof m.type=="function"){for(T=m.__k,y=0;T&&y<T.length;y++)T[y]&&(T[y].__=m,p=ye(T[y],p,_,P));return p}m.__e!=p&&(P&&(p&&m.type&&!p.parentNode&&(p=N(m)),_.insertBefore(m.__e,p||null)),p=m.__e);do p=p&&p.nextSibling;while(p!=null&&p.nodeType==8);return p}function Me(m,p){return p=p||[],m==null||typeof m=="boolean"||(w(m)?m.some(function(_){Me(_,p)}):p.push(m)),p}function ct(m,p,_,P){var T,y,L,j=m.key,pe=m.type,R=p[_],ie=R!=null&&!(2&R.__u);if(R===null&&j==null||ie&&j==R.key&&pe==R.type)return _;if(P>(ie?1:0)){for(T=_-1,y=_+1;T>=0||y<p.length;)if((R=p[L=T>=0?T--:y++])!=null&&!(2&R.__u)&&j==R.key&&pe==R.type)return L}return-1}function lt(m,p,_){p[0]=="-"?m.setProperty(p,_??""):m[p]=_==null?"":typeof _!="number"||K.test(p)?_:_+"px"}function x(m,p,_,P,T){var y,L;e:if(p=="style")if(typeof _=="string")m.style.cssText=_;else{if(typeof P=="string"&&(m.style.cssText=P=""),P)for(p in P)_&&p in _||lt(m.style,p,"");if(_)for(p in _)P&&_[p]==P[p]||lt(m.style,p,_[p])}else if(p[0]=="o"&&p[1]=="n")y=p!=(p=p.replace(h,"$1")),L=p.toLowerCase(),p=L in m||p=="onFocusOut"||p=="onFocusIn"?L.slice(2):p.slice(2),m.l||(m.l={}),m.l[p+y]=_,_?P?_.u=P.u:(_.u=v,m.addEventListener(p,y?k:f,y)):m.removeEventListener(p,y?k:f,y);else{if(T=="http://www.w3.org/2000/svg")p=p.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(p!="width"&&p!="height"&&p!="href"&&p!="list"&&p!="form"&&p!="tabIndex"&&p!="download"&&p!="rowSpan"&&p!="colSpan"&&p!="role"&&p!="popover"&&p in m)try{m[p]=_??"";break e}catch{}typeof _=="function"||(_==null||_===!1&&p[4]!="-"?m.removeAttribute(p):m.setAttribute(p,p=="popover"&&_==1?"":_))}}function I(m){return function(p){if(this.l){var _=this.l[p.type+m];if(p.t==null)p.t=v++;else if(p.t<_.u)return;return _(i.event?i.event(p):p)}}}function D(m,p,_,P,T,y,L,j,pe,R){var ie,S,be,B,Te,Ke,Ue,ve,me,nt,ut,Pn,Vt,Fi,En,Bt,po,Ge=p.type;if(p.constructor!==void 0)return null;128&_.__u&&(pe=!!(32&_.__u),y=[j=p.__e=_.__e]),(ie=i.__b)&&ie(p);e:if(typeof Ge=="function")try{if(ve=p.props,me="prototype"in Ge&&Ge.prototype.render,nt=(ie=Ge.contextType)&&P[ie.__c],ut=ie?nt?nt.props.value:ie.__:P,_.__c?Ue=(S=p.__c=_.__c).__=S.__E:(me?p.__c=S=new Ge(ve,ut):(p.__c=S=new ee(ve,ut),S.constructor=Ge,S.render=Qe),nt&&nt.sub(S),S.state||(S.state={}),S.__n=P,be=S.__d=!0,S.__h=[],S._sb=[]),me&&S.__s==null&&(S.__s=S.state),me&&Ge.getDerivedStateFromProps!=null&&(S.__s==S.state&&(S.__s=E({},S.__s)),E(S.__s,Ge.getDerivedStateFromProps(ve,S.__s))),B=S.props,Te=S.state,S.__v=p,be)me&&Ge.getDerivedStateFromProps==null&&S.componentWillMount!=null&&S.componentWillMount(),me&&S.componentDidMount!=null&&S.__h.push(S.componentDidMount);else{if(me&&Ge.getDerivedStateFromProps==null&&ve!==B&&S.componentWillReceiveProps!=null&&S.componentWillReceiveProps(ve,ut),p.__v==_.__v||!S.__e&&S.shouldComponentUpdate!=null&&S.shouldComponentUpdate(ve,S.__s,ut)===!1){for(p.__v!=_.__v&&(S.props=ve,S.state=S.__s,S.__d=!1),p.__e=_.__e,p.__k=_.__k,p.__k.some(function(bt){bt&&(bt.__=p)}),Pn=0;Pn<S._sb.length;Pn++)S.__h.push(S._sb[Pn]);S._sb=[],S.__h.length&&L.push(S);break e}S.componentWillUpdate!=null&&S.componentWillUpdate(ve,S.__s,ut),me&&S.componentDidUpdate!=null&&S.__h.push(function(){S.componentDidUpdate(B,Te,Ke)})}if(S.context=ut,S.props=ve,S.__P=m,S.__e=!1,Vt=i.__r,Fi=0,me){for(S.state=S.__s,S.__d=!1,Vt&&Vt(p),ie=S.render(S.props,S.state,S.context),En=0;En<S._sb.length;En++)S.__h.push(S._sb[En]);S._sb=[]}else do S.__d=!1,Vt&&Vt(p),ie=S.render(S.props,S.state,S.context),S.state=S.__s;while(S.__d&&++Fi<25);S.state=S.__s,S.getChildContext!=null&&(P=E(E({},P),S.getChildContext())),me&&!be&&S.getSnapshotBeforeUpdate!=null&&(Ke=S.getSnapshotBeforeUpdate(B,Te)),Bt=ie,ie!=null&&ie.type===V&&ie.key==null&&(Bt=H(ie.props.children)),j=de(m,w(Bt)?Bt:[Bt],p,_,P,T,y,L,j,pe,R),S.base=p.__e,p.__u&=-161,S.__h.length&&L.push(S),Ue&&(S.__E=S.__=null)}catch(bt){if(p.__v=null,pe||y!=null)if(bt.then){for(p.__u|=pe?160:128;j&&j.nodeType==8&&j.nextSibling;)j=j.nextSibling;y[y.indexOf(j)]=null,p.__e=j}else{for(po=y.length;po--;)O(y[po]);J(p)}else p.__e=_.__e,p.__k=_.__k,bt.then||J(p);i.__e(bt,p,_)}else y==null&&p.__v==_.__v?(p.__k=_.__k,p.__e=_.__e):j=p.__e=Ee(_.__e,p,_,P,T,y,L,pe,R);return(ie=i.diffed)&&ie(p),128&p.__u?void 0:j}function J(m){m&&m.__c&&(m.__c.__e=!0),m&&m.__k&&m.__k.forEach(J)}function q(m,p,_){for(var P=0;P<_.length;P++)se(_[P],_[++P],_[++P]);i.__c&&i.__c(p,m),m.some(function(T){try{m=T.__h,T.__h=[],m.some(function(y){y.call(T)})}catch(y){i.__e(y,T.__v)}})}function H(m){return typeof m!="object"||m==null||m.__b&&m.__b>0?m:w(m)?m.map(H):E({},m)}function Ee(m,p,_,P,T,y,L,j,pe){var R,ie,S,be,B,Te,Ke,Ue=_.props||C,ve=p.props,me=p.type;if(me=="svg"?T="http://www.w3.org/2000/svg":me=="math"?T="http://www.w3.org/1998/Math/MathML":T||(T="http://www.w3.org/1999/xhtml"),y!=null){for(R=0;R<y.length;R++)if((B=y[R])&&"setAttribute"in B==!!me&&(me?B.localName==me:B.nodeType==3)){m=B,y[R]=null;break}}if(m==null){if(me==null)return document.createTextNode(ve);m=document.createElementNS(T,me,ve.is&&ve),j&&(i.__m&&i.__m(p,y),j=!1),y=null}if(me==null)Ue===ve||j&&m.data==ve||(m.data=ve);else{if(y=y&&n.call(m.childNodes),!j&&y!=null)for(Ue={},R=0;R<m.attributes.length;R++)Ue[(B=m.attributes[R]).name]=B.value;for(R in Ue)if(B=Ue[R],R!="children"){if(R=="dangerouslySetInnerHTML")S=B;else if(!(R in ve)){if(R=="value"&&"defaultValue"in ve||R=="checked"&&"defaultChecked"in ve)continue;x(m,R,null,B,T)}}for(R in ve)B=ve[R],R=="children"?be=B:R=="dangerouslySetInnerHTML"?ie=B:R=="value"?Te=B:R=="checked"?Ke=B:j&&typeof B!="function"||Ue[R]===B||x(m,R,B,Ue[R],T);if(ie)j||S&&(ie.__html==S.__html||ie.__html==m.innerHTML)||(m.innerHTML=ie.__html),p.__k=[];else if(S&&(m.innerHTML=""),de(p.type=="template"?m.content:m,w(be)?be:[be],p,_,P,me=="foreignObject"?"http://www.w3.org/1999/xhtml":T,y,L,y?y[0]:_.__k&&N(_,0),j,pe),y!=null)for(R=y.length;R--;)O(y[R]);j||(R="value",me=="progress"&&Te==null?m.removeAttribute("value"):Te!=null&&(Te!==m[R]||me=="progress"&&!Te||me=="option"&&Te!=Ue[R])&&x(m,R,Te,Ue[R],T),R="checked",Ke!=null&&Ke!=m[R]&&x(m,R,Ke,Ue[R],T))}return m}function se(m,p,_){try{if(typeof m=="function"){var P=typeof m.__u=="function";P&&m.__u(),P&&p==null||(m.__u=m(p))}else m.current=p}catch(T){i.__e(T,_)}}function Ie(m,p,_){var P,T;if(i.unmount&&i.unmount(m),(P=m.ref)&&(P.current&&P.current!=m.__e||se(P,null,p)),(P=m.__c)!=null){if(P.componentWillUnmount)try{P.componentWillUnmount()}catch(y){i.__e(y,p)}P.base=P.__P=null}if(P=m.__k)for(T=0;T<P.length;T++)P[T]&&Ie(P[T],p,_||typeof m.type!="function");_||O(m.__e),m.__c=m.__=m.__e=void 0}function Qe(m,p,_){return this.constructor(m,_)}function dt(m,p,_){var P,T,y,L;p==document&&(p=document.documentElement),i.__&&i.__(m,p),T=(P=typeof _=="function")?null:_&&_.__k||p.__k,y=[],L=[],D(p,m=(!P&&_||p).__k=M(V,null,[m]),T||C,C,p.namespaceURI,!P&&_?[_]:T?null:p.firstChild?n.call(p.childNodes):null,y,!P&&_?_:T?T.__e:p.firstChild,P,L),q(y,m,L)}function Wt(m,p){dt(m,p,Wt)}function qe(m,p,_){var P,T,y,L,j=E({},m.props);for(y in m.type&&m.type.defaultProps&&(L=m.type.defaultProps),p)y=="key"?P=p[y]:y=="ref"?T=p[y]:j[y]=p[y]===void 0&&L!=null?L[y]:p[y];return arguments.length>2&&(j.children=arguments.length>3?n.call(arguments,2):_),z(m.type,j,P||m.key,T||m.ref,null)}function ho(m){function p(_){var P,T;return this.getChildContext||(P=new Set,(T={})[p.__c]=this,this.getChildContext=function(){return T},this.componentWillUnmount=function(){P=null},this.shouldComponentUpdate=function(y){this.props.value!=y.value&&P.forEach(function(L){L.__e=!0,_e(L)})},this.sub=function(y){P.add(y);var L=y.componentWillUnmount;y.componentWillUnmount=function(){P&&P.delete(y),L&&L.call(y)}}),_.children}return p.__c="__cC"+A++,p.__=m,p.Provider=p.__l=(p.Consumer=function(_,P){return _.children(P)}).contextType=p,p}n=$.slice,i={__e:function(m,p,_,P){for(var T,y,L;p=p.__;)if((T=p.__c)&&!T.__)try{if((y=T.constructor)&&y.getDerivedStateFromError!=null&&(T.setState(y.getDerivedStateFromError(m)),L=T.__d),T.componentDidCatch!=null&&(T.componentDidCatch(m,P||{}),L=T.__d),L)return T.__E=T}catch(j){m=j}throw m}},r=0,s=function(m){return m!=null&&m.constructor===void 0},ee.prototype.setState=function(m,p){var _;_=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=E({},this.state),typeof m=="function"&&(m=m(E({},_),this.props)),m&&E(_,m),m!=null&&this.__v&&(p&&this._sb.push(p),_e(this))},ee.prototype.forceUpdate=function(m){this.__v&&(this.__e=!0,m&&this.__h.push(m),_e(this))},ee.prototype.render=V,c=[],l=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=function(m,p){return m.__v.__b-p.__v.__b},ue.__r=0,h=/(PointerCapture)$|Capture$/i,v=0,f=I(!1),k=I(!0),A=0},78(o,e,t){t.r(e),t.d(e,{useCallback:()=>V,useContext:()=>ee,useDebugValue:()=>N,useEffect:()=>E,useErrorBoundary:()=>ge,useId:()=>_e,useImperativeHandle:()=>z,useLayoutEffect:()=>O,useMemo:()=>F,useReducer:()=>w,useRef:()=>M,useState:()=>K});var n,i,r,s,c=t(616),u=0,l=[],d=c.options,h=d.__b,v=d.__r,f=d.diffed,k=d.__c,A=d.unmount,C=d.__;function $(x,I){d.__h&&d.__h(i,x,u||I),u=0;var D=i.__H||(i.__H={__:[],__h:[]});return x>=D.__.length&&D.__.push({}),D.__[x]}function K(x){return u=1,w(lt,x)}function w(x,I,D){var J=$(n++,2);if(J.t=x,!J.__c&&(J.__=[D?D(I):lt(void 0,I),function(se){var Ie=J.__N?J.__N[0]:J.__[0],Qe=J.t(Ie,se);Ie!==Qe&&(J.__N=[Qe,J.__[1]],J.__c.setState({}))}],J.__c=i,!i.__f)){var q=function(se,Ie,Qe){if(!J.__c.__H)return!0;var dt=J.__c.__H.__.filter(function(qe){return!!qe.__c});if(dt.every(function(qe){return!qe.__N}))return!H||H.call(this,se,Ie,Qe);var Wt=J.__c.props!==se;return dt.forEach(function(qe){if(qe.__N){var ho=qe.__[0];qe.__=qe.__N,qe.__N=void 0,ho!==qe.__[0]&&(Wt=!0)}}),H&&H.call(this,se,Ie,Qe)||Wt};i.__f=!0;var H=i.shouldComponentUpdate,Ee=i.componentWillUpdate;i.componentWillUpdate=function(se,Ie,Qe){if(this.__e){var dt=H;H=void 0,q(se,Ie,Qe),H=dt}Ee&&Ee.call(this,se,Ie,Qe)},i.shouldComponentUpdate=q}return J.__N||J.__}function E(x,I){var D=$(n++,3);!d.__s&&ct(D.__H,I)&&(D.__=x,D.u=I,i.__H.__h.push(D))}function O(x,I){var D=$(n++,4);!d.__s&&ct(D.__H,I)&&(D.__=x,D.u=I,i.__h.push(D))}function M(x){return u=5,F(function(){return{current:x}},[])}function z(x,I,D){u=6,O(function(){if(typeof x=="function"){var J=x(I());return function(){x(null),J&&typeof J=="function"&&J()}}if(x)return x.current=I(),function(){return x.current=null}},D==null?D:D.concat(x))}function F(x,I){var D=$(n++,7);return ct(D.__H,I)&&(D.__=x(),D.__H=I,D.__h=x),D.__}function V(x,I){return u=8,F(function(){return x},I)}function ee(x){var I=i.context[x.__c],D=$(n++,9);return D.c=x,I?(D.__==null&&(D.__=!0,I.sub(i)),I.props.value):x.__}function N(x,I){d.useDebugValue&&d.useDebugValue(I?I(x):x)}function ge(x){var I=$(n++,10),D=K();return I.__=x,i.componentDidCatch||(i.componentDidCatch=function(J,q){I.__&&I.__(J,q),D[1](J)}),[D[0],function(){D[1](void 0)}]}function _e(){var x=$(n++,11);if(!x.__){for(var I=i.__v;I!==null&&!I.__m&&I.__!==null;)I=I.__;var D=I.__m||(I.__m=[0,0]);x.__="P"+D[0]+"-"+D[1]++}return x.__}function ue(){for(var x;x=l.shift();)if(x.__P&&x.__H)try{x.__H.__h.forEach(ye),x.__H.__h.forEach(Me),x.__H.__h=[]}catch(I){x.__H.__h=[],d.__e(I,x.__v)}}d.__b=function(x){i=null,h&&h(x)},d.__=function(x,I){x&&I.__k&&I.__k.__m&&(x.__m=I.__k.__m),C&&C(x,I)},d.__r=function(x){v&&v(x),n=0;var I=(i=x.__c).__H;I&&(r===i?(I.__h=[],i.__h=[],I.__.forEach(function(D){D.__N&&(D.__=D.__N),D.u=D.__N=void 0})):(I.__h.forEach(ye),I.__h.forEach(Me),I.__h=[],n=0)),r=i},d.diffed=function(x){f&&f(x);var I=x.__c;I&&I.__H&&(I.__H.__h.length&&(l.push(I)!==1&&s===d.requestAnimationFrame||((s=d.requestAnimationFrame)||re)(ue)),I.__H.__.forEach(function(D){D.u&&(D.__H=D.u),D.u=void 0})),r=i=null},d.__c=function(x,I){I.some(function(D){try{D.__h.forEach(ye),D.__h=D.__h.filter(function(J){return!J.__||Me(J)})}catch(J){I.some(function(q){q.__h&&(q.__h=[])}),I=[],d.__e(J,D.__v)}}),k&&k(x,I)},d.unmount=function(x){A&&A(x);var I,D=x.__c;D&&D.__H&&(D.__H.__.forEach(function(J){try{ye(J)}catch(q){I=q}}),D.__H=void 0,I&&d.__e(I,D.__v))};var de=typeof requestAnimationFrame=="function";function re(x){var I,D=function(){clearTimeout(J),de&&cancelAnimationFrame(I),setTimeout(x)},J=setTimeout(D,35);de&&(I=requestAnimationFrame(D))}function ye(x){var I=i,D=x.__c;typeof D=="function"&&(x.__c=void 0,D()),i=I}function Me(x){var I=i;x.__c=x.__(),i=I}function ct(x,I){return!x||x.length!==I.length||I.some(function(D,J){return D!==x[J]})}function lt(x,I){return typeof I=="function"?I(x):I}},292(o){var e=[];function t(r){for(var s=-1,c=0;c<e.length;c++)if(e[c].identifier===r){s=c;break}return s}function n(r,s){for(var c={},u=[],l=0;l<r.length;l++){var d=r[l],h=s.base?d[0]+s.base:d[0],v=c[h]||0,f="".concat(h," ").concat(v);c[h]=v+1;var k=t(f),A={css:d[1],media:d[2],sourceMap:d[3],supports:d[4],layer:d[5]};if(k!==-1)e[k].references++,e[k].updater(A);else{var C=i(A,s);s.byIndex=l,e.splice(l,0,{identifier:f,updater:C,references:1})}u.push(f)}return u}function i(r,s){var c=s.domAPI(s);return c.update(r),function(u){if(u){if(u.css===r.css&&u.media===r.media&&u.sourceMap===r.sourceMap&&u.supports===r.supports&&u.layer===r.layer)return;c.update(r=u)}else c.remove()}}o.exports=function(r,s){var c=n(r=r||[],s=s||{});return function(u){u=u||[];for(var l=0;l<c.length;l++){var d=t(c[l]);e[d].references--}for(var h=n(u,s),v=0;v<c.length;v++){var f=t(c[v]);e[f].references===0&&(e[f].updater(),e.splice(f,1))}c=h}}},88(o){o.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},884(o,e,t){o.exports=function(n){var i=t.nc;i&&n.setAttribute("nonce",i)}},360(o){var e,t=(e=[],function(r,s){return e[r]=s,e.filter(Boolean).join(`
44
- `)});function n(r,s,c,u){var l;if(c)l="";else{l="",u.supports&&(l+="@supports (".concat(u.supports,") {")),u.media&&(l+="@media ".concat(u.media," {"));var d=u.layer!==void 0;d&&(l+="@layer".concat(u.layer.length>0?" ".concat(u.layer):""," {")),l+=u.css,d&&(l+="}"),u.media&&(l+="}"),u.supports&&(l+="}")}if(r.styleSheet)r.styleSheet.cssText=t(s,l);else{var h=document.createTextNode(l),v=r.childNodes;v[s]&&r.removeChild(v[s]),v.length?r.insertBefore(h,v[s]):r.appendChild(h)}}var i={singleton:null,singletonCounter:0};o.exports=function(r){if(typeof document>"u")return{update:function(){},remove:function(){}};var s=i.singletonCounter++,c=i.singleton||(i.singleton=r.insertStyleElement(r));return{update:function(u){n(c,s,!1,u)},remove:function(u){n(c,s,!0,u)}}}},6(o,e,t){t.d(e,{en:()=>n});const n={headlines:{error:"An error has occurred",loginEmail:"Sign in or create account",loginEmailNoSignup:"Sign in",loginFinished:"Login successful",loginPasscode:"Enter passcode",loginPassword:"Enter password",registerAuthenticator:"Create a passkey",registerConfirm:"Create account?",registerPassword:"Set new password",otpSetUp:"Set up authenticator app",profileEmails:"Emails",profilePassword:"Password",profilePasskeys:"Passkeys",isPrimaryEmail:"Primary email address",setPrimaryEmail:"Set primary email address",createEmail:"Enter a new email",createUsername:"Enter a new username",emailVerified:"Verified",emailUnverified:"Unverified",emailDelete:"Delete",renamePasskey:"Rename passkey",deletePasskey:"Delete passkey",lastUsedAt:"Last used at",createdAt:"Created at",connectedAccounts:"Connected accounts",deleteAccount:"Delete account",accountNotFound:"Account not found",signIn:"Sign in",signUp:"Create account",selectLoginMethod:"Select login method",setupLoginMethod:"Set up login method",lastUsed:"Last seen",ipAddress:"IP address",revokeSession:"Revoke session",profileSessions:"Sessions",mfaSetUp:"Set up MFA",securityKeySetUp:"Add security key",securityKeyLogin:"Security key",otpLogin:"Authentication code",renameSecurityKey:"Rename security key",deleteSecurityKey:"Delete security key",securityKeys:"Security keys",authenticatorApp:"Authenticator app",authenticatorAppAlreadySetUp:"Authenticator app is set up",authenticatorAppNotSetUp:"Set up authenticator app",trustDevice:"Trust this browser?",deleteIdentity:"Delete connection"},texts:{enterPasscode:"Enter the passcode sent to your email address.",enterPasscodeNoEmail:"Enter the passcode that was sent to your primary email address.",setupPasskey:"Sign in to your account easily and securely with a passkey. Note: Your biometric data is only stored on your devices and will never be shared with anyone.",createAccount:'No account exists for "{emailAddress}". Do you want to create a new account?',otpEnterVerificationCode:"Enter the one-time password (OTP) obtained from your authenticator app below:",otpScanQRCode:"Scan the QR code using your authenticator app (such as Google Authenticator or any other TOTP app). Alternatively, you can manually enter the OTP secret key into the app.",otpSecretKey:"OTP secret key",passwordFormatHint:"Must be between {minLength} and {maxLength} characters long.",securityKeySetUp:"Use a dedicated security key via USB, Bluetooth, or NFC, or your mobile phone. Connect or activate your security key, then click the button below and follow the prompts to complete the registration.",setPrimaryEmail:"Set this email address to be used for contacting you.",isPrimaryEmail:"This email address will be used to contact you if necessary.",emailVerified:"This email address has been verified.",emailUnverified:"This email address has not been verified.",emailDelete:"If you delete this email address, it can no longer be used to sign in.",renamePasskey:"Set a name for the passkey.",deletePasskey:"Delete this passkey from your account.",deleteAccount:"Are you sure you want to delete this account? All data will be deleted immediately and cannot be recovered.",noAccountExists:'No account exists for "{emailAddress}".',selectLoginMethodForFutureLogins:"Select one of the following login methods to use for future logins.",howDoYouWantToLogin:"How do you want to login?",mfaSetUp:"Protect your account with Multi-Factor Authentication (MFA). MFA adds an additional step to your login process, ensuring that even if your password or email account is compromised, your account stays secure.",securityKeyLogin:"Connect or activate your security key, then click the button below. Once ready, use it via USB, NFC, your mobile phone. Follow the prompts to complete the login process.",otpLogin:"Open your authenticator app to obtain the one-time password (OTP). Enter the code in the field below to complete your login.",renameSecurityKey:"Set a name for the security key.",deleteSecurityKey:"Delete this security key from your account.",authenticatorAppAlreadySetUp:"Your account is secured with an authenticator app that generates time-based one-time passwords (TOTP) for multi-factor authentication.",authenticatorAppNotSetUp:"Secure your account with an authenticator app that generates time-based one-time passwords (TOTP) for multi-factor authentication.",trustDevice:"If you trust this browser, you won’t need to enter your OTP (One-Time-Password) or use your security key for multi-factor authentication (MFA) the next time you log in."},labels:{or:"or",no:"no",yes:"yes",email:"Email",continue:"Continue",copied:"copied",skip:"Skip",save:"Save",password:"Password",passkey:"Passkey",passcode:"Passcode",signInPassword:"Sign in with a password",signInPasscode:"Sign in with a passcode",forgotYourPassword:"Forgot your password?",back:"Back",signInPasskey:"Sign in with a passkey",registerAuthenticator:"Create a passkey",signIn:"Sign in",signUp:"Create account",sendNewPasscode:"Send new code",passwordRetryAfter:"Retry in {passwordRetryAfter}",passcodeResendAfter:"Request a new code in {passcodeResendAfter}",unverifiedEmail:"unverified",primaryEmail:"primary",setAsPrimaryEmail:"Set as primary",verify:"Verify",delete:"Delete",newEmailAddress:"New email address",newPassword:"New password",rename:"Rename",newPasskeyName:"New passkey name",addEmail:"Add email",createPasskey:"Create a passkey",webauthnUnsupported:"Passkeys are not supported by your browser",signInWith:"Continue with {provider}",deleteAccount:"Yes, delete this account.",emailOrUsername:"Email or username",username:"Username",optional:"optional",dontHaveAnAccount:"Don't have an account?",alreadyHaveAnAccount:"Already have an account?",changeUsername:"Change username",setUsername:"Set username",changePassword:"Change password",setPassword:"Set password",revoke:"Revoke",currentSession:"Current session",authenticatorApp:"Authenticator app",securityKey:"Security key",securityKeyUse:"Use security key",newSecurityKeyName:"New security key name",createSecurityKey:"Add a security key",authenticatorAppManage:"Manage authenticator app",authenticatorAppAdd:"Set up",configured:"configured",useAnotherMethod:"Use another method",lastUsed:"Last used",trustDevice:"Trust this browser",staySignedIn:"Stay signed in",connectAccount:"Connect account"},errors:{somethingWentWrong:"A technical error has occurred. Please try again later.",requestTimeout:"The request timed out.",invalidPassword:"Wrong email or password.",invalidPasscode:"The passcode provided was not correct.",passcodeAttemptsReached:"The passcode was entered incorrectly too many times. Please request a new code.",tooManyRequests:"Too many requests have been made. Please wait to repeat the requested operation.",unauthorized:"Your session has expired. Please log in again.",invalidWebauthnCredential:"This passkey cannot be used anymore.",passcodeExpired:"The passcode has expired. Please request a new one.",userVerification:"User verification required. Please ensure your authenticator device is protected with a PIN or biometric.",emailAddressAlreadyExistsError:"The email address already exists.",maxNumOfEmailAddressesReached:"No further email addresses can be added.",thirdPartyAccessDenied:"Access denied. The request was cancelled by the user or the provider has denied access for other reasons.",thirdPartyMultipleAccounts:"Cannot identify account. The email address is used by multiple accounts.",thirdPartyUnverifiedEmail:"Email verification required. Please verify the used email address with your provider.",signupDisabled:"Account registration is disabled.",handlerNotFoundError:"The current step in your process is not supported by this application version. Please try again later or contact support if the issue persists."},flowErrors:{technical_error:"A technical error has occurred. Please try again later.",flow_expired_error:"The session has expired, please click the button to restart.",value_invalid_error:"The entered value is invalid.",passcode_invalid:"The passcode provided was not correct.",passkey_invalid:"This passkey cannot be used anymore.",passcode_max_attempts_reached:"The passcode was entered incorrectly too many times. Please request a new code.",rate_limit_exceeded:"Too many requests have been made. Please wait to repeat the requested operation.",unknown_username_error:"The username is unknown.",unknown_email_error:"The email address is unknown.",username_already_exists:"The username is already taken.",invalid_username_error:"The username must contain only letters, numbers, and underscores.",email_already_exists:"The email is already taken.",not_found:"The requested resource was not found.",operation_not_permitted_error:"The operation is not permitted.",flow_discontinuity_error:"The process cannot be continued due to user settings or the provider's configuration.",form_data_invalid_error:"The submitted form data contains errors.",unauthorized:"Your session has expired. Please log in again.",value_missing_error:"The value is missing.",value_too_long_error:"Value is too long.",value_too_short_error:"The value is too short.",webauthn_credential_invalid_mfa_only:"This credential can be used as a second factor security key only.",webauthn_credential_already_exists:"The request either timed out, was canceled or the device is already registered. Please try again or try using another device.",platform_authenticator_required:"Your account is configured to use platform authenticators, but your current device or browser does not support this feature. Please try again with a compatible device or browser.",third_party_access_denied:"Access denied. The request was cancelled by the user or the provider has denied access for other reasons."}}},597(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,'.hanko_accordion{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);width:100%;overflow:hidden}.hanko_accordion .hanko_accordionItem{color:var(--color, #333333);margin:.25rem 0;overflow:hidden}.hanko_accordion .hanko_accordionItem.hanko_dropdown{margin:0}.hanko_accordion .hanko_accordionItem .hanko_label{border-radius:var(--border-radius, 8px);border-style:none;height:var(--item-height, 42px);background:var(--background-color, white);box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;padding:0 1rem;margin:0;cursor:pointer;transition:all .35s}.hanko_accordion .hanko_accordionItem .hanko_label .hanko_labelText{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hanko_accordion .hanko_accordionItem .hanko_label .hanko_labelText .hanko_description{color:var(--color-shade-1, #8f9095)}.hanko_accordion .hanko_accordionItem .hanko_label.hanko_dropdown{margin:0;color:var(--link-color, #506cf0);justify-content:flex-start}.hanko_accordion .hanko_accordionItem .hanko_label:hover{color:var(--brand-contrast-color, white);background:var(--brand-color-shade-1, #6b84fb)}.hanko_accordion .hanko_accordionItem .hanko_label:hover .hanko_description{color:var(--brand-contrast-color, white)}.hanko_accordion .hanko_accordionItem .hanko_label:hover.hanko_dropdown{color:var(--link-color, #506cf0);background:none}.hanko_accordion .hanko_accordionItem .hanko_label:not(.hanko_dropdown)::after{content:"❯";width:1rem;text-align:center;transition:all .35s}.hanko_accordion .hanko_accordionItem .hanko_accordionInput{position:absolute;opacity:0;z-index:-1}.hanko_accordion .hanko_accordionItem .hanko_accordionInput:checked+.hanko_label{color:var(--brand-contrast-color, white);background:var(--brand-color, #506cf0)}.hanko_accordion .hanko_accordionItem .hanko_accordionInput:checked+.hanko_label .hanko_description{color:var(--brand-contrast-color, white)}.hanko_accordion .hanko_accordionItem .hanko_accordionInput:checked+.hanko_label.hanko_dropdown{color:var(--link-color, #506cf0);background:none}.hanko_accordion .hanko_accordionItem .hanko_accordionInput:checked+.hanko_label:not(.hanko_dropdown)::after{transform:rotate(90deg)}.hanko_accordion .hanko_accordionItem .hanko_accordionInput:checked+.hanko_label~.hanko_accordionContent{margin:.25rem 1rem;opacity:1;max-height:100vh}.hanko_accordion .hanko_accordionItem .hanko_accordionContent{max-height:0;margin:0 1rem;opacity:0;overflow:hidden;transition:all .35s}.hanko_accordion .hanko_accordionItem .hanko_accordionContent.hanko_dropdownContent{border-style:none}',""]),s.locals={accordion:"hanko_accordion",accordionItem:"hanko_accordionItem",dropdown:"hanko_dropdown",label:"hanko_label",labelText:"hanko_labelText",description:"hanko_description",accordionInput:"hanko_accordionInput",accordionContent:"hanko_accordionContent",dropdownContent:"hanko_dropdownContent"};const c=s},217(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_errorBox{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);border-radius:var(--border-radius, 8px);border-style:var(--border-style, solid);border-width:var(--border-width, 1px);color:var(--error-color, #e82020);background:var(--background-color, white);margin:var(--item-margin, 0.5rem 0);display:flex;align-items:start;box-sizing:border-box;line-height:1.5rem;padding:.25em;gap:.2em}.hanko_errorBox>span{display:inline-flex}.hanko_errorBox>span:first-child{padding:.25em 0 .25em .19em}.hanko_errorBox[hidden]{display:none}.hanko_errorMessage{color:var(--error-color, #e82020)}",""]),s.locals={errorBox:"hanko_errorBox",errorMessage:"hanko_errorMessage"};const c=s},681(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,'.hanko_form{display:flex;flex-grow:1}.hanko_form .hanko_ul{flex-grow:1;margin:var(--item-margin, 0.5rem 0);padding-inline-start:0;list-style-type:none;display:flex;flex-wrap:wrap;gap:1em}.hanko_form .hanko_li{display:flex;max-width:100%;flex-grow:1;flex-basis:min-content}.hanko_form .hanko_li.hanko_maxWidth{min-width:100%}.hanko_button{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);border-radius:var(--border-radius, 8px);border-style:var(--border-style, solid);border-width:var(--border-width, 1px);white-space:nowrap;width:100%;min-width:var(--button-min-width, 7em);min-height:var(--item-height, 42px);outline:none;cursor:pointer;transition:.1s ease-out;flex-grow:1;flex-shrink:1;display:inline-flex;position:relative}.hanko_button[data-bubble]:before{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);border-radius:var(--border-radius, 8px);border-style:var(--border-style, solid);border-width:var(--border-width, 1px);padding:2px 8px;font-size:9px;line-height:normal;content:attr(data-bubble);display:block;position:absolute;bottom:80%;left:80%;white-space:nowrap;width:max-content;text-align:center;background-color:inherit;color:var(--brand-color-shade-1, #6b84fb);border-color:var(--brand-color-shade-1, #6b84fb)}.hanko_button:disabled{cursor:default}.hanko_button.hanko_primary{color:var(--brand-contrast-color, white);background:var(--brand-color, #506cf0);border-color:var(--brand-color, #506cf0);justify-content:center}.hanko_button.hanko_primary:hover{color:var(--brand-contrast-color, white);background:var(--brand-color-shade-1, #6b84fb);border-color:var(--brand-color, #506cf0)}.hanko_button.hanko_primary:focus{color:var(--brand-contrast-color, white);background:var(--brand-color, #506cf0);border-color:var(--color, #333333)}.hanko_button.hanko_primary:disabled{color:var(--color-shade-1, #8f9095);background:var(--color-shade-2, #e5e6ef);border-color:var(--color-shade-2, #e5e6ef)}.hanko_button.hanko_secondary{color:var(--color, #333333);background:var(--background-color, white);border-color:var(--color-shade-1, #8f9095);justify-content:center}.hanko_button.hanko_secondary:hover{color:var(--color, #333333);background:var(--color-shade-2, #e5e6ef);border-color:var(--color, #333333)}.hanko_button.hanko_secondary:focus{color:var(--color, #333333);background:var(--background-color, white);border-color:var(--brand-color, #506cf0)}.hanko_button.hanko_secondary:disabled{color:var(--color-shade-1, #8f9095);background:var(--color-shade-2, #e5e6ef);border-color:var(--color-shade-1, #8f9095)}.hanko_button.hanko_dangerous{color:var(--error-color, #e82020);background:var(--background-color, white);border-color:var(--error-color, #e82020);flex-grow:0;width:auto}.hanko_caption{flex-wrap:wrap;display:flex;justify-content:space-between;align-items:baseline}.hanko_inputWrapper{flex-grow:1;position:relative;display:flex;min-width:var(--input-min-width, 14em);max-width:100%}.hanko_input{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);border-radius:var(--border-radius, 8px);border-style:var(--border-style, solid);border-width:var(--border-width, 1px);height:var(--item-height, 42px);color:var(--color, #333333);border-color:var(--color-shade-1, #8f9095);background:var(--background-color, white)}.hanko_input.hanko_error{border-color:var(--error-color, #e82020)}.hanko_input{padding:0 .5rem;outline:none;width:100%;box-sizing:border-box;transition:.1s ease-out}.hanko_input:-webkit-autofill,.hanko_input:-webkit-autofill:hover,.hanko_input:-webkit-autofill:focus{-webkit-text-fill-color:var(--color, #333333);-webkit-box-shadow:0 0 0 50px var(--background-color, white) inset}.hanko_input::-ms-reveal,.hanko_input::-ms-clear{display:none}.hanko_input::placeholder{color:var(--color-shade-1, #8f9095)}.hanko_input:focus{color:var(--color, #333333);border-color:var(--color, #333333)}.hanko_input:disabled{color:var(--color-shade-1, #8f9095);background:var(--color-shade-2, #e5e6ef);border-color:var(--color-shade-1, #8f9095)}.hanko_passcodeInputWrapper{flex-grow:1;min-width:var(--input-min-width, 14em);max-width:fit-content;position:relative;display:flex;justify-content:space-between}.hanko_passcodeInputWrapper .hanko_passcodeDigitWrapper{flex-grow:1;margin:0 .5rem 0 0}.hanko_passcodeInputWrapper .hanko_passcodeDigitWrapper:last-child{margin:0}.hanko_passcodeInputWrapper .hanko_passcodeDigitWrapper .hanko_input{text-align:center}.hanko_checkboxWrapper{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);color:var(--color, #333333);align-items:center;display:flex}.hanko_checkboxWrapper .hanko_label{color:inherit;padding-left:.5rem;cursor:pointer}.hanko_checkboxWrapper .hanko_label.hanko_disabled{cursor:default;color:var(--color-shade-1, #8f9095)}.hanko_checkboxWrapper .hanko_checkbox{border:currentColor solid 1px;border-radius:.15em;appearance:none;-webkit-appearance:none;width:1.1rem;height:1.1rem;margin:0;color:currentColor;background-color:var(--background-color, white);font:inherit;box-shadow:none;display:inline-flex;place-content:center;cursor:pointer}.hanko_checkboxWrapper .hanko_checkbox:checked{background-color:var(--color, #333333)}.hanko_checkboxWrapper .hanko_checkbox:disabled{cursor:default;background-color:var(--color-shade-2, #e5e6ef);border-color:var(--color-shade-1, #8f9095)}.hanko_checkboxWrapper .hanko_checkbox:checked:after{content:"✓";color:var(--background-color, white);position:absolute;line-height:1.1rem}.hanko_checkboxWrapper .hanko_checkbox:disabled:after{color:var(--color-shade-1, #8f9095)}',""]),s.locals={form:"hanko_form",ul:"hanko_ul",li:"hanko_li",maxWidth:"hanko_maxWidth",button:"hanko_button",primary:"hanko_primary",secondary:"hanko_secondary",dangerous:"hanko_dangerous",caption:"hanko_caption",inputWrapper:"hanko_inputWrapper",input:"hanko_input",error:"hanko_error",passcodeInputWrapper:"hanko_passcodeInputWrapper",passcodeDigitWrapper:"hanko_passcodeDigitWrapper",checkboxWrapper:"hanko_checkboxWrapper",label:"hanko_label",disabled:"hanko_disabled",checkbox:"hanko_checkbox"};const c=s},547(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_headline{color:var(--color, #333333);font-family:var(--font-family, sans-serif);text-align:left;letter-spacing:0;font-style:normal;line-height:1.1}.hanko_headline.hanko_grade1{font-size:var(--headline1-font-size, 24px);font-weight:var(--headline1-font-weight, 600);margin:var(--headline1-margin, 0 0 0.5rem)}.hanko_headline.hanko_grade2{font-size:var(--headline2-font-size, 16px);font-weight:var(--headline2-font-weight, 600);margin:var(--headline2-margin, 1rem 0 0.5rem)}",""]),s.locals={headline:"hanko_headline",grade1:"hanko_grade1",grade2:"hanko_grade2"};const c=s},313(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_icon,.hanko_loadingSpinnerWrapper .hanko_loadingSpinner,.hanko_loadingSpinnerWrapperIcon .hanko_loadingSpinner,.hanko_exclamationMark,.hanko_checkmark{display:inline-block;fill:var(--brand-contrast-color, white);width:18px}.hanko_icon.hanko_secondary,.hanko_loadingSpinnerWrapper .hanko_secondary.hanko_loadingSpinner,.hanko_loadingSpinnerWrapperIcon .hanko_secondary.hanko_loadingSpinner,.hanko_secondary.hanko_exclamationMark,.hanko_secondary.hanko_checkmark{fill:var(--color, #333333)}.hanko_icon.hanko_disabled,.hanko_loadingSpinnerWrapper .hanko_disabled.hanko_loadingSpinner,.hanko_loadingSpinnerWrapperIcon .hanko_disabled.hanko_loadingSpinner,.hanko_disabled.hanko_exclamationMark,.hanko_disabled.hanko_checkmark{fill:var(--color-shade-1, #8f9095)}.hanko_checkmark{fill:var(--brand-color, #506cf0)}.hanko_checkmark.hanko_secondary{fill:var(--color-shade-1, #8f9095)}.hanko_checkmark.hanko_fadeOut{animation:hanko_fadeOut ease-out 1.5s forwards !important}@keyframes hanko_fadeOut{0%{opacity:1}100%{opacity:0}}.hanko_exclamationMark{fill:var(--error-color, #e82020)}.hanko_loadingSpinnerWrapperIcon{width:100%;column-gap:10px;margin-left:10px}.hanko_loadingSpinnerWrapper,.hanko_loadingSpinnerWrapperIcon{display:inline-flex;align-items:center;height:100%;margin:0 5px;justify-content:inherit;flex-wrap:inherit}.hanko_loadingSpinnerWrapper.hanko_centerContent,.hanko_centerContent.hanko_loadingSpinnerWrapperIcon{justify-content:center}.hanko_loadingSpinnerWrapper.hanko_maxWidth,.hanko_maxWidth.hanko_loadingSpinnerWrapperIcon{width:100%}.hanko_loadingSpinnerWrapper .hanko_loadingSpinner,.hanko_loadingSpinnerWrapperIcon .hanko_loadingSpinner{fill:var(--brand-color, #506cf0);animation:hanko_spin 500ms ease-in-out infinite}.hanko_loadingSpinnerWrapper.hanko_secondary,.hanko_secondary.hanko_loadingSpinnerWrapperIcon{fill:var(--color-shade-1, #8f9095)}@keyframes hanko_spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.hanko_googleIcon.hanko_disabled{fill:var(--color-shade-1, #8f9095)}.hanko_googleIcon.hanko_blue{fill:#4285f4}.hanko_googleIcon.hanko_green{fill:#34a853}.hanko_googleIcon.hanko_yellow{fill:#fbbc05}.hanko_googleIcon.hanko_red{fill:#ea4335}.hanko_microsoftIcon.hanko_disabled{fill:var(--color-shade-1, #8f9095)}.hanko_microsoftIcon.hanko_blue{fill:#00a4ef}.hanko_microsoftIcon.hanko_green{fill:#7fba00}.hanko_microsoftIcon.hanko_yellow{fill:#ffb900}.hanko_microsoftIcon.hanko_red{fill:#f25022}.hanko_facebookIcon.hanko_outline{fill:#0866ff}.hanko_facebookIcon.hanko_disabledOutline{fill:var(--color-shade-1, #8f9095)}.hanko_facebookIcon.hanko_letter{fill:#fff}.hanko_facebookIcon.hanko_disabledLetter{fill:var(--color-shade-2, #e5e6ef)}",""]),s.locals={icon:"hanko_icon",loadingSpinnerWrapper:"hanko_loadingSpinnerWrapper",loadingSpinner:"hanko_loadingSpinner",loadingSpinnerWrapperIcon:"hanko_loadingSpinnerWrapperIcon",exclamationMark:"hanko_exclamationMark",checkmark:"hanko_checkmark",secondary:"hanko_secondary",disabled:"hanko_disabled",fadeOut:"hanko_fadeOut",centerContent:"hanko_centerContent",maxWidth:"hanko_maxWidth",spin:"hanko_spin",googleIcon:"hanko_googleIcon",blue:"hanko_blue",green:"hanko_green",yellow:"hanko_yellow",red:"hanko_red",microsoftIcon:"hanko_microsoftIcon",facebookIcon:"hanko_facebookIcon",outline:"hanko_outline",disabledOutline:"hanko_disabledOutline",letter:"hanko_letter",disabledLetter:"hanko_disabledLetter"};const c=s},579(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_link{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);color:var(--link-color, #506cf0);text-decoration:var(--link-text-decoration, none);cursor:pointer;background:none !important;border:none;padding:0 !important;transition:all .1s}.hanko_link:hover{text-decoration:var(--link-text-decoration-hover, underline)}.hanko_link:disabled{color:var(--color, #333333) !important;pointer-events:none;cursor:default}.hanko_link.hanko_danger{color:var(--error-color, #e82020)}.hanko_linkWrapper{display:inline-flex;flex-direction:row;justify-content:space-between;align-items:center;overflow:hidden}.hanko_linkWrapper.hanko_reverse{flex-direction:row-reverse}",""]),s.locals={link:"hanko_link",danger:"hanko_danger",linkWrapper:"hanko_linkWrapper",reverse:"hanko_reverse"};const c=s},8(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_otpCreationDetails{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);color:var(--color, #333333);margin:var(--item-margin, 0.5rem 0);display:flex;justify-content:center;align-items:center;flex-direction:column;font-size:smaller}",""]),s.locals={otpCreationDetails:"hanko_otpCreationDetails"};const c=s},193(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_paragraph{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);color:var(--color, #333333);margin:var(--item-margin, 0.5rem 0);text-align:left;word-break:break-word}.hanko_paragraph.hanko_center{align-items:center}.hanko_paragraph.hanko_column{display:flex;flex-direction:column;width:100%}",""]),s.locals={paragraph:"hanko_paragraph",center:"hanko_center",column:"hanko_column"};const c=s},751(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_spacer{height:1em}.hanko_divider{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);display:flex;visibility:var(--divider-visibility, visible);color:var(--color-shade-1, #8f9095);margin:var(--item-margin, 0.5rem 0);padding:.5em 0}.hanko_divider .hanko_line{border-bottom-style:var(--border-style, solid);border-bottom-width:var(--border-width, 1px);color:inherit;font:inherit;width:100%}.hanko_divider .hanko_text{font:inherit;color:inherit;background:var(--background-color, white);padding:var(--divider-padding, 0 42px);line-height:.1em}",""]),s.locals={spacer:"hanko_spacer",divider:"hanko_divider",line:"hanko_line",text:"hanko_text"};const c=s},890(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_container{background-color:var(--background-color, white);padding:var(--container-padding, 30px);max-width:var(--container-max-width, 410px);display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center;align-items:center;align-content:flex-start;box-sizing:border-box}.hanko_content{box-sizing:border-box;flex:0 1 auto;width:100%;height:100%}.hanko_footer{padding:.5rem 0 0;box-sizing:border-box;width:100%}.hanko_footer :nth-child(1){float:left}.hanko_footer :nth-child(2){float:right}.hanko_clipboardContainer{display:flex}.hanko_clipboardIcon{display:flex;margin:auto;cursor:pointer}",""]),s.locals={container:"hanko_container",content:"hanko_content",footer:"hanko_footer",clipboardContainer:"hanko_clipboardContainer",clipboardIcon:"hanko_clipboardIcon"};const c=s},314(o){o.exports=function(e){var t=[];return t.toString=function(){return this.map(function(n){var i="",r=n[5]!==void 0;return n[4]&&(i+="@supports (".concat(n[4],") {")),n[2]&&(i+="@media ".concat(n[2]," {")),r&&(i+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),i+=e(n),r&&(i+="}"),n[2]&&(i+="}"),n[4]&&(i+="}"),i}).join("")},t.i=function(n,i,r,s,c){typeof n=="string"&&(n=[[null,n,void 0]]);var u={};if(r)for(var l=0;l<this.length;l++){var d=this[l][0];d!=null&&(u[d]=!0)}for(var h=0;h<n.length;h++){var v=[].concat(n[h]);r&&u[v[0]]||(c!==void 0&&(v[5]===void 0||(v[1]="@layer".concat(v[5].length>0?" ".concat(v[5]):""," {").concat(v[1],"}")),v[5]=c),i&&(v[2]&&(v[1]="@media ".concat(v[2]," {").concat(v[1],"}")),v[2]=i),s&&(v[4]?(v[1]="@supports (".concat(v[4],") {").concat(v[1],"}"),v[4]=s):v[4]="".concat(s)),t.push(v))}},t}},601(o){o.exports=function(e){return e[1]}},452(o,e){var t;(function(){var n={}.hasOwnProperty;function i(){for(var c="",u=0;u<arguments.length;u++){var l=arguments[u];l&&(c=s(c,r(l)))}return c}function r(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var u="";for(var l in c)n.call(c,l)&&c[l]&&(u=s(u,l));return u}function s(c,u){return u?c?c+" "+u:c+u:c}o.exports?(i.default=i,o.exports=i):(t=(function(){return i}).apply(e,[]))===void 0||(o.exports=t)})()}},Io={};function te(o){var e=Io[o];if(e!==void 0)return e.exports;var t=Io[o]={id:o,exports:{}};return ba[o].call(t.exports,t,t.exports,te),t.exports}te.n=o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return te.d(e,{a:e}),e},te.d=(o,e)=>{for(var t in e)te.o(e,t)&&!te.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},te.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),te.r=o=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},te.nc=void 0;var zn={};te.r(zn),te.d(zn,{apple:()=>or,checkmark:()=>ir,copy:()=>ar,customProvider:()=>rr,discord:()=>sr,exclamation:()=>cr,facebook:()=>lr,github:()=>dr,google:()=>ur,linkedin:()=>hr,mail:()=>pr,microsoft:()=>mr,passkey:()=>fr,password:()=>gr,qrCodeScanner:()=>vr,securityKey:()=>_r,spinner:()=>yr});var b=te(616),wa=0;function a(o,e,t,n,i,r){e||(e={});var s,c,u=e;if("ref"in u)for(c in u={},e)c=="ref"?s=e[c]:u[c]=e[c];var l={type:o,props:u,key:t,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--wa,__i:-1,__u:0,__source:i,__self:r};if(typeof o=="function"&&(s=o.defaultProps))for(c in s)u[c]===void 0&&(u[c]=s[c]);return b.options.vnode&&b.options.vnode(l),l}function Gt(){return Gt=Object.assign?Object.assign.bind():function(o){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(o[n]=t[n])}return o},Gt.apply(this,arguments)}var ka=["context","children"];function Sa(o){this.getChildContext=function(){return o.context};var e=o.children,t=function(n,i){if(n==null)return{};var r,s,c={},u=Object.keys(n);for(s=0;s<u.length;s++)i.indexOf(r=u[s])>=0||(c[r]=n[r]);return c}(o,ka);return(0,b.cloneElement)(e,t)}function Aa(){var o=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(o),this._vdom=(0,b.h)(Sa,Gt({},this._props,{context:o.detail.context}),$o(this,this._vdomComponent)),(this.hasAttribute("hydrate")?b.hydrate:b.render)(this._vdom,this._root)}function To(o){return o.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""})}function Ca(o,e,t){if(this._vdom){var n={};n[o]=t=t??void 0,n[To(o)]=t,this._vdom=(0,b.cloneElement)(this._vdom,n),(0,b.render)(this._vdom,this._root)}}function xa(){(0,b.render)(this._vdom=null,this._root)}function Uo(o,e){var t=this;return(0,b.h)("slot",Gt({},o,{ref:function(n){n?(t.ref=n,t._listener||(t._listener=function(i){i.stopPropagation(),i.detail.context=e},n.addEventListener("_preact",t._listener))):t.ref.removeEventListener("_preact",t._listener)}}))}function $o(o,e){if(o.nodeType===3)return o.data;if(o.nodeType!==1)return null;var t=[],n={},i=0,r=o.attributes,s=o.childNodes;for(i=r.length;i--;)r[i].name!=="slot"&&(n[r[i].name]=r[i].value,n[To(r[i].name)]=r[i].value);for(i=s.length;i--;){var c=$o(s[i],null),u=s[i].slot;u?n[u]=(0,b.h)(Uo,{name:u},c):t[i]=c}var l=e?(0,b.h)(Uo,null,t):t;return(0,b.h)(e||o.nodeName.toLowerCase(),n,l)}var Z=te(7),g=te(78);function Do(o,e){for(var t in e)o[t]=e[t];return o}function Lo(o,e){for(var t in o)if(t!=="__source"&&!(t in e))return!0;for(var n in e)if(n!=="__source"&&o[n]!==e[n])return!0;return!1}g.useLayoutEffect;function No(o,e){this.props=o,this.context=e}(No.prototype=new b.Component).isPureReactComponent=!0,No.prototype.shouldComponentUpdate=function(o,e){return Lo(this.props,o)||Lo(this.state,e)};var Mo=b.options.__b;b.options.__b=function(o){o.type&&o.type.__f&&o.ref&&(o.props.ref=o.ref,o.ref=null),Mo&&Mo(o)};var Pa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Ea=(b.toChildArray,b.options.__e);b.options.__e=function(o,e,t,n){if(o.then){for(var i,r=e;r=r.__;)if((i=r.__c)&&i.__c)return e.__e==null&&(e.__e=t.__e,e.__k=t.__k),i.__c(o,e)}Ea(o,e,t,n)};var Ro=b.options.unmount;function zo(o,e,t){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),o.__c.__H=null),(o=Do({},o)).__c!=null&&(o.__c.__P===t&&(o.__c.__P=e),o.__c.__e=!0,o.__c=null),o.__k=o.__k&&o.__k.map(function(n){return zo(n,e,t)})),o}function Ho(o,e,t){return o&&t&&(o.__v=null,o.__k=o.__k&&o.__k.map(function(n){return Ho(n,e,t)}),o.__c&&o.__c.__P===e&&(o.__e&&t.appendChild(o.__e),o.__c.__e=!0,o.__c.__P=t)),o}function Hn(){this.__u=0,this.o=null,this.__b=null}function qo(o){var e=o.__.__c;return e&&e.__a&&e.__a(o)}function Xt(){this.i=null,this.l=null}b.options.unmount=function(o){var e=o.__c;e&&e.__R&&e.__R(),e&&32&o.__u&&(o.type=null),Ro&&Ro(o)},(Hn.prototype=new b.Component).__c=function(o,e){var t=e.__c,n=this;n.o==null&&(n.o=[]),n.o.push(t);var i=qo(n.__v),r=!1,s=function(){r||(r=!0,t.__R=null,i?i(c):c())};t.__R=s;var c=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=Ho(u,u.__c.__P,u.__c.__O)}var l;for(n.setState({__a:n.__b=null});l=n.o.pop();)l.forceUpdate()}};n.__u++||32&e.__u||n.setState({__a:n.__b=n.__v.__k[0]}),o.then(s,s)},Hn.prototype.componentWillUnmount=function(){this.o=[]},Hn.prototype.render=function(o,e){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=zo(this.__b,t,n.__O=n.__P)}this.__b=null}var i=e.__a&&(0,b.createElement)(b.Fragment,null,o.fallback);return i&&(i.__u&=-33),[(0,b.createElement)(b.Fragment,null,e.__a?null:o.children),i]};var jo=function(o,e,t){if(++t[1]===t[0]&&o.l.delete(e),o.props.revealOrder&&(o.props.revealOrder[0]!=="t"||!o.l.size))for(t=o.i;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;o.i=t=t[2]}};(Xt.prototype=new b.Component).__a=function(o){var e=this,t=qo(e.__v),n=e.l.get(o);return n[0]++,function(i){var r=function(){e.props.revealOrder?(n.push(i),jo(e,o,n)):i()};t?t(r):r()}},Xt.prototype.render=function(o){this.i=null,this.l=new Map;var e=(0,b.toChildArray)(o.children);o.revealOrder&&o.revealOrder[0]==="b"&&e.reverse();for(var t=e.length;t--;)this.l.set(e[t],this.i=[1,0,this.i]);return o.children},Xt.prototype.componentDidUpdate=Xt.prototype.componentDidMount=function(){var o=this;this.l.forEach(function(e,t){jo(o,t,e)})};var Oa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ia=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ta=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ua=/[A-Z0-9]/g,$a=typeof document<"u",Da=function(o){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(o)};b.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(o){Object.defineProperty(b.Component.prototype,o,{configurable:!0,get:function(){return this["UNSAFE_"+o]},set:function(e){Object.defineProperty(this,o,{configurable:!0,writable:!0,value:e})}})});var Fo=b.options.event;function La(){}function Na(){return this.cancelBubble}function Ma(){return this.defaultPrevented}b.options.event=function(o){return Fo&&(o=Fo(o)),o.persist=La,o.isPropagationStopped=Na,o.isDefaultPrevented=Ma,o.nativeEvent=o};var Ra={enumerable:!1,configurable:!0,get:function(){return this.class}},Ko=b.options.vnode;b.options.vnode=function(o){typeof o.type=="string"&&function(e){var t=e.props,n=e.type,i={},r=n.indexOf("-")===-1;for(var s in t){var c=t[s];if(!(s==="value"&&"defaultValue"in t&&c==null||$a&&s==="children"&&n==="noscript"||s==="class"||s==="className")){var u=s.toLowerCase();s==="defaultValue"&&"value"in t&&t.value==null?s="value":s==="download"&&c===!0?c="":u==="translate"&&c==="no"?c=!1:u[0]==="o"&&u[1]==="n"?u==="ondoubleclick"?s="ondblclick":u!=="onchange"||n!=="input"&&n!=="textarea"||Da(t.type)?u==="onfocus"?s="onfocusin":u==="onblur"?s="onfocusout":Ta.test(s)&&(s=u):u=s="oninput":r&&Ia.test(s)?s=s.replace(Ua,"-$&").toLowerCase():c===null&&(c=void 0),u==="oninput"&&i[s=u]&&(s="oninputCapture"),i[s]=c}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=(0,b.toChildArray)(t.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=(0,b.toChildArray)(t.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),t.class&&!t.className?(i.class=t.class,Object.defineProperty(i,"className",Ra)):(t.className&&!t.class||t.class&&t.className)&&(i.class=i.className=t.className),e.props=i}(o),o.$$typeof=Oa,Ko&&Ko(o)};var Wo=b.options.__r;b.options.__r=function(o){Wo&&Wo(o),o.__c};var Vo=b.options.diffed;function ze(){return ze=Object.assign?Object.assign.bind():function(o){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(o[n]=t[n])}return o},ze.apply(null,arguments)}b.options.diffed=function(o){Vo&&Vo(o);var e=o.props,t=o.__e;t!=null&&o.type==="textarea"&&"value"in e&&e.value!==t.value&&(t.value=e.value==null?"":e.value)},g.useCallback,g.useContext,g.useDebugValue,g.useEffect,g.useId,g.useImperativeHandle,g.useLayoutEffect,g.useMemo,g.useReducer,g.useRef,g.useState,b.Fragment,g.useState,g.useId,g.useReducer,g.useEffect,g.useLayoutEffect,g.useRef,g.useImperativeHandle,g.useMemo,g.useCallback,g.useContext,g.useDebugValue,b.createElement,b.createContext,b.createRef,b.Fragment,b.Component;class za{static throttle(e,t,n={}){const{leading:i=!0,trailing:r=!0}=n;let s,c,u,l=0;const d=()=>{l=i===!1?0:Date.now(),u=null,e.apply(s,c)};return function(...h){const v=Date.now();l||i!==!1||(l=v);const f=t-(v-l);s=this,c=h,f<=0||f>t?(u&&(window.clearTimeout(u),u=null),l=v,e.apply(s,c)):u||r===!1||(u=window.setTimeout(d,f))}}}const qn="hanko-session-created",jn="hanko-session-expired",Fn="hanko-user-logged-out",Kn="hanko-user-deleted",Bo="hanko-after-state-change",Zo="hanko-before-state-change";class Jo extends CustomEvent{constructor(e,t){super(e,{detail:t})}}class en{constructor(){this.throttleLimit=1e3,this._addEventListener=document.addEventListener.bind(document),this._removeEventListener=document.removeEventListener.bind(document),this._throttle=za.throttle}wrapCallback(e,t){const n=i=>{e(i.detail)};return t?this._throttle(n,this.throttleLimit,{leading:!0,trailing:!1}):n}addEventListenerWithType({type:e,callback:t,once:n=!1,throttle:i=!1}){const r=this.wrapCallback(t,i);return this._addEventListener(e,r,{once:n}),()=>this._removeEventListener(e,r)}static mapAddEventListenerParams(e,{once:t,callback:n},i){return{type:e,callback:n,once:t,throttle:i}}addEventListener(e,t,n){return this.addEventListenerWithType(en.mapAddEventListenerParams(e,t,n))}onSessionCreated(e,t){return this.addEventListener(qn,{callback:e,once:t},!0)}onSessionExpired(e,t){return this.addEventListener(jn,{callback:e,once:t},!0)}onUserLoggedOut(e,t){return this.addEventListener(Fn,{callback:e,once:t})}onUserDeleted(e,t){return this.addEventListener(Kn,{callback:e,once:t})}onAfterStateChange(e,t){return this.addEventListener(Bo,{callback:e,once:t},!1)}onBeforeStateChange(e,t){return this.addEventListener(Zo,{callback:e,once:t},!1)}}class Yo{constructor(){this._dispatchEvent=document.dispatchEvent.bind(document)}dispatch(e,t){this._dispatchEvent(new Jo(e,t))}dispatchSessionCreatedEvent(e){this.dispatch(qn,e)}dispatchSessionExpiredEvent(){this.dispatch(jn,null)}dispatchUserLoggedOutEvent(){this.dispatch(Fn,null)}dispatchUserDeletedEvent(){this.dispatch(Kn,null)}dispatchAfterStateChangeEvent(e){this.dispatch(Bo,e)}dispatchBeforeStateChangeEvent(e){this.dispatch(Zo,e)}}class st extends Error{constructor(e,t,n){super(e),this.code=void 0,this.cause=void 0,this.code=t,this.cause=n,Object.setPrototypeOf(this,st.prototype)}}class je extends st{constructor(e){super("Technical error","somethingWentWrong",e),Object.setPrototypeOf(this,je.prototype)}}class tn extends st{constructor(e){super("Request timed out error","requestTimeout",e),Object.setPrototypeOf(this,tn.prototype)}}class ft extends st{constructor(e){super("Unauthorized error","unauthorized",e),Object.setPrototypeOf(this,ft.prototype)}}function nn(o){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)o[n]=t[n]}return o}var Wn=function o(e,t){function n(i,r,s){if(typeof document<"u"){typeof(s=nn({},t,s)).expires=="number"&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in s)s[u]&&(c+="; "+u,s[u]!==!0&&(c+="="+s[u].split(";")[0]));return document.cookie=i+"="+e.write(r,i)+c}}return Object.create({set:n,get:function(i){if(typeof document<"u"&&(!arguments.length||i)){for(var r=document.cookie?document.cookie.split("; "):[],s={},c=0;c<r.length;c++){var u=r[c].split("="),l=u.slice(1).join("=");try{var d=decodeURIComponent(u[0]);if(s[d]=e.read(l,d),i===d)break}catch{}}return i?s[i]:s}},remove:function(i,r){n(i,"",nn({},r,{expires:-1}))},withAttributes:function(i){return o(this.converter,nn({},this.attributes,i))},withConverter:function(i){return o(nn({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}({read:function(o){return o[0]==='"'&&(o=o.slice(1,-1)),o.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(o){return encodeURIComponent(o).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});class Qo{constructor(e){var t,n;this.authCookieName=void 0,this.authCookieDomain=void 0,this.authCookieSameSite=void 0,this.authCookieName=(t=e.cookieName)!=null?t:"hanko",this.authCookieDomain=e.cookieDomain,this.authCookieSameSite=(n=e.cookieSameSite)!=null?n:"lax"}getAuthCookie(){return Wn.get(this.authCookieName)}setAuthCookie(e,t){const n={secure:!0,sameSite:this.authCookieSameSite};this.authCookieDomain!==void 0&&(n.domain=this.authCookieDomain);const i=ze({},n,t);if((i.sameSite==="none"||i.sameSite==="None")&&i.secure===!1)throw new je(new Error("Secure attribute must be set when SameSite=None"));Wn.set(this.authCookieName,e,i)}removeAuthCookie(){Wn.remove(this.authCookieName)}}class Ha{constructor(e){this.keyName=void 0,this.keyName=e.keyName}getSessionToken(){return sessionStorage.getItem(this.keyName)}setSessionToken(e){sessionStorage.setItem(this.keyName,e)}removeSessionToken(){sessionStorage.removeItem(this.keyName)}}class qa{constructor(e){this._xhr=void 0,this._xhr=e}getResponseHeader(e){return this._xhr.getResponseHeader(e)}}class ja{constructor(e){this.headers=void 0,this.ok=void 0,this.status=void 0,this.statusText=void 0,this.url=void 0,this._decodedJSON=void 0,this.xhr=void 0,this.headers=new qa(e),this.ok=e.status>=200&&e.status<=299,this.status=e.status,this.statusText=e.statusText,this.url=e.responseURL,this.xhr=e}json(){return this._decodedJSON||(this._decodedJSON=JSON.parse(this.xhr.response)),this._decodedJSON}parseNumericHeader(e){const t=parseInt(this.headers.getResponseHeader(e),10);return isNaN(t)?0:t}}class Vn{constructor(e,t){var n;this.timeout=void 0,this.api=void 0,this.dispatcher=void 0,this.cookie=void 0,this.sessionTokenStorage=void 0,this.lang=void 0,this.sessionTokenLocation=void 0,this.api=e,this.timeout=(n=t.timeout)!=null?n:13e3,this.dispatcher=new Yo,this.cookie=new Qo(ze({},t)),this.sessionTokenStorage=new Ha({keyName:t.cookieName}),this.lang=t.lang,this.sessionTokenLocation=t.sessionTokenLocation}_fetch(e,t,n=new XMLHttpRequest){const i=this,r=this.api+e,s=this.timeout,c=this.getAuthToken(),u=this.lang;return new Promise(function(l,d){n.open(t.method,r,!0),n.setRequestHeader("Accept","application/json"),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("X-Language",u),c&&n.setRequestHeader("Authorization",`Bearer ${c}`),n.timeout=s,n.withCredentials=!0,n.onload=()=>{i.processHeaders(n),l(new ja(n))},n.onerror=()=>{d(new je)},n.ontimeout=()=>{d(new tn)},n.send(t.body?t.body.toString():null)})}processHeaders(e){let t="",n=0,i="";if(e.getAllResponseHeaders().split(`\r
45
- `).forEach(r=>{const s=r.toLowerCase();s.startsWith("x-auth-token")?t=e.getResponseHeader("X-Auth-Token"):s.startsWith("x-session-lifetime")?n=parseInt(e.getResponseHeader("X-Session-Lifetime"),10):s.startsWith("x-session-retention")&&(i=e.getResponseHeader("X-Session-Retention"))}),t){const r=new RegExp("^https://"),s=!!this.api.match(r)&&!!window.location.href.match(r),c=i==="session"?void 0:new Date(new Date().getTime()+1e3*n);this.setAuthToken(t,{secure:s,expires:c})}}get(e){return this._fetch(e,{method:"GET"})}post(e,t){return this._fetch(e,{method:"POST",body:JSON.stringify(t)})}put(e,t){return this._fetch(e,{method:"PUT",body:JSON.stringify(t)})}patch(e,t){return this._fetch(e,{method:"PATCH",body:JSON.stringify(t)})}delete(e){return this._fetch(e,{method:"DELETE"})}getAuthToken(){let e="";switch(this.sessionTokenLocation){case"cookie":default:e=this.cookie.getAuthCookie();break;case"sessionStorage":e=this.sessionTokenStorage.getSessionToken()}return e}setAuthToken(e,t){switch(this.sessionTokenLocation){case"cookie":default:return this.cookie.setAuthCookie(e,t);case"sessionStorage":return this.sessionTokenStorage.setSessionToken(e)}}}class Bn{constructor(e,t){this.client=void 0,this.client=new Vn(e,t)}}class Zn extends Bn{async validate(){const e=await this.client.get("/sessions/validate");if(!e.ok)throw new je;return await e.json()}}class Fa{constructor(e){this.storageKey=void 0,this.defaultState={expiration:0,lastCheck:0},this.storageKey=e}load(){const e=window.localStorage.getItem(this.storageKey);return e==null?this.defaultState:JSON.parse(e)}save(e){window.localStorage.setItem(this.storageKey,JSON.stringify(e||this.defaultState))}}class Ka{constructor(e,t){this.onActivityCallback=void 0,this.onInactivityCallback=void 0,this.handleFocus=()=>{this.onActivityCallback()},this.handleBlur=()=>{this.onInactivityCallback()},this.handleVisibilityChange=()=>{document.visibilityState==="visible"?this.onActivityCallback():this.onInactivityCallback()},this.hasFocus=()=>document.hasFocus(),this.onActivityCallback=e,this.onInactivityCallback=t,window.addEventListener("focus",this.handleFocus),window.addEventListener("blur",this.handleBlur),document.addEventListener("visibilitychange",this.handleVisibilityChange)}}class Wa{constructor(e,t,n){this.intervalID=null,this.timeoutID=null,this.checkInterval=void 0,this.checkSession=void 0,this.onSessionExpired=void 0,this.checkInterval=e,this.checkSession=t,this.onSessionExpired=n}scheduleSessionExpiry(e){var t=this;this.stop(),this.timeoutID=setTimeout(async function(){t.stop(),t.onSessionExpired()},e)}start(e=0,t=0){var n=this;const i=this.calcTimeToNextCheck(e);this.sessionExpiresSoon(t)?this.scheduleSessionExpiry(i):this.timeoutID=setTimeout(async function(){try{let r=await n.checkSession();if(r.is_valid){if(n.sessionExpiresSoon(r.expiration))return void n.scheduleSessionExpiry(r.expiration-Date.now());n.intervalID=setInterval(async function(){r=await n.checkSession(),r.is_valid?n.sessionExpiresSoon(r.expiration)&&n.scheduleSessionExpiry(r.expiration-Date.now()):n.stop()},n.checkInterval)}else n.stop()}catch(r){console.log(r)}},i)}stop(){this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null),this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)}isRunning(){return this.timeoutID!==null||this.intervalID!==null}sessionExpiresSoon(e){return e>0&&e-Date.now()<=this.checkInterval}calcTimeToNextCheck(e){const t=Date.now()-e;return this.checkInterval>=t?this.checkInterval-t%this.checkInterval:0}}class Va{constructor(e="hanko_session",t,n,i){this.channel=void 0,this.onSessionExpired=void 0,this.onSessionCreated=void 0,this.onLeadershipRequested=void 0,this.handleMessage=r=>{const s=r.data;switch(s.action){case"sessionExpired":this.onSessionExpired(s);break;case"sessionCreated":this.onSessionCreated(s);break;case"requestLeadership":this.onLeadershipRequested(s)}},this.onSessionExpired=t,this.onSessionCreated=n,this.onLeadershipRequested=i,this.channel=new BroadcastChannel(e),this.channel.onmessage=this.handleMessage}post(e){this.channel.postMessage(e)}}class Go extends Yo{constructor(e,t){super(),this.listener=new en,this.checkInterval=3e4,this.client=void 0,this.sessionState=void 0,this.windowActivityManager=void 0,this.scheduler=void 0,this.sessionChannel=void 0,this.isLoggedIn=void 0,this.client=new Zn(e,t),t.sessionCheckInterval&&(this.checkInterval=t.sessionCheckInterval<3e3?3e3:t.sessionCheckInterval),this.sessionState=new Fa(`${t.cookieName}_session_state`),this.sessionChannel=new Va(this.getSessionCheckChannelName(t.sessionTokenLocation,t.sessionCheckChannelName),()=>this.onChannelSessionExpired(),r=>this.onChannelSessionCreated(r),()=>this.onChannelLeadershipRequested()),this.scheduler=new Wa(this.checkInterval,()=>this.checkSession(),()=>this.onSessionExpired()),this.windowActivityManager=new Ka(()=>this.startSessionCheck(),()=>this.scheduler.stop());const n=Date.now(),{expiration:i}=this.sessionState.load();this.isLoggedIn=n<i,this.initializeEventListeners(),this.startSessionCheck()}initializeEventListeners(){this.listener.onSessionCreated(e=>{const{claims:t}=e,n=Date.parse(t.expiration),i=Date.now();this.isLoggedIn=!0,this.sessionState.save({expiration:n,lastCheck:i}),this.sessionChannel.post({action:"sessionCreated",claims:t}),this.startSessionCheck()}),this.listener.onUserLoggedOut(()=>{this.isLoggedIn=!1,this.sessionChannel.post({action:"sessionExpired"}),this.sessionState.save(null),this.scheduler.stop()}),window.addEventListener("beforeunload",()=>this.scheduler.stop())}startSessionCheck(){if(!this.windowActivityManager.hasFocus()||(this.sessionChannel.post({action:"requestLeadership"}),this.scheduler.isRunning()))return;const{lastCheck:e,expiration:t}=this.sessionState.load();this.isLoggedIn&&this.scheduler.start(e,t)}async checkSession(){const e=Date.now(),{is_valid:t,claims:n,expiration_time:i}=await this.client.validate(),r=i?Date.parse(i):0;return!t&&this.isLoggedIn&&this.dispatchSessionExpiredEvent(),t?(this.isLoggedIn=!0,this.sessionState.save({lastCheck:e,expiration:r})):(this.isLoggedIn=!1,this.sessionState.save(null),this.sessionChannel.post({action:"sessionExpired"})),{is_valid:t,claims:n,expiration:r}}onSessionExpired(){this.isLoggedIn&&(this.isLoggedIn=!1,this.sessionState.save(null),this.sessionChannel.post({action:"sessionExpired"}),this.dispatchSessionExpiredEvent())}onChannelSessionExpired(){this.isLoggedIn&&(this.isLoggedIn=!1,this.dispatchSessionExpiredEvent())}onChannelSessionCreated(e){const{claims:t}=e,n=Date.now(),i=Date.parse(t.expiration)-n;this.isLoggedIn=!0,this.dispatchSessionCreatedEvent({claims:t,expirationSeconds:i})}onChannelLeadershipRequested(){this.windowActivityManager.hasFocus()||this.scheduler.stop()}getSessionCheckChannelName(e,t){if(e!=="sessionStorage")return t;let n=sessionStorage.getItem("sessionCheckChannelName");return n!=null&&n!==""||(n=`${t}-${Math.floor(100*Math.random())+1}`,sessionStorage.setItem("sessionCheckChannelName",n)),n}}class gt{static supported(){return!!(navigator.credentials&&navigator.credentials.create&&navigator.credentials.get&&window.PublicKeyCredential)}static async isPlatformAuthenticatorAvailable(){return!(!this.supported()||!window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable)&&window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()}static async isSecurityKeySupported(){return window.PublicKeyCredential!==void 0&&window.PublicKeyCredential.isExternalCTAP2SecurityKeySupported?window.PublicKeyCredential.isExternalCTAP2SecurityKeySupported():this.supported()}static async isConditionalMediationAvailable(){return!(!window.PublicKeyCredential||!window.PublicKeyCredential.isConditionalMediationAvailable)&&window.PublicKeyCredential.isConditionalMediationAvailable()}}function Xo(o){const e="==".slice(0,(4-o.length%4)%4),t=o.replace(/-/g,"+").replace(/_/g,"/")+e,n=atob(t),i=new ArrayBuffer(n.length),r=new Uint8Array(i);for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s);return i}function ei(o){const e=new Uint8Array(o);let t="";for(const n of e)t+=String.fromCharCode(n);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var ce="copy",Ne="convert";function vt(o,e,t){if(e===ce)return t;if(e===Ne)return o(t);if(e instanceof Array)return t.map(n=>vt(o,e[0],n));if(e instanceof Object){const n={};for(const[i,r]of Object.entries(e)){if(r.derive){const s=r.derive(t);s!==void 0&&(t[i]=s)}if(i in t)n[i]=t[i]!=null?vt(o,r.schema,t[i]):null;else if(r.required)throw new Error(`Missing key: ${i}`)}return n}}function Jn(o,e){return{required:!0,schema:o,derive:e}}function he(o){return{required:!0,schema:o}}function we(o){return{required:!1,schema:o}}var ti={type:he(ce),id:he(Ne),transports:we(ce)},ni={appid:we(ce),appidExclude:we(ce),credProps:we(ce)},oi={appid:we(ce),appidExclude:we(ce),credProps:we(ce)},Ba={publicKey:he({rp:he(ce),user:he({id:he(Ne),name:he(ce),displayName:he(ce)}),challenge:he(Ne),pubKeyCredParams:he(ce),timeout:we(ce),excludeCredentials:we([ti]),authenticatorSelection:we(ce),attestation:we(ce),extensions:we(ni)}),signal:we(ce)},Za={type:he(ce),id:he(ce),rawId:he(Ne),authenticatorAttachment:we(ce),response:he({clientDataJSON:he(Ne),attestationObject:he(Ne),transports:Jn(ce,o=>{var e;return((e=o.getTransports)==null?void 0:e.call(o))||[]})}),clientExtensionResults:Jn(oi,o=>o.getClientExtensionResults())},Ja={mediation:we(ce),publicKey:he({challenge:he(Ne),timeout:we(ce),rpId:we(ce),allowCredentials:we([ti]),userVerification:we(ce),extensions:we(ni)}),signal:we(ce)},Ya={type:he(ce),id:he(ce),rawId:he(Ne),authenticatorAttachment:we(ce),response:he({clientDataJSON:he(Ne),authenticatorData:he(Ne),signature:he(Ne),userHandle:he(Ne)}),clientExtensionResults:Jn(oi,o=>o.getClientExtensionResults())};async function ii(o){const e=await navigator.credentials.get(function(t){return vt(Xo,Ja,t)}(o));return function(t){return vt(ei,Ya,t)}(e)}class We{constructor(){this.abortController=new AbortController}static getInstance(){return We.instance||(We.instance=new We),We.instance}createAbortSignal(){return this.abortController.abort(),this.abortController=new AbortController,this.abortController.signal}async getWebauthnCredential(e){return await ii(ze({},e,{signal:this.createAbortSignal()}))}async getConditionalWebauthnCredential(e){return await ii({publicKey:e,mediation:"conditional",signal:this.createAbortSignal()})}async createWebauthnCredential(e){return await async function(t){return n=await navigator.credentials.create(function(i){return vt(Xo,Ba,i)}(t)),vt(ei,Za,n);var n}(ze({},e,{signal:this.createAbortSignal()}))}}We.instance=null;const Yn="hanko_pkce_code_verifier",on=()=>{let o="";const e=new Uint8Array(1);for(;o.length<64;){window.crypto.getRandomValues(e);const t=e[0];t<198&&(o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~".charAt(t%66))}return o},an=o=>{typeof window<"u"&&window.sessionStorage&&window.sessionStorage.setItem(Yn,o)},ai=()=>typeof window<"u"&&window.sessionStorage?window.sessionStorage.getItem(Yn):null,tt=()=>{typeof window<"u"&&window.sessionStorage&&window.sessionStorage.removeItem(Yn)};async function ri(o,e,t,n="webauthn_credential_already_exists",i="Webauthn credential already exists"){try{const r=await e.createWebauthnCredential(t);return await o.actions.webauthn_verify_attestation_response.run({public_key:r})}catch{const s=await o.actions.back.run();return s.error={code:n,message:i},s}}const si={preflight:async o=>await o.actions.register_client_capabilities.run({webauthn_available:gt.supported(),webauthn_conditional_mediation_available:await gt.isConditionalMediationAvailable(),webauthn_platform_authenticator_available:await gt.isPlatformAuthenticatorAvailable()}),login_passkey:async o=>{const e=We.getInstance();try{const t=await e.getWebauthnCredential(o.payload.request_options);return await o.actions.webauthn_verify_assertion_response.run({assertion_response:t})}catch{const n=await o.actions.back.run();return o.error&&(n.error=o.error),n}},onboarding_verify_passkey_attestation:async o=>ri(o,We.getInstance(),o.payload.creation_options),webauthn_credential_verification:async o=>ri(o,We.getInstance(),o.payload.creation_options),async thirdparty(o){const e=new URLSearchParams(window.location.search),t=e.get("hanko_token"),n=e.get("error"),i=r=>{r.forEach(c=>e.delete(c));const s=e.toString()?`?${e.toString()}`:"";history.replaceState(null,null,`${window.location.pathname}${s}`)};if((t==null?void 0:t.length)>0){i(["hanko_token"]);const r=ai();try{return await o.actions.exchange_token.run({token:t,code_verifier:r||void 0})}finally{tt()}}if((n==null?void 0:n.length)>0){const r=n==="access_denied"?"third_party_access_denied":"technical_error",s=e.get("error_description");i(["error","error_description"]);const c=await o.actions.back.run(null,{dispatchAfterStateChangeEvent:!1});return c.error={code:r,message:s},c.dispatchAfterStateChangeEvent(),c}return o.isCached?await o.actions.back.run():(o.saveToLocalStorage(),window.location.assign(o.payload.redirect_url),o)},success:async o=>{const{claims:e}=o.payload,t=Date.parse(e.expiration)-Date.now();return o.removeFromLocalStorage(),o.hanko.relay.dispatchSessionCreatedEvent({claims:e,expirationSeconds:t}),o},account_deleted:async o=>(o.removeFromLocalStorage(),o.hanko.relay.dispatchUserDeletedEvent(),o)},ci={login_init:async o=>{(async function(){const e=We.getInstance();if(o.payload.request_options)try{const{publicKey:t}=o.payload.request_options,n=await e.getConditionalWebauthnCredential(t);return await o.actions.webauthn_verify_assertion_response.run({assertion_response:n})}catch{return}})()}};class He{constructor(e,t,n,i={}){if(this.name=void 0,this.flowName=void 0,this.error=void 0,this.payload=void 0,this.actions=void 0,this.csrfToken=void 0,this.status=void 0,this.previousAction=void 0,this.isCached=void 0,this.cacheKey=void 0,this.hanko=void 0,this.invokedAction=void 0,this.excludeAutoSteps=void 0,this.autoStep=void 0,this.passkeyAutofillActivation=void 0,this.flowName=t,this.name=n.name,this.error=n.error,this.payload=n.payload,this.csrfToken=n.csrf_token,this.status=n.status,this.hanko=e,this.actions=this.buildActionMap(n.actions),this.name in si){const d=si[this.name];this.autoStep=()=>d(this)}if(this.name in ci){const d=ci[this.name];this.passkeyAutofillActivation=()=>d(this)}const{dispatchAfterStateChangeEvent:r=!0,excludeAutoSteps:s=null,previousAction:c=null,isCached:u=!1,cacheKey:l="hanko-flow-state"}=i;this.excludeAutoSteps=s,this.previousAction=c,this.isCached=u,this.cacheKey=l,r&&this.dispatchAfterStateChangeEvent()}buildActionMap(e){const t={};return Object.keys(e).forEach(n=>{t[n]=new Pt(e[n],this)}),new Proxy(t,{get:(n,i)=>{if(i in n)return n[i];const r=typeof i=="string"?i:i.toString();return Pt.createDisabled(r,this)}})}dispatchAfterStateChangeEvent(){this.hanko.relay.dispatchAfterStateChangeEvent({state:this})}serialize(){return{flow_name:this.flowName,name:this.name,error:this.error,payload:this.payload,csrf_token:this.csrfToken,status:this.status,previous_action:this.previousAction,actions:Object.fromEntries(Object.entries(this.actions).map(([e,t])=>[e,{action:t.name,href:t.href,inputs:t.inputs,description:null}]))}}saveToLocalStorage(){localStorage.setItem(this.cacheKey,JSON.stringify(ze({},this.serialize(),{is_cached:!0})))}removeFromLocalStorage(){localStorage.removeItem(this.cacheKey)}static async initializeFlowState(e,t,n,i={}){let r=new He(e,t,n,i);if(r.excludeAutoSteps!="all")for(;r&&r.autoStep&&((s=r.excludeAutoSteps)==null||!s.includes(r.name));){var s;const c=await r.autoStep();if(c.name==r.name)return c;r=c}return r}static readFromLocalStorage(e){const t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch{return}}static async create(e,t,n={}){const{cacheKey:i="hanko-flow-state",loadFromCache:r=!0}=n;if(r){const c=He.readFromLocalStorage(i);if(c)return He.deserialize(e,c,ze({},n,{cacheKey:i}))}const s=await He.fetchState(e,`/${t}`);return He.initializeFlowState(e,t,s,ze({},n,{cacheKey:i}))}static async deserialize(e,t,n={}){return He.initializeFlowState(e,t.flow_name,t,ze({},n,{previousAction:t.previous_action,isCached:t.is_cached}))}static async fetchState(e,t,n){try{return(await e.client.post(t,n)).json()}catch(i){return He.createErrorResponse(i)}}static createErrorResponse(e){return{actions:null,csrf_token:"",name:"error",payload:null,status:0,error:e}}}class Pt{constructor(e,t,n=!0){this.enabled=void 0,this.href=void 0,this.name=void 0,this.inputs=void 0,this.parentState=void 0,this.enabled=n,this.href=e.href,this.name=e.action,this.inputs=e.inputs,this.parentState=t}static createDisabled(e,t){return new Pt({action:e,href:"",inputs:{},description:"Disabled action"},t,!1)}async run(e=null,t={}){const{name:n,hanko:i,flowName:r,csrfToken:s,invokedAction:c,excludeAutoSteps:u,cacheKey:l}=this.parentState,{dispatchAfterStateChangeEvent:d=!0}=t;if(!this.enabled)throw new Error(`Action '${this.name}' is not enabled in state '${n}'`);if(c)throw new Error(`An action '${c.name}' has already been invoked on state '${c.relatedStateName}'. No further actions can be run.`);this.parentState.invokedAction={name:this.name,relatedStateName:n},i.relay.dispatchBeforeStateChangeEvent({state:this.parentState});const h={input_data:ze({},Object.keys(this.inputs).reduce((f,k)=>{const A=this.inputs[k];return A.value!==void 0&&(f[k]=A.value),f},{}),e),csrf_token:s},v=await He.fetchState(i,this.href,h);return this.parentState.removeFromLocalStorage(),He.initializeFlowState(i,r,v,{dispatchAfterStateChangeEvent:d,excludeAutoSteps:u,previousAction:c,cacheKey:l})}}class li extends Bn{async getCurrent(){const e=await this.client.get("/me");if(e.status===401)throw this.client.dispatcher.dispatchSessionExpiredEvent(),new ft;if(!e.ok)throw new je;const t=e.json(),n=await this.client.get(`/users/${t.id}`);if(n.status===401)throw this.client.dispatcher.dispatchSessionExpiredEvent(),new ft;if(!n.ok)throw new je;return n.json()}async getCurrentUser(){const e=await this.client.get("/me");if(e.status===401)throw this.client.dispatcher.dispatchSessionExpiredEvent(),new ft;if(!e.ok)throw new je;return e.json()}async logout(){const e=await this.client.post("/logout");if(this.client.sessionTokenStorage.removeSessionToken(),this.client.cookie.removeAuthCookie(),this.client.dispatcher.dispatchUserLoggedOutEvent(),e.status!==401&&!e.ok)throw new je}}class di extends en{constructor(e,t){super(),this.session=void 0,this.user=void 0,this.cookie=void 0,this.client=void 0,this.relay=void 0;const n=ze({timeout:13e3,cookieName:"hanko",localStorageKey:"hanko",sessionCheckInterval:3e4,sessionCheckChannelName:"hanko-session-check"},t);this.client=new Vn(e,n),this.session=new Zn(e,n),this.user=new li(e,n),this.relay=new Go(e,n),this.cookie=new Qo(n)}setLang(e){this.client.lang=e}createState(e,t={}){return He.create(this,e,t)}async getUser(){return this.user.getCurrent()}async getCurrentUser(){return this.user.getCurrentUser()}async validateSession(){return this.session.validate()}getSessionToken(){return this.cookie.getAuthCookie()}async logout(){return this.user.logout()}}var Qa=te(292),Ve=te.n(Qa),Ga=te(360),Be=te.n(Ga),Xa=te(884),Ze=te.n(Xa),er=te(88),Je=te.n(er),rn=te(890),Et={};Et.setAttributes=Ze(),Et.insert=o=>{window._hankoStyle=o},Et.domAPI=Be(),Et.insertStyleElement=Je(),Ve()(rn.A,Et);const Ot=rn.A&&rn.A.locals?rn.A.locals:void 0,tr=function(o){function e(t){var n=Do({},t);return delete n.ref,o(n,t.ref||null)}return e.$$typeof=Pa,e.render=o,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(o.displayName||o.name)+")",e}((o,e)=>{const{lang:t,hanko:n,setHanko:i}=(0,g.useContext)(De),{setLang:r}=(0,g.useContext)(Z.TranslateContext);return(0,g.useEffect)(()=>{r(t.replace(/[-]/,"")),i(s=>(s.setLang(t),s))},[n,t,i,r]),a("section",{part:"container",className:Ot.container,ref:e,children:o.children})});var sn=te(313),It={};It.setAttributes=Ze(),It.insert=o=>{window._hankoStyle=o},It.domAPI=Be(),It.insertStyleElement=Je(),Ve()(sn.A,It);const U=sn.A&&sn.A.locals?sn.A.locals:void 0;var nr=te(452),Q=te.n(nr);const or=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-apple",xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"20.5 16 15 19",className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z"})}),ir=({secondary:o,size:e,fadeOut:t,disabled:n})=>a("svg",{id:"icon-checkmark",xmlns:"http://www.w3.org/2000/svg",viewBox:"4 4 40 40",width:e,height:e,className:Q()(U.checkmark,o&&U.secondary,t&&U.fadeOut,n&&U.disabled),children:a("path",{d:"M21.05 33.1 35.2 18.95l-2.3-2.25-11.85 11.85-6-6-2.25 2.25ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 24q0-4.15 1.575-7.8 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24 4q4.15 0 7.8 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm0-3q7.1 0 12.05-4.975Q41 31.05 41 24q0-7.1-4.95-12.05Q31.1 7 24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24 41Zm0-17Z"})}),ar=({size:o,secondary:e,disabled:t})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:o,height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"})}),rr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-custom-provider",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:[a("path",{d:"M0 0h24v24H0z",fill:"none"}),a("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"})]}),sr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-discord",fill:"#fff",xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 127.14 96.36",className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z"})}),cr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-exclamation",xmlns:"http://www.w3.org/2000/svg",viewBox:"5 2 13 20",width:o,height:o,className:Q()(U.exclamationMark,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),lr=({size:o,secondary:e,disabled:t})=>a("svg",{width:o,height:o,viewBox:"0 0 666.66668 666.66717",xmlns:"http://www.w3.org/2000/svg",children:[a("defs",{id:"defs13",children:a("clipPath",{clipPathUnits:"userSpaceOnUse",id:"clipPath25",children:a("path",{d:"M 0,700 H 700 V 0 H 0 Z",id:"path23"})})}),a("g",{id:"g17",transform:"matrix(1.3333333,0,0,-1.3333333,-133.33333,799.99999)",children:a("g",{id:"g19",children:a("g",{id:"g21",clipPath:"url(#clipPath25)",children:[a("g",{id:"g27",transform:"translate(600,350)",children:a("path",{className:Q()(U.facebookIcon,t?U.disabledOutline:U.outline),d:"m 0,0 c 0,138.071 -111.929,250 -250,250 -138.071,0 -250,-111.929 -250,-250 0,-117.245 80.715,-215.622 189.606,-242.638 v 166.242 h -51.552 V 0 h 51.552 v 32.919 c 0,85.092 38.508,124.532 122.048,124.532 15.838,0 43.167,-3.105 54.347,-6.211 V 81.986 c -5.901,0.621 -16.149,0.932 -28.882,0.932 -40.993,0 -56.832,-15.528 -56.832,-55.9 V 0 h 81.659 l -14.028,-76.396 h -67.631 V -248.169 C -95.927,-233.218 0,-127.818 0,0",id:"path29"})}),a("g",{id:"g31",transform:"translate(447.9175,273.6036)",children:a("path",{className:Q()(U.facebookIcon,t?U.disabledLetter:U.letter),d:"M 0,0 14.029,76.396 H -67.63 v 27.019 c 0,40.372 15.838,55.899 56.831,55.899 12.733,0 22.981,-0.31 28.882,-0.931 v 69.253 c -11.18,3.106 -38.509,6.212 -54.347,6.212 -83.539,0 -122.048,-39.441 -122.048,-124.533 V 76.396 h -51.552 V 0 h 51.552 v -166.242 c 19.343,-4.798 39.568,-7.362 60.394,-7.362 10.254,0 20.358,0.632 30.288,1.831 L -67.63,0 Z",id:"path33"})})]})})})]}),dr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-github",xmlns:"http://www.w3.org/2000/svg",fill:"#fff",viewBox:"0 0 97.63 96",width:o,height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:[a("path",{d:"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"})," "]}),ur=({size:o,disabled:e})=>a("svg",{id:"icon-google",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,className:U.googleIcon,children:[a("path",{className:Q()(U.googleIcon,e?U.disabled:U.blue),d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),a("path",{className:Q()(U.googleIcon,e?U.disabled:U.green),d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),a("path",{className:Q()(U.googleIcon,e?U.disabled:U.yellow),d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),a("path",{className:Q()(U.googleIcon,e?U.disabled:U.red),d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"}),a("path",{d:"M1 1h22v22H1z",fill:"none"})]}),hr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-linkedin",fill:"#fff",xmlns:"http://www.w3.org/2000/svg",width:o,viewBox:"0 0 24 24",height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M20.5 2h-17A1.5 1.5 0 002 3.5v17A1.5 1.5 0 003.5 22h17a1.5 1.5 0 001.5-1.5v-17A1.5 1.5 0 0020.5 2zM8 19H5v-9h3zM6.5 8.25A1.75 1.75 0 118.3 6.5a1.78 1.78 0 01-1.8 1.75zM19 19h-3v-4.74c0-1.42-.6-1.93-1.38-1.93A1.74 1.74 0 0013 14.19a.66.66 0 000 .14V19h-3v-9h2.9v1.3a3.11 3.11 0 012.7-1.4c1.55 0 3.36.86 3.36 3.66z"})}),pr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-mail",xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 -960 960 960",className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z"})}),mr=({size:o,disabled:e})=>a("svg",{id:"icon-microsoft",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,className:U.microsoftIcon,children:[a("rect",{className:Q()(U.microsoftIcon,e?U.disabled:U.blue),x:"1",y:"1",width:"9",height:"9"}),a("rect",{className:Q()(U.microsoftIcon,e?U.disabled:U.green),x:"1",y:"11",width:"9",height:"9"}),a("rect",{className:Q()(U.microsoftIcon,e?U.disabled:U.yellow),x:"11",y:"1",width:"9",height:"9"}),a("rect",{className:Q()(U.microsoftIcon,e?U.disabled:U.red),x:"11",y:"11",width:"9",height:"9"})]}),fr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-passkey",xmlns:"http://www.w3.org/2000/svg",viewBox:"3 1.5 19.5 19",width:o,height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("g",{id:"icon-passkey-all",children:[a("circle",{id:"icon-passkey-head",cx:"10.5",cy:"6",r:"4.5"}),a("path",{id:"icon-passkey-key",d:"M22.5,10.5a3.5,3.5,0,1,0-5,3.15V19L19,20.5,21.5,18,20,16.5,21.5,15l-1.24-1.24A3.5,3.5,0,0,0,22.5,10.5Zm-3.5,0a1,1,0,1,1,1-1A1,1,0,0,1,19,10.5Z"}),a("path",{id:"icon-passkey-body",d:"M14.44,12.52A6,6,0,0,0,12,12H9a6,6,0,0,0-6,6v2H16V14.49A5.16,5.16,0,0,1,14.44,12.52Z"})]})}),gr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-password",xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 -960 960 960",className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M80-200v-80h800v80H80Zm46-242-52-30 34-60H40v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Z"})}),vr=({size:o,secondary:e,disabled:t})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:o,height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M80-680v-200h200v80H160v120H80Zm0 600v-200h80v120h120v80H80Zm600 0v-80h120v-120h80v200H680Zm120-600v-120H680v-80h200v200h-80ZM700-260h60v60h-60v-60Zm0-120h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60-60h60v60h-60v-60Zm120-120h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60-60h60v60h-60v-60Zm240-320v240H520v-240h240ZM440-440v240H200v-240h240Zm0-320v240H200v-240h240Zm-60 500v-120H260v120h120Zm0-320v-120H260v120h120Zm320 0v-120H580v120h120Z"})}),_r=({size:o,secondary:e,disabled:t})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:o,height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M280-240q-100 0-170-70T40-480q0-100 70-170t170-70q66 0 121 33t87 87h432v240h-80v120H600v-120H488q-32 54-87 87t-121 33Zm0-80q66 0 106-40.5t48-79.5h246v120h80v-120h80v-80H434q-8-39-48-79.5T280-640q-66 0-113 47t-47 113q0 66 47 113t113 47Zm0-80q33 0 56.5-23.5T360-480q0-33-23.5-56.5T280-560q-33 0-56.5 23.5T200-480q0 33 23.5 56.5T280-400Zm0-80Z"})}),yr=({size:o,disabled:e})=>a("svg",{id:"icon-spinner",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,className:Q()(U.loadingSpinner,e&&U.disabled),children:[a("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",opacity:".25"}),a("path",{d:"M10.72,19.9a8,8,0,0,1-6.5-9.79A7.77,7.77,0,0,1,10.4,4.16a8,8,0,0,1,9.49,6.52A1.54,1.54,0,0,0,21.38,12h.13a1.37,1.37,0,0,0,1.38-1.54,11,11,0,1,0-12.7,12.39A1.54,1.54,0,0,0,12,21.34h0A1.47,1.47,0,0,0,10.72,19.9Z"})]}),Tt=({name:o,secondary:e,size:t=18,fadeOut:n,disabled:i})=>a(zn[o],{size:t,secondary:e,fadeOut:n,disabled:i}),Qn=({children:o,isLoading:e,isSuccess:t,fadeOut:n,secondary:i,hasIcon:r,maxWidth:s})=>a(b.Fragment,{children:a("div",e?{className:Q()(U.loadingSpinnerWrapper,U.centerContent,s&&U.maxWidth),children:a(Tt,{name:"spinner",secondary:i})}:t?{className:Q()(U.loadingSpinnerWrapper,U.centerContent,s&&U.maxWidth),children:a(Tt,{name:"checkmark",secondary:i,fadeOut:n})}:{className:r?U.loadingSpinnerWrapperIcon:U.loadingSpinnerWrapper,children:o})}),br=()=>a(Qn,{isLoading:!0}),Pe=o=>{const[e,t]=(0,g.useState)(o);return(0,g.useEffect)(()=>{o&&t(o)},[o]),{flowState:e}};var cn=te(681),Ut={};Ut.setAttributes=Ze(),Ut.insert=o=>{window._hankoStyle=o},Ut.domAPI=Be(),Ut.insertStyleElement=Je(),Ve()(cn.A,Ut);const Ae=cn.A&&cn.A.locals?cn.A.locals:void 0,ui=(o,e,t)=>{const{hanko:n,setUIState:i,isOwnFlow:r}=(0,g.useContext)(De);(0,g.useEffect)(()=>n.onBeforeStateChange(({state:s})=>{o&&r(s)&&(i(c=>Object.assign(Object.assign({},c),{isDisabled:!0,error:void 0})),e(s.invokedAction.name==o.name))}),[o,n,r,e,i]),(0,g.useEffect)(()=>n.onAfterStateChange(({state:s})=>{var c;o&&r(s)&&(t(((c=s.previousAction)===null||c===void 0?void 0:c.name)==o.name),e(!1))}),[n,t,e,o,r])},hi=(0,b.createContext)({}),ne=({onSubmit:o,children:e,hidden:t=!1,maxWidth:n,flowAction:i})=>a(hi.Provider,{value:{flowAction:i},children:i&&i.enabled&&!t?a("form",{onSubmit:o||(r=>function(s,c,u,l){return new(u||(u=Promise))(function(d,h){function v(A){try{k(l.next(A))}catch(C){h(C)}}function f(A){try{k(l.throw(A))}catch(C){h(C)}}function k(A){var C;A.done?d(A.value):(C=A.value,C instanceof u?C:new u(function($){$(C)})).then(v,f)}k((l=l.apply(s,[])).next())})}(void 0,void 0,void 0,function*(){return r.preventDefault(),yield i.run()})),className:Ae.form,children:a("ul",{className:Ae.ul,children:(0,b.toChildArray)(e).map((r,s)=>a("li",{part:"form-item",className:Q()(Ae.li,n?Ae.maxWidth:null),children:r},s))})}):null}),oe=o=>{var{title:e,children:t,secondary:n,dangerous:i,autofocus:r,showLastUsed:s,onClick:c,icon:u,showSuccessIcon:l}=o,d=function(O,M){var z={};for(var F in O)Object.prototype.hasOwnProperty.call(O,F)&&M.indexOf(F)<0&&(z[F]=O[F]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function"){var V=0;for(F=Object.getOwnPropertySymbols(O);V<F.length;V++)M.indexOf(F[V])<0&&Object.prototype.propertyIsEnumerable.call(O,F[V])&&(z[F[V]]=O[F[V]])}return z}(o,["title","children","secondary","dangerous","autofocus","showLastUsed","onClick","icon","showSuccessIcon"]);const h=(0,g.useRef)(null),{uiState:v}=(0,g.useContext)(De),{t:f}=(0,g.useContext)(Z.TranslateContext),[k,A]=(0,g.useState)(!1),[C,$]=(0,g.useState)(!1),{flowAction:K}=(0,g.useContext)(hi);ui(K,A,$),(0,g.useEffect)(()=>{const{current:O}=h;O&&r&&O.focus()},[r]);const w=(0,g.useMemo)(()=>l&&(C||d.isSuccess),[C,d,l]),E=(0,g.useMemo)(()=>v.isDisabled||d.disabled,[d,v]);return a("button",{part:i?"button dangerous-button":n?"button secondary-button":"button primary-button",title:e,ref:h,type:"submit",disabled:E,onClick:c,className:Q()(Ae.button,i?Ae.dangerous:n?Ae.secondary:Ae.primary),"data-bubble":s?f("labels.lastUsed"):void 0,children:a(Qn,{isLoading:k,isSuccess:w,secondary:!0,hasIcon:!!u,maxWidth:!0,children:[u?a(Tt,{name:u,secondary:n,disabled:E}):null,a("div",{className:Ae.caption,children:a("span",{children:t})})]})})},Le=o=>{var e,t,n,i,r,{label:s}=o,c=function(f,k){var A={};for(var C in f)Object.prototype.hasOwnProperty.call(f,C)&&k.indexOf(C)<0&&(A[C]=f[C]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function"){var $=0;for(C=Object.getOwnPropertySymbols(f);$<C.length;$++)k.indexOf(C[$])<0&&Object.prototype.propertyIsEnumerable.call(f,C[$])&&(A[C[$]]=f[C[$]])}return A}(o,["label"]);const u=(0,g.useRef)(null),{uiState:l}=(0,g.useContext)(De),{t:d}=(0,g.useContext)(Z.TranslateContext),h=(0,g.useMemo)(()=>l.isDisabled||c.disabled,[c,l]);(0,g.useEffect)(()=>{const{current:f}=u;f&&c.autofocus&&(f.focus(),f.select())},[c.autofocus]);const v=(0,g.useMemo)(()=>{var f;return c.markOptional&&!(!((f=c.flowInput)===null||f===void 0)&&f.required)?`${c.placeholder} (${d("labels.optional")})`:c.placeholder},[c.markOptional,c.placeholder,c.flowInput,d]);return a("div",{className:Ae.inputWrapper,children:a("input",Object.assign({part:"input text-input",required:(e=c.flowInput)===null||e===void 0?void 0:e.required,maxLength:(t=c.flowInput)===null||t===void 0?void 0:t.max_length,minLength:(n=c.flowInput)===null||n===void 0?void 0:n.min_length,hidden:(i=c.flowInput)===null||i===void 0?void 0:i.hidden},c,{ref:u,"aria-label":v,placeholder:v,className:Q()(Ae.input,!!(!((r=c.flowInput)===null||r===void 0)&&r.error)&&c.markError&&Ae.error),disabled:h}))})},ke=({children:o})=>a("section",{className:Ot.content,children:o});var ln=te(751),$t={};$t.setAttributes=Ze(),$t.insert=o=>{window._hankoStyle=o},$t.domAPI=Be(),$t.insertStyleElement=Je(),Ve()(ln.A,$t);const Dt=ln.A&&ln.A.locals?ln.A.locals:void 0,Gn=({children:o,hidden:e})=>e?null:a("section",{part:"divider",className:Dt.divider,children:[a("div",{part:"divider-line",className:Dt.line}),o?a("div",{part:"divider-text",class:Dt.text,children:o}):null,a("div",{part:"divider-line",className:Dt.line})]});var dn=te(217),Lt={};Lt.setAttributes=Ze(),Lt.insert=o=>{window._hankoStyle=o},Lt.domAPI=Be(),Lt.insertStyleElement=Je(),Ve()(dn.A,Lt);const pi=dn.A&&dn.A.locals?dn.A.locals:void 0,Se=({state:o,error:e,flowError:t})=>{var n,i;const{t:r}=(0,g.useContext)(Z.TranslateContext),{uiState:s,setUIState:c}=(0,g.useContext)(De);return(0,g.useEffect)(()=>{var u,l;if(((u=o==null?void 0:o.error)===null||u===void 0?void 0:u.code)=="form_data_invalid_error")for(const d of Object.values(o==null?void 0:o.actions)){let h=!1;for(const v of Object.values(d==null?void 0:d.inputs))if(!((l=v.error)===null||l===void 0)&&l.code)return c(Object.assign(Object.assign({},s),{error:v.error})),void(h=!0);h||c(Object.assign(Object.assign({},s),{error:o.error}))}else o!=null&&o.error&&c(Object.assign(Object.assign({},s),{error:o==null?void 0:o.error}))},[o]),a("section",{part:"error",className:pi.errorBox,hidden:!(!((n=s.error)===null||n===void 0)&&n.code)&&!(t!=null&&t.code)&&!e,children:[a("span",{children:a(Tt,{name:"exclamation",size:15})}),a("span",{id:"errorMessage",part:"error-text",children:r(e?`errors.${e.code}`:`flowErrors.${((i=s.error)===null||i===void 0?void 0:i.code)||(t==null?void 0:t.code)}`)})]})};var un=te(547),Nt={};Nt.setAttributes=Ze(),Nt.insert=o=>{window._hankoStyle=o},Nt.domAPI=Be(),Nt.insertStyleElement=Je(),Ve()(un.A,Nt);const hn=un.A&&un.A.locals?un.A.locals:void 0,le=({children:o})=>a("h1",{part:"headline1",className:Q()(hn.headline,hn.grade1),children:o});var pn=te(579),Mt={};Mt.setAttributes=Ze(),Mt.insert=o=>{window._hankoStyle=o},Mt.domAPI=Be(),Mt.insertStyleElement=Je(),Ve()(pn.A,Mt);const mn=pn.A&&pn.A.locals?pn.A.locals:void 0,Xn=o=>{var{loadingSpinnerPosition:e,dangerous:t=!1,onClick:n,flowAction:i}=o,r=function(M,z){var F={};for(var V in M)Object.prototype.hasOwnProperty.call(M,V)&&z.indexOf(V)<0&&(F[V]=M[V]);if(M!=null&&typeof Object.getOwnPropertySymbols=="function"){var ee=0;for(V=Object.getOwnPropertySymbols(M);ee<V.length;ee++)z.indexOf(V[ee])<0&&Object.prototype.propertyIsEnumerable.call(M,V[ee])&&(F[V[ee]]=M[V[ee]])}return F}(o,["loadingSpinnerPosition","dangerous","onClick","flowAction"]);const{t:s}=(0,g.useContext)(Z.TranslateContext),{uiState:c}=(0,g.useContext)(De),[u,l]=(0,g.useState)(),[d,h]=(0,g.useState)(!1),[v,f]=(0,g.useState)(!1);let k;n||(n=M=>function(z,F,V,ee){return new(V||(V=Promise))(function(N,ge){function _e(re){try{de(ee.next(re))}catch(ye){ge(ye)}}function ue(re){try{de(ee.throw(re))}catch(ye){ge(ye)}}function de(re){var ye;re.done?N(re.value):(ye=re.value,ye instanceof V?ye:new V(function(Me){Me(ye)})).then(_e,ue)}de((ee=ee.apply(z,[])).next())})}(void 0,void 0,void 0,function*(){return M.preventDefault(),yield i==null?void 0:i.run()})),ui(i,h,f);const A=M=>{M.preventDefault(),l(!0)},C=M=>{M.preventDefault(),l(!1)},$=(0,g.useMemo)(()=>d||r.isLoading,[d,r]),K=(0,g.useMemo)(()=>v||r.isSuccess,[v,r]),w=(0,g.useMemo)(()=>i&&!i.enabled||r.hidden,[i,r]),E=(0,g.useCallback)(M=>{M.preventDefault(),l(!1),n(M)},[n]),O=(0,g.useCallback)(()=>w?null:a(b.Fragment,{children:[u?a(b.Fragment,{children:[a(Xn,{onClick:E,children:s("labels.yes")})," / ",a(Xn,{onClick:C,children:s("labels.no")})," "]}):null,a("button",Object.assign({},r,{onClick:t?A:n,disabled:u||r.disabled||c.isDisabled,part:"link",className:Q()(mn.link,t?mn.danger:null),children:r.children}))]}),[w,c,u,t,n,E,r,s]);return a(b.Fragment,{children:a("span",{className:Q()(mn.linkWrapper,e==="right"?mn.reverse:null),onMouseEnter:()=>{k&&window.clearTimeout(k)},onMouseLeave:()=>{k=window.setTimeout(()=>{l(!1)},1e3)},children:a(b.Fragment,u||!$&&!K?{children:O()}:{children:[a(Qn,{isLoading:$,isSuccess:K,secondary:r.secondary,fadeOut:!0}),O()]})})})},G=Xn,Oe=({children:o,hidden:e=!1})=>e?null:a("section",{className:Ot.footer,children:o}),eo=o=>{var{label:e}=o,t=function(r,s){var c={};for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&s.indexOf(u)<0&&(c[u]=r[u]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function"){var l=0;for(u=Object.getOwnPropertySymbols(r);l<u.length;l++)s.indexOf(u[l])<0&&Object.prototype.propertyIsEnumerable.call(r,u[l])&&(c[u[l]]=r[u[l]])}return c}(o,["label"]);const{uiState:n}=(0,g.useContext)(De),i=(0,g.useMemo)(()=>n.isDisabled||t.disabled,[t,n]);return a("div",{className:Ae.inputWrapper,children:a("label",{className:Ae.checkboxWrapper,children:[a("input",Object.assign({part:"input checkbox-input",type:"checkbox","aria-label":e,className:Ae.checkbox},t)),a("span",{className:Q()(Ae.label,i?Ae.disabled:null),children:e})]})})},fn=()=>a("section",{className:Dt.spacer});var gn=te(193),Rt={};Rt.setAttributes=Ze(),Rt.insert=o=>{window._hankoStyle=o},Rt.domAPI=Be(),Rt.insertStyleElement=Je(),Ve()(gn.A,Rt);const to=gn.A&&gn.A.locals?gn.A.locals:void 0,W=({children:o,hidden:e,center:t})=>e?null:a("p",{part:"paragraph",className:Q()(to.paragraph,t&&to.center,t&&to.column),children:o});var vn=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const wr=o=>{var e;const{t}=(0,g.useContext)(Z.TranslateContext),{init:n,initialComponentName:i,uiState:r,setUIState:s,hidePasskeyButtonOnLogin:c,lastLogin:u}=(0,g.useContext)(De),[l,d]=(0,g.useState)(!1),[h,v]=(0,g.useState)(null),[f,k]=(0,g.useState)(null),{flowState:A}=Pe(o.state),C=gt.supported(),[$,K]=(0,g.useState)(void 0),[w,E]=(0,g.useState)(null),[O,M]=(0,g.useState)(!1),z=N=>{if(N.preventDefault(),N.target instanceof HTMLInputElement){const{value:ge}=N.target;k(ge),F(ge)}},F=N=>{const ge=()=>s(ue=>Object.assign(Object.assign({},ue),{email:N,username:null})),_e=()=>s(ue=>Object.assign(Object.assign({},ue),{email:null,username:N}));switch(h){case"email":ge();break;case"username":_e();break;case"identifier":N.match(/^[^@]+@[^@]+\.[^@]+$/)?ge():_e()}},V=(0,g.useMemo)(()=>(!!A.actions.webauthn_generate_request_options.enabled||!!A.actions.thirdparty_oauth.enabled)&&A.actions.continue_with_login_identifier.enabled,[A.actions]),ee=A.actions.continue_with_login_identifier.inputs;return(0,g.useEffect)(()=>{const N=A.actions.continue_with_login_identifier.inputs;N!=null&&N.email?(v("email"),k(r.email)):N!=null&&N.username?(v("username"),k(r.username)):(v("identifier"),k(r.email||r.username))},[A,r.email,r.username]),a(b.Fragment,{children:[a(ke,{children:[a(le,{children:t("headlines.signIn")}),a(Se,{state:A,error:$}),ee?a(b.Fragment,{children:[a(ne,{flowAction:A.actions.continue_with_login_identifier,onSubmit:N=>vn(void 0,void 0,void 0,function*(){return N.preventDefault(),F(f),A.actions.continue_with_login_identifier.run({[h]:f})}),maxWidth:!0,children:[ee.email?a(Le,{type:"email",autoComplete:"username webauthn",autoCorrect:"off",flowInput:ee.email,onInput:z,value:f,placeholder:t("labels.email"),pattern:"^[^@]+@[^@]+\\.[^@]+$"}):ee.username?a(Le,{type:"text",autoComplete:"username webauthn",autoCorrect:"off",flowInput:ee.username,onInput:z,value:f,placeholder:t("labels.username")}):a(Le,{type:"text",autoComplete:"username webauthn",autoCorrect:"off",flowInput:ee.identifier,onInput:z,value:f,placeholder:t("labels.emailOrUsername")}),a(oe,{children:t("labels.continue")})]}),a(Gn,{hidden:!V,children:t("labels.or")})]}):null,A.actions.thirdparty_oauth.enabled?(e=A.actions.thirdparty_oauth.inputs.provider.allowed_values)===null||e===void 0?void 0:e.map(N=>a(ne,{flowAction:A.actions.thirdparty_oauth,onSubmit:ge=>((_e,ue)=>vn(void 0,void 0,void 0,function*(){_e.preventDefault(),E(ue);const de=on();an(de);try{const re=yield A.actions.thirdparty_oauth.run({provider:ue,redirect_to:window.location.toString(),code_verifier:de});return re.error&&(tt(),E(null)),re}catch(re){throw tt(),E(null),re}}))(ge,N.value),children:a(oe,{isLoading:N.value==w,secondary:!0,icon:N.value.startsWith("custom_")?"customProvider":N.value,showLastUsed:(u==null?void 0:u.login_method)=="third_party"&&(u==null?void 0:u.third_party_provider)==N.value,children:t("labels.signInWith",{provider:N.name})})},N.value)):null,A.actions.webauthn_generate_request_options.enabled&&!c?a(ne,{flowAction:A.actions.webauthn_generate_request_options,children:a(oe,{secondary:!0,title:C?null:t("labels.webauthnUnsupported"),disabled:!C,children:t("labels.signInPasskey")})}):null,A.actions.remember_me.enabled&&a(b.Fragment,{children:[a(fn,{}),a(eo,{required:!1,type:"checkbox",label:t("labels.staySignedIn"),checked:O,onChange:N=>vn(void 0,void 0,void 0,function*(){return M(ge=>!ge),A.actions.remember_me.run({remember_me:!O})})})]})]}),a(Oe,{hidden:i!=="auth",children:a(W,{center:!0,children:[a("span",{children:t("labels.dontHaveAnAccount")}),a(G,{onClick:N=>vn(void 0,void 0,void 0,function*(){N.preventDefault(),d(!0),n("registration")}),loadingSpinnerPosition:"left",isLoading:l,children:t("labels.signUp")})]})})]})},kr=o=>{var{index:e,focus:t,digit:n=""}=o,i=function(l,d){var h={};for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&d.indexOf(v)<0&&(h[v]=l[v]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(v=Object.getOwnPropertySymbols(l);f<v.length;f++)d.indexOf(v[f])<0&&Object.prototype.propertyIsEnumerable.call(l,v[f])&&(h[v[f]]=l[v[f]])}return h}(o,["index","focus","digit"]);const r=(0,g.useRef)(null),{uiState:s}=(0,g.useContext)(De),c=()=>{const{current:l}=r;l&&(l.focus(),l.select())},u=(0,g.useMemo)(()=>s.isDisabled||i.disabled,[i,s]);return(0,g.useEffect)(()=>{e===0&&c()},[e,i.disabled]),(0,g.useMemo)(()=>{t&&c()},[t]),a("div",{className:Ae.passcodeDigitWrapper,children:a("input",Object.assign({},i,{part:"input passcode-input","aria-label":`${i.name}-digit-${e+1}`,name:i.name+e.toString(10),type:"text",inputMode:"numeric",maxLength:1,ref:r,value:n.charAt(0),required:!0,className:Ae.input,disabled:u}))})},no=({passcodeDigits:o=[],numberOfInputs:e=6,onInput:t,disabled:n=!1})=>{const[i,r]=(0,g.useState)(0),s=()=>o.slice(),c=()=>{i<e-1&&r(i+1)},u=()=>{i>0&&r(i-1)},l=f=>{const k=s();k[i]=f.charAt(0),t(k)},d=f=>{if(f.preventDefault(),n)return;const k=f.clipboardData.getData("text/plain").slice(0,e-i).split(""),A=s();let C=i;for(let $=0;$<e;++$)$>=i&&k.length>0&&(A[$]=k.shift(),C++);r(C),t(A)},h=f=>{f.key==="Backspace"?(f.preventDefault(),l(""),u()):f.key==="Delete"?(f.preventDefault(),l("")):f.key==="ArrowLeft"?(f.preventDefault(),u()):f.key==="ArrowRight"?(f.preventDefault(),c()):f.key!==" "&&f.key!=="Spacebar"&&f.key!=="Space"||f.preventDefault()},v=f=>{f.target instanceof HTMLInputElement&&l(f.target.value),c()};return(0,g.useEffect)(()=>{o.length===0&&r(0)},[o]),a("div",{className:Ae.passcodeInputWrapper,children:Array.from(Array(e)).map((f,k)=>a(kr,{name:"passcode",index:k,focus:i===k,digit:o[k],onKeyDown:h,onInput:v,onPaste:d,onFocus:()=>(A=>{r(A)})(k),disabled:n},k))})};var mi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Sr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),{uiState:n,setUIState:i}=(0,g.useContext)(De),[r,s]=(0,g.useState)(),[c,u]=(0,g.useState)(t.payload.resend_after),[l,d]=(0,g.useState)([]),h=(0,g.useMemo)(()=>{var f;return((f=t.error)===null||f===void 0?void 0:f.code)==="passcode_max_attempts_reached"},[t]),v=(0,g.useCallback)(f=>mi(void 0,void 0,void 0,function*(){return yield t.actions.verify_passcode.run({code:f})}),[t]);return(0,g.useEffect)(()=>{const f=r>0&&setInterval(()=>s(r-1),1e3);return()=>clearInterval(f)},[r]),(0,g.useEffect)(()=>{const f=c>0&&setInterval(()=>{u(c-1)},1e3);return()=>clearInterval(f)},[c]),(0,g.useEffect)(()=>{var f;c==0&&((f=t.error)===null||f===void 0?void 0:f.code)=="rate_limit_exceeded"&&i(k=>Object.assign(Object.assign({},k),{error:null}))},[c]),(0,g.useEffect)(()=>{d([]),t.payload.resend_after>=0&&u(t.payload.resend_after)},[t]),a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.loginPasscode")}),a(Se,{state:t}),a(W,{children:n.email?e("texts.enterPasscode"):e("texts.enterPasscodeNoEmail")}),a(W,{hidden:!n.email,children:a("b",{children:n.email})}),a(ne,{flowAction:t.actions.verify_passcode,onSubmit:f=>mi(void 0,void 0,void 0,function*(){return f.preventDefault(),v(l.join(""))}),children:[a(no,{onInput:f=>{if(d(f),f.filter(k=>k!=="").length===6)return v(f.join(""))},passcodeDigits:l,numberOfInputs:6,disabled:r<=0||h}),a(oe,{disabled:r<=0||h,children:e("labels.continue")})]})]}),a(Oe,{children:[a(G,{flowAction:t.actions.back,loadingSpinnerPosition:"right",children:e("labels.back")}),a(G,{disabled:c>0,flowAction:t.actions.resend_passcode,loadingSpinnerPosition:"left",children:c>0?e("labels.passcodeResendAfter",{passcodeResendAfter:c}):e("labels.sendNewPasscode")})]})]})},Ar=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state);return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.registerAuthenticator")}),a(Se,{state:t}),a(W,{children:e("texts.setupPasskey")}),a(ne,{flowAction:t.actions.webauthn_generate_creation_options,children:a(oe,{autofocus:!0,icon:"passkey",children:e("labels.registerAuthenticator")})})]}),a(Oe,{hidden:!t.actions.skip.enabled&&!t.actions.back.enabled,children:[a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.back,children:e("labels.back")}),a(G,{loadingSpinnerPosition:"left",flowAction:t.actions.skip,children:e("labels.skip")})]})]})};var fi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Cr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)(),[r,s]=(0,g.useState)(),c=(0,g.useMemo)(()=>a(G,{flowAction:t.actions.continue_to_passcode_confirmation_recovery,loadingSpinnerPosition:"left",children:e("labels.forgotYourPassword")}),[t,e]),u=(0,g.useMemo)(()=>a(G,{flowAction:t.actions.continue_to_login_method_chooser,loadingSpinnerPosition:"left",children:"Choose another method"}),[t]);return(0,g.useEffect)(()=>{const l=r>0&&setInterval(()=>s(r-1),1e3);return()=>clearInterval(l)},[r]),a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.loginPassword")}),a(Se,{state:t}),a(ne,{flowAction:t.actions.password_login,onSubmit:l=>fi(void 0,void 0,void 0,function*(){return l.preventDefault(),t.actions.password_login.run({password:n})}),children:[a(Le,{type:"password",flowInput:t.actions.password_login.inputs.password,autocomplete:"current-password",placeholder:e("labels.password"),onInput:l=>fi(void 0,void 0,void 0,function*(){l.target instanceof HTMLInputElement&&i(l.target.value)}),autofocus:!0}),a(oe,{disabled:r>0,children:r>0?e("labels.passwordRetryAfter",{passwordRetryAfter:r}):e("labels.signIn")})]}),t.actions.continue_to_login_method_chooser.enabled?c:null]}),a(Oe,{children:[a(G,{flowAction:t.actions.back,loadingSpinnerPosition:"right",children:e("labels.back")}),t.actions.continue_to_login_method_chooser.enabled?u:c]})]})};var gi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const xr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)();return a(ke,{children:[a(le,{children:e("headlines.registerPassword")}),a(Se,{state:t}),a(W,{children:e("texts.passwordFormatHint",{minLength:t.actions.password_recovery.inputs.new_password.min_length,maxLength:72})}),a(ne,{flowAction:t.actions.password_recovery,onSubmit:r=>gi(void 0,void 0,void 0,function*(){return r.preventDefault(),t.actions.password_recovery.run({new_password:n})}),children:[a(Le,{type:"password",autocomplete:"new-password",flowInput:t.actions.password_recovery.inputs.new_password,placeholder:e("labels.newPassword"),onInput:r=>gi(void 0,void 0,void 0,function*(){r.target instanceof HTMLInputElement&&i(r.target.value)}),autofocus:!0}),a(oe,{children:e("labels.continue")})]})]})},Pr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state);return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.selectLoginMethod")}),a(Se,{flowError:t==null?void 0:t.error}),a(W,{children:e("texts.howDoYouWantToLogin")}),a(ne,{flowAction:t.actions.continue_to_passcode_confirmation,children:a(oe,{secondary:!0,icon:"mail",children:e("labels.passcode")})}),a(ne,{flowAction:t.actions.continue_to_password_login,children:a(oe,{secondary:!0,icon:"password",children:e("labels.password")})}),a(ne,{flowAction:t.actions.webauthn_generate_request_options,children:a(oe,{secondary:!0,icon:"passkey",children:e("labels.passkey")})})]}),a(Oe,{children:a(G,{flowAction:t.actions.back,loadingSpinnerPosition:"right",children:e("labels.back")})})]})};var _n=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Er=o=>{var e;const{t}=(0,g.useContext)(Z.TranslateContext),{init:n,uiState:i,setUIState:r,initialComponentName:s}=(0,g.useContext)(De),{flowState:c}=Pe(o.state),u=c.actions.register_login_identifier.inputs,l=!(!(u!=null&&u.email)||!(u!=null&&u.username)),[d,h]=(0,g.useState)(void 0),[v,f]=(0,g.useState)(null),[k,A]=(0,g.useState)(!1),[C,$]=(0,g.useState)(!1),K=(0,g.useMemo)(()=>!!c.actions.thirdparty_oauth.enabled&&c.actions.register_login_identifier.enabled,[c.actions]);return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:t("headlines.signUp")}),a(Se,{state:c,error:d}),u?a(b.Fragment,{children:[a(ne,{flowAction:c.actions.register_login_identifier,onSubmit:w=>_n(void 0,void 0,void 0,function*(){return w.preventDefault(),yield c.actions.register_login_identifier.run({email:i.email,username:i.username})}),maxWidth:!0,children:[u.username?a(Le,{markOptional:l,markError:l,type:"text",autoComplete:"username",autoCorrect:"off",flowInput:u.username,onInput:w=>{if(w.preventDefault(),w.target instanceof HTMLInputElement){const{value:E}=w.target;r(O=>Object.assign(Object.assign({},O),{username:E}))}},value:i.username,placeholder:t("labels.username")}):null,u.email?a(Le,{markOptional:l,markError:l,type:"email",autoComplete:"email",autoCorrect:"off",flowInput:u.email,onInput:w=>{if(w.preventDefault(),w.target instanceof HTMLInputElement){const{value:E}=w.target;r(O=>Object.assign(Object.assign({},O),{email:E}))}},value:i.email,placeholder:t("labels.email"),pattern:"^.*[^0-9]+$"}):null,a(oe,{autofocus:!0,children:t("labels.continue")})]}),a(Gn,{hidden:!K,children:t("labels.or")})]}):null,c.actions.thirdparty_oauth.enabled?(e=c.actions.thirdparty_oauth.inputs.provider.allowed_values)===null||e===void 0?void 0:e.map(w=>a(ne,{flowAction:c.actions.thirdparty_oauth,onSubmit:E=>((O,M)=>_n(void 0,void 0,void 0,function*(){O.preventDefault(),f(M);const z=on();an(z);try{const F=yield c.actions.thirdparty_oauth.run({provider:M,redirect_to:window.location.toString(),code_verifier:z},{dispatchAfterStateChangeEvent:!1});F.error&&(tt(),f(null)),F.dispatchAfterStateChangeEvent()}catch(F){throw tt(),f(null),F}}))(E,w.value),children:a(oe,{isLoading:w.value==v,secondary:!0,icon:w.value.startsWith("custom_")?"customProvider":w.value,children:t("labels.signInWith",{provider:w.name})})},w.value)):null,c.actions.remember_me.enabled&&a(b.Fragment,{children:[a(fn,{}),a(eo,{required:!1,type:"checkbox",label:t("labels.staySignedIn"),checked:k,onChange:w=>_n(void 0,void 0,void 0,function*(){w.preventDefault();const E=yield c.actions.remember_me.run({remember_me:!k},{dispatchAfterStateChangeEvent:!1});A(O=>!O),E.dispatchAfterStateChangeEvent()})})]})]}),a(Oe,{hidden:s!=="auth",children:a(W,{center:!0,children:[a("span",{children:t("labels.alreadyHaveAnAccount")}),a(G,{onClick:w=>_n(void 0,void 0,void 0,function*(){w.preventDefault(),$(!0),n("login")}),loadingSpinnerPosition:"left",isLoading:C,children:t("labels.signIn")})]})})]})};var vi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Or=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)();return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.registerPassword")}),a(Se,{state:t}),a(W,{children:e("texts.passwordFormatHint",{minLength:t.actions.register_password.inputs.new_password.min_length,maxLength:72})}),a(ne,{flowAction:t.actions.register_password,onSubmit:r=>vi(void 0,void 0,void 0,function*(){return r.preventDefault(),t.actions.register_password.run({new_password:n})}),children:[a(Le,{type:"password",autocomplete:"new-password",flowInput:t.actions.register_password.inputs.new_password,placeholder:e("labels.newPassword"),onInput:r=>vi(void 0,void 0,void 0,function*(){r.target instanceof HTMLInputElement&&i(r.target.value)}),autofocus:!0}),a(oe,{children:e("labels.continue")})]})]}),a(Oe,{hidden:!t.actions.back.enabled&&!t.actions.skip.enabled,children:[a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.back,children:e("labels.back")}),a(G,{loadingSpinnerPosition:"left",flowAction:t.actions.skip,children:e("labels.skip")})]})]})};var yn=te(597),zt={};zt.setAttributes=Ze(),zt.insert=o=>{window._hankoStyle=o},zt.domAPI=Be(),zt.insertStyleElement=Je(),Ve()(yn.A,zt);const Fe=yn.A&&yn.A.locals?yn.A.locals:void 0,Ht=function({name:o,columnSelector:e,contentSelector:t,data:n=[],checkedItemID:i,setCheckedItemID:r,dropdown:s=!1}){const c=(0,g.useCallback)(d=>`${o}-${d}`,[o]),u=(0,g.useCallback)(d=>c(d)===i,[i,c]),l=d=>{if(!(d.target instanceof HTMLInputElement))return;const h=parseInt(d.target.value,10),v=c(h);r(v===i?null:v)};return a("div",{className:Fe.accordion,children:n.map((d,h)=>a("div",{className:Fe.accordionItem,children:[a("input",{type:"radio",className:Fe.accordionInput,id:`${o}-${h}`,name:o,onClick:l,value:h,checked:u(h)}),a("label",{className:Q()(Fe.label,s&&Fe.dropdown),for:`${o}-${h}`,children:a("span",{className:Fe.labelText,children:e(d,h)})}),a("div",{className:Q()(Fe.accordionContent,s&&Fe.dropdownContent),children:t(d,h)})]},h))})},$e=({children:o})=>a("h2",{part:"headline2",className:Q()(hn.headline,hn.grade2),children:o});var oo=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Ir=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{const{t:i}=(0,g.useContext)(Z.TranslateContext),r=(0,g.useMemo)(()=>!1,[]);return a(Ht,{name:"email-edit-dropdown",columnSelector:s=>{const c=a("span",{className:Fe.description,children:s.is_verified?s.is_primary?a(b.Fragment,{children:[" -"," ",i("labels.primaryEmail")]}):null:a(b.Fragment,{children:[" -"," ",i("labels.unverifiedEmail")]})});return s.is_primary?a(b.Fragment,{children:[a("b",{children:s.address}),c]}):a(b.Fragment,{children:[s.address,c]})},data:t.payload.user.emails,contentSelector:s=>{var c,u;return a(b.Fragment,{children:[s.is_primary?a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.isPrimaryEmail")}),i("texts.isPrimaryEmail")]})}):a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.setPrimaryEmail")}),i("texts.setPrimaryEmail"),a("br",{}),a(G,{flowAction:t.actions.email_set_primary,onClick:l=>((d,h)=>oo(void 0,void 0,void 0,function*(){d.preventDefault();const v=yield t.actions.email_set_primary.run({email_id:h},{dispatchAfterStateChangeEvent:!1});return n(v)}))(l,s.id),loadingSpinnerPosition:"right",children:i("labels.setAsPrimaryEmail")})]})}),s.is_verified?a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.emailVerified")}),i("texts.emailVerified")]})}):a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.emailUnverified")}),i("texts.emailUnverified"),a("br",{}),a(G,{flowAction:t.actions.email_verify,onClick:l=>((d,h)=>oo(void 0,void 0,void 0,function*(){d.preventDefault();const v=yield t.actions.email_verify.run({email_id:h},{dispatchAfterStateChangeEvent:!1});return n(v)}))(l,s.id),loadingSpinnerPosition:"right",children:i("labels.verify")})]})}),!((c=t.actions.email_delete.inputs.email_id.allowed_values)===null||c===void 0)&&c.map(l=>l.value).includes(s.id)?a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.emailDelete")}),i("texts.emailDelete"),a("br",{}),a(G,{dangerous:!0,flowAction:t.actions.email_delete,onClick:l=>((d,h)=>oo(void 0,void 0,void 0,function*(){d.preventDefault();const v=yield t.actions.email_delete.run({email_id:h},{dispatchAfterStateChangeEvent:!1});return n(v)}))(l,s.id),disabled:r,loadingSpinnerPosition:"right",children:i("labels.delete")})]})}):null,((u=s.identities)===null||u===void 0?void 0:u.length)>0?a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.connectedAccounts")}),s.identities.map(l=>l.provider).join(", ")]})}):null]})},checkedItemID:o,setCheckedItemID:e})},Tr=({onCredentialNameSubmit:o,oldName:e,onBack:t,credential:n,credentialType:i,flowState:r})=>{const{t:s}=(0,g.useContext)(Z.TranslateContext),[c,u]=(0,g.useState)(e);return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:s(i==="security-key"?"headlines.renameSecurityKey":"headlines.renamePasskey")}),a(Se,{flowError:null}),a(W,{children:s(i==="security-key"?"texts.renameSecurityKey":"texts.renamePasskey")}),a(ne,{flowAction:r.actions.webauthn_credential_rename,onSubmit:l=>o(l,n.id,c),children:[a(Le,{type:"text",name:i,value:c,minLength:3,maxLength:32,required:!0,placeholder:s(i==="security-key"?"labels.newSecurityKeyName":"labels.newPasskeyName"),onInput:l=>function(d,h,v,f){return new(v||(v=Promise))(function(k,A){function C(w){try{K(f.next(w))}catch(E){A(E)}}function $(w){try{K(f.throw(w))}catch(E){A(E)}}function K(w){var E;w.done?k(w.value):(E=w.value,E instanceof v?E:new v(function(O){O(E)})).then(C,$)}K((f=f.apply(d,[])).next())})}(void 0,void 0,void 0,function*(){l.target instanceof HTMLInputElement&&u(l.target.value)}),autofocus:!0}),a(oe,{children:s("labels.save")})]})]}),a(Oe,{children:a(G,{onClick:t,loadingSpinnerPosition:"right",children:s("labels.back")})})]})},_i=({credentials:o=[],checkedItemID:e,setCheckedItemID:t,onBack:n,onCredentialNameSubmit:i,allowCredentialDeletion:r,credentialType:s,onCredentialDelete:c,flowState:u})=>{const{t:l}=(0,g.useContext)(Z.TranslateContext),{setPage:d}=(0,g.useContext)(De),h=f=>{if(f.name)return f.name;const k=f.public_key.replace(/[\W_]/g,"");return`${s==="security-key"?"SecurityKey":"Passkey"}-${k.substring(k.length-7,k.length)}`},v=f=>new Date(f).toLocaleString();return a(Ht,{name:s==="security-key"?"security-key-edit-dropdown":"passkey-edit-dropdown",columnSelector:f=>h(f),data:o,contentSelector:f=>a(b.Fragment,{children:[a(W,{children:[a($e,{children:l(s==="security-key"?"headlines.renameSecurityKey":"headlines.renamePasskey")}),l(s==="security-key"?"texts.renameSecurityKey":"texts.renamePasskey"),a("br",{}),a(G,{onClick:k=>((A,C,$)=>{A.preventDefault(),d(a(Tr,{oldName:h(C),credential:C,credentialType:$,onBack:n,onCredentialNameSubmit:i,flowState:u}))})(k,f,s),loadingSpinnerPosition:"right",children:l("labels.rename")})]}),a(W,{hidden:!r,children:[a($e,{children:l(s==="security-key"?"headlines.deleteSecurityKey":"headlines.deletePasskey")}),l(s==="security-key"?"texts.deleteSecurityKey":"texts.deletePasskey"),a("br",{}),a(G,{dangerous:!0,flowAction:u.actions.webauthn_credential_delete,onClick:k=>c(k,f.id),loadingSpinnerPosition:"right",children:l("labels.delete")})]}),a(W,{children:[a($e,{children:l("headlines.lastUsedAt")}),f.last_used_at?v(f.last_used_at):"-"]}),a(W,{children:[a($e,{children:l("headlines.createdAt")}),v(f.created_at)]})]}),checkedItemID:e,setCheckedItemID:t})},_t=({name:o,title:e,children:t,checkedItemID:n,setCheckedItemID:i})=>a(Ht,{dropdown:!0,name:o,columnSelector:()=>e,contentSelector:()=>a(b.Fragment,{children:t}),setCheckedItemID:i,checkedItemID:n,data:[{}]}),bn=({flowError:o})=>{const{t:e}=(0,g.useContext)(Z.TranslateContext);return a(b.Fragment,{children:o?a("div",{className:pi.errorMessage,children:e(`flowErrors.${o==null?void 0:o.code}`)}):null})},Ur=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{var i;const{t:r}=(0,g.useContext)(Z.TranslateContext),{setUIState:s}=(0,g.useContext)(De),[c,u]=(0,g.useState)();return a(_t,{name:"email-create-dropdown",title:r("labels.addEmail"),checkedItemID:o,setCheckedItemID:e,children:[a(bn,{flowError:(i=t.actions.email_create.inputs.email)===null||i===void 0?void 0:i.error}),a(ne,{flowAction:t.actions.email_create,onSubmit:l=>((d,h)=>function(v,f,k,A){return new(k||(k=Promise))(function(C,$){function K(O){try{E(A.next(O))}catch(M){$(M)}}function w(O){try{E(A.throw(O))}catch(M){$(M)}}function E(O){var M;O.done?C(O.value):(M=O.value,M instanceof k?M:new k(function(z){z(M)})).then(K,w)}E((A=A.apply(v,[])).next())})}(void 0,void 0,void 0,function*(){d.preventDefault(),s(f=>Object.assign(Object.assign({},f),{email:h}));const v=yield t.actions.email_create.run({email:h},{dispatchAfterStateChangeEvent:!1});return n(v)}))(l,c).then(()=>u("")),children:[a(Le,{markError:!0,type:"email",placeholder:r("labels.newEmailAddress"),onInput:l=>{l.preventDefault(),l.target instanceof HTMLInputElement&&u(l.target.value)},value:c,flowInput:t.actions.email_create.inputs.email}),a(oe,{children:r("labels.save")})]})]})};var yi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const $r=({checkedItemID:o,setCheckedItemID:e,onState:t,flowState:n})=>{var i,r,s;const{t:c}=(0,g.useContext)(Z.TranslateContext),[u,l]=(0,g.useState)(""),d=n.actions.password_create.enabled?n.actions.password_create:n.actions.password_update;return a(_t,{name:"password-edit-dropdown",title:c(n.actions.password_create.enabled?"labels.setPassword":"labels.changePassword"),checkedItemID:o,setCheckedItemID:e,children:[a(W,{children:c("texts.passwordFormatHint",{minLength:(i=d.inputs.password.min_length)===null||i===void 0?void 0:i.toString(10),maxLength:(r=d.inputs.password.max_length)===null||r===void 0?void 0:r.toString(10)})}),a(bn,{flowError:(s=n.actions.password_create.inputs.password)===null||s===void 0?void 0:s.error}),a(ne,{flowAction:d,onSubmit:h=>((v,f)=>yi(void 0,void 0,void 0,function*(){v.preventDefault();const k=yield d.run({password:f},{dispatchAfterStateChangeEvent:!1});return t(k)}))(h,u).then(()=>l("")),children:[a(Le,{markError:!0,autoComplete:"new-password",placeholder:c("labels.newPassword"),type:"password",onInput:h=>{h.preventDefault(),h.target instanceof HTMLInputElement&&l(h.target.value)},value:u,flowInput:d.inputs.password}),a(oe,{children:c("labels.save")})]}),a(G,{dangerous:!0,flowAction:n.actions.password_delete,onClick:h=>(v=>yi(void 0,void 0,void 0,function*(){v.preventDefault();const f=yield n.actions.password_delete.run(null,{dispatchAfterStateChangeEvent:!1});return t(f)}))(h).then(()=>l("")),loadingSpinnerPosition:"right",children:c("labels.delete")})]})},bi=({checkedItemID:o,setCheckedItemID:e,credentialType:t,flowState:n,onState:i})=>{const{t:r}=(0,g.useContext)(Z.TranslateContext),s=gt.supported(),c=t=="passkey"?n.actions.webauthn_credential_create:n.actions.security_key_create;return a(_t,{name:t==="security-key"?"security-key-create-dropdown":"passkey-create-dropdown",title:r(t==="security-key"?"labels.createSecurityKey":"labels.createPasskey"),checkedItemID:o,setCheckedItemID:e,children:[a(W,{children:r(t==="security-key"?"texts.securityKeySetUp":"texts.setupPasskey")}),a(ne,{onSubmit:u=>function(l,d,h,v){return new(h||(h=Promise))(function(f,k){function A(K){try{$(v.next(K))}catch(w){k(w)}}function C(K){try{$(v.throw(K))}catch(w){k(w)}}function $(K){var w;K.done?f(K.value):(w=K.value,w instanceof h?w:new h(function(E){E(w)})).then(A,C)}$((v=v.apply(l,[])).next())})}(void 0,void 0,void 0,function*(){u.preventDefault();const l=yield c.run(null,{dispatchAfterStateChangeEvent:!1});return i(l)}),flowAction:c,children:a(oe,{title:s?null:r("labels.webauthnUnsupported"),children:r(t==="security-key"?"labels.createSecurityKey":"labels.createPasskey")})})]})};var wi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Dr=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{var i,r;const{t:s}=(0,g.useContext)(Z.TranslateContext),[c,u]=(0,g.useState)();return a(_t,{name:"username-edit-dropdown",title:s(t.payload.user.username?"labels.changeUsername":"labels.setUsername"),checkedItemID:o,setCheckedItemID:e,children:[a(bn,{flowError:t.payload.user.username?(i=t.actions.username_update.inputs.username)===null||i===void 0?void 0:i.error:(r=t.actions.username_create.inputs.username)===null||r===void 0?void 0:r.error}),a(ne,{flowAction:t.payload.user.username?t.actions.username_update:t.actions.username_create,onSubmit:l=>wi(void 0,void 0,void 0,function*(){l.preventDefault();const d=t.payload.user.username?t.actions.username_update:t.actions.username_create,h=yield d.run({username:c},{dispatchAfterStateChangeEvent:!1});return n(h).then(()=>u(""))}),children:[a(Le,{markError:!0,placeholder:s("labels.username"),type:"text",onInput:l=>{l.preventDefault(),l.target instanceof HTMLInputElement&&u(l.target.value)},value:c,flowInput:t.payload.user.username?t.actions.username_update.inputs.username:t.actions.username_create.inputs.username}),a(oe,{children:s("labels.save")})]}),a(G,{flowAction:t.actions.username_delete,onClick:l=>wi(void 0,void 0,void 0,function*(){l.preventDefault();const d=yield t.actions.username_delete.run(null,{dispatchAfterStateChangeEvent:!1});return n(d).then(()=>u(""))}),dangerous:!0,loadingSpinnerPosition:"right",children:s("labels.delete")})]})},Lr=({state:o,onBack:e})=>{const{t}=(0,g.useContext)(Z.TranslateContext);return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:t("headlines.deleteAccount")}),a(Se,{flowError:null}),a(W,{children:t("texts.deleteAccount")}),a(ne,{flowAction:o.actions.account_delete,children:[a(eo,{required:!0,type:"checkbox",label:t("labels.deleteAccount")}),a(oe,{children:t("labels.delete")})]})]}),a(Oe,{children:a(G,{onClick:e,children:t("labels.back")})})]})},Nr=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{const{t:i}=(0,g.useContext)(Z.TranslateContext),r=s=>new Date(s).toLocaleString();return a(Ht,{name:"session-edit-dropdown",columnSelector:s=>{const c=a("b",{children:s.user_agent?s.user_agent:s.id}),u=s.current?a("span",{className:Fe.description,children:a(b.Fragment,{children:[" -"," ",i("labels.currentSession")]})}):null;return a(b.Fragment,{children:[c,u]})},data:t.payload.sessions,contentSelector:s=>{var c,u,l;return a(b.Fragment,{children:[a(W,{hidden:!s.ip_address,children:[a($e,{children:i("headlines.ipAddress")}),s.ip_address]}),a(W,{children:[a($e,{children:i("headlines.lastUsed")}),r(s.last_used)]}),a(W,{children:[a($e,{children:i("headlines.createdAt")}),r(s.created_at)]}),!((l=(u=(c=t.actions.session_delete.inputs.session_id)===null||c===void 0?void 0:c.allowed_values)===null||u===void 0?void 0:u.map(d=>d.value))===null||l===void 0)&&l.includes(s.id)?a(W,{children:[a($e,{children:i("headlines.revokeSession")}),a(G,{dangerous:!0,onClick:d=>((h,v)=>function(f,k,A,C){return new(A||(A=Promise))(function($,K){function w(M){try{O(C.next(M))}catch(z){K(z)}}function E(M){try{O(C.throw(M))}catch(z){K(z)}}function O(M){var z;M.done?$(M.value):(z=M.value,z instanceof A?z:new A(function(F){F(z)})).then(w,E)}O((C=C.apply(f,[])).next())})}(void 0,void 0,void 0,function*(){h.preventDefault();const f=yield t.actions.session_delete.run({session_id:v},{dispatchAfterStateChangeEvent:!1});return n(f)}))(d,s.id),loadingSpinnerPosition:"right",children:i("labels.revoke")})]}):null]})},checkedItemID:o,setCheckedItemID:e})};var ki=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Mr=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{var i,r,s,c;const{t:u}=(0,g.useContext)(Z.TranslateContext),l=a("span",{className:Fe.description,children:!((i=t.payload.user.mfa_config)===null||i===void 0)&&i.auth_app_set_up?a(b.Fragment,{children:[" -"," ",u("labels.configured")]}):null}),d=a(b.Fragment,{children:[u("labels.authenticatorAppManage")," ",l]});return a(_t,{name:"authenticator-app-manage-dropdown",title:d,checkedItemID:o,setCheckedItemID:e,children:[a($e,{children:u(!((r=t.payload.user.mfa_config)===null||r===void 0)&&r.auth_app_set_up?"headlines.authenticatorAppAlreadySetUp":"headlines.authenticatorAppNotSetUp")}),a(W,{children:[u(!((s=t.payload.user.mfa_config)===null||s===void 0)&&s.auth_app_set_up?"texts.authenticatorAppAlreadySetUp":"texts.authenticatorAppNotSetUp"),a("br",{}),!((c=t.payload.user.mfa_config)===null||c===void 0)&&c.auth_app_set_up?a(G,{flowAction:t.actions.otp_secret_delete,onClick:h=>ki(void 0,void 0,void 0,function*(){h.preventDefault();const v=yield t.actions.otp_secret_delete.run(null,{dispatchAfterStateChangeEvent:!1});return n(v)}),loadingSpinnerPosition:"right",dangerous:!0,children:u("labels.delete")}):a(G,{flowAction:t.actions.continue_to_otp_secret_creation,onClick:h=>ki(void 0,void 0,void 0,function*(){h.preventDefault();const v=yield t.actions.continue_to_otp_secret_creation.run(null,{dispatchAfterStateChangeEvent:!1});return n(v)}),loadingSpinnerPosition:"right",children:u("labels.authenticatorAppAdd")})]})]})},Rr=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{const{t:i}=(0,g.useContext)(Z.TranslateContext),r=(0,g.useMemo)(()=>!1,[]);return a(Ht,{name:"connected-accounts",columnSelector:s=>{const c=a("b",{children:s.provider});return a(b.Fragment,{children:c})},contentSelector:s=>a(b.Fragment,{children:a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.deleteIdentity")}),a(G,{dangerous:!0,flowAction:t.actions.disconnect_thirdparty_oauth_provider,onClick:c=>((u,l)=>function(d,h,v,f){return new(v||(v=Promise))(function(k,A){function C(w){try{K(f.next(w))}catch(E){A(E)}}function $(w){try{K(f.throw(w))}catch(E){A(E)}}function K(w){var E;w.done?k(w.value):(E=w.value,E instanceof v?E:new v(function(O){O(E)})).then(C,$)}K((f=f.apply(d,[])).next())})}(void 0,void 0,void 0,function*(){u.preventDefault();const d=yield t.actions.disconnect_thirdparty_oauth_provider.run({identity_id:l},{dispatchAfterStateChangeEvent:!1});return n(d)}))(c,s.identity_id),disabled:r,loadingSpinnerPosition:"right",children:i("labels.delete")})]})})}),checkedItemID:o,setCheckedItemID:e,data:t.payload.user.identities})},zr=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{var i,r;const{t:s}=(0,g.useContext)(Z.TranslateContext);return a(_t,{name:"connect-account-dropdown",title:s("labels.connectAccount"),checkedItemID:o,setCheckedItemID:e,children:[a(bn,{flowError:(i=t.actions.connect_thirdparty_oauth_provider.inputs.provider)===null||i===void 0?void 0:i.error}),(r=t.actions.connect_thirdparty_oauth_provider.inputs.provider.allowed_values)===null||r===void 0?void 0:r.map(c=>a(ne,{flowAction:t.actions.connect_thirdparty_oauth_provider,onSubmit:u=>((l,d)=>function(h,v,f,k){return new(f||(f=Promise))(function(A,C){function $(E){try{w(k.next(E))}catch(O){C(O)}}function K(E){try{w(k.throw(E))}catch(O){C(O)}}function w(E){var O;E.done?A(E.value):(O=E.value,O instanceof f?O:new f(function(M){M(O)})).then($,K)}w((k=k.apply(h,[])).next())})}(void 0,void 0,void 0,function*(){l.preventDefault();const h=on();an(h);try{const v=yield t.actions.connect_thirdparty_oauth_provider.run({provider:d,redirect_to:window.location.href,code_verifier:h});return v.error&&tt(),n(v)}catch(v){throw tt(),v}}))(u,c.value),children:a(oe,{icon:c.value.startsWith("custom_")?"customProvider":c.value,children:c.name},c)},c.value))]})};var wn=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Si=o=>{var e,t,n,i,r,s,c;const{t:u}=(0,g.useContext)(Z.TranslateContext),{setPage:l}=(0,g.useContext)(De),{flowState:d}=Pe(o.state),[h,v]=(0,g.useState)(""),f=C=>wn(void 0,void 0,void 0,function*(){C!=null&&C.error||(v(null),yield new Promise($=>setTimeout($,360))),C.dispatchAfterStateChangeEvent()}),k=(C,$,K)=>wn(void 0,void 0,void 0,function*(){C.preventDefault();const w=yield d.actions.webauthn_credential_rename.run({passkey_id:$,passkey_name:K},{dispatchAfterStateChangeEvent:!1});return f(w)}),A=C=>(C.preventDefault(),l(a(Si,{state:d,enablePasskeys:o.enablePasskeys})),Promise.resolve());return a(ke,{children:[a(Se,{state:((e=d==null?void 0:d.error)===null||e===void 0?void 0:e.code)!=="form_data_invalid_error"?d:null}),d.actions.username_create.enabled||d.actions.username_update.enabled||d.actions.username_delete.enabled?a(b.Fragment,{children:[a(le,{children:u("labels.username")}),d.payload.user.username?a(W,{children:a("b",{children:d.payload.user.username.username})}):null,a(W,{children:d.actions.username_create.enabled||d.actions.username_update.enabled?a(Dr,{onState:f,flowState:d,checkedItemID:h,setCheckedItemID:v}):null})]}):null,!((n=(t=d.payload)===null||t===void 0?void 0:t.user)===null||n===void 0)&&n.emails||d.actions.email_create.enabled?a(b.Fragment,{children:[a(le,{children:u("headlines.profileEmails")}),a(W,{children:[a(Ir,{flowState:d,onState:f,checkedItemID:h,setCheckedItemID:v}),d.actions.email_create.enabled?a(Ur,{flowState:d,onState:f,checkedItemID:h,setCheckedItemID:v}):null]})]}):null,d.actions.password_create.enabled||d.actions.password_update.enabled?a(b.Fragment,{children:[a(le,{children:u("headlines.profilePassword")}),a(W,{children:a($r,{flowState:d,onState:f,checkedItemID:h,setCheckedItemID:v})})]}):null,o.enablePasskeys&&(!((r=(i=d.payload)===null||i===void 0?void 0:i.user)===null||r===void 0)&&r.passkeys||d.actions.webauthn_credential_create.enabled)?a(b.Fragment,{children:[a(le,{children:u("headlines.profilePasskeys")}),a(W,{children:[a(_i,{flowState:d,onBack:A,onCredentialNameSubmit:k,onCredentialDelete:(C,$)=>wn(void 0,void 0,void 0,function*(){C.preventDefault();const K=yield d.actions.webauthn_credential_delete.run({passkey_id:$},{dispatchAfterStateChangeEvent:!1});return f(K)}),credentials:d.payload.user.passkeys,checkedItemID:h,setCheckedItemID:v,allowCredentialDeletion:!!d.actions.webauthn_credential_delete.enabled,credentialType:"passkey"}),d.actions.webauthn_credential_create.enabled?a(bi,{flowState:d,onState:f,credentialType:"passkey",checkedItemID:h,setCheckedItemID:v}):null]})]}):null,!((s=d.payload.user.mfa_config)===null||s===void 0)&&s.security_keys_enabled?a(b.Fragment,{children:[a(le,{children:u("headlines.securityKeys")}),a(W,{children:[a(_i,{onBack:A,flowState:d,onCredentialNameSubmit:k,onCredentialDelete:(C,$)=>wn(void 0,void 0,void 0,function*(){C.preventDefault();const K=yield d.actions.security_key_delete.run({security_key_id:$},{dispatchAfterStateChangeEvent:!1});return f(K)}),credentials:d.payload.user.security_keys,checkedItemID:h,setCheckedItemID:v,allowCredentialDeletion:!!d.actions.security_key_delete.enabled,credentialType:"security-key"}),d.actions.security_key_create.enabled?a(bi,{flowState:d,onState:f,credentialType:"security-key",checkedItemID:h,setCheckedItemID:v}):null]})]}):null,!((c=d.payload.user.mfa_config)===null||c===void 0)&&c.totp_enabled?a(b.Fragment,{children:[a(le,{children:u("headlines.authenticatorApp")}),a(W,{children:a(Mr,{onState:f,flowState:d,checkedItemID:h,setCheckedItemID:v})})]}):null,d.actions.connect_thirdparty_oauth_provider.enabled||d.actions.disconnect_thirdparty_oauth_provider.enabled?a(b.Fragment,{children:[a(le,{children:u("headlines.connectedAccounts")}),a(Rr,{flowState:d,onState:f,checkedItemID:h,setCheckedItemID:v}),d.actions.connect_thirdparty_oauth_provider.enabled?a(zr,{setCheckedItemID:v,flowState:d,onState:f,checkedItemID:h}):null]}):null,d.payload.sessions?a(b.Fragment,{children:[a(le,{children:u("headlines.profileSessions")}),a(W,{children:a(Nr,{flowState:d,onState:f,checkedItemID:h,setCheckedItemID:v})})]}):null,d.actions.account_delete.enabled?a(b.Fragment,{children:[a(fn,{}),a(W,{children:a(Gn,{})}),a(W,{children:a(ne,{onSubmit:C=>(C.preventDefault(),l(a(Lr,{onBack:A,state:d})),Promise.resolve()),flowAction:d.actions.account_delete,children:a(oe,{dangerous:!0,children:u("headlines.deleteAccount")})})})]}):null]})},Hr=Si,Ai=({state:o,error:e})=>{const{t}=(0,g.useContext)(Z.TranslateContext),{init:n,componentName:i}=(0,g.useContext)(De),[r,s]=(0,g.useState)(!1),c=(0,g.useCallback)(()=>n(i),[i,n]),{flowState:u}=Pe(o);return(0,g.useEffect)(()=>(addEventListener("hankoAuthSuccess",c),()=>{removeEventListener("hankoAuthSuccess",c)}),[c]),a(ke,{children:[a(le,{children:t("headlines.error")}),a(Se,{state:u,error:e}),a(ne,{onSubmit:l=>{l.preventDefault(),s(!0),c()},children:a(oe,{isLoading:r,children:t("labels.continue")})})]})};var Ci=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const qr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)();return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.createEmail")}),a(Se,{state:t}),a(ne,{onSubmit:r=>Ci(void 0,void 0,void 0,function*(){return r.preventDefault(),t.actions.email_address_set.run({email:n})}),flowAction:t.actions.email_address_set,children:[a(Le,{type:"email",autoComplete:"email",autoCorrect:"off",flowInput:t.actions.email_address_set.inputs.email,onInput:r=>Ci(void 0,void 0,void 0,function*(){r.target instanceof HTMLInputElement&&i(r.target.value)}),placeholder:e("labels.email"),pattern:"^.*[^0-9]+$",value:n}),a(oe,{children:e("labels.continue")})]})]}),a(Oe,{hidden:!t.actions.skip.enabled,children:[a("span",{hidden:!0}),a(G,{flowAction:t.actions.skip,loadingSpinnerPosition:"left",children:e("labels.skip")})]})]})};var xi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const jr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)();return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.createUsername")}),a(Se,{state:t}),a(ne,{flowAction:t.actions.username_create,onSubmit:r=>xi(void 0,void 0,void 0,function*(){return r.preventDefault(),t.actions.username_create.run({username:n})}),children:[a(Le,{type:"text",autoComplete:"username",autoCorrect:"off",flowInput:t.actions.username_create.inputs.username,onInput:r=>xi(void 0,void 0,void 0,function*(){r.target instanceof HTMLInputElement&&i(r.target.value)}),value:n,placeholder:e("labels.username")}),a(oe,{children:e("labels.continue")})]})]}),a(Oe,{hidden:!t.actions.skip.enabled,children:[a("span",{hidden:!0}),a(G,{flowAction:t.actions.skip,loadingSpinnerPosition:"left",children:e("labels.skip")})]})]})},Fr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state);return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.setupLoginMethod")}),a(Se,{flowError:t==null?void 0:t.error}),a(W,{children:e("texts.selectLoginMethodForFutureLogins")}),a(ne,{flowAction:t.actions.continue_to_passkey_registration,children:a(oe,{secondary:!0,icon:"passkey",children:e("labels.passkey")})}),a(ne,{flowAction:t.actions.continue_to_password_registration,children:a(oe,{secondary:!0,icon:"password",children:e("labels.password")})})]}),a(Oe,{hidden:!t.actions.back.enabled&&!t.actions.skip.enabled,children:[a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.back,children:e("labels.back")}),a(G,{loadingSpinnerPosition:"left",flowAction:t.actions.skip,children:e("labels.skip")})]})]})};var Pi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Kr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)([]),r=(0,g.useCallback)(s=>Pi(void 0,void 0,void 0,function*(){return t.actions.otp_code_validate.run({otp_code:s})}),[t]);return(0,g.useEffect)(()=>{i([])},[t]),a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.otpLogin")}),a(Se,{state:t}),a(W,{children:e("texts.otpLogin")}),a(ne,{flowAction:t.actions.otp_code_validate,onSubmit:s=>Pi(void 0,void 0,void 0,function*(){return s.preventDefault(),r(n.join(""))}),children:[a(no,{onInput:s=>{if(i(s),s.filter(c=>c!=="").length===6)return r(s.join(""))},passcodeDigits:n,numberOfInputs:6}),a(oe,{children:e("labels.continue")})]})]}),a(Oe,{hidden:!t.actions.continue_to_login_security_key.enabled,children:a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.continue_to_login_security_key,children:e("labels.useAnotherMethod")})})]})},Wr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state);return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.securityKeyLogin")}),a(Se,{state:t}),a(W,{children:e("texts.securityKeyLogin")}),a(ne,{flowAction:t.actions.webauthn_generate_request_options,children:a(oe,{autofocus:!0,icon:"securityKey",children:e("labels.securityKeyUse")})})]}),a(Oe,{hidden:!t.actions.continue_to_login_otp.enabled,children:a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.continue_to_login_otp,children:e("labels.useAnotherMethod")})})]})},Vr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),n=(0,g.useMemo)(()=>{const{actions:i}=t;return i.continue_to_security_key_creation.enabled&&!i.continue_to_otp_secret_creation.enabled?i.continue_to_security_key_creation:!i.continue_to_security_key_creation.enabled&&i.continue_to_otp_secret_creation.enabled?i.continue_to_otp_secret_creation:void 0},[t]);return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.mfaSetUp")}),a(Se,{flowError:t==null?void 0:t.error}),a(W,{children:e("texts.mfaSetUp")}),n?a(ne,{flowAction:n,children:a(oe,{children:e("labels.continue")})}):a(b.Fragment,{children:[a(ne,{flowAction:t.actions.continue_to_security_key_creation,children:a(oe,{secondary:!0,icon:"securityKey",children:e("labels.securityKey")})}),a(ne,{flowAction:t.actions.continue_to_otp_secret_creation,children:a(oe,{secondary:!0,icon:"qrCodeScanner",children:e("labels.authenticatorApp")})})]})]}),a(Oe,{children:[a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.back,children:e("labels.back")}),a(G,{loadingSpinnerPosition:"left",flowAction:t.actions.skip,children:e("labels.skip")})]})]})};var kn=te(8),qt={};qt.setAttributes=Ze(),qt.insert=o=>{window._hankoStyle=o},qt.domAPI=Be(),qt.insertStyleElement=Je(),Ve()(kn.A,qt);const Br=kn.A&&kn.A.locals?kn.A.locals:void 0,Zr=({children:o,text:e})=>{const{t}=(0,g.useContext)(Z.TranslateContext),[n,i]=(0,g.useState)(!1);return a("section",{className:Ot.clipboardContainer,children:[a("div",{children:[o," "]}),a("div",{className:Ot.clipboardIcon,onClick:r=>function(s,c,u,l){return new(u||(u=Promise))(function(d,h){function v(A){try{k(l.next(A))}catch(C){h(C)}}function f(A){try{k(l.throw(A))}catch(C){h(C)}}function k(A){var C;A.done?d(A.value):(C=A.value,C instanceof u?C:new u(function($){$(C)})).then(v,f)}k((l=l.apply(s,[])).next())})}(void 0,void 0,void 0,function*(){r.preventDefault();try{yield navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),1500)}catch(s){console.error("Failed to copy: ",s)}}),children:n?a("span",{children:["- ",t("labels.copied")]}):a(Tt,{name:"copy",secondary:!0,size:13})})]})},Jr=({src:o,secret:e})=>{const{t}=(0,g.useContext)(Z.TranslateContext);return a("div",{className:Br.otpCreationDetails,children:[a("img",{alt:"QR-Code",src:o}),a(fn,{}),a(Zr,{text:e,children:t("texts.otpSecretKey")}),a("div",{children:e})]})};var Ei=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Yr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)([]),r=(0,g.useCallback)(s=>Ei(void 0,void 0,void 0,function*(){return t.actions.otp_code_verify.run({otp_code:s})}),[t]);return(0,g.useEffect)(()=>{var s;((s=t.error)===null||s===void 0?void 0:s.code)==="passcode_invalid"&&i([])},[t]),a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.otpSetUp")}),a(Se,{state:t}),a(W,{children:e("texts.otpScanQRCode")}),a(Jr,{src:t.payload.otp_image_source,secret:t.payload.otp_secret}),a(W,{children:e("texts.otpEnterVerificationCode")}),a(ne,{flowAction:t.actions.otp_code_verify,onSubmit:s=>Ei(void 0,void 0,void 0,function*(){return s.preventDefault(),r(n.join(""))}),children:[a(no,{onInput:s=>{if(i(s),s.filter(c=>c!=="").length===6)return r(s.join(""))},passcodeDigits:n,numberOfInputs:6}),a(oe,{children:e("labels.continue")})]})]}),a(Oe,{children:a(G,{flowAction:t.actions.back,loadingSpinnerPosition:"right",children:e("labels.back")})})]})},Qr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state);return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.securityKeySetUp")}),a(Se,{state:t}),a(W,{children:e("texts.securityKeySetUp")}),a(ne,{flowAction:t.actions.webauthn_generate_creation_options,children:a(oe,{autofocus:!0,icon:"securityKey",children:e("labels.createSecurityKey")})})]}),a(Oe,{hidden:!t.actions.back.enabled,children:a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.back,children:e("labels.back")})})]})},Gr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state);return a(b.Fragment,{children:[a(ke,{children:[a(le,{children:e("headlines.trustDevice")}),a(Se,{flowError:t==null?void 0:t.error}),a(W,{children:e("texts.trustDevice")}),a(ne,{flowAction:t.actions.trust_device,children:a(oe,{children:e("labels.trustDevice")})})]}),a(Oe,{children:[a(G,{flowAction:t.actions.back,loadingSpinnerPosition:"right",children:e("labels.back")}),a(G,{flowAction:t.actions.skip,loadingSpinnerPosition:"left",children:e("labels.skip")})]})]})};var Oi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,e||[])).next())})};const De=(0,b.createContext)(null),Xr=o=>{var e,{lang:t,prefilledEmail:n,prefilledUsername:i,globalOptions:r,createWebauthnAbortSignal:s,nonce:c}=o,u=function(q,H){var Ee={};for(var se in q)Object.prototype.hasOwnProperty.call(q,se)&&H.indexOf(se)<0&&(Ee[se]=q[se]);if(q!=null&&typeof Object.getOwnPropertySymbols=="function"){var Ie=0;for(se=Object.getOwnPropertySymbols(q);Ie<se.length;Ie++)H.indexOf(se[Ie])<0&&Object.prototype.propertyIsEnumerable.call(q,se[Ie])&&(Ee[se[Ie]]=q[se[Ie]])}return Ee}(o,["lang","prefilledEmail","prefilledUsername","globalOptions","createWebauthnAbortSignal","nonce"]);const{hanko:l,injectStyles:d,hidePasskeyButtonOnLogin:h,translations:v,translationsLocation:f,fallbackLanguage:k}=r;l.setLang((t==null?void 0:t.toString())||k);const A=(0,g.useRef)(null),C=(0,g.useMemo)(()=>`${r.storageKey}_last_login`,[r.storageKey]),[$,K]=(0,g.useState)(u.componentName),[w,E]=(0,g.useState)((e=u.mode)!==null&&e!==void 0?e:"login"),O=(0,g.useRef)(!1),[M,z]=(0,g.useState)(!1),F=(0,g.useMemo)(()=>({auth:w,login:"login",registration:"registration",profile:"profile",events:null}),[w]),V=(0,g.useMemo)(()=>a(br,{}),[]),[ee,N]=(0,g.useState)(V),[,ge]=(0,g.useState)(l),[_e,ue]=(0,g.useState)(),[de,re]=(0,g.useState)({email:n,username:i}),ye=function(q,H){var Ee;(Ee=A.current)===null||Ee===void 0||Ee.dispatchEvent(new CustomEvent(q,{detail:H,bubbles:!1,composed:!0}))},Me=(0,g.useCallback)(q=>F[$]==q.flowName,[F,$,w]),ct=q=>{N(a(Ai,{error:q instanceof st?q:new je(q)}))};(0,g.useMemo)(()=>l.onBeforeStateChange(({state:q})=>{Me(q)&&re(H=>Object.assign(Object.assign({},H),{isDisabled:!0,error:void 0}))}),[l,Me]),(0,g.useEffect)(()=>{re(q=>Object.assign(Object.assign(Object.assign({},q),n&&{email:n}),i&&{username:i}))},[n,i]),(0,g.useEffect)(()=>l.onAfterStateChange(q=>Oi(void 0,[q],void 0,function*({state:H}){var Ee;if(Me(H))switch(["onboarding_verify_passkey_attestation","webauthn_credential_verification","login_passkey","thirdparty"].includes(H.name)||re(se=>Object.assign(Object.assign({},se),{isDisabled:!1})),H.name){case"login_init":N(a(wr,{state:H})),H.passkeyAutofillActivation();break;case"passcode_confirmation":N(a(Sr,{state:H}));break;case"login_otp":N(a(Kr,{state:H}));break;case"onboarding_create_passkey":N(a(Ar,{state:H}));break;case"login_password":N(a(Cr,{state:H}));break;case"login_password_recovery":N(a(xr,{state:H}));break;case"login_security_key":N(a(Wr,{state:H}));break;case"mfa_method_chooser":N(a(Vr,{state:H}));break;case"mfa_otp_secret_creation":N(a(Yr,{state:H}));break;case"mfa_security_key_creation":N(a(Qr,{state:H}));break;case"login_method_chooser":N(a(Pr,{state:H}));break;case"registration_init":N(a(Er,{state:H}));break;case"password_creation":N(a(Or,{state:H}));break;case"success":!((Ee=H.payload)===null||Ee===void 0)&&Ee.last_login&&localStorage.setItem(C,JSON.stringify(H.payload.last_login)),H.autoStep();break;case"profile_init":N(a(Hr,{state:H,enablePasskeys:r.enablePasskeys}));break;case"error":N(a(Ai,{state:H}));break;case"onboarding_email":N(a(qr,{state:H}));break;case"onboarding_username":N(a(jr,{state:H}));break;case"credential_onboarding_chooser":N(a(Fr,{state:H}));break;case"device_trust":N(a(Gr,{state:H}))}})),[$,F]);const lt=(0,g.useCallback)(q=>Oi(void 0,void 0,void 0,function*(){re(se=>Object.assign(Object.assign({},se),{isDisabled:!0}));const H=localStorage.getItem(C);H&&ue(JSON.parse(H));const Ee={excludeAutoSteps:["success"],cacheKey:"hanko-auth-flow-state",dispatchAfterStateChangeEvent:!1};if(new URLSearchParams(window.location.search).get("saml_hint")==="idp_initiated")E("token_exchange"),yield l.createState("token_exchange",Object.assign(Object.assign({},Ee),{dispatchAfterStateChangeEvent:!0}));else{const se=yield l.createState(q,Ee);E(se.flowName),setTimeout(()=>se.dispatchAfterStateChangeEvent(),500)}}),[]),x=(0,g.useCallback)(q=>{K(q);const H=F[q];H&&lt(H).catch(ct)},[F]);(0,g.useEffect)(()=>{if(!O.current){const q=setTimeout(()=>{var H;E((H=u.mode)!==null&&H!==void 0?H:"login"),z(!0)},0);return()=>clearTimeout(q)}},[u.mode]),(0,g.useEffect)(()=>{M&&!O.current&&(O.current=!0,x($))},[M,w,$,x]),(0,g.useEffect)(()=>{l.onUserDeleted(()=>{ye("onUserDeleted")}),l.onSessionCreated(q=>{ye("onSessionCreated",q)}),l.onSessionExpired(()=>{ye("onSessionExpired")}),l.onUserLoggedOut(()=>{ye("onUserLoggedOut")}),l.onBeforeStateChange(q=>{ye("onBeforeStateChange",q)}),l.onAfterStateChange(q=>{ye("onAfterStateChange",q)})},[l]),(0,g.useMemo)(()=>{const q=()=>{x($)};["auth","login","registration"].includes($)?(l.onUserLoggedOut(q),l.onSessionExpired(q),l.onUserDeleted(q)):$==="profile"&&l.onSessionCreated(q)},[$,l,x]);const I=De.Provider,D=Z.TranslateProvider,J=tr;return a(I,{value:{init:x,initialComponentName:u.componentName,setUIState:re,uiState:de,hanko:l,setHanko:ge,lang:(t==null?void 0:t.toString())||k,prefilledEmail:n,prefilledUsername:i,componentName:$,setComponentName:K,hidePasskeyButtonOnLogin:h,page:ee,setPage:N,lastLogin:_e,isOwnFlow:Me},children:a(D,{translations:v,fallbackLang:k,root:f,children:a(J,{ref:A,children:$!=="events"?a(b.Fragment,{children:[d?a("style",{nonce:c||void 0,dangerouslySetInnerHTML:{__html:window._hankoStyle.innerHTML}}):null,ee]}):null})})})},es={en:te(6).en};var Ii=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,e||[])).next())})};const Ye={},jt=(o,e)=>{var t;const n=(t=document.getElementsByTagName(`hanko-${o}`).item(0))===null||t===void 0?void 0:t.nonce;return a(Xr,Object.assign({componentName:o,globalOptions:Ye,createWebauthnAbortSignal:rs},e,{nonce:n}))},ts=o=>jt("auth",o),ns=o=>jt("login",o),os=o=>jt("registration",o),is=o=>jt("profile",o),as=o=>jt("events",o);let Sn=new AbortController;const rs=()=>(Sn&&Sn.abort(),Sn=new AbortController,Sn.signal),Ft=o=>Ii(void 0,[o],void 0,function*({tagName:e,entryComponent:t,shadow:n=!0,observedAttributes:i}){customElements.get(e)||function(r,s,c,u){function l(){var d=Reflect.construct(HTMLElement,[],l);return d._vdomComponent=r,d._root=u&&u.shadow?d.attachShadow({mode:"open"}):d,d}(l.prototype=Object.create(HTMLElement.prototype)).constructor=l,l.prototype.connectedCallback=Aa,l.prototype.attributeChangedCallback=Ca,l.prototype.disconnectedCallback=xa,c=c||r.observedAttributes||Object.keys(r.propTypes||{}),l.observedAttributes=c,c.forEach(function(d){Object.defineProperty(l.prototype,d,{get:function(){var h,v,f,k;return(h=(v=this._vdom)==null||(f=v.props)==null?void 0:f[d])!=null?h:(k=this._props)==null?void 0:k[d]},set:function(h){this._vdom?this.attributeChangedCallback(d,null,h):(this._props||(this._props={}),this._props[d]=h,this.connectedCallback());var v=typeof h;h!=null&&v!=="string"&&v!=="boolean"&&v!=="number"||this.setAttribute(d,h)}})}),customElements.define(s||r.tagName||r.displayName||r.name,l)}(t,e,i,{shadow:n})}),Ti=(o,...e)=>Ii(void 0,[o,...e],void 0,function*(t,n={}){const i=["api","lang","prefilled-email","entry","mode"];return n=Object.assign({shadow:!0,injectStyles:!0,enablePasskeys:!0,hidePasskeyButtonOnLogin:!1,translations:null,translationsLocation:"/i18n",fallbackLanguage:"en",storageKey:"hanko",sessionCheckInterval:3e4},n),Ye.hanko=new di(t,{cookieName:n.storageKey,cookieDomain:n.cookieDomain,cookieSameSite:n.cookieSameSite,localStorageKey:n.storageKey,sessionCheckInterval:n.sessionCheckInterval,sessionTokenLocation:n.sessionTokenLocation}),Ye.injectStyles=n.injectStyles,Ye.enablePasskeys=n.enablePasskeys,Ye.hidePasskeyButtonOnLogin=n.hidePasskeyButtonOnLogin,Ye.translations=n.translations||es,Ye.translationsLocation=n.translationsLocation,Ye.fallbackLanguage=n.fallbackLanguage,Ye.storageKey=n.storageKey,yield Promise.all([Ft(Object.assign(Object.assign({},n),{tagName:"hanko-auth",entryComponent:ts,observedAttributes:i})),Ft(Object.assign(Object.assign({},n),{tagName:"hanko-login",entryComponent:ns,observedAttributes:i})),Ft(Object.assign(Object.assign({},n),{tagName:"hanko-registration",entryComponent:os,observedAttributes:i})),Ft(Object.assign(Object.assign({},n),{tagName:"hanko-profile",entryComponent:is,observedAttributes:i.filter(r=>["api","lang"].includes(r))})),Ft(Object.assign(Object.assign({},n),{tagName:"hanko-events",entryComponent:as,observedAttributes:[]}))]),{hanko:Ye.hanko}}),ss=Object.freeze(Object.defineProperty({__proto__:null,Action:Pt,Client:Bn,CustomEventWithDetail:Jo,Hanko:di,HankoError:st,HttpClient:Vn,Relay:Go,RequestTimeoutError:tn,SessionClient:Zn,State:He,TechnicalError:je,UnauthorizedError:ft,UserClient:li,WebauthnSupport:gt,clearStoredCodeVerifier:tt,generateCodeVerifier:on,getStoredCodeVerifier:ai,register:Ti,sessionCreatedType:qn,sessionExpiredType:jn,setStoredCodeVerifier:an,userDeletedType:Kn,userLoggedOutType:Fn},Symbol.toStringTag,{value:"Module"})),cs=Bi`
43
+ */const ya=fa(class extends ga{constructor(){super(...arguments),this.key=Ce}render(o,e){return this.key=o,e}update(o,[e,t]){return e!==this.key&&(_a(o),this.key=e),t}});/*! For license information please see elements.js.LICENSE.txt */var ba={7(o,e,t){(function(n,i,r){function s(k,E){return[k,!k||k.endsWith("/")?"":"/",E,".json"].join("")}function c(k,E){let O=k;return E&&Object.keys(E).forEach(M=>{const z=E[M],F=new RegExp(`{${M}}`,"gm");O=O.replace(F,z.toString())}),O}function u(k,E,O){let M=k[E];if(!M)return O;const z=O.split(".");let F="";do{F+=z.shift();const V=M[F];V===void 0||typeof V!="object"&&z.length?z.length?F+=".":M=O:(M=V,F="")}while(z.length);return M}var l=Object.defineProperty,d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,f=(k,E,O)=>E in k?l(k,E,{enumerable:!0,configurable:!0,writable:!0,value:O}):k[E]=O,w=(k,E,O)=>new Promise((M,z)=>{var F=N=>{try{ee(O.next(N))}catch(ge){z(ge)}},V=N=>{try{ee(O.throw(N))}catch(ge){z(ge)}},ee=N=>N.done?M(N.value):Promise.resolve(N.value).then(F,V);ee((O=O.apply(k,E)).next())});let A={};const C={root:"",lang:"en",fallbackLang:"en"};function $(k,E){k=Object.assign({},C,k),A=E||A;const[O,M]=r.useState(k.lang),[z,F]=r.useState(A),[V,ee]=r.useState(!1),N=r.useCallback(_e=>w(null,null,function*(){if(!z[_e]){ee(!1);try{const ue=s(k.root,_e),de=yield fetch(ue);A[_e]=yield de.json()}catch(ue){console.error(`Failed to load language data for ${_e}:`,ue)}finally{F(((ue,de)=>{for(var re in de||(de={}))h.call(de,re)&&f(ue,re,de[re]);if(d)for(var re of d(de))v.call(de,re)&&f(ue,re,de[re]);return ue})({},A)),ee(!0)}}}),[z,k.root]);r.useEffect(()=>{w(null,null,function*(){yield N(k.fallbackLang),yield N(O)})},[O,N,k.fallbackLang]);const ge=r.useMemo(()=>(_e,ue)=>{if(!Object.prototype.hasOwnProperty.call(z,O))return _e;let de=u(z,O,_e);return de===_e&&O!==k.fallbackLang&&(de=u(z,k.fallbackLang,_e)),c(de,ue)},[z,O,k.fallbackLang]);return{lang:O,setLang:M,t:ge,isReady:V}}const K=i.createContext(null);n.TranslateContext=K,n.TranslateProvider=k=>{const{t:E,setLang:O,lang:M,isReady:z}=$({root:k.root||"assets",lang:k.lang||"en",fallbackLang:k.fallbackLang||"en"},k.translations);return i.h(K.Provider,{value:{t:E,setLang:O,lang:M,isReady:z}},k.children)},n.format=c,n.getResourceUrl=s,n.getValue=u,Object.defineProperty(n,"__esModule",{value:!0})})(e,t(616),t(78))},616(o,e,t){t.r(e),t.d(e,{Component:()=>ee,Fragment:()=>V,cloneElement:()=>qe,createContext:()=>ho,createElement:()=>M,createRef:()=>F,h:()=>M,hydrate:()=>Wt,isValidElement:()=>s,options:()=>i,render:()=>dt,toChildArray:()=>Me});var n,i,r,s,c,u,l,d,h,v,f,w,A,C={},$=[],K=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,k=Array.isArray;function E(m,p){for(var _ in p)m[_]=p[_];return m}function O(m){m&&m.parentNode&&m.parentNode.removeChild(m)}function M(m,p,_){var P,T,y,L={};for(y in p)y=="key"?P=p[y]:y=="ref"?T=p[y]:L[y]=p[y];if(arguments.length>2&&(L.children=arguments.length>3?n.call(arguments,2):_),typeof m=="function"&&m.defaultProps!=null)for(y in m.defaultProps)L[y]===void 0&&(L[y]=m.defaultProps[y]);return z(m,L,P,T,null)}function z(m,p,_,P,T){var y={type:m,props:p,key:_,ref:P,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:T??++r,__i:-1,__u:0};return T==null&&i.vnode!=null&&i.vnode(y),y}function F(){return{current:null}}function V(m){return m.children}function ee(m,p){this.props=m,this.context=p}function N(m,p){if(p==null)return m.__?N(m.__,m.__i+1):null;for(var _;p<m.__k.length;p++)if((_=m.__k[p])!=null&&_.__e!=null)return _.__e;return typeof m.type=="function"?N(m):null}function ge(m){var p,_;if((m=m.__)!=null&&m.__c!=null){for(m.__e=m.__c.base=null,p=0;p<m.__k.length;p++)if((_=m.__k[p])!=null&&_.__e!=null){m.__e=m.__c.base=_.__e;break}return ge(m)}}function _e(m){(!m.__d&&(m.__d=!0)&&c.push(m)&&!ue.__r++||u!=i.debounceRendering)&&((u=i.debounceRendering)||l)(ue)}function ue(){for(var m,p,_,P,T,y,L,j=1;c.length;)c.length>j&&c.sort(d),m=c.shift(),j=c.length,m.__d&&(_=void 0,P=void 0,T=(P=(p=m).__v).__e,y=[],L=[],p.__P&&((_=E({},P)).__v=P.__v+1,i.vnode&&i.vnode(_),D(p.__P,_,P,p.__n,p.__P.namespaceURI,32&P.__u?[T]:null,y,T??N(P),!!(32&P.__u),L),_.__v=P.__v,_.__.__k[_.__i]=_,q(y,_,L),P.__e=P.__=null,_.__e!=T&&ge(_)));ue.__r=0}function de(m,p,_,P,T,y,L,j,pe,R,ie){var S,be,B,Te,Ke,Ue,ve,me=P&&P.__k||$,nt=p.length;for(pe=re(_,p,me,pe,nt),S=0;S<nt;S++)(B=_.__k[S])!=null&&(be=B.__i==-1?C:me[B.__i]||C,B.__i=S,Ue=D(m,B,be,T,y,L,j,pe,R,ie),Te=B.__e,B.ref&&be.ref!=B.ref&&(be.ref&&se(be.ref,null,B),ie.push(B.ref,B.__c||Te,B)),Ke==null&&Te!=null&&(Ke=Te),(ve=!!(4&B.__u))||be.__k===B.__k?pe=ye(B,pe,m,ve):typeof B.type=="function"&&Ue!==void 0?pe=Ue:Te&&(pe=Te.nextSibling),B.__u&=-7);return _.__e=Ke,pe}function re(m,p,_,P,T){var y,L,j,pe,R,ie=_.length,S=ie,be=0;for(m.__k=new Array(T),y=0;y<T;y++)(L=p[y])!=null&&typeof L!="boolean"&&typeof L!="function"?(typeof L=="string"||typeof L=="number"||typeof L=="bigint"||L.constructor==String?L=m.__k[y]=z(null,L,null,null,null):k(L)?L=m.__k[y]=z(V,{children:L},null,null,null):L.constructor===void 0&&L.__b>0?L=m.__k[y]=z(L.type,L.props,L.key,L.ref?L.ref:null,L.__v):m.__k[y]=L,pe=y+be,L.__=m,L.__b=m.__b+1,j=null,(R=L.__i=ct(L,_,pe,S))!=-1&&(S--,(j=_[R])&&(j.__u|=2)),j==null||j.__v==null?(R==-1&&(T>ie?be--:T<ie&&be++),typeof L.type!="function"&&(L.__u|=4)):R!=pe&&(R==pe-1?be--:R==pe+1?be++:(R>pe?be--:be++,L.__u|=4))):m.__k[y]=null;if(S)for(y=0;y<ie;y++)(j=_[y])!=null&&!(2&j.__u)&&(j.__e==P&&(P=N(j)),Ie(j,j));return P}function ye(m,p,_,P){var T,y;if(typeof m.type=="function"){for(T=m.__k,y=0;T&&y<T.length;y++)T[y]&&(T[y].__=m,p=ye(T[y],p,_,P));return p}m.__e!=p&&(P&&(p&&m.type&&!p.parentNode&&(p=N(m)),_.insertBefore(m.__e,p||null)),p=m.__e);do p=p&&p.nextSibling;while(p!=null&&p.nodeType==8);return p}function Me(m,p){return p=p||[],m==null||typeof m=="boolean"||(k(m)?m.some(function(_){Me(_,p)}):p.push(m)),p}function ct(m,p,_,P){var T,y,L,j=m.key,pe=m.type,R=p[_],ie=R!=null&&!(2&R.__u);if(R===null&&j==null||ie&&j==R.key&&pe==R.type)return _;if(P>(ie?1:0)){for(T=_-1,y=_+1;T>=0||y<p.length;)if((R=p[L=T>=0?T--:y++])!=null&&!(2&R.__u)&&j==R.key&&pe==R.type)return L}return-1}function lt(m,p,_){p[0]=="-"?m.setProperty(p,_??""):m[p]=_==null?"":typeof _!="number"||K.test(p)?_:_+"px"}function x(m,p,_,P,T){var y,L;e:if(p=="style")if(typeof _=="string")m.style.cssText=_;else{if(typeof P=="string"&&(m.style.cssText=P=""),P)for(p in P)_&&p in _||lt(m.style,p,"");if(_)for(p in _)P&&_[p]==P[p]||lt(m.style,p,_[p])}else if(p[0]=="o"&&p[1]=="n")y=p!=(p=p.replace(h,"$1")),L=p.toLowerCase(),p=L in m||p=="onFocusOut"||p=="onFocusIn"?L.slice(2):p.slice(2),m.l||(m.l={}),m.l[p+y]=_,_?P?_.u=P.u:(_.u=v,m.addEventListener(p,y?w:f,y)):m.removeEventListener(p,y?w:f,y);else{if(T=="http://www.w3.org/2000/svg")p=p.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(p!="width"&&p!="height"&&p!="href"&&p!="list"&&p!="form"&&p!="tabIndex"&&p!="download"&&p!="rowSpan"&&p!="colSpan"&&p!="role"&&p!="popover"&&p in m)try{m[p]=_??"";break e}catch{}typeof _=="function"||(_==null||_===!1&&p[4]!="-"?m.removeAttribute(p):m.setAttribute(p,p=="popover"&&_==1?"":_))}}function I(m){return function(p){if(this.l){var _=this.l[p.type+m];if(p.t==null)p.t=v++;else if(p.t<_.u)return;return _(i.event?i.event(p):p)}}}function D(m,p,_,P,T,y,L,j,pe,R){var ie,S,be,B,Te,Ke,Ue,ve,me,nt,ut,Pn,Vt,Fi,En,Bt,po,Ge=p.type;if(p.constructor!==void 0)return null;128&_.__u&&(pe=!!(32&_.__u),y=[j=p.__e=_.__e]),(ie=i.__b)&&ie(p);e:if(typeof Ge=="function")try{if(ve=p.props,me="prototype"in Ge&&Ge.prototype.render,nt=(ie=Ge.contextType)&&P[ie.__c],ut=ie?nt?nt.props.value:ie.__:P,_.__c?Ue=(S=p.__c=_.__c).__=S.__E:(me?p.__c=S=new Ge(ve,ut):(p.__c=S=new ee(ve,ut),S.constructor=Ge,S.render=Qe),nt&&nt.sub(S),S.state||(S.state={}),S.__n=P,be=S.__d=!0,S.__h=[],S._sb=[]),me&&S.__s==null&&(S.__s=S.state),me&&Ge.getDerivedStateFromProps!=null&&(S.__s==S.state&&(S.__s=E({},S.__s)),E(S.__s,Ge.getDerivedStateFromProps(ve,S.__s))),B=S.props,Te=S.state,S.__v=p,be)me&&Ge.getDerivedStateFromProps==null&&S.componentWillMount!=null&&S.componentWillMount(),me&&S.componentDidMount!=null&&S.__h.push(S.componentDidMount);else{if(me&&Ge.getDerivedStateFromProps==null&&ve!==B&&S.componentWillReceiveProps!=null&&S.componentWillReceiveProps(ve,ut),p.__v==_.__v||!S.__e&&S.shouldComponentUpdate!=null&&S.shouldComponentUpdate(ve,S.__s,ut)===!1){for(p.__v!=_.__v&&(S.props=ve,S.state=S.__s,S.__d=!1),p.__e=_.__e,p.__k=_.__k,p.__k.some(function(bt){bt&&(bt.__=p)}),Pn=0;Pn<S._sb.length;Pn++)S.__h.push(S._sb[Pn]);S._sb=[],S.__h.length&&L.push(S);break e}S.componentWillUpdate!=null&&S.componentWillUpdate(ve,S.__s,ut),me&&S.componentDidUpdate!=null&&S.__h.push(function(){S.componentDidUpdate(B,Te,Ke)})}if(S.context=ut,S.props=ve,S.__P=m,S.__e=!1,Vt=i.__r,Fi=0,me){for(S.state=S.__s,S.__d=!1,Vt&&Vt(p),ie=S.render(S.props,S.state,S.context),En=0;En<S._sb.length;En++)S.__h.push(S._sb[En]);S._sb=[]}else do S.__d=!1,Vt&&Vt(p),ie=S.render(S.props,S.state,S.context),S.state=S.__s;while(S.__d&&++Fi<25);S.state=S.__s,S.getChildContext!=null&&(P=E(E({},P),S.getChildContext())),me&&!be&&S.getSnapshotBeforeUpdate!=null&&(Ke=S.getSnapshotBeforeUpdate(B,Te)),Bt=ie,ie!=null&&ie.type===V&&ie.key==null&&(Bt=H(ie.props.children)),j=de(m,k(Bt)?Bt:[Bt],p,_,P,T,y,L,j,pe,R),S.base=p.__e,p.__u&=-161,S.__h.length&&L.push(S),Ue&&(S.__E=S.__=null)}catch(bt){if(p.__v=null,pe||y!=null)if(bt.then){for(p.__u|=pe?160:128;j&&j.nodeType==8&&j.nextSibling;)j=j.nextSibling;y[y.indexOf(j)]=null,p.__e=j}else{for(po=y.length;po--;)O(y[po]);J(p)}else p.__e=_.__e,p.__k=_.__k,bt.then||J(p);i.__e(bt,p,_)}else y==null&&p.__v==_.__v?(p.__k=_.__k,p.__e=_.__e):j=p.__e=Ee(_.__e,p,_,P,T,y,L,pe,R);return(ie=i.diffed)&&ie(p),128&p.__u?void 0:j}function J(m){m&&m.__c&&(m.__c.__e=!0),m&&m.__k&&m.__k.forEach(J)}function q(m,p,_){for(var P=0;P<_.length;P++)se(_[P],_[++P],_[++P]);i.__c&&i.__c(p,m),m.some(function(T){try{m=T.__h,T.__h=[],m.some(function(y){y.call(T)})}catch(y){i.__e(y,T.__v)}})}function H(m){return typeof m!="object"||m==null||m.__b&&m.__b>0?m:k(m)?m.map(H):E({},m)}function Ee(m,p,_,P,T,y,L,j,pe){var R,ie,S,be,B,Te,Ke,Ue=_.props||C,ve=p.props,me=p.type;if(me=="svg"?T="http://www.w3.org/2000/svg":me=="math"?T="http://www.w3.org/1998/Math/MathML":T||(T="http://www.w3.org/1999/xhtml"),y!=null){for(R=0;R<y.length;R++)if((B=y[R])&&"setAttribute"in B==!!me&&(me?B.localName==me:B.nodeType==3)){m=B,y[R]=null;break}}if(m==null){if(me==null)return document.createTextNode(ve);m=document.createElementNS(T,me,ve.is&&ve),j&&(i.__m&&i.__m(p,y),j=!1),y=null}if(me==null)Ue===ve||j&&m.data==ve||(m.data=ve);else{if(y=y&&n.call(m.childNodes),!j&&y!=null)for(Ue={},R=0;R<m.attributes.length;R++)Ue[(B=m.attributes[R]).name]=B.value;for(R in Ue)if(B=Ue[R],R!="children"){if(R=="dangerouslySetInnerHTML")S=B;else if(!(R in ve)){if(R=="value"&&"defaultValue"in ve||R=="checked"&&"defaultChecked"in ve)continue;x(m,R,null,B,T)}}for(R in ve)B=ve[R],R=="children"?be=B:R=="dangerouslySetInnerHTML"?ie=B:R=="value"?Te=B:R=="checked"?Ke=B:j&&typeof B!="function"||Ue[R]===B||x(m,R,B,Ue[R],T);if(ie)j||S&&(ie.__html==S.__html||ie.__html==m.innerHTML)||(m.innerHTML=ie.__html),p.__k=[];else if(S&&(m.innerHTML=""),de(p.type=="template"?m.content:m,k(be)?be:[be],p,_,P,me=="foreignObject"?"http://www.w3.org/1999/xhtml":T,y,L,y?y[0]:_.__k&&N(_,0),j,pe),y!=null)for(R=y.length;R--;)O(y[R]);j||(R="value",me=="progress"&&Te==null?m.removeAttribute("value"):Te!=null&&(Te!==m[R]||me=="progress"&&!Te||me=="option"&&Te!=Ue[R])&&x(m,R,Te,Ue[R],T),R="checked",Ke!=null&&Ke!=m[R]&&x(m,R,Ke,Ue[R],T))}return m}function se(m,p,_){try{if(typeof m=="function"){var P=typeof m.__u=="function";P&&m.__u(),P&&p==null||(m.__u=m(p))}else m.current=p}catch(T){i.__e(T,_)}}function Ie(m,p,_){var P,T;if(i.unmount&&i.unmount(m),(P=m.ref)&&(P.current&&P.current!=m.__e||se(P,null,p)),(P=m.__c)!=null){if(P.componentWillUnmount)try{P.componentWillUnmount()}catch(y){i.__e(y,p)}P.base=P.__P=null}if(P=m.__k)for(T=0;T<P.length;T++)P[T]&&Ie(P[T],p,_||typeof m.type!="function");_||O(m.__e),m.__c=m.__=m.__e=void 0}function Qe(m,p,_){return this.constructor(m,_)}function dt(m,p,_){var P,T,y,L;p==document&&(p=document.documentElement),i.__&&i.__(m,p),T=(P=typeof _=="function")?null:_&&_.__k||p.__k,y=[],L=[],D(p,m=(!P&&_||p).__k=M(V,null,[m]),T||C,C,p.namespaceURI,!P&&_?[_]:T?null:p.firstChild?n.call(p.childNodes):null,y,!P&&_?_:T?T.__e:p.firstChild,P,L),q(y,m,L)}function Wt(m,p){dt(m,p,Wt)}function qe(m,p,_){var P,T,y,L,j=E({},m.props);for(y in m.type&&m.type.defaultProps&&(L=m.type.defaultProps),p)y=="key"?P=p[y]:y=="ref"?T=p[y]:j[y]=p[y]===void 0&&L!=null?L[y]:p[y];return arguments.length>2&&(j.children=arguments.length>3?n.call(arguments,2):_),z(m.type,j,P||m.key,T||m.ref,null)}function ho(m){function p(_){var P,T;return this.getChildContext||(P=new Set,(T={})[p.__c]=this,this.getChildContext=function(){return T},this.componentWillUnmount=function(){P=null},this.shouldComponentUpdate=function(y){this.props.value!=y.value&&P.forEach(function(L){L.__e=!0,_e(L)})},this.sub=function(y){P.add(y);var L=y.componentWillUnmount;y.componentWillUnmount=function(){P&&P.delete(y),L&&L.call(y)}}),_.children}return p.__c="__cC"+A++,p.__=m,p.Provider=p.__l=(p.Consumer=function(_,P){return _.children(P)}).contextType=p,p}n=$.slice,i={__e:function(m,p,_,P){for(var T,y,L;p=p.__;)if((T=p.__c)&&!T.__)try{if((y=T.constructor)&&y.getDerivedStateFromError!=null&&(T.setState(y.getDerivedStateFromError(m)),L=T.__d),T.componentDidCatch!=null&&(T.componentDidCatch(m,P||{}),L=T.__d),L)return T.__E=T}catch(j){m=j}throw m}},r=0,s=function(m){return m!=null&&m.constructor===void 0},ee.prototype.setState=function(m,p){var _;_=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=E({},this.state),typeof m=="function"&&(m=m(E({},_),this.props)),m&&E(_,m),m!=null&&this.__v&&(p&&this._sb.push(p),_e(this))},ee.prototype.forceUpdate=function(m){this.__v&&(this.__e=!0,m&&this.__h.push(m),_e(this))},ee.prototype.render=V,c=[],l=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=function(m,p){return m.__v.__b-p.__v.__b},ue.__r=0,h=/(PointerCapture)$|Capture$/i,v=0,f=I(!1),w=I(!0),A=0},78(o,e,t){t.r(e),t.d(e,{useCallback:()=>V,useContext:()=>ee,useDebugValue:()=>N,useEffect:()=>E,useErrorBoundary:()=>ge,useId:()=>_e,useImperativeHandle:()=>z,useLayoutEffect:()=>O,useMemo:()=>F,useReducer:()=>k,useRef:()=>M,useState:()=>K});var n,i,r,s,c=t(616),u=0,l=[],d=c.options,h=d.__b,v=d.__r,f=d.diffed,w=d.__c,A=d.unmount,C=d.__;function $(x,I){d.__h&&d.__h(i,x,u||I),u=0;var D=i.__H||(i.__H={__:[],__h:[]});return x>=D.__.length&&D.__.push({}),D.__[x]}function K(x){return u=1,k(lt,x)}function k(x,I,D){var J=$(n++,2);if(J.t=x,!J.__c&&(J.__=[D?D(I):lt(void 0,I),function(se){var Ie=J.__N?J.__N[0]:J.__[0],Qe=J.t(Ie,se);Ie!==Qe&&(J.__N=[Qe,J.__[1]],J.__c.setState({}))}],J.__c=i,!i.__f)){var q=function(se,Ie,Qe){if(!J.__c.__H)return!0;var dt=J.__c.__H.__.filter(function(qe){return!!qe.__c});if(dt.every(function(qe){return!qe.__N}))return!H||H.call(this,se,Ie,Qe);var Wt=J.__c.props!==se;return dt.forEach(function(qe){if(qe.__N){var ho=qe.__[0];qe.__=qe.__N,qe.__N=void 0,ho!==qe.__[0]&&(Wt=!0)}}),H&&H.call(this,se,Ie,Qe)||Wt};i.__f=!0;var H=i.shouldComponentUpdate,Ee=i.componentWillUpdate;i.componentWillUpdate=function(se,Ie,Qe){if(this.__e){var dt=H;H=void 0,q(se,Ie,Qe),H=dt}Ee&&Ee.call(this,se,Ie,Qe)},i.shouldComponentUpdate=q}return J.__N||J.__}function E(x,I){var D=$(n++,3);!d.__s&&ct(D.__H,I)&&(D.__=x,D.u=I,i.__H.__h.push(D))}function O(x,I){var D=$(n++,4);!d.__s&&ct(D.__H,I)&&(D.__=x,D.u=I,i.__h.push(D))}function M(x){return u=5,F(function(){return{current:x}},[])}function z(x,I,D){u=6,O(function(){if(typeof x=="function"){var J=x(I());return function(){x(null),J&&typeof J=="function"&&J()}}if(x)return x.current=I(),function(){return x.current=null}},D==null?D:D.concat(x))}function F(x,I){var D=$(n++,7);return ct(D.__H,I)&&(D.__=x(),D.__H=I,D.__h=x),D.__}function V(x,I){return u=8,F(function(){return x},I)}function ee(x){var I=i.context[x.__c],D=$(n++,9);return D.c=x,I?(D.__==null&&(D.__=!0,I.sub(i)),I.props.value):x.__}function N(x,I){d.useDebugValue&&d.useDebugValue(I?I(x):x)}function ge(x){var I=$(n++,10),D=K();return I.__=x,i.componentDidCatch||(i.componentDidCatch=function(J,q){I.__&&I.__(J,q),D[1](J)}),[D[0],function(){D[1](void 0)}]}function _e(){var x=$(n++,11);if(!x.__){for(var I=i.__v;I!==null&&!I.__m&&I.__!==null;)I=I.__;var D=I.__m||(I.__m=[0,0]);x.__="P"+D[0]+"-"+D[1]++}return x.__}function ue(){for(var x;x=l.shift();)if(x.__P&&x.__H)try{x.__H.__h.forEach(ye),x.__H.__h.forEach(Me),x.__H.__h=[]}catch(I){x.__H.__h=[],d.__e(I,x.__v)}}d.__b=function(x){i=null,h&&h(x)},d.__=function(x,I){x&&I.__k&&I.__k.__m&&(x.__m=I.__k.__m),C&&C(x,I)},d.__r=function(x){v&&v(x),n=0;var I=(i=x.__c).__H;I&&(r===i?(I.__h=[],i.__h=[],I.__.forEach(function(D){D.__N&&(D.__=D.__N),D.u=D.__N=void 0})):(I.__h.forEach(ye),I.__h.forEach(Me),I.__h=[],n=0)),r=i},d.diffed=function(x){f&&f(x);var I=x.__c;I&&I.__H&&(I.__H.__h.length&&(l.push(I)!==1&&s===d.requestAnimationFrame||((s=d.requestAnimationFrame)||re)(ue)),I.__H.__.forEach(function(D){D.u&&(D.__H=D.u),D.u=void 0})),r=i=null},d.__c=function(x,I){I.some(function(D){try{D.__h.forEach(ye),D.__h=D.__h.filter(function(J){return!J.__||Me(J)})}catch(J){I.some(function(q){q.__h&&(q.__h=[])}),I=[],d.__e(J,D.__v)}}),w&&w(x,I)},d.unmount=function(x){A&&A(x);var I,D=x.__c;D&&D.__H&&(D.__H.__.forEach(function(J){try{ye(J)}catch(q){I=q}}),D.__H=void 0,I&&d.__e(I,D.__v))};var de=typeof requestAnimationFrame=="function";function re(x){var I,D=function(){clearTimeout(J),de&&cancelAnimationFrame(I),setTimeout(x)},J=setTimeout(D,35);de&&(I=requestAnimationFrame(D))}function ye(x){var I=i,D=x.__c;typeof D=="function"&&(x.__c=void 0,D()),i=I}function Me(x){var I=i;x.__c=x.__(),i=I}function ct(x,I){return!x||x.length!==I.length||I.some(function(D,J){return D!==x[J]})}function lt(x,I){return typeof I=="function"?I(x):I}},292(o){var e=[];function t(r){for(var s=-1,c=0;c<e.length;c++)if(e[c].identifier===r){s=c;break}return s}function n(r,s){for(var c={},u=[],l=0;l<r.length;l++){var d=r[l],h=s.base?d[0]+s.base:d[0],v=c[h]||0,f="".concat(h," ").concat(v);c[h]=v+1;var w=t(f),A={css:d[1],media:d[2],sourceMap:d[3],supports:d[4],layer:d[5]};if(w!==-1)e[w].references++,e[w].updater(A);else{var C=i(A,s);s.byIndex=l,e.splice(l,0,{identifier:f,updater:C,references:1})}u.push(f)}return u}function i(r,s){var c=s.domAPI(s);return c.update(r),function(u){if(u){if(u.css===r.css&&u.media===r.media&&u.sourceMap===r.sourceMap&&u.supports===r.supports&&u.layer===r.layer)return;c.update(r=u)}else c.remove()}}o.exports=function(r,s){var c=n(r=r||[],s=s||{});return function(u){u=u||[];for(var l=0;l<c.length;l++){var d=t(c[l]);e[d].references--}for(var h=n(u,s),v=0;v<c.length;v++){var f=t(c[v]);e[f].references===0&&(e[f].updater(),e.splice(f,1))}c=h}}},88(o){o.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},884(o,e,t){o.exports=function(n){var i=t.nc;i&&n.setAttribute("nonce",i)}},360(o){var e,t=(e=[],function(r,s){return e[r]=s,e.filter(Boolean).join(`
44
+ `)});function n(r,s,c,u){var l;if(c)l="";else{l="",u.supports&&(l+="@supports (".concat(u.supports,") {")),u.media&&(l+="@media ".concat(u.media," {"));var d=u.layer!==void 0;d&&(l+="@layer".concat(u.layer.length>0?" ".concat(u.layer):""," {")),l+=u.css,d&&(l+="}"),u.media&&(l+="}"),u.supports&&(l+="}")}if(r.styleSheet)r.styleSheet.cssText=t(s,l);else{var h=document.createTextNode(l),v=r.childNodes;v[s]&&r.removeChild(v[s]),v.length?r.insertBefore(h,v[s]):r.appendChild(h)}}var i={singleton:null,singletonCounter:0};o.exports=function(r){if(typeof document>"u")return{update:function(){},remove:function(){}};var s=i.singletonCounter++,c=i.singleton||(i.singleton=r.insertStyleElement(r));return{update:function(u){n(c,s,!1,u)},remove:function(u){n(c,s,!0,u)}}}},6(o,e,t){t.d(e,{en:()=>n});const n={headlines:{error:"An error has occurred",loginEmail:"Sign in or create account",loginEmailNoSignup:"Sign in",loginFinished:"Login successful",loginPasscode:"Enter passcode",loginPassword:"Enter password",registerAuthenticator:"Create a passkey",registerConfirm:"Create account?",registerPassword:"Set new password",otpSetUp:"Set up authenticator app",profileEmails:"Emails",profilePassword:"Password",profilePasskeys:"Passkeys",isPrimaryEmail:"Primary email address",setPrimaryEmail:"Set primary email address",createEmail:"Enter a new email",createUsername:"Enter a new username",emailVerified:"Verified",emailUnverified:"Unverified",emailDelete:"Delete",renamePasskey:"Rename passkey",deletePasskey:"Delete passkey",lastUsedAt:"Last used at",createdAt:"Created at",connectedAccounts:"Connected accounts",deleteAccount:"Delete account",accountNotFound:"Account not found",signIn:"Sign in",signUp:"Create account",selectLoginMethod:"Select login method",setupLoginMethod:"Set up login method",lastUsed:"Last seen",ipAddress:"IP address",revokeSession:"Revoke session",profileSessions:"Sessions",mfaSetUp:"Set up MFA",securityKeySetUp:"Add security key",securityKeyLogin:"Security key",otpLogin:"Authentication code",renameSecurityKey:"Rename security key",deleteSecurityKey:"Delete security key",securityKeys:"Security keys",authenticatorApp:"Authenticator app",authenticatorAppAlreadySetUp:"Authenticator app is set up",authenticatorAppNotSetUp:"Set up authenticator app",trustDevice:"Trust this browser?",deleteIdentity:"Delete connection"},texts:{enterPasscode:"Enter the passcode sent to your email address.",enterPasscodeNoEmail:"Enter the passcode that was sent to your primary email address.",setupPasskey:"Sign in to your account easily and securely with a passkey. Note: Your biometric data is only stored on your devices and will never be shared with anyone.",createAccount:'No account exists for "{emailAddress}". Do you want to create a new account?',otpEnterVerificationCode:"Enter the one-time password (OTP) obtained from your authenticator app below:",otpScanQRCode:"Scan the QR code using your authenticator app (such as Google Authenticator or any other TOTP app). Alternatively, you can manually enter the OTP secret key into the app.",otpSecretKey:"OTP secret key",passwordFormatHint:"Must be between {minLength} and {maxLength} characters long.",securityKeySetUp:"Use a dedicated security key via USB, Bluetooth, or NFC, or your mobile phone. Connect or activate your security key, then click the button below and follow the prompts to complete the registration.",setPrimaryEmail:"Set this email address to be used for contacting you.",isPrimaryEmail:"This email address will be used to contact you if necessary.",emailVerified:"This email address has been verified.",emailUnverified:"This email address has not been verified.",emailDelete:"If you delete this email address, it can no longer be used to sign in.",renamePasskey:"Set a name for the passkey.",deletePasskey:"Delete this passkey from your account.",deleteAccount:"Are you sure you want to delete this account? All data will be deleted immediately and cannot be recovered.",noAccountExists:'No account exists for "{emailAddress}".',selectLoginMethodForFutureLogins:"Select one of the following login methods to use for future logins.",howDoYouWantToLogin:"How do you want to login?",mfaSetUp:"Protect your account with Multi-Factor Authentication (MFA). MFA adds an additional step to your login process, ensuring that even if your password or email account is compromised, your account stays secure.",securityKeyLogin:"Connect or activate your security key, then click the button below. Once ready, use it via USB, NFC, your mobile phone. Follow the prompts to complete the login process.",otpLogin:"Open your authenticator app to obtain the one-time password (OTP). Enter the code in the field below to complete your login.",renameSecurityKey:"Set a name for the security key.",deleteSecurityKey:"Delete this security key from your account.",authenticatorAppAlreadySetUp:"Your account is secured with an authenticator app that generates time-based one-time passwords (TOTP) for multi-factor authentication.",authenticatorAppNotSetUp:"Secure your account with an authenticator app that generates time-based one-time passwords (TOTP) for multi-factor authentication.",trustDevice:"If you trust this browser, you won’t need to enter your OTP (One-Time-Password) or use your security key for multi-factor authentication (MFA) the next time you log in."},labels:{or:"or",no:"no",yes:"yes",email:"Email",continue:"Continue",copied:"copied",skip:"Skip",save:"Save",password:"Password",passkey:"Passkey",passcode:"Passcode",signInPassword:"Sign in with a password",signInPasscode:"Sign in with a passcode",forgotYourPassword:"Forgot your password?",back:"Back",signInPasskey:"Sign in with a passkey",registerAuthenticator:"Create a passkey",signIn:"Sign in",signUp:"Create account",sendNewPasscode:"Send new code",passwordRetryAfter:"Retry in {passwordRetryAfter}",passcodeResendAfter:"Request a new code in {passcodeResendAfter}",unverifiedEmail:"unverified",primaryEmail:"primary",setAsPrimaryEmail:"Set as primary",verify:"Verify",delete:"Delete",newEmailAddress:"New email address",newPassword:"New password",rename:"Rename",newPasskeyName:"New passkey name",addEmail:"Add email",createPasskey:"Create a passkey",webauthnUnsupported:"Passkeys are not supported by your browser",signInWith:"Continue with {provider}",deleteAccount:"Yes, delete this account.",emailOrUsername:"Email or username",username:"Username",optional:"optional",dontHaveAnAccount:"Don't have an account?",alreadyHaveAnAccount:"Already have an account?",changeUsername:"Change username",setUsername:"Set username",changePassword:"Change password",setPassword:"Set password",revoke:"Revoke",currentSession:"Current session",authenticatorApp:"Authenticator app",securityKey:"Security key",securityKeyUse:"Use security key",newSecurityKeyName:"New security key name",createSecurityKey:"Add a security key",authenticatorAppManage:"Manage authenticator app",authenticatorAppAdd:"Set up",configured:"configured",useAnotherMethod:"Use another method",lastUsed:"Last used",trustDevice:"Trust this browser",staySignedIn:"Stay signed in",connectAccount:"Connect account"},errors:{somethingWentWrong:"A technical error has occurred. Please try again later.",requestTimeout:"The request timed out.",invalidPassword:"Wrong email or password.",invalidPasscode:"The passcode provided was not correct.",passcodeAttemptsReached:"The passcode was entered incorrectly too many times. Please request a new code.",tooManyRequests:"Too many requests have been made. Please wait to repeat the requested operation.",unauthorized:"Your session has expired. Please log in again.",invalidWebauthnCredential:"This passkey cannot be used anymore.",passcodeExpired:"The passcode has expired. Please request a new one.",userVerification:"User verification required. Please ensure your authenticator device is protected with a PIN or biometric.",emailAddressAlreadyExistsError:"The email address already exists.",maxNumOfEmailAddressesReached:"No further email addresses can be added.",thirdPartyAccessDenied:"Access denied. The request was cancelled by the user or the provider has denied access for other reasons.",thirdPartyMultipleAccounts:"Cannot identify account. The email address is used by multiple accounts.",thirdPartyUnverifiedEmail:"Email verification required. Please verify the used email address with your provider.",signupDisabled:"Account registration is disabled.",handlerNotFoundError:"The current step in your process is not supported by this application version. Please try again later or contact support if the issue persists."},flowErrors:{technical_error:"A technical error has occurred. Please try again later.",flow_expired_error:"The session has expired, please click the button to restart.",value_invalid_error:"The entered value is invalid.",passcode_invalid:"The passcode provided was not correct.",passkey_invalid:"This passkey cannot be used anymore.",passcode_max_attempts_reached:"The passcode was entered incorrectly too many times. Please request a new code.",rate_limit_exceeded:"Too many requests have been made. Please wait to repeat the requested operation.",unknown_username_error:"The username is unknown.",unknown_email_error:"The email address is unknown.",username_already_exists:"The username is already taken.",invalid_username_error:"The username must contain only letters, numbers, and underscores.",email_already_exists:"The email is already taken.",not_found:"The requested resource was not found.",operation_not_permitted_error:"The operation is not permitted.",flow_discontinuity_error:"The process cannot be continued due to user settings or the provider's configuration.",form_data_invalid_error:"The submitted form data contains errors.",unauthorized:"Your session has expired. Please log in again.",value_missing_error:"The value is missing.",value_too_long_error:"Value is too long.",value_too_short_error:"The value is too short.",webauthn_credential_invalid_mfa_only:"This credential can be used as a second factor security key only.",webauthn_credential_already_exists:"The request either timed out, was canceled or the device is already registered. Please try again or try using another device.",platform_authenticator_required:"Your account is configured to use platform authenticators, but your current device or browser does not support this feature. Please try again with a compatible device or browser.",third_party_access_denied:"Access denied. The request was cancelled by the user or the provider has denied access for other reasons."}}},597(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,'.hanko_accordion{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);width:100%;overflow:hidden}.hanko_accordion .hanko_accordionItem{color:var(--color, #333333);margin:.25rem 0;overflow:hidden}.hanko_accordion .hanko_accordionItem.hanko_dropdown{margin:0}.hanko_accordion .hanko_accordionItem .hanko_label{border-radius:var(--border-radius, 8px);border-style:none;height:var(--item-height, 42px);background:var(--background-color, white);box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;padding:0 1rem;margin:0;cursor:pointer;transition:all .35s}.hanko_accordion .hanko_accordionItem .hanko_label .hanko_labelText{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hanko_accordion .hanko_accordionItem .hanko_label .hanko_labelText .hanko_description{color:var(--color-shade-1, #8f9095)}.hanko_accordion .hanko_accordionItem .hanko_label.hanko_dropdown{margin:0;color:var(--link-color, #506cf0);justify-content:flex-start}.hanko_accordion .hanko_accordionItem .hanko_label:hover{color:var(--brand-contrast-color, white);background:var(--brand-color-shade-1, #6b84fb)}.hanko_accordion .hanko_accordionItem .hanko_label:hover .hanko_description{color:var(--brand-contrast-color, white)}.hanko_accordion .hanko_accordionItem .hanko_label:hover.hanko_dropdown{color:var(--link-color, #506cf0);background:none}.hanko_accordion .hanko_accordionItem .hanko_label:not(.hanko_dropdown)::after{content:"❯";width:1rem;text-align:center;transition:all .35s}.hanko_accordion .hanko_accordionItem .hanko_accordionInput{position:absolute;opacity:0;z-index:-1}.hanko_accordion .hanko_accordionItem .hanko_accordionInput:checked+.hanko_label{color:var(--brand-contrast-color, white);background:var(--brand-color, #506cf0)}.hanko_accordion .hanko_accordionItem .hanko_accordionInput:checked+.hanko_label .hanko_description{color:var(--brand-contrast-color, white)}.hanko_accordion .hanko_accordionItem .hanko_accordionInput:checked+.hanko_label.hanko_dropdown{color:var(--link-color, #506cf0);background:none}.hanko_accordion .hanko_accordionItem .hanko_accordionInput:checked+.hanko_label:not(.hanko_dropdown)::after{transform:rotate(90deg)}.hanko_accordion .hanko_accordionItem .hanko_accordionInput:checked+.hanko_label~.hanko_accordionContent{margin:.25rem 1rem;opacity:1;max-height:100vh}.hanko_accordion .hanko_accordionItem .hanko_accordionContent{max-height:0;margin:0 1rem;opacity:0;overflow:hidden;transition:all .35s}.hanko_accordion .hanko_accordionItem .hanko_accordionContent.hanko_dropdownContent{border-style:none}',""]),s.locals={accordion:"hanko_accordion",accordionItem:"hanko_accordionItem",dropdown:"hanko_dropdown",label:"hanko_label",labelText:"hanko_labelText",description:"hanko_description",accordionInput:"hanko_accordionInput",accordionContent:"hanko_accordionContent",dropdownContent:"hanko_dropdownContent"};const c=s},217(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_errorBox{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);border-radius:var(--border-radius, 8px);border-style:var(--border-style, solid);border-width:var(--border-width, 1px);color:var(--error-color, #e82020);background:var(--background-color, white);margin:var(--item-margin, 0.5rem 0);display:flex;align-items:start;box-sizing:border-box;line-height:1.5rem;padding:.25em;gap:.2em}.hanko_errorBox>span{display:inline-flex}.hanko_errorBox>span:first-child{padding:.25em 0 .25em .19em}.hanko_errorBox[hidden]{display:none}.hanko_errorMessage{color:var(--error-color, #e82020)}",""]),s.locals={errorBox:"hanko_errorBox",errorMessage:"hanko_errorMessage"};const c=s},681(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,'.hanko_form{display:flex;flex-grow:1}.hanko_form .hanko_ul{flex-grow:1;margin:var(--item-margin, 0.5rem 0);padding-inline-start:0;list-style-type:none;display:flex;flex-wrap:wrap;gap:1em}.hanko_form .hanko_li{display:flex;max-width:100%;flex-grow:1;flex-basis:min-content}.hanko_form .hanko_li.hanko_maxWidth{min-width:100%}.hanko_button{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);border-radius:var(--border-radius, 8px);border-style:var(--border-style, solid);border-width:var(--border-width, 1px);white-space:nowrap;width:100%;min-width:var(--button-min-width, 7em);min-height:var(--item-height, 42px);outline:none;cursor:pointer;transition:.1s ease-out;flex-grow:1;flex-shrink:1;display:inline-flex;position:relative}.hanko_button[data-bubble]:before{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);border-radius:var(--border-radius, 8px);border-style:var(--border-style, solid);border-width:var(--border-width, 1px);padding:2px 8px;font-size:9px;line-height:normal;content:attr(data-bubble);display:block;position:absolute;bottom:80%;left:80%;white-space:nowrap;width:max-content;text-align:center;background-color:inherit;color:var(--brand-color-shade-1, #6b84fb);border-color:var(--brand-color-shade-1, #6b84fb)}.hanko_button:disabled{cursor:default}.hanko_button.hanko_primary{color:var(--brand-contrast-color, white);background:var(--brand-color, #506cf0);border-color:var(--brand-color, #506cf0);justify-content:center}.hanko_button.hanko_primary:hover{color:var(--brand-contrast-color, white);background:var(--brand-color-shade-1, #6b84fb);border-color:var(--brand-color, #506cf0)}.hanko_button.hanko_primary:focus{color:var(--brand-contrast-color, white);background:var(--brand-color, #506cf0);border-color:var(--color, #333333)}.hanko_button.hanko_primary:disabled{color:var(--color-shade-1, #8f9095);background:var(--color-shade-2, #e5e6ef);border-color:var(--color-shade-2, #e5e6ef)}.hanko_button.hanko_secondary{color:var(--color, #333333);background:var(--background-color, white);border-color:var(--color-shade-1, #8f9095);justify-content:center}.hanko_button.hanko_secondary:hover{color:var(--color, #333333);background:var(--color-shade-2, #e5e6ef);border-color:var(--color, #333333)}.hanko_button.hanko_secondary:focus{color:var(--color, #333333);background:var(--background-color, white);border-color:var(--brand-color, #506cf0)}.hanko_button.hanko_secondary:disabled{color:var(--color-shade-1, #8f9095);background:var(--color-shade-2, #e5e6ef);border-color:var(--color-shade-1, #8f9095)}.hanko_button.hanko_dangerous{color:var(--error-color, #e82020);background:var(--background-color, white);border-color:var(--error-color, #e82020);flex-grow:0;width:auto}.hanko_caption{flex-wrap:wrap;display:flex;justify-content:space-between;align-items:baseline}.hanko_inputWrapper{flex-grow:1;position:relative;display:flex;min-width:var(--input-min-width, 14em);max-width:100%}.hanko_input{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);border-radius:var(--border-radius, 8px);border-style:var(--border-style, solid);border-width:var(--border-width, 1px);height:var(--item-height, 42px);color:var(--color, #333333);border-color:var(--color-shade-1, #8f9095);background:var(--background-color, white)}.hanko_input.hanko_error{border-color:var(--error-color, #e82020)}.hanko_input{padding:0 .5rem;outline:none;width:100%;box-sizing:border-box;transition:.1s ease-out}.hanko_input:-webkit-autofill,.hanko_input:-webkit-autofill:hover,.hanko_input:-webkit-autofill:focus{-webkit-text-fill-color:var(--color, #333333);-webkit-box-shadow:0 0 0 50px var(--background-color, white) inset}.hanko_input::-ms-reveal,.hanko_input::-ms-clear{display:none}.hanko_input::placeholder{color:var(--color-shade-1, #8f9095)}.hanko_input:focus{color:var(--color, #333333);border-color:var(--color, #333333)}.hanko_input:disabled{color:var(--color-shade-1, #8f9095);background:var(--color-shade-2, #e5e6ef);border-color:var(--color-shade-1, #8f9095)}.hanko_passcodeInputWrapper{flex-grow:1;min-width:var(--input-min-width, 14em);max-width:fit-content;position:relative;display:flex;justify-content:space-between}.hanko_passcodeInputWrapper .hanko_passcodeDigitWrapper{flex-grow:1;margin:0 .5rem 0 0}.hanko_passcodeInputWrapper .hanko_passcodeDigitWrapper:last-child{margin:0}.hanko_passcodeInputWrapper .hanko_passcodeDigitWrapper .hanko_input{text-align:center}.hanko_checkboxWrapper{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);color:var(--color, #333333);align-items:center;display:flex}.hanko_checkboxWrapper .hanko_label{color:inherit;padding-left:.5rem;cursor:pointer}.hanko_checkboxWrapper .hanko_label.hanko_disabled{cursor:default;color:var(--color-shade-1, #8f9095)}.hanko_checkboxWrapper .hanko_checkbox{border:currentColor solid 1px;border-radius:.15em;appearance:none;-webkit-appearance:none;width:1.1rem;height:1.1rem;margin:0;color:currentColor;background-color:var(--background-color, white);font:inherit;box-shadow:none;display:inline-flex;place-content:center;cursor:pointer}.hanko_checkboxWrapper .hanko_checkbox:checked{background-color:var(--color, #333333)}.hanko_checkboxWrapper .hanko_checkbox:disabled{cursor:default;background-color:var(--color-shade-2, #e5e6ef);border-color:var(--color-shade-1, #8f9095)}.hanko_checkboxWrapper .hanko_checkbox:checked:after{content:"✓";color:var(--background-color, white);position:absolute;line-height:1.1rem}.hanko_checkboxWrapper .hanko_checkbox:disabled:after{color:var(--color-shade-1, #8f9095)}',""]),s.locals={form:"hanko_form",ul:"hanko_ul",li:"hanko_li",maxWidth:"hanko_maxWidth",button:"hanko_button",primary:"hanko_primary",secondary:"hanko_secondary",dangerous:"hanko_dangerous",caption:"hanko_caption",inputWrapper:"hanko_inputWrapper",input:"hanko_input",error:"hanko_error",passcodeInputWrapper:"hanko_passcodeInputWrapper",passcodeDigitWrapper:"hanko_passcodeDigitWrapper",checkboxWrapper:"hanko_checkboxWrapper",label:"hanko_label",disabled:"hanko_disabled",checkbox:"hanko_checkbox"};const c=s},547(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_headline{color:var(--color, #333333);font-family:var(--font-family, sans-serif);text-align:left;letter-spacing:0;font-style:normal;line-height:1.1}.hanko_headline.hanko_grade1{font-size:var(--headline1-font-size, 24px);font-weight:var(--headline1-font-weight, 600);margin:var(--headline1-margin, 0 0 0.5rem)}.hanko_headline.hanko_grade2{font-size:var(--headline2-font-size, 16px);font-weight:var(--headline2-font-weight, 600);margin:var(--headline2-margin, 1rem 0 0.5rem)}",""]),s.locals={headline:"hanko_headline",grade1:"hanko_grade1",grade2:"hanko_grade2"};const c=s},313(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_icon,.hanko_loadingSpinnerWrapper .hanko_loadingSpinner,.hanko_loadingSpinnerWrapperIcon .hanko_loadingSpinner,.hanko_exclamationMark,.hanko_checkmark{display:inline-block;fill:var(--brand-contrast-color, white);width:18px}.hanko_icon.hanko_secondary,.hanko_loadingSpinnerWrapper .hanko_secondary.hanko_loadingSpinner,.hanko_loadingSpinnerWrapperIcon .hanko_secondary.hanko_loadingSpinner,.hanko_secondary.hanko_exclamationMark,.hanko_secondary.hanko_checkmark{fill:var(--color, #333333)}.hanko_icon.hanko_disabled,.hanko_loadingSpinnerWrapper .hanko_disabled.hanko_loadingSpinner,.hanko_loadingSpinnerWrapperIcon .hanko_disabled.hanko_loadingSpinner,.hanko_disabled.hanko_exclamationMark,.hanko_disabled.hanko_checkmark{fill:var(--color-shade-1, #8f9095)}.hanko_checkmark{fill:var(--brand-color, #506cf0)}.hanko_checkmark.hanko_secondary{fill:var(--color-shade-1, #8f9095)}.hanko_checkmark.hanko_fadeOut{animation:hanko_fadeOut ease-out 1.5s forwards !important}@keyframes hanko_fadeOut{0%{opacity:1}100%{opacity:0}}.hanko_exclamationMark{fill:var(--error-color, #e82020)}.hanko_loadingSpinnerWrapperIcon{width:100%;column-gap:10px;margin-left:10px}.hanko_loadingSpinnerWrapper,.hanko_loadingSpinnerWrapperIcon{display:inline-flex;align-items:center;height:100%;margin:0 5px;justify-content:inherit;flex-wrap:inherit}.hanko_loadingSpinnerWrapper.hanko_centerContent,.hanko_centerContent.hanko_loadingSpinnerWrapperIcon{justify-content:center}.hanko_loadingSpinnerWrapper.hanko_maxWidth,.hanko_maxWidth.hanko_loadingSpinnerWrapperIcon{width:100%}.hanko_loadingSpinnerWrapper .hanko_loadingSpinner,.hanko_loadingSpinnerWrapperIcon .hanko_loadingSpinner{fill:var(--brand-color, #506cf0);animation:hanko_spin 500ms ease-in-out infinite}.hanko_loadingSpinnerWrapper.hanko_secondary,.hanko_secondary.hanko_loadingSpinnerWrapperIcon{fill:var(--color-shade-1, #8f9095)}@keyframes hanko_spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.hanko_googleIcon.hanko_disabled{fill:var(--color-shade-1, #8f9095)}.hanko_googleIcon.hanko_blue{fill:#4285f4}.hanko_googleIcon.hanko_green{fill:#34a853}.hanko_googleIcon.hanko_yellow{fill:#fbbc05}.hanko_googleIcon.hanko_red{fill:#ea4335}.hanko_microsoftIcon.hanko_disabled{fill:var(--color-shade-1, #8f9095)}.hanko_microsoftIcon.hanko_blue{fill:#00a4ef}.hanko_microsoftIcon.hanko_green{fill:#7fba00}.hanko_microsoftIcon.hanko_yellow{fill:#ffb900}.hanko_microsoftIcon.hanko_red{fill:#f25022}.hanko_facebookIcon.hanko_outline{fill:#0866ff}.hanko_facebookIcon.hanko_disabledOutline{fill:var(--color-shade-1, #8f9095)}.hanko_facebookIcon.hanko_letter{fill:#fff}.hanko_facebookIcon.hanko_disabledLetter{fill:var(--color-shade-2, #e5e6ef)}",""]),s.locals={icon:"hanko_icon",loadingSpinnerWrapper:"hanko_loadingSpinnerWrapper",loadingSpinner:"hanko_loadingSpinner",loadingSpinnerWrapperIcon:"hanko_loadingSpinnerWrapperIcon",exclamationMark:"hanko_exclamationMark",checkmark:"hanko_checkmark",secondary:"hanko_secondary",disabled:"hanko_disabled",fadeOut:"hanko_fadeOut",centerContent:"hanko_centerContent",maxWidth:"hanko_maxWidth",spin:"hanko_spin",googleIcon:"hanko_googleIcon",blue:"hanko_blue",green:"hanko_green",yellow:"hanko_yellow",red:"hanko_red",microsoftIcon:"hanko_microsoftIcon",facebookIcon:"hanko_facebookIcon",outline:"hanko_outline",disabledOutline:"hanko_disabledOutline",letter:"hanko_letter",disabledLetter:"hanko_disabledLetter"};const c=s},579(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_link{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);color:var(--link-color, #506cf0);text-decoration:var(--link-text-decoration, none);cursor:pointer;background:none !important;border:none;padding:0 !important;transition:all .1s}.hanko_link:hover{text-decoration:var(--link-text-decoration-hover, underline)}.hanko_link:disabled{color:var(--color, #333333) !important;pointer-events:none;cursor:default}.hanko_link.hanko_danger{color:var(--error-color, #e82020)}.hanko_linkWrapper{display:inline-flex;flex-direction:row;justify-content:space-between;align-items:center;overflow:hidden}.hanko_linkWrapper.hanko_reverse{flex-direction:row-reverse}",""]),s.locals={link:"hanko_link",danger:"hanko_danger",linkWrapper:"hanko_linkWrapper",reverse:"hanko_reverse"};const c=s},8(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_otpCreationDetails{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);color:var(--color, #333333);margin:var(--item-margin, 0.5rem 0);display:flex;justify-content:center;align-items:center;flex-direction:column;font-size:smaller}",""]),s.locals={otpCreationDetails:"hanko_otpCreationDetails"};const c=s},193(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_paragraph{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);color:var(--color, #333333);margin:var(--item-margin, 0.5rem 0);text-align:left;word-break:break-word}.hanko_paragraph.hanko_center{align-items:center}.hanko_paragraph.hanko_column{display:flex;flex-direction:column;width:100%}",""]),s.locals={paragraph:"hanko_paragraph",center:"hanko_center",column:"hanko_column"};const c=s},751(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_spacer{height:1em}.hanko_divider{font-weight:var(--font-weight, 400);font-size:var(--font-size, 16px);font-family:var(--font-family, sans-serif);line-height:var(--line-height, 1.4rem);display:flex;visibility:var(--divider-visibility, visible);color:var(--color-shade-1, #8f9095);margin:var(--item-margin, 0.5rem 0);padding:.5em 0}.hanko_divider .hanko_line{border-bottom-style:var(--border-style, solid);border-bottom-width:var(--border-width, 1px);color:inherit;font:inherit;width:100%}.hanko_divider .hanko_text{font:inherit;color:inherit;background:var(--background-color, white);padding:var(--divider-padding, 0 42px);line-height:.1em}",""]),s.locals={spacer:"hanko_spacer",divider:"hanko_divider",line:"hanko_line",text:"hanko_text"};const c=s},890(o,e,t){t.d(e,{A:()=>c});var n=t(601),i=t.n(n),r=t(314),s=t.n(r)()(i());s.push([o.id,".hanko_container{background-color:var(--background-color, white);padding:var(--container-padding, 30px);max-width:var(--container-max-width, 410px);display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center;align-items:center;align-content:flex-start;box-sizing:border-box}.hanko_content{box-sizing:border-box;flex:0 1 auto;width:100%;height:100%}.hanko_footer{padding:.5rem 0 0;box-sizing:border-box;width:100%}.hanko_footer :nth-child(1){float:left}.hanko_footer :nth-child(2){float:right}.hanko_clipboardContainer{display:flex}.hanko_clipboardIcon{display:flex;margin:auto;cursor:pointer}",""]),s.locals={container:"hanko_container",content:"hanko_content",footer:"hanko_footer",clipboardContainer:"hanko_clipboardContainer",clipboardIcon:"hanko_clipboardIcon"};const c=s},314(o){o.exports=function(e){var t=[];return t.toString=function(){return this.map(function(n){var i="",r=n[5]!==void 0;return n[4]&&(i+="@supports (".concat(n[4],") {")),n[2]&&(i+="@media ".concat(n[2]," {")),r&&(i+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),i+=e(n),r&&(i+="}"),n[2]&&(i+="}"),n[4]&&(i+="}"),i}).join("")},t.i=function(n,i,r,s,c){typeof n=="string"&&(n=[[null,n,void 0]]);var u={};if(r)for(var l=0;l<this.length;l++){var d=this[l][0];d!=null&&(u[d]=!0)}for(var h=0;h<n.length;h++){var v=[].concat(n[h]);r&&u[v[0]]||(c!==void 0&&(v[5]===void 0||(v[1]="@layer".concat(v[5].length>0?" ".concat(v[5]):""," {").concat(v[1],"}")),v[5]=c),i&&(v[2]&&(v[1]="@media ".concat(v[2]," {").concat(v[1],"}")),v[2]=i),s&&(v[4]?(v[1]="@supports (".concat(v[4],") {").concat(v[1],"}"),v[4]=s):v[4]="".concat(s)),t.push(v))}},t}},601(o){o.exports=function(e){return e[1]}},452(o,e){var t;(function(){var n={}.hasOwnProperty;function i(){for(var c="",u=0;u<arguments.length;u++){var l=arguments[u];l&&(c=s(c,r(l)))}return c}function r(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var u="";for(var l in c)n.call(c,l)&&c[l]&&(u=s(u,l));return u}function s(c,u){return u?c?c+" "+u:c+u:c}o.exports?(i.default=i,o.exports=i):(t=(function(){return i}).apply(e,[]))===void 0||(o.exports=t)})()}},Io={};function te(o){var e=Io[o];if(e!==void 0)return e.exports;var t=Io[o]={id:o,exports:{}};return ba[o].call(t.exports,t,t.exports,te),t.exports}te.n=o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return te.d(e,{a:e}),e},te.d=(o,e)=>{for(var t in e)te.o(e,t)&&!te.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},te.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),te.r=o=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},te.nc=void 0;var zn={};te.r(zn),te.d(zn,{apple:()=>or,checkmark:()=>ir,copy:()=>ar,customProvider:()=>rr,discord:()=>sr,exclamation:()=>cr,facebook:()=>lr,github:()=>dr,google:()=>ur,linkedin:()=>hr,mail:()=>pr,microsoft:()=>mr,passkey:()=>fr,password:()=>gr,qrCodeScanner:()=>vr,securityKey:()=>_r,spinner:()=>yr});var b=te(616),ka=0;function a(o,e,t,n,i,r){e||(e={});var s,c,u=e;if("ref"in u)for(c in u={},e)c=="ref"?s=e[c]:u[c]=e[c];var l={type:o,props:u,key:t,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ka,__i:-1,__u:0,__source:i,__self:r};if(typeof o=="function"&&(s=o.defaultProps))for(c in s)u[c]===void 0&&(u[c]=s[c]);return b.options.vnode&&b.options.vnode(l),l}function Gt(){return Gt=Object.assign?Object.assign.bind():function(o){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(o[n]=t[n])}return o},Gt.apply(this,arguments)}var wa=["context","children"];function Sa(o){this.getChildContext=function(){return o.context};var e=o.children,t=function(n,i){if(n==null)return{};var r,s,c={},u=Object.keys(n);for(s=0;s<u.length;s++)i.indexOf(r=u[s])>=0||(c[r]=n[r]);return c}(o,wa);return(0,b.cloneElement)(e,t)}function Aa(){var o=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(o),this._vdom=(0,b.h)(Sa,Gt({},this._props,{context:o.detail.context}),$o(this,this._vdomComponent)),(this.hasAttribute("hydrate")?b.hydrate:b.render)(this._vdom,this._root)}function To(o){return o.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""})}function Ca(o,e,t){if(this._vdom){var n={};n[o]=t=t??void 0,n[To(o)]=t,this._vdom=(0,b.cloneElement)(this._vdom,n),(0,b.render)(this._vdom,this._root)}}function xa(){(0,b.render)(this._vdom=null,this._root)}function Uo(o,e){var t=this;return(0,b.h)("slot",Gt({},o,{ref:function(n){n?(t.ref=n,t._listener||(t._listener=function(i){i.stopPropagation(),i.detail.context=e},n.addEventListener("_preact",t._listener))):t.ref.removeEventListener("_preact",t._listener)}}))}function $o(o,e){if(o.nodeType===3)return o.data;if(o.nodeType!==1)return null;var t=[],n={},i=0,r=o.attributes,s=o.childNodes;for(i=r.length;i--;)r[i].name!=="slot"&&(n[r[i].name]=r[i].value,n[To(r[i].name)]=r[i].value);for(i=s.length;i--;){var c=$o(s[i],null),u=s[i].slot;u?n[u]=(0,b.h)(Uo,{name:u},c):t[i]=c}var l=e?(0,b.h)(Uo,null,t):t;return(0,b.h)(e||o.nodeName.toLowerCase(),n,l)}var Z=te(7),g=te(78);function Do(o,e){for(var t in e)o[t]=e[t];return o}function Lo(o,e){for(var t in o)if(t!=="__source"&&!(t in e))return!0;for(var n in e)if(n!=="__source"&&o[n]!==e[n])return!0;return!1}g.useLayoutEffect;function No(o,e){this.props=o,this.context=e}(No.prototype=new b.Component).isPureReactComponent=!0,No.prototype.shouldComponentUpdate=function(o,e){return Lo(this.props,o)||Lo(this.state,e)};var Mo=b.options.__b;b.options.__b=function(o){o.type&&o.type.__f&&o.ref&&(o.props.ref=o.ref,o.ref=null),Mo&&Mo(o)};var Pa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Ea=(b.toChildArray,b.options.__e);b.options.__e=function(o,e,t,n){if(o.then){for(var i,r=e;r=r.__;)if((i=r.__c)&&i.__c)return e.__e==null&&(e.__e=t.__e,e.__k=t.__k),i.__c(o,e)}Ea(o,e,t,n)};var Ro=b.options.unmount;function zo(o,e,t){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),o.__c.__H=null),(o=Do({},o)).__c!=null&&(o.__c.__P===t&&(o.__c.__P=e),o.__c.__e=!0,o.__c=null),o.__k=o.__k&&o.__k.map(function(n){return zo(n,e,t)})),o}function Ho(o,e,t){return o&&t&&(o.__v=null,o.__k=o.__k&&o.__k.map(function(n){return Ho(n,e,t)}),o.__c&&o.__c.__P===e&&(o.__e&&t.appendChild(o.__e),o.__c.__e=!0,o.__c.__P=t)),o}function Hn(){this.__u=0,this.o=null,this.__b=null}function qo(o){var e=o.__.__c;return e&&e.__a&&e.__a(o)}function Xt(){this.i=null,this.l=null}b.options.unmount=function(o){var e=o.__c;e&&e.__R&&e.__R(),e&&32&o.__u&&(o.type=null),Ro&&Ro(o)},(Hn.prototype=new b.Component).__c=function(o,e){var t=e.__c,n=this;n.o==null&&(n.o=[]),n.o.push(t);var i=qo(n.__v),r=!1,s=function(){r||(r=!0,t.__R=null,i?i(c):c())};t.__R=s;var c=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=Ho(u,u.__c.__P,u.__c.__O)}var l;for(n.setState({__a:n.__b=null});l=n.o.pop();)l.forceUpdate()}};n.__u++||32&e.__u||n.setState({__a:n.__b=n.__v.__k[0]}),o.then(s,s)},Hn.prototype.componentWillUnmount=function(){this.o=[]},Hn.prototype.render=function(o,e){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=zo(this.__b,t,n.__O=n.__P)}this.__b=null}var i=e.__a&&(0,b.createElement)(b.Fragment,null,o.fallback);return i&&(i.__u&=-33),[(0,b.createElement)(b.Fragment,null,e.__a?null:o.children),i]};var jo=function(o,e,t){if(++t[1]===t[0]&&o.l.delete(e),o.props.revealOrder&&(o.props.revealOrder[0]!=="t"||!o.l.size))for(t=o.i;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;o.i=t=t[2]}};(Xt.prototype=new b.Component).__a=function(o){var e=this,t=qo(e.__v),n=e.l.get(o);return n[0]++,function(i){var r=function(){e.props.revealOrder?(n.push(i),jo(e,o,n)):i()};t?t(r):r()}},Xt.prototype.render=function(o){this.i=null,this.l=new Map;var e=(0,b.toChildArray)(o.children);o.revealOrder&&o.revealOrder[0]==="b"&&e.reverse();for(var t=e.length;t--;)this.l.set(e[t],this.i=[1,0,this.i]);return o.children},Xt.prototype.componentDidUpdate=Xt.prototype.componentDidMount=function(){var o=this;this.l.forEach(function(e,t){jo(o,t,e)})};var Oa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ia=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ta=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ua=/[A-Z0-9]/g,$a=typeof document<"u",Da=function(o){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(o)};b.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(o){Object.defineProperty(b.Component.prototype,o,{configurable:!0,get:function(){return this["UNSAFE_"+o]},set:function(e){Object.defineProperty(this,o,{configurable:!0,writable:!0,value:e})}})});var Fo=b.options.event;function La(){}function Na(){return this.cancelBubble}function Ma(){return this.defaultPrevented}b.options.event=function(o){return Fo&&(o=Fo(o)),o.persist=La,o.isPropagationStopped=Na,o.isDefaultPrevented=Ma,o.nativeEvent=o};var Ra={enumerable:!1,configurable:!0,get:function(){return this.class}},Ko=b.options.vnode;b.options.vnode=function(o){typeof o.type=="string"&&function(e){var t=e.props,n=e.type,i={},r=n.indexOf("-")===-1;for(var s in t){var c=t[s];if(!(s==="value"&&"defaultValue"in t&&c==null||$a&&s==="children"&&n==="noscript"||s==="class"||s==="className")){var u=s.toLowerCase();s==="defaultValue"&&"value"in t&&t.value==null?s="value":s==="download"&&c===!0?c="":u==="translate"&&c==="no"?c=!1:u[0]==="o"&&u[1]==="n"?u==="ondoubleclick"?s="ondblclick":u!=="onchange"||n!=="input"&&n!=="textarea"||Da(t.type)?u==="onfocus"?s="onfocusin":u==="onblur"?s="onfocusout":Ta.test(s)&&(s=u):u=s="oninput":r&&Ia.test(s)?s=s.replace(Ua,"-$&").toLowerCase():c===null&&(c=void 0),u==="oninput"&&i[s=u]&&(s="oninputCapture"),i[s]=c}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=(0,b.toChildArray)(t.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=(0,b.toChildArray)(t.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),t.class&&!t.className?(i.class=t.class,Object.defineProperty(i,"className",Ra)):(t.className&&!t.class||t.class&&t.className)&&(i.class=i.className=t.className),e.props=i}(o),o.$$typeof=Oa,Ko&&Ko(o)};var Wo=b.options.__r;b.options.__r=function(o){Wo&&Wo(o),o.__c};var Vo=b.options.diffed;function ze(){return ze=Object.assign?Object.assign.bind():function(o){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(o[n]=t[n])}return o},ze.apply(null,arguments)}b.options.diffed=function(o){Vo&&Vo(o);var e=o.props,t=o.__e;t!=null&&o.type==="textarea"&&"value"in e&&e.value!==t.value&&(t.value=e.value==null?"":e.value)},g.useCallback,g.useContext,g.useDebugValue,g.useEffect,g.useId,g.useImperativeHandle,g.useLayoutEffect,g.useMemo,g.useReducer,g.useRef,g.useState,b.Fragment,g.useState,g.useId,g.useReducer,g.useEffect,g.useLayoutEffect,g.useRef,g.useImperativeHandle,g.useMemo,g.useCallback,g.useContext,g.useDebugValue,b.createElement,b.createContext,b.createRef,b.Fragment,b.Component;class za{static throttle(e,t,n={}){const{leading:i=!0,trailing:r=!0}=n;let s,c,u,l=0;const d=()=>{l=i===!1?0:Date.now(),u=null,e.apply(s,c)};return function(...h){const v=Date.now();l||i!==!1||(l=v);const f=t-(v-l);s=this,c=h,f<=0||f>t?(u&&(window.clearTimeout(u),u=null),l=v,e.apply(s,c)):u||r===!1||(u=window.setTimeout(d,f))}}}const qn="hanko-session-created",jn="hanko-session-expired",Fn="hanko-user-logged-out",Kn="hanko-user-deleted",Bo="hanko-after-state-change",Zo="hanko-before-state-change";class Jo extends CustomEvent{constructor(e,t){super(e,{detail:t})}}class en{constructor(){this.throttleLimit=1e3,this._addEventListener=document.addEventListener.bind(document),this._removeEventListener=document.removeEventListener.bind(document),this._throttle=za.throttle}wrapCallback(e,t){const n=i=>{e(i.detail)};return t?this._throttle(n,this.throttleLimit,{leading:!0,trailing:!1}):n}addEventListenerWithType({type:e,callback:t,once:n=!1,throttle:i=!1}){const r=this.wrapCallback(t,i);return this._addEventListener(e,r,{once:n}),()=>this._removeEventListener(e,r)}static mapAddEventListenerParams(e,{once:t,callback:n},i){return{type:e,callback:n,once:t,throttle:i}}addEventListener(e,t,n){return this.addEventListenerWithType(en.mapAddEventListenerParams(e,t,n))}onSessionCreated(e,t){return this.addEventListener(qn,{callback:e,once:t},!0)}onSessionExpired(e,t){return this.addEventListener(jn,{callback:e,once:t},!0)}onUserLoggedOut(e,t){return this.addEventListener(Fn,{callback:e,once:t})}onUserDeleted(e,t){return this.addEventListener(Kn,{callback:e,once:t})}onAfterStateChange(e,t){return this.addEventListener(Bo,{callback:e,once:t},!1)}onBeforeStateChange(e,t){return this.addEventListener(Zo,{callback:e,once:t},!1)}}class Yo{constructor(){this._dispatchEvent=document.dispatchEvent.bind(document)}dispatch(e,t){this._dispatchEvent(new Jo(e,t))}dispatchSessionCreatedEvent(e){this.dispatch(qn,e)}dispatchSessionExpiredEvent(){this.dispatch(jn,null)}dispatchUserLoggedOutEvent(){this.dispatch(Fn,null)}dispatchUserDeletedEvent(){this.dispatch(Kn,null)}dispatchAfterStateChangeEvent(e){this.dispatch(Bo,e)}dispatchBeforeStateChangeEvent(e){this.dispatch(Zo,e)}}class st extends Error{constructor(e,t,n){super(e),this.code=void 0,this.cause=void 0,this.code=t,this.cause=n,Object.setPrototypeOf(this,st.prototype)}}class je extends st{constructor(e){super("Technical error","somethingWentWrong",e),Object.setPrototypeOf(this,je.prototype)}}class tn extends st{constructor(e){super("Request timed out error","requestTimeout",e),Object.setPrototypeOf(this,tn.prototype)}}class ft extends st{constructor(e){super("Unauthorized error","unauthorized",e),Object.setPrototypeOf(this,ft.prototype)}}function nn(o){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)o[n]=t[n]}return o}var Wn=function o(e,t){function n(i,r,s){if(typeof document<"u"){typeof(s=nn({},t,s)).expires=="number"&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in s)s[u]&&(c+="; "+u,s[u]!==!0&&(c+="="+s[u].split(";")[0]));return document.cookie=i+"="+e.write(r,i)+c}}return Object.create({set:n,get:function(i){if(typeof document<"u"&&(!arguments.length||i)){for(var r=document.cookie?document.cookie.split("; "):[],s={},c=0;c<r.length;c++){var u=r[c].split("="),l=u.slice(1).join("=");try{var d=decodeURIComponent(u[0]);if(s[d]=e.read(l,d),i===d)break}catch{}}return i?s[i]:s}},remove:function(i,r){n(i,"",nn({},r,{expires:-1}))},withAttributes:function(i){return o(this.converter,nn({},this.attributes,i))},withConverter:function(i){return o(nn({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}({read:function(o){return o[0]==='"'&&(o=o.slice(1,-1)),o.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(o){return encodeURIComponent(o).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});class Qo{constructor(e){var t,n;this.authCookieName=void 0,this.authCookieDomain=void 0,this.authCookieSameSite=void 0,this.authCookieName=(t=e.cookieName)!=null?t:"hanko",this.authCookieDomain=e.cookieDomain,this.authCookieSameSite=(n=e.cookieSameSite)!=null?n:"lax"}getAuthCookie(){return Wn.get(this.authCookieName)}setAuthCookie(e,t){const n={secure:!0,sameSite:this.authCookieSameSite};this.authCookieDomain!==void 0&&(n.domain=this.authCookieDomain);const i=ze({},n,t);if((i.sameSite==="none"||i.sameSite==="None")&&i.secure===!1)throw new je(new Error("Secure attribute must be set when SameSite=None"));Wn.set(this.authCookieName,e,i)}removeAuthCookie(){Wn.remove(this.authCookieName)}}class Ha{constructor(e){this.keyName=void 0,this.keyName=e.keyName}getSessionToken(){return sessionStorage.getItem(this.keyName)}setSessionToken(e){sessionStorage.setItem(this.keyName,e)}removeSessionToken(){sessionStorage.removeItem(this.keyName)}}class qa{constructor(e){this._xhr=void 0,this._xhr=e}getResponseHeader(e){return this._xhr.getResponseHeader(e)}}class ja{constructor(e){this.headers=void 0,this.ok=void 0,this.status=void 0,this.statusText=void 0,this.url=void 0,this._decodedJSON=void 0,this.xhr=void 0,this.headers=new qa(e),this.ok=e.status>=200&&e.status<=299,this.status=e.status,this.statusText=e.statusText,this.url=e.responseURL,this.xhr=e}json(){return this._decodedJSON||(this._decodedJSON=JSON.parse(this.xhr.response)),this._decodedJSON}parseNumericHeader(e){const t=parseInt(this.headers.getResponseHeader(e),10);return isNaN(t)?0:t}}class Vn{constructor(e,t){var n;this.timeout=void 0,this.api=void 0,this.dispatcher=void 0,this.cookie=void 0,this.sessionTokenStorage=void 0,this.lang=void 0,this.sessionTokenLocation=void 0,this.api=e,this.timeout=(n=t.timeout)!=null?n:13e3,this.dispatcher=new Yo,this.cookie=new Qo(ze({},t)),this.sessionTokenStorage=new Ha({keyName:t.cookieName}),this.lang=t.lang,this.sessionTokenLocation=t.sessionTokenLocation}_fetch(e,t,n=new XMLHttpRequest){const i=this,r=this.api+e,s=this.timeout,c=this.getAuthToken(),u=this.lang;return new Promise(function(l,d){n.open(t.method,r,!0),n.setRequestHeader("Accept","application/json"),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("X-Language",u),c&&n.setRequestHeader("Authorization",`Bearer ${c}`),n.timeout=s,n.withCredentials=!0,n.onload=()=>{i.processHeaders(n),l(new ja(n))},n.onerror=()=>{d(new je)},n.ontimeout=()=>{d(new tn)},n.send(t.body?t.body.toString():null)})}processHeaders(e){let t="",n=0,i="";if(e.getAllResponseHeaders().split(`\r
45
+ `).forEach(r=>{const s=r.toLowerCase();s.startsWith("x-auth-token")?t=e.getResponseHeader("X-Auth-Token"):s.startsWith("x-session-lifetime")?n=parseInt(e.getResponseHeader("X-Session-Lifetime"),10):s.startsWith("x-session-retention")&&(i=e.getResponseHeader("X-Session-Retention"))}),t){const r=new RegExp("^https://"),s=!!this.api.match(r)&&!!window.location.href.match(r),c=i==="session"?void 0:new Date(new Date().getTime()+1e3*n);this.setAuthToken(t,{secure:s,expires:c})}}get(e){return this._fetch(e,{method:"GET"})}post(e,t){return this._fetch(e,{method:"POST",body:JSON.stringify(t)})}put(e,t){return this._fetch(e,{method:"PUT",body:JSON.stringify(t)})}patch(e,t){return this._fetch(e,{method:"PATCH",body:JSON.stringify(t)})}delete(e){return this._fetch(e,{method:"DELETE"})}getAuthToken(){let e="";switch(this.sessionTokenLocation){case"cookie":default:e=this.cookie.getAuthCookie();break;case"sessionStorage":e=this.sessionTokenStorage.getSessionToken()}return e}setAuthToken(e,t){switch(this.sessionTokenLocation){case"cookie":default:return this.cookie.setAuthCookie(e,t);case"sessionStorage":return this.sessionTokenStorage.setSessionToken(e)}}}class Bn{constructor(e,t){this.client=void 0,this.client=new Vn(e,t)}}class Zn extends Bn{async validate(){const e=await this.client.get("/sessions/validate");if(!e.ok)throw new je;return await e.json()}}class Fa{constructor(e){this.storageKey=void 0,this.defaultState={expiration:0,lastCheck:0},this.storageKey=e}load(){const e=window.localStorage.getItem(this.storageKey);return e==null?this.defaultState:JSON.parse(e)}save(e){window.localStorage.setItem(this.storageKey,JSON.stringify(e||this.defaultState))}}class Ka{constructor(e,t){this.onActivityCallback=void 0,this.onInactivityCallback=void 0,this.handleFocus=()=>{this.onActivityCallback()},this.handleBlur=()=>{this.onInactivityCallback()},this.handleVisibilityChange=()=>{document.visibilityState==="visible"?this.onActivityCallback():this.onInactivityCallback()},this.hasFocus=()=>document.hasFocus(),this.onActivityCallback=e,this.onInactivityCallback=t,window.addEventListener("focus",this.handleFocus),window.addEventListener("blur",this.handleBlur),document.addEventListener("visibilitychange",this.handleVisibilityChange)}}class Wa{constructor(e,t,n){this.intervalID=null,this.timeoutID=null,this.checkInterval=void 0,this.checkSession=void 0,this.onSessionExpired=void 0,this.checkInterval=e,this.checkSession=t,this.onSessionExpired=n}scheduleSessionExpiry(e){var t=this;this.stop(),this.timeoutID=setTimeout(async function(){t.stop(),t.onSessionExpired()},e)}start(e=0,t=0){var n=this;const i=this.calcTimeToNextCheck(e);this.sessionExpiresSoon(t)?this.scheduleSessionExpiry(i):this.timeoutID=setTimeout(async function(){try{let r=await n.checkSession();if(r.is_valid){if(n.sessionExpiresSoon(r.expiration))return void n.scheduleSessionExpiry(r.expiration-Date.now());n.intervalID=setInterval(async function(){r=await n.checkSession(),r.is_valid?n.sessionExpiresSoon(r.expiration)&&n.scheduleSessionExpiry(r.expiration-Date.now()):n.stop()},n.checkInterval)}else n.stop()}catch(r){console.log(r)}},i)}stop(){this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null),this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)}isRunning(){return this.timeoutID!==null||this.intervalID!==null}sessionExpiresSoon(e){return e>0&&e-Date.now()<=this.checkInterval}calcTimeToNextCheck(e){const t=Date.now()-e;return this.checkInterval>=t?this.checkInterval-t%this.checkInterval:0}}class Va{constructor(e="hanko_session",t,n,i){this.channel=void 0,this.onSessionExpired=void 0,this.onSessionCreated=void 0,this.onLeadershipRequested=void 0,this.handleMessage=r=>{const s=r.data;switch(s.action){case"sessionExpired":this.onSessionExpired(s);break;case"sessionCreated":this.onSessionCreated(s);break;case"requestLeadership":this.onLeadershipRequested(s)}},this.onSessionExpired=t,this.onSessionCreated=n,this.onLeadershipRequested=i,this.channel=new BroadcastChannel(e),this.channel.onmessage=this.handleMessage}post(e){this.channel.postMessage(e)}}class Go extends Yo{constructor(e,t){super(),this.listener=new en,this.checkInterval=3e4,this.client=void 0,this.sessionState=void 0,this.windowActivityManager=void 0,this.scheduler=void 0,this.sessionChannel=void 0,this.isLoggedIn=void 0,this.client=new Zn(e,t),t.sessionCheckInterval&&(this.checkInterval=t.sessionCheckInterval<3e3?3e3:t.sessionCheckInterval),this.sessionState=new Fa(`${t.cookieName}_session_state`),this.sessionChannel=new Va(this.getSessionCheckChannelName(t.sessionTokenLocation,t.sessionCheckChannelName),()=>this.onChannelSessionExpired(),r=>this.onChannelSessionCreated(r),()=>this.onChannelLeadershipRequested()),this.scheduler=new Wa(this.checkInterval,()=>this.checkSession(),()=>this.onSessionExpired()),this.windowActivityManager=new Ka(()=>this.startSessionCheck(),()=>this.scheduler.stop());const n=Date.now(),{expiration:i}=this.sessionState.load();this.isLoggedIn=n<i,this.initializeEventListeners(),this.startSessionCheck()}initializeEventListeners(){this.listener.onSessionCreated(e=>{const{claims:t}=e,n=Date.parse(t.expiration),i=Date.now();this.isLoggedIn=!0,this.sessionState.save({expiration:n,lastCheck:i}),this.sessionChannel.post({action:"sessionCreated",claims:t}),this.startSessionCheck()}),this.listener.onUserLoggedOut(()=>{this.isLoggedIn=!1,this.sessionChannel.post({action:"sessionExpired"}),this.sessionState.save(null),this.scheduler.stop()}),window.addEventListener("beforeunload",()=>this.scheduler.stop())}startSessionCheck(){if(!this.windowActivityManager.hasFocus()||(this.sessionChannel.post({action:"requestLeadership"}),this.scheduler.isRunning()))return;const{lastCheck:e,expiration:t}=this.sessionState.load();this.isLoggedIn&&this.scheduler.start(e,t)}async checkSession(){const e=Date.now(),{is_valid:t,claims:n,expiration_time:i}=await this.client.validate(),r=i?Date.parse(i):0;return!t&&this.isLoggedIn&&this.dispatchSessionExpiredEvent(),t?(this.isLoggedIn=!0,this.sessionState.save({lastCheck:e,expiration:r})):(this.isLoggedIn=!1,this.sessionState.save(null),this.sessionChannel.post({action:"sessionExpired"})),{is_valid:t,claims:n,expiration:r}}onSessionExpired(){this.isLoggedIn&&(this.isLoggedIn=!1,this.sessionState.save(null),this.sessionChannel.post({action:"sessionExpired"}),this.dispatchSessionExpiredEvent())}onChannelSessionExpired(){this.isLoggedIn&&(this.isLoggedIn=!1,this.dispatchSessionExpiredEvent())}onChannelSessionCreated(e){const{claims:t}=e,n=Date.now(),i=Date.parse(t.expiration)-n;this.isLoggedIn=!0,this.dispatchSessionCreatedEvent({claims:t,expirationSeconds:i})}onChannelLeadershipRequested(){this.windowActivityManager.hasFocus()||this.scheduler.stop()}getSessionCheckChannelName(e,t){if(e!=="sessionStorage")return t;let n=sessionStorage.getItem("sessionCheckChannelName");return n!=null&&n!==""||(n=`${t}-${Math.floor(100*Math.random())+1}`,sessionStorage.setItem("sessionCheckChannelName",n)),n}}class gt{static supported(){return!!(navigator.credentials&&navigator.credentials.create&&navigator.credentials.get&&window.PublicKeyCredential)}static async isPlatformAuthenticatorAvailable(){return!(!this.supported()||!window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable)&&window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()}static async isSecurityKeySupported(){return window.PublicKeyCredential!==void 0&&window.PublicKeyCredential.isExternalCTAP2SecurityKeySupported?window.PublicKeyCredential.isExternalCTAP2SecurityKeySupported():this.supported()}static async isConditionalMediationAvailable(){return!(!window.PublicKeyCredential||!window.PublicKeyCredential.isConditionalMediationAvailable)&&window.PublicKeyCredential.isConditionalMediationAvailable()}}function Xo(o){const e="==".slice(0,(4-o.length%4)%4),t=o.replace(/-/g,"+").replace(/_/g,"/")+e,n=atob(t),i=new ArrayBuffer(n.length),r=new Uint8Array(i);for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s);return i}function ei(o){const e=new Uint8Array(o);let t="";for(const n of e)t+=String.fromCharCode(n);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var ce="copy",Ne="convert";function vt(o,e,t){if(e===ce)return t;if(e===Ne)return o(t);if(e instanceof Array)return t.map(n=>vt(o,e[0],n));if(e instanceof Object){const n={};for(const[i,r]of Object.entries(e)){if(r.derive){const s=r.derive(t);s!==void 0&&(t[i]=s)}if(i in t)n[i]=t[i]!=null?vt(o,r.schema,t[i]):null;else if(r.required)throw new Error(`Missing key: ${i}`)}return n}}function Jn(o,e){return{required:!0,schema:o,derive:e}}function he(o){return{required:!0,schema:o}}function ke(o){return{required:!1,schema:o}}var ti={type:he(ce),id:he(Ne),transports:ke(ce)},ni={appid:ke(ce),appidExclude:ke(ce),credProps:ke(ce)},oi={appid:ke(ce),appidExclude:ke(ce),credProps:ke(ce)},Ba={publicKey:he({rp:he(ce),user:he({id:he(Ne),name:he(ce),displayName:he(ce)}),challenge:he(Ne),pubKeyCredParams:he(ce),timeout:ke(ce),excludeCredentials:ke([ti]),authenticatorSelection:ke(ce),attestation:ke(ce),extensions:ke(ni)}),signal:ke(ce)},Za={type:he(ce),id:he(ce),rawId:he(Ne),authenticatorAttachment:ke(ce),response:he({clientDataJSON:he(Ne),attestationObject:he(Ne),transports:Jn(ce,o=>{var e;return((e=o.getTransports)==null?void 0:e.call(o))||[]})}),clientExtensionResults:Jn(oi,o=>o.getClientExtensionResults())},Ja={mediation:ke(ce),publicKey:he({challenge:he(Ne),timeout:ke(ce),rpId:ke(ce),allowCredentials:ke([ti]),userVerification:ke(ce),extensions:ke(ni)}),signal:ke(ce)},Ya={type:he(ce),id:he(ce),rawId:he(Ne),authenticatorAttachment:ke(ce),response:he({clientDataJSON:he(Ne),authenticatorData:he(Ne),signature:he(Ne),userHandle:he(Ne)}),clientExtensionResults:Jn(oi,o=>o.getClientExtensionResults())};async function ii(o){const e=await navigator.credentials.get(function(t){return vt(Xo,Ja,t)}(o));return function(t){return vt(ei,Ya,t)}(e)}class We{constructor(){this.abortController=new AbortController}static getInstance(){return We.instance||(We.instance=new We),We.instance}createAbortSignal(){return this.abortController.abort(),this.abortController=new AbortController,this.abortController.signal}async getWebauthnCredential(e){return await ii(ze({},e,{signal:this.createAbortSignal()}))}async getConditionalWebauthnCredential(e){return await ii({publicKey:e,mediation:"conditional",signal:this.createAbortSignal()})}async createWebauthnCredential(e){return await async function(t){return n=await navigator.credentials.create(function(i){return vt(Xo,Ba,i)}(t)),vt(ei,Za,n);var n}(ze({},e,{signal:this.createAbortSignal()}))}}We.instance=null;const Yn="hanko_pkce_code_verifier",on=()=>{let o="";const e=new Uint8Array(1);for(;o.length<64;){window.crypto.getRandomValues(e);const t=e[0];t<198&&(o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~".charAt(t%66))}return o},an=o=>{typeof window<"u"&&window.sessionStorage&&window.sessionStorage.setItem(Yn,o)},ai=()=>typeof window<"u"&&window.sessionStorage?window.sessionStorage.getItem(Yn):null,tt=()=>{typeof window<"u"&&window.sessionStorage&&window.sessionStorage.removeItem(Yn)};async function ri(o,e,t,n="webauthn_credential_already_exists",i="Webauthn credential already exists"){try{const r=await e.createWebauthnCredential(t);return await o.actions.webauthn_verify_attestation_response.run({public_key:r})}catch{const s=await o.actions.back.run();return s.error={code:n,message:i},s}}const si={preflight:async o=>await o.actions.register_client_capabilities.run({webauthn_available:gt.supported(),webauthn_conditional_mediation_available:await gt.isConditionalMediationAvailable(),webauthn_platform_authenticator_available:await gt.isPlatformAuthenticatorAvailable()}),login_passkey:async o=>{const e=We.getInstance();try{const t=await e.getWebauthnCredential(o.payload.request_options);return await o.actions.webauthn_verify_assertion_response.run({assertion_response:t})}catch{const n=await o.actions.back.run();return o.error&&(n.error=o.error),n}},onboarding_verify_passkey_attestation:async o=>ri(o,We.getInstance(),o.payload.creation_options),webauthn_credential_verification:async o=>ri(o,We.getInstance(),o.payload.creation_options),async thirdparty(o){const e=new URLSearchParams(window.location.search),t=e.get("hanko_token"),n=e.get("error"),i=r=>{r.forEach(c=>e.delete(c));const s=e.toString()?`?${e.toString()}`:"";history.replaceState(null,null,`${window.location.pathname}${s}`)};if((t==null?void 0:t.length)>0){i(["hanko_token"]);const r=ai();try{return await o.actions.exchange_token.run({token:t,code_verifier:r||void 0})}finally{tt()}}if((n==null?void 0:n.length)>0){const r=n==="access_denied"?"third_party_access_denied":"technical_error",s=e.get("error_description");i(["error","error_description"]);const c=await o.actions.back.run(null,{dispatchAfterStateChangeEvent:!1});return c.error={code:r,message:s},c.dispatchAfterStateChangeEvent(),c}return o.isCached?await o.actions.back.run():(o.saveToLocalStorage(),window.location.assign(o.payload.redirect_url),o)},success:async o=>{const{claims:e}=o.payload,t=Date.parse(e.expiration)-Date.now();return o.removeFromLocalStorage(),o.hanko.relay.dispatchSessionCreatedEvent({claims:e,expirationSeconds:t}),o},account_deleted:async o=>(o.removeFromLocalStorage(),o.hanko.relay.dispatchUserDeletedEvent(),o)},ci={login_init:async o=>{(async function(){const e=We.getInstance();if(o.payload.request_options)try{const{publicKey:t}=o.payload.request_options,n=await e.getConditionalWebauthnCredential(t);return await o.actions.webauthn_verify_assertion_response.run({assertion_response:n})}catch{return}})()}};class He{constructor(e,t,n,i={}){if(this.name=void 0,this.flowName=void 0,this.error=void 0,this.payload=void 0,this.actions=void 0,this.csrfToken=void 0,this.status=void 0,this.previousAction=void 0,this.isCached=void 0,this.cacheKey=void 0,this.hanko=void 0,this.invokedAction=void 0,this.excludeAutoSteps=void 0,this.autoStep=void 0,this.passkeyAutofillActivation=void 0,this.flowName=t,this.name=n.name,this.error=n.error,this.payload=n.payload,this.csrfToken=n.csrf_token,this.status=n.status,this.hanko=e,this.actions=this.buildActionMap(n.actions),this.name in si){const d=si[this.name];this.autoStep=()=>d(this)}if(this.name in ci){const d=ci[this.name];this.passkeyAutofillActivation=()=>d(this)}const{dispatchAfterStateChangeEvent:r=!0,excludeAutoSteps:s=null,previousAction:c=null,isCached:u=!1,cacheKey:l="hanko-flow-state"}=i;this.excludeAutoSteps=s,this.previousAction=c,this.isCached=u,this.cacheKey=l,r&&this.dispatchAfterStateChangeEvent()}buildActionMap(e){const t={};return Object.keys(e).forEach(n=>{t[n]=new Pt(e[n],this)}),new Proxy(t,{get:(n,i)=>{if(i in n)return n[i];const r=typeof i=="string"?i:i.toString();return Pt.createDisabled(r,this)}})}dispatchAfterStateChangeEvent(){this.hanko.relay.dispatchAfterStateChangeEvent({state:this})}serialize(){return{flow_name:this.flowName,name:this.name,error:this.error,payload:this.payload,csrf_token:this.csrfToken,status:this.status,previous_action:this.previousAction,actions:Object.fromEntries(Object.entries(this.actions).map(([e,t])=>[e,{action:t.name,href:t.href,inputs:t.inputs,description:null}]))}}saveToLocalStorage(){localStorage.setItem(this.cacheKey,JSON.stringify(ze({},this.serialize(),{is_cached:!0})))}removeFromLocalStorage(){localStorage.removeItem(this.cacheKey)}static async initializeFlowState(e,t,n,i={}){let r=new He(e,t,n,i);if(r.excludeAutoSteps!="all")for(;r&&r.autoStep&&((s=r.excludeAutoSteps)==null||!s.includes(r.name));){var s;const c=await r.autoStep();if(c.name==r.name)return c;r=c}return r}static readFromLocalStorage(e){const t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch{return}}static async create(e,t,n={}){const{cacheKey:i="hanko-flow-state",loadFromCache:r=!0}=n;if(r){const c=He.readFromLocalStorage(i);if(c)return He.deserialize(e,c,ze({},n,{cacheKey:i}))}const s=await He.fetchState(e,`/${t}`);return He.initializeFlowState(e,t,s,ze({},n,{cacheKey:i}))}static async deserialize(e,t,n={}){return He.initializeFlowState(e,t.flow_name,t,ze({},n,{previousAction:t.previous_action,isCached:t.is_cached}))}static async fetchState(e,t,n){try{return(await e.client.post(t,n)).json()}catch(i){return He.createErrorResponse(i)}}static createErrorResponse(e){return{actions:null,csrf_token:"",name:"error",payload:null,status:0,error:e}}}class Pt{constructor(e,t,n=!0){this.enabled=void 0,this.href=void 0,this.name=void 0,this.inputs=void 0,this.parentState=void 0,this.enabled=n,this.href=e.href,this.name=e.action,this.inputs=e.inputs,this.parentState=t}static createDisabled(e,t){return new Pt({action:e,href:"",inputs:{},description:"Disabled action"},t,!1)}async run(e=null,t={}){const{name:n,hanko:i,flowName:r,csrfToken:s,invokedAction:c,excludeAutoSteps:u,cacheKey:l}=this.parentState,{dispatchAfterStateChangeEvent:d=!0}=t;if(!this.enabled)throw new Error(`Action '${this.name}' is not enabled in state '${n}'`);if(c)throw new Error(`An action '${c.name}' has already been invoked on state '${c.relatedStateName}'. No further actions can be run.`);this.parentState.invokedAction={name:this.name,relatedStateName:n},i.relay.dispatchBeforeStateChangeEvent({state:this.parentState});const h={input_data:ze({},Object.keys(this.inputs).reduce((f,w)=>{const A=this.inputs[w];return A.value!==void 0&&(f[w]=A.value),f},{}),e),csrf_token:s},v=await He.fetchState(i,this.href,h);return this.parentState.removeFromLocalStorage(),He.initializeFlowState(i,r,v,{dispatchAfterStateChangeEvent:d,excludeAutoSteps:u,previousAction:c,cacheKey:l})}}class li extends Bn{async getCurrent(){const e=await this.client.get("/me");if(e.status===401)throw this.client.dispatcher.dispatchSessionExpiredEvent(),new ft;if(!e.ok)throw new je;const t=e.json(),n=await this.client.get(`/users/${t.id}`);if(n.status===401)throw this.client.dispatcher.dispatchSessionExpiredEvent(),new ft;if(!n.ok)throw new je;return n.json()}async getCurrentUser(){const e=await this.client.get("/me");if(e.status===401)throw this.client.dispatcher.dispatchSessionExpiredEvent(),new ft;if(!e.ok)throw new je;return e.json()}async logout(){const e=await this.client.post("/logout");if(this.client.sessionTokenStorage.removeSessionToken(),this.client.cookie.removeAuthCookie(),this.client.dispatcher.dispatchUserLoggedOutEvent(),e.status!==401&&!e.ok)throw new je}}class di extends en{constructor(e,t){super(),this.session=void 0,this.user=void 0,this.cookie=void 0,this.client=void 0,this.relay=void 0;const n=ze({timeout:13e3,cookieName:"hanko",localStorageKey:"hanko",sessionCheckInterval:3e4,sessionCheckChannelName:"hanko-session-check"},t);this.client=new Vn(e,n),this.session=new Zn(e,n),this.user=new li(e,n),this.relay=new Go(e,n),this.cookie=new Qo(n)}setLang(e){this.client.lang=e}createState(e,t={}){return He.create(this,e,t)}async getUser(){return this.user.getCurrent()}async getCurrentUser(){return this.user.getCurrentUser()}async validateSession(){return this.session.validate()}getSessionToken(){return this.cookie.getAuthCookie()}async logout(){return this.user.logout()}}var Qa=te(292),Ve=te.n(Qa),Ga=te(360),Be=te.n(Ga),Xa=te(884),Ze=te.n(Xa),er=te(88),Je=te.n(er),rn=te(890),Et={};Et.setAttributes=Ze(),Et.insert=o=>{window._hankoStyle=o},Et.domAPI=Be(),Et.insertStyleElement=Je(),Ve()(rn.A,Et);const Ot=rn.A&&rn.A.locals?rn.A.locals:void 0,tr=function(o){function e(t){var n=Do({},t);return delete n.ref,o(n,t.ref||null)}return e.$$typeof=Pa,e.render=o,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(o.displayName||o.name)+")",e}((o,e)=>{const{lang:t,hanko:n,setHanko:i}=(0,g.useContext)(De),{setLang:r}=(0,g.useContext)(Z.TranslateContext);return(0,g.useEffect)(()=>{r(t.replace(/[-]/,"")),i(s=>(s.setLang(t),s))},[n,t,i,r]),a("section",{part:"container",className:Ot.container,ref:e,children:o.children})});var sn=te(313),It={};It.setAttributes=Ze(),It.insert=o=>{window._hankoStyle=o},It.domAPI=Be(),It.insertStyleElement=Je(),Ve()(sn.A,It);const U=sn.A&&sn.A.locals?sn.A.locals:void 0;var nr=te(452),Q=te.n(nr);const or=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-apple",xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"20.5 16 15 19",className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z"})}),ir=({secondary:o,size:e,fadeOut:t,disabled:n})=>a("svg",{id:"icon-checkmark",xmlns:"http://www.w3.org/2000/svg",viewBox:"4 4 40 40",width:e,height:e,className:Q()(U.checkmark,o&&U.secondary,t&&U.fadeOut,n&&U.disabled),children:a("path",{d:"M21.05 33.1 35.2 18.95l-2.3-2.25-11.85 11.85-6-6-2.25 2.25ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 24q0-4.15 1.575-7.8 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24 4q4.15 0 7.8 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm0-3q7.1 0 12.05-4.975Q41 31.05 41 24q0-7.1-4.95-12.05Q31.1 7 24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24 41Zm0-17Z"})}),ar=({size:o,secondary:e,disabled:t})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:o,height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"})}),rr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-custom-provider",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:[a("path",{d:"M0 0h24v24H0z",fill:"none"}),a("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"})]}),sr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-discord",fill:"#fff",xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 127.14 96.36",className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z"})}),cr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-exclamation",xmlns:"http://www.w3.org/2000/svg",viewBox:"5 2 13 20",width:o,height:o,className:Q()(U.exclamationMark,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),lr=({size:o,secondary:e,disabled:t})=>a("svg",{width:o,height:o,viewBox:"0 0 666.66668 666.66717",xmlns:"http://www.w3.org/2000/svg",children:[a("defs",{id:"defs13",children:a("clipPath",{clipPathUnits:"userSpaceOnUse",id:"clipPath25",children:a("path",{d:"M 0,700 H 700 V 0 H 0 Z",id:"path23"})})}),a("g",{id:"g17",transform:"matrix(1.3333333,0,0,-1.3333333,-133.33333,799.99999)",children:a("g",{id:"g19",children:a("g",{id:"g21",clipPath:"url(#clipPath25)",children:[a("g",{id:"g27",transform:"translate(600,350)",children:a("path",{className:Q()(U.facebookIcon,t?U.disabledOutline:U.outline),d:"m 0,0 c 0,138.071 -111.929,250 -250,250 -138.071,0 -250,-111.929 -250,-250 0,-117.245 80.715,-215.622 189.606,-242.638 v 166.242 h -51.552 V 0 h 51.552 v 32.919 c 0,85.092 38.508,124.532 122.048,124.532 15.838,0 43.167,-3.105 54.347,-6.211 V 81.986 c -5.901,0.621 -16.149,0.932 -28.882,0.932 -40.993,0 -56.832,-15.528 -56.832,-55.9 V 0 h 81.659 l -14.028,-76.396 h -67.631 V -248.169 C -95.927,-233.218 0,-127.818 0,0",id:"path29"})}),a("g",{id:"g31",transform:"translate(447.9175,273.6036)",children:a("path",{className:Q()(U.facebookIcon,t?U.disabledLetter:U.letter),d:"M 0,0 14.029,76.396 H -67.63 v 27.019 c 0,40.372 15.838,55.899 56.831,55.899 12.733,0 22.981,-0.31 28.882,-0.931 v 69.253 c -11.18,3.106 -38.509,6.212 -54.347,6.212 -83.539,0 -122.048,-39.441 -122.048,-124.533 V 76.396 h -51.552 V 0 h 51.552 v -166.242 c 19.343,-4.798 39.568,-7.362 60.394,-7.362 10.254,0 20.358,0.632 30.288,1.831 L -67.63,0 Z",id:"path33"})})]})})})]}),dr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-github",xmlns:"http://www.w3.org/2000/svg",fill:"#fff",viewBox:"0 0 97.63 96",width:o,height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:[a("path",{d:"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"})," "]}),ur=({size:o,disabled:e})=>a("svg",{id:"icon-google",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,className:U.googleIcon,children:[a("path",{className:Q()(U.googleIcon,e?U.disabled:U.blue),d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),a("path",{className:Q()(U.googleIcon,e?U.disabled:U.green),d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),a("path",{className:Q()(U.googleIcon,e?U.disabled:U.yellow),d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),a("path",{className:Q()(U.googleIcon,e?U.disabled:U.red),d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"}),a("path",{d:"M1 1h22v22H1z",fill:"none"})]}),hr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-linkedin",fill:"#fff",xmlns:"http://www.w3.org/2000/svg",width:o,viewBox:"0 0 24 24",height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M20.5 2h-17A1.5 1.5 0 002 3.5v17A1.5 1.5 0 003.5 22h17a1.5 1.5 0 001.5-1.5v-17A1.5 1.5 0 0020.5 2zM8 19H5v-9h3zM6.5 8.25A1.75 1.75 0 118.3 6.5a1.78 1.78 0 01-1.8 1.75zM19 19h-3v-4.74c0-1.42-.6-1.93-1.38-1.93A1.74 1.74 0 0013 14.19a.66.66 0 000 .14V19h-3v-9h2.9v1.3a3.11 3.11 0 012.7-1.4c1.55 0 3.36.86 3.36 3.66z"})}),pr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-mail",xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 -960 960 960",className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z"})}),mr=({size:o,disabled:e})=>a("svg",{id:"icon-microsoft",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,className:U.microsoftIcon,children:[a("rect",{className:Q()(U.microsoftIcon,e?U.disabled:U.blue),x:"1",y:"1",width:"9",height:"9"}),a("rect",{className:Q()(U.microsoftIcon,e?U.disabled:U.green),x:"1",y:"11",width:"9",height:"9"}),a("rect",{className:Q()(U.microsoftIcon,e?U.disabled:U.yellow),x:"11",y:"1",width:"9",height:"9"}),a("rect",{className:Q()(U.microsoftIcon,e?U.disabled:U.red),x:"11",y:"11",width:"9",height:"9"})]}),fr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-passkey",xmlns:"http://www.w3.org/2000/svg",viewBox:"3 1.5 19.5 19",width:o,height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("g",{id:"icon-passkey-all",children:[a("circle",{id:"icon-passkey-head",cx:"10.5",cy:"6",r:"4.5"}),a("path",{id:"icon-passkey-key",d:"M22.5,10.5a3.5,3.5,0,1,0-5,3.15V19L19,20.5,21.5,18,20,16.5,21.5,15l-1.24-1.24A3.5,3.5,0,0,0,22.5,10.5Zm-3.5,0a1,1,0,1,1,1-1A1,1,0,0,1,19,10.5Z"}),a("path",{id:"icon-passkey-body",d:"M14.44,12.52A6,6,0,0,0,12,12H9a6,6,0,0,0-6,6v2H16V14.49A5.16,5.16,0,0,1,14.44,12.52Z"})]})}),gr=({size:o,secondary:e,disabled:t})=>a("svg",{id:"icon-password",xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 -960 960 960",className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M80-200v-80h800v80H80Zm46-242-52-30 34-60H40v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Z"})}),vr=({size:o,secondary:e,disabled:t})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:o,height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M80-680v-200h200v80H160v120H80Zm0 600v-200h80v120h120v80H80Zm600 0v-80h120v-120h80v200H680Zm120-600v-120H680v-80h200v200h-80ZM700-260h60v60h-60v-60Zm0-120h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60-60h60v60h-60v-60Zm120-120h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60-60h60v60h-60v-60Zm240-320v240H520v-240h240ZM440-440v240H200v-240h240Zm0-320v240H200v-240h240Zm-60 500v-120H260v120h120Zm0-320v-120H260v120h120Zm320 0v-120H580v120h120Z"})}),_r=({size:o,secondary:e,disabled:t})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",width:o,height:o,className:Q()(U.icon,e&&U.secondary,t&&U.disabled),children:a("path",{d:"M280-240q-100 0-170-70T40-480q0-100 70-170t170-70q66 0 121 33t87 87h432v240h-80v120H600v-120H488q-32 54-87 87t-121 33Zm0-80q66 0 106-40.5t48-79.5h246v120h80v-120h80v-80H434q-8-39-48-79.5T280-640q-66 0-113 47t-47 113q0 66 47 113t113 47Zm0-80q33 0 56.5-23.5T360-480q0-33-23.5-56.5T280-560q-33 0-56.5 23.5T200-480q0 33 23.5 56.5T280-400Zm0-80Z"})}),yr=({size:o,disabled:e})=>a("svg",{id:"icon-spinner",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,className:Q()(U.loadingSpinner,e&&U.disabled),children:[a("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",opacity:".25"}),a("path",{d:"M10.72,19.9a8,8,0,0,1-6.5-9.79A7.77,7.77,0,0,1,10.4,4.16a8,8,0,0,1,9.49,6.52A1.54,1.54,0,0,0,21.38,12h.13a1.37,1.37,0,0,0,1.38-1.54,11,11,0,1,0-12.7,12.39A1.54,1.54,0,0,0,12,21.34h0A1.47,1.47,0,0,0,10.72,19.9Z"})]}),Tt=({name:o,secondary:e,size:t=18,fadeOut:n,disabled:i})=>a(zn[o],{size:t,secondary:e,fadeOut:n,disabled:i}),Qn=({children:o,isLoading:e,isSuccess:t,fadeOut:n,secondary:i,hasIcon:r,maxWidth:s})=>a(b.Fragment,{children:a("div",e?{className:Q()(U.loadingSpinnerWrapper,U.centerContent,s&&U.maxWidth),children:a(Tt,{name:"spinner",secondary:i})}:t?{className:Q()(U.loadingSpinnerWrapper,U.centerContent,s&&U.maxWidth),children:a(Tt,{name:"checkmark",secondary:i,fadeOut:n})}:{className:r?U.loadingSpinnerWrapperIcon:U.loadingSpinnerWrapper,children:o})}),br=()=>a(Qn,{isLoading:!0}),Pe=o=>{const[e,t]=(0,g.useState)(o);return(0,g.useEffect)(()=>{o&&t(o)},[o]),{flowState:e}};var cn=te(681),Ut={};Ut.setAttributes=Ze(),Ut.insert=o=>{window._hankoStyle=o},Ut.domAPI=Be(),Ut.insertStyleElement=Je(),Ve()(cn.A,Ut);const Ae=cn.A&&cn.A.locals?cn.A.locals:void 0,ui=(o,e,t)=>{const{hanko:n,setUIState:i,isOwnFlow:r}=(0,g.useContext)(De);(0,g.useEffect)(()=>n.onBeforeStateChange(({state:s})=>{o&&r(s)&&(i(c=>Object.assign(Object.assign({},c),{isDisabled:!0,error:void 0})),e(s.invokedAction.name==o.name))}),[o,n,r,e,i]),(0,g.useEffect)(()=>n.onAfterStateChange(({state:s})=>{var c;o&&r(s)&&(t(((c=s.previousAction)===null||c===void 0?void 0:c.name)==o.name),e(!1))}),[n,t,e,o,r])},hi=(0,b.createContext)({}),ne=({onSubmit:o,children:e,hidden:t=!1,maxWidth:n,flowAction:i})=>a(hi.Provider,{value:{flowAction:i},children:i&&i.enabled&&!t?a("form",{onSubmit:o||(r=>function(s,c,u,l){return new(u||(u=Promise))(function(d,h){function v(A){try{w(l.next(A))}catch(C){h(C)}}function f(A){try{w(l.throw(A))}catch(C){h(C)}}function w(A){var C;A.done?d(A.value):(C=A.value,C instanceof u?C:new u(function($){$(C)})).then(v,f)}w((l=l.apply(s,[])).next())})}(void 0,void 0,void 0,function*(){return r.preventDefault(),yield i.run()})),className:Ae.form,children:a("ul",{className:Ae.ul,children:(0,b.toChildArray)(e).map((r,s)=>a("li",{part:"form-item",className:Q()(Ae.li,n?Ae.maxWidth:null),children:r},s))})}):null}),oe=o=>{var{title:e,children:t,secondary:n,dangerous:i,autofocus:r,showLastUsed:s,onClick:c,icon:u,showSuccessIcon:l}=o,d=function(O,M){var z={};for(var F in O)Object.prototype.hasOwnProperty.call(O,F)&&M.indexOf(F)<0&&(z[F]=O[F]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function"){var V=0;for(F=Object.getOwnPropertySymbols(O);V<F.length;V++)M.indexOf(F[V])<0&&Object.prototype.propertyIsEnumerable.call(O,F[V])&&(z[F[V]]=O[F[V]])}return z}(o,["title","children","secondary","dangerous","autofocus","showLastUsed","onClick","icon","showSuccessIcon"]);const h=(0,g.useRef)(null),{uiState:v}=(0,g.useContext)(De),{t:f}=(0,g.useContext)(Z.TranslateContext),[w,A]=(0,g.useState)(!1),[C,$]=(0,g.useState)(!1),{flowAction:K}=(0,g.useContext)(hi);ui(K,A,$),(0,g.useEffect)(()=>{const{current:O}=h;O&&r&&O.focus()},[r]);const k=(0,g.useMemo)(()=>l&&(C||d.isSuccess),[C,d,l]),E=(0,g.useMemo)(()=>v.isDisabled||d.disabled,[d,v]);return a("button",{part:i?"button dangerous-button":n?"button secondary-button":"button primary-button",title:e,ref:h,type:"submit",disabled:E,onClick:c,className:Q()(Ae.button,i?Ae.dangerous:n?Ae.secondary:Ae.primary),"data-bubble":s?f("labels.lastUsed"):void 0,children:a(Qn,{isLoading:w,isSuccess:k,secondary:!0,hasIcon:!!u,maxWidth:!0,children:[u?a(Tt,{name:u,secondary:n,disabled:E}):null,a("div",{className:Ae.caption,children:a("span",{children:t})})]})})},Le=o=>{var e,t,n,i,r,{label:s}=o,c=function(f,w){var A={};for(var C in f)Object.prototype.hasOwnProperty.call(f,C)&&w.indexOf(C)<0&&(A[C]=f[C]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function"){var $=0;for(C=Object.getOwnPropertySymbols(f);$<C.length;$++)w.indexOf(C[$])<0&&Object.prototype.propertyIsEnumerable.call(f,C[$])&&(A[C[$]]=f[C[$]])}return A}(o,["label"]);const u=(0,g.useRef)(null),{uiState:l}=(0,g.useContext)(De),{t:d}=(0,g.useContext)(Z.TranslateContext),h=(0,g.useMemo)(()=>l.isDisabled||c.disabled,[c,l]);(0,g.useEffect)(()=>{const{current:f}=u;f&&c.autofocus&&(f.focus(),f.select())},[c.autofocus]);const v=(0,g.useMemo)(()=>{var f;return c.markOptional&&!(!((f=c.flowInput)===null||f===void 0)&&f.required)?`${c.placeholder} (${d("labels.optional")})`:c.placeholder},[c.markOptional,c.placeholder,c.flowInput,d]);return a("div",{className:Ae.inputWrapper,children:a("input",Object.assign({part:"input text-input",required:(e=c.flowInput)===null||e===void 0?void 0:e.required,maxLength:(t=c.flowInput)===null||t===void 0?void 0:t.max_length,minLength:(n=c.flowInput)===null||n===void 0?void 0:n.min_length,hidden:(i=c.flowInput)===null||i===void 0?void 0:i.hidden},c,{ref:u,"aria-label":v,placeholder:v,className:Q()(Ae.input,!!(!((r=c.flowInput)===null||r===void 0)&&r.error)&&c.markError&&Ae.error),disabled:h}))})},we=({children:o})=>a("section",{className:Ot.content,children:o});var ln=te(751),$t={};$t.setAttributes=Ze(),$t.insert=o=>{window._hankoStyle=o},$t.domAPI=Be(),$t.insertStyleElement=Je(),Ve()(ln.A,$t);const Dt=ln.A&&ln.A.locals?ln.A.locals:void 0,Gn=({children:o,hidden:e})=>e?null:a("section",{part:"divider",className:Dt.divider,children:[a("div",{part:"divider-line",className:Dt.line}),o?a("div",{part:"divider-text",class:Dt.text,children:o}):null,a("div",{part:"divider-line",className:Dt.line})]});var dn=te(217),Lt={};Lt.setAttributes=Ze(),Lt.insert=o=>{window._hankoStyle=o},Lt.domAPI=Be(),Lt.insertStyleElement=Je(),Ve()(dn.A,Lt);const pi=dn.A&&dn.A.locals?dn.A.locals:void 0,Se=({state:o,error:e,flowError:t})=>{var n,i;const{t:r}=(0,g.useContext)(Z.TranslateContext),{uiState:s,setUIState:c}=(0,g.useContext)(De);return(0,g.useEffect)(()=>{var u,l;if(((u=o==null?void 0:o.error)===null||u===void 0?void 0:u.code)=="form_data_invalid_error")for(const d of Object.values(o==null?void 0:o.actions)){let h=!1;for(const v of Object.values(d==null?void 0:d.inputs))if(!((l=v.error)===null||l===void 0)&&l.code)return c(Object.assign(Object.assign({},s),{error:v.error})),void(h=!0);h||c(Object.assign(Object.assign({},s),{error:o.error}))}else o!=null&&o.error&&c(Object.assign(Object.assign({},s),{error:o==null?void 0:o.error}))},[o]),a("section",{part:"error",className:pi.errorBox,hidden:!(!((n=s.error)===null||n===void 0)&&n.code)&&!(t!=null&&t.code)&&!e,children:[a("span",{children:a(Tt,{name:"exclamation",size:15})}),a("span",{id:"errorMessage",part:"error-text",children:r(e?`errors.${e.code}`:`flowErrors.${((i=s.error)===null||i===void 0?void 0:i.code)||(t==null?void 0:t.code)}`)})]})};var un=te(547),Nt={};Nt.setAttributes=Ze(),Nt.insert=o=>{window._hankoStyle=o},Nt.domAPI=Be(),Nt.insertStyleElement=Je(),Ve()(un.A,Nt);const hn=un.A&&un.A.locals?un.A.locals:void 0,le=({children:o})=>a("h1",{part:"headline1",className:Q()(hn.headline,hn.grade1),children:o});var pn=te(579),Mt={};Mt.setAttributes=Ze(),Mt.insert=o=>{window._hankoStyle=o},Mt.domAPI=Be(),Mt.insertStyleElement=Je(),Ve()(pn.A,Mt);const mn=pn.A&&pn.A.locals?pn.A.locals:void 0,Xn=o=>{var{loadingSpinnerPosition:e,dangerous:t=!1,onClick:n,flowAction:i}=o,r=function(M,z){var F={};for(var V in M)Object.prototype.hasOwnProperty.call(M,V)&&z.indexOf(V)<0&&(F[V]=M[V]);if(M!=null&&typeof Object.getOwnPropertySymbols=="function"){var ee=0;for(V=Object.getOwnPropertySymbols(M);ee<V.length;ee++)z.indexOf(V[ee])<0&&Object.prototype.propertyIsEnumerable.call(M,V[ee])&&(F[V[ee]]=M[V[ee]])}return F}(o,["loadingSpinnerPosition","dangerous","onClick","flowAction"]);const{t:s}=(0,g.useContext)(Z.TranslateContext),{uiState:c}=(0,g.useContext)(De),[u,l]=(0,g.useState)(),[d,h]=(0,g.useState)(!1),[v,f]=(0,g.useState)(!1);let w;n||(n=M=>function(z,F,V,ee){return new(V||(V=Promise))(function(N,ge){function _e(re){try{de(ee.next(re))}catch(ye){ge(ye)}}function ue(re){try{de(ee.throw(re))}catch(ye){ge(ye)}}function de(re){var ye;re.done?N(re.value):(ye=re.value,ye instanceof V?ye:new V(function(Me){Me(ye)})).then(_e,ue)}de((ee=ee.apply(z,[])).next())})}(void 0,void 0,void 0,function*(){return M.preventDefault(),yield i==null?void 0:i.run()})),ui(i,h,f);const A=M=>{M.preventDefault(),l(!0)},C=M=>{M.preventDefault(),l(!1)},$=(0,g.useMemo)(()=>d||r.isLoading,[d,r]),K=(0,g.useMemo)(()=>v||r.isSuccess,[v,r]),k=(0,g.useMemo)(()=>i&&!i.enabled||r.hidden,[i,r]),E=(0,g.useCallback)(M=>{M.preventDefault(),l(!1),n(M)},[n]),O=(0,g.useCallback)(()=>k?null:a(b.Fragment,{children:[u?a(b.Fragment,{children:[a(Xn,{onClick:E,children:s("labels.yes")})," / ",a(Xn,{onClick:C,children:s("labels.no")})," "]}):null,a("button",Object.assign({},r,{onClick:t?A:n,disabled:u||r.disabled||c.isDisabled,part:"link",className:Q()(mn.link,t?mn.danger:null),children:r.children}))]}),[k,c,u,t,n,E,r,s]);return a(b.Fragment,{children:a("span",{className:Q()(mn.linkWrapper,e==="right"?mn.reverse:null),onMouseEnter:()=>{w&&window.clearTimeout(w)},onMouseLeave:()=>{w=window.setTimeout(()=>{l(!1)},1e3)},children:a(b.Fragment,u||!$&&!K?{children:O()}:{children:[a(Qn,{isLoading:$,isSuccess:K,secondary:r.secondary,fadeOut:!0}),O()]})})})},G=Xn,Oe=({children:o,hidden:e=!1})=>e?null:a("section",{className:Ot.footer,children:o}),eo=o=>{var{label:e}=o,t=function(r,s){var c={};for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&s.indexOf(u)<0&&(c[u]=r[u]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function"){var l=0;for(u=Object.getOwnPropertySymbols(r);l<u.length;l++)s.indexOf(u[l])<0&&Object.prototype.propertyIsEnumerable.call(r,u[l])&&(c[u[l]]=r[u[l]])}return c}(o,["label"]);const{uiState:n}=(0,g.useContext)(De),i=(0,g.useMemo)(()=>n.isDisabled||t.disabled,[t,n]);return a("div",{className:Ae.inputWrapper,children:a("label",{className:Ae.checkboxWrapper,children:[a("input",Object.assign({part:"input checkbox-input",type:"checkbox","aria-label":e,className:Ae.checkbox},t)),a("span",{className:Q()(Ae.label,i?Ae.disabled:null),children:e})]})})},fn=()=>a("section",{className:Dt.spacer});var gn=te(193),Rt={};Rt.setAttributes=Ze(),Rt.insert=o=>{window._hankoStyle=o},Rt.domAPI=Be(),Rt.insertStyleElement=Je(),Ve()(gn.A,Rt);const to=gn.A&&gn.A.locals?gn.A.locals:void 0,W=({children:o,hidden:e,center:t})=>e?null:a("p",{part:"paragraph",className:Q()(to.paragraph,t&&to.center,t&&to.column),children:o});var vn=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const kr=o=>{var e;const{t}=(0,g.useContext)(Z.TranslateContext),{init:n,initialComponentName:i,uiState:r,setUIState:s,hidePasskeyButtonOnLogin:c,lastLogin:u}=(0,g.useContext)(De),[l,d]=(0,g.useState)(!1),[h,v]=(0,g.useState)(null),[f,w]=(0,g.useState)(null),{flowState:A}=Pe(o.state),C=gt.supported(),[$,K]=(0,g.useState)(void 0),[k,E]=(0,g.useState)(null),[O,M]=(0,g.useState)(!1),z=N=>{if(N.preventDefault(),N.target instanceof HTMLInputElement){const{value:ge}=N.target;w(ge),F(ge)}},F=N=>{const ge=()=>s(ue=>Object.assign(Object.assign({},ue),{email:N,username:null})),_e=()=>s(ue=>Object.assign(Object.assign({},ue),{email:null,username:N}));switch(h){case"email":ge();break;case"username":_e();break;case"identifier":N.match(/^[^@]+@[^@]+\.[^@]+$/)?ge():_e()}},V=(0,g.useMemo)(()=>(!!A.actions.webauthn_generate_request_options.enabled||!!A.actions.thirdparty_oauth.enabled)&&A.actions.continue_with_login_identifier.enabled,[A.actions]),ee=A.actions.continue_with_login_identifier.inputs;return(0,g.useEffect)(()=>{const N=A.actions.continue_with_login_identifier.inputs;N!=null&&N.email?(v("email"),w(r.email)):N!=null&&N.username?(v("username"),w(r.username)):(v("identifier"),w(r.email||r.username))},[A,r.email,r.username]),a(b.Fragment,{children:[a(we,{children:[a(le,{children:t("headlines.signIn")}),a(Se,{state:A,error:$}),ee?a(b.Fragment,{children:[a(ne,{flowAction:A.actions.continue_with_login_identifier,onSubmit:N=>vn(void 0,void 0,void 0,function*(){return N.preventDefault(),F(f),A.actions.continue_with_login_identifier.run({[h]:f})}),maxWidth:!0,children:[ee.email?a(Le,{type:"email",autoComplete:"username webauthn",autoCorrect:"off",flowInput:ee.email,onInput:z,value:f,placeholder:t("labels.email"),pattern:"^[^@]+@[^@]+\\.[^@]+$"}):ee.username?a(Le,{type:"text",autoComplete:"username webauthn",autoCorrect:"off",flowInput:ee.username,onInput:z,value:f,placeholder:t("labels.username")}):a(Le,{type:"text",autoComplete:"username webauthn",autoCorrect:"off",flowInput:ee.identifier,onInput:z,value:f,placeholder:t("labels.emailOrUsername")}),a(oe,{children:t("labels.continue")})]}),a(Gn,{hidden:!V,children:t("labels.or")})]}):null,A.actions.thirdparty_oauth.enabled?(e=A.actions.thirdparty_oauth.inputs.provider.allowed_values)===null||e===void 0?void 0:e.map(N=>a(ne,{flowAction:A.actions.thirdparty_oauth,onSubmit:ge=>((_e,ue)=>vn(void 0,void 0,void 0,function*(){_e.preventDefault(),E(ue);const de=on();an(de);try{const re=yield A.actions.thirdparty_oauth.run({provider:ue,redirect_to:window.location.toString(),code_verifier:de});return re.error&&(tt(),E(null)),re}catch(re){throw tt(),E(null),re}}))(ge,N.value),children:a(oe,{isLoading:N.value==k,secondary:!0,icon:N.value.startsWith("custom_")?"customProvider":N.value,showLastUsed:(u==null?void 0:u.login_method)=="third_party"&&(u==null?void 0:u.third_party_provider)==N.value,children:t("labels.signInWith",{provider:N.name})})},N.value)):null,A.actions.webauthn_generate_request_options.enabled&&!c?a(ne,{flowAction:A.actions.webauthn_generate_request_options,children:a(oe,{secondary:!0,title:C?null:t("labels.webauthnUnsupported"),disabled:!C,children:t("labels.signInPasskey")})}):null,A.actions.remember_me.enabled&&a(b.Fragment,{children:[a(fn,{}),a(eo,{required:!1,type:"checkbox",label:t("labels.staySignedIn"),checked:O,onChange:N=>vn(void 0,void 0,void 0,function*(){return M(ge=>!ge),A.actions.remember_me.run({remember_me:!O})})})]})]}),a(Oe,{hidden:i!=="auth",children:a(W,{center:!0,children:[a("span",{children:t("labels.dontHaveAnAccount")}),a(G,{onClick:N=>vn(void 0,void 0,void 0,function*(){N.preventDefault(),d(!0),n("registration")}),loadingSpinnerPosition:"left",isLoading:l,children:t("labels.signUp")})]})})]})},wr=o=>{var{index:e,focus:t,digit:n=""}=o,i=function(l,d){var h={};for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&d.indexOf(v)<0&&(h[v]=l[v]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(v=Object.getOwnPropertySymbols(l);f<v.length;f++)d.indexOf(v[f])<0&&Object.prototype.propertyIsEnumerable.call(l,v[f])&&(h[v[f]]=l[v[f]])}return h}(o,["index","focus","digit"]);const r=(0,g.useRef)(null),{uiState:s}=(0,g.useContext)(De),c=()=>{const{current:l}=r;l&&(l.focus(),l.select())},u=(0,g.useMemo)(()=>s.isDisabled||i.disabled,[i,s]);return(0,g.useEffect)(()=>{e===0&&c()},[e,i.disabled]),(0,g.useMemo)(()=>{t&&c()},[t]),a("div",{className:Ae.passcodeDigitWrapper,children:a("input",Object.assign({},i,{part:"input passcode-input","aria-label":`${i.name}-digit-${e+1}`,name:i.name+e.toString(10),type:"text",inputMode:"numeric",maxLength:1,ref:r,value:n.charAt(0),required:!0,className:Ae.input,disabled:u}))})},no=({passcodeDigits:o=[],numberOfInputs:e=6,onInput:t,disabled:n=!1})=>{const[i,r]=(0,g.useState)(0),s=()=>o.slice(),c=()=>{i<e-1&&r(i+1)},u=()=>{i>0&&r(i-1)},l=f=>{const w=s();w[i]=f.charAt(0),t(w)},d=f=>{if(f.preventDefault(),n)return;const w=f.clipboardData.getData("text/plain").slice(0,e-i).split(""),A=s();let C=i;for(let $=0;$<e;++$)$>=i&&w.length>0&&(A[$]=w.shift(),C++);r(C),t(A)},h=f=>{f.key==="Backspace"?(f.preventDefault(),l(""),u()):f.key==="Delete"?(f.preventDefault(),l("")):f.key==="ArrowLeft"?(f.preventDefault(),u()):f.key==="ArrowRight"?(f.preventDefault(),c()):f.key!==" "&&f.key!=="Spacebar"&&f.key!=="Space"||f.preventDefault()},v=f=>{f.target instanceof HTMLInputElement&&l(f.target.value),c()};return(0,g.useEffect)(()=>{o.length===0&&r(0)},[o]),a("div",{className:Ae.passcodeInputWrapper,children:Array.from(Array(e)).map((f,w)=>a(wr,{name:"passcode",index:w,focus:i===w,digit:o[w],onKeyDown:h,onInput:v,onPaste:d,onFocus:()=>(A=>{r(A)})(w),disabled:n},w))})};var mi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Sr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),{uiState:n,setUIState:i}=(0,g.useContext)(De),[r,s]=(0,g.useState)(),[c,u]=(0,g.useState)(t.payload.resend_after),[l,d]=(0,g.useState)([]),h=(0,g.useMemo)(()=>{var f;return((f=t.error)===null||f===void 0?void 0:f.code)==="passcode_max_attempts_reached"},[t]),v=(0,g.useCallback)(f=>mi(void 0,void 0,void 0,function*(){return yield t.actions.verify_passcode.run({code:f})}),[t]);return(0,g.useEffect)(()=>{const f=r>0&&setInterval(()=>s(r-1),1e3);return()=>clearInterval(f)},[r]),(0,g.useEffect)(()=>{const f=c>0&&setInterval(()=>{u(c-1)},1e3);return()=>clearInterval(f)},[c]),(0,g.useEffect)(()=>{var f;c==0&&((f=t.error)===null||f===void 0?void 0:f.code)=="rate_limit_exceeded"&&i(w=>Object.assign(Object.assign({},w),{error:null}))},[c]),(0,g.useEffect)(()=>{d([]),t.payload.resend_after>=0&&u(t.payload.resend_after)},[t]),a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.loginPasscode")}),a(Se,{state:t}),a(W,{children:n.email?e("texts.enterPasscode"):e("texts.enterPasscodeNoEmail")}),a(W,{hidden:!n.email,children:a("b",{children:n.email})}),a(ne,{flowAction:t.actions.verify_passcode,onSubmit:f=>mi(void 0,void 0,void 0,function*(){return f.preventDefault(),v(l.join(""))}),children:[a(no,{onInput:f=>{if(d(f),f.filter(w=>w!=="").length===6)return v(f.join(""))},passcodeDigits:l,numberOfInputs:6,disabled:r<=0||h}),a(oe,{disabled:r<=0||h,children:e("labels.continue")})]})]}),a(Oe,{children:[a(G,{flowAction:t.actions.back,loadingSpinnerPosition:"right",children:e("labels.back")}),a(G,{disabled:c>0,flowAction:t.actions.resend_passcode,loadingSpinnerPosition:"left",children:c>0?e("labels.passcodeResendAfter",{passcodeResendAfter:c}):e("labels.sendNewPasscode")})]})]})},Ar=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state);return a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.registerAuthenticator")}),a(Se,{state:t}),a(W,{children:e("texts.setupPasskey")}),a(ne,{flowAction:t.actions.webauthn_generate_creation_options,children:a(oe,{autofocus:!0,icon:"passkey",children:e("labels.registerAuthenticator")})})]}),a(Oe,{hidden:!t.actions.skip.enabled&&!t.actions.back.enabled,children:[a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.back,children:e("labels.back")}),a(G,{loadingSpinnerPosition:"left",flowAction:t.actions.skip,children:e("labels.skip")})]})]})};var fi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Cr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)(),[r,s]=(0,g.useState)(),c=(0,g.useMemo)(()=>a(G,{flowAction:t.actions.continue_to_passcode_confirmation_recovery,loadingSpinnerPosition:"left",children:e("labels.forgotYourPassword")}),[t,e]),u=(0,g.useMemo)(()=>a(G,{flowAction:t.actions.continue_to_login_method_chooser,loadingSpinnerPosition:"left",children:"Choose another method"}),[t]);return(0,g.useEffect)(()=>{const l=r>0&&setInterval(()=>s(r-1),1e3);return()=>clearInterval(l)},[r]),a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.loginPassword")}),a(Se,{state:t}),a(ne,{flowAction:t.actions.password_login,onSubmit:l=>fi(void 0,void 0,void 0,function*(){return l.preventDefault(),t.actions.password_login.run({password:n})}),children:[a(Le,{type:"password",flowInput:t.actions.password_login.inputs.password,autocomplete:"current-password",placeholder:e("labels.password"),onInput:l=>fi(void 0,void 0,void 0,function*(){l.target instanceof HTMLInputElement&&i(l.target.value)}),autofocus:!0}),a(oe,{disabled:r>0,children:r>0?e("labels.passwordRetryAfter",{passwordRetryAfter:r}):e("labels.signIn")})]}),t.actions.continue_to_login_method_chooser.enabled?c:null]}),a(Oe,{children:[a(G,{flowAction:t.actions.back,loadingSpinnerPosition:"right",children:e("labels.back")}),t.actions.continue_to_login_method_chooser.enabled?u:c]})]})};var gi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const xr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)();return a(we,{children:[a(le,{children:e("headlines.registerPassword")}),a(Se,{state:t}),a(W,{children:e("texts.passwordFormatHint",{minLength:t.actions.password_recovery.inputs.new_password.min_length,maxLength:72})}),a(ne,{flowAction:t.actions.password_recovery,onSubmit:r=>gi(void 0,void 0,void 0,function*(){return r.preventDefault(),t.actions.password_recovery.run({new_password:n})}),children:[a(Le,{type:"password",autocomplete:"new-password",flowInput:t.actions.password_recovery.inputs.new_password,placeholder:e("labels.newPassword"),onInput:r=>gi(void 0,void 0,void 0,function*(){r.target instanceof HTMLInputElement&&i(r.target.value)}),autofocus:!0}),a(oe,{children:e("labels.continue")})]})]})},Pr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state);return a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.selectLoginMethod")}),a(Se,{flowError:t==null?void 0:t.error}),a(W,{children:e("texts.howDoYouWantToLogin")}),a(ne,{flowAction:t.actions.continue_to_passcode_confirmation,children:a(oe,{secondary:!0,icon:"mail",children:e("labels.passcode")})}),a(ne,{flowAction:t.actions.continue_to_password_login,children:a(oe,{secondary:!0,icon:"password",children:e("labels.password")})}),a(ne,{flowAction:t.actions.webauthn_generate_request_options,children:a(oe,{secondary:!0,icon:"passkey",children:e("labels.passkey")})})]}),a(Oe,{children:a(G,{flowAction:t.actions.back,loadingSpinnerPosition:"right",children:e("labels.back")})})]})};var _n=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Er=o=>{var e;const{t}=(0,g.useContext)(Z.TranslateContext),{init:n,uiState:i,setUIState:r,initialComponentName:s}=(0,g.useContext)(De),{flowState:c}=Pe(o.state),u=c.actions.register_login_identifier.inputs,l=!(!(u!=null&&u.email)||!(u!=null&&u.username)),[d,h]=(0,g.useState)(void 0),[v,f]=(0,g.useState)(null),[w,A]=(0,g.useState)(!1),[C,$]=(0,g.useState)(!1),K=(0,g.useMemo)(()=>!!c.actions.thirdparty_oauth.enabled&&c.actions.register_login_identifier.enabled,[c.actions]);return a(b.Fragment,{children:[a(we,{children:[a(le,{children:t("headlines.signUp")}),a(Se,{state:c,error:d}),u?a(b.Fragment,{children:[a(ne,{flowAction:c.actions.register_login_identifier,onSubmit:k=>_n(void 0,void 0,void 0,function*(){return k.preventDefault(),yield c.actions.register_login_identifier.run({email:i.email,username:i.username})}),maxWidth:!0,children:[u.username?a(Le,{markOptional:l,markError:l,type:"text",autoComplete:"username",autoCorrect:"off",flowInput:u.username,onInput:k=>{if(k.preventDefault(),k.target instanceof HTMLInputElement){const{value:E}=k.target;r(O=>Object.assign(Object.assign({},O),{username:E}))}},value:i.username,placeholder:t("labels.username")}):null,u.email?a(Le,{markOptional:l,markError:l,type:"email",autoComplete:"email",autoCorrect:"off",flowInput:u.email,onInput:k=>{if(k.preventDefault(),k.target instanceof HTMLInputElement){const{value:E}=k.target;r(O=>Object.assign(Object.assign({},O),{email:E}))}},value:i.email,placeholder:t("labels.email"),pattern:"^.*[^0-9]+$"}):null,a(oe,{autofocus:!0,children:t("labels.continue")})]}),a(Gn,{hidden:!K,children:t("labels.or")})]}):null,c.actions.thirdparty_oauth.enabled?(e=c.actions.thirdparty_oauth.inputs.provider.allowed_values)===null||e===void 0?void 0:e.map(k=>a(ne,{flowAction:c.actions.thirdparty_oauth,onSubmit:E=>((O,M)=>_n(void 0,void 0,void 0,function*(){O.preventDefault(),f(M);const z=on();an(z);try{const F=yield c.actions.thirdparty_oauth.run({provider:M,redirect_to:window.location.toString(),code_verifier:z},{dispatchAfterStateChangeEvent:!1});F.error&&(tt(),f(null)),F.dispatchAfterStateChangeEvent()}catch(F){throw tt(),f(null),F}}))(E,k.value),children:a(oe,{isLoading:k.value==v,secondary:!0,icon:k.value.startsWith("custom_")?"customProvider":k.value,children:t("labels.signInWith",{provider:k.name})})},k.value)):null,c.actions.remember_me.enabled&&a(b.Fragment,{children:[a(fn,{}),a(eo,{required:!1,type:"checkbox",label:t("labels.staySignedIn"),checked:w,onChange:k=>_n(void 0,void 0,void 0,function*(){k.preventDefault();const E=yield c.actions.remember_me.run({remember_me:!w},{dispatchAfterStateChangeEvent:!1});A(O=>!O),E.dispatchAfterStateChangeEvent()})})]})]}),a(Oe,{hidden:s!=="auth",children:a(W,{center:!0,children:[a("span",{children:t("labels.alreadyHaveAnAccount")}),a(G,{onClick:k=>_n(void 0,void 0,void 0,function*(){k.preventDefault(),$(!0),n("login")}),loadingSpinnerPosition:"left",isLoading:C,children:t("labels.signIn")})]})})]})};var vi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Or=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)();return a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.registerPassword")}),a(Se,{state:t}),a(W,{children:e("texts.passwordFormatHint",{minLength:t.actions.register_password.inputs.new_password.min_length,maxLength:72})}),a(ne,{flowAction:t.actions.register_password,onSubmit:r=>vi(void 0,void 0,void 0,function*(){return r.preventDefault(),t.actions.register_password.run({new_password:n})}),children:[a(Le,{type:"password",autocomplete:"new-password",flowInput:t.actions.register_password.inputs.new_password,placeholder:e("labels.newPassword"),onInput:r=>vi(void 0,void 0,void 0,function*(){r.target instanceof HTMLInputElement&&i(r.target.value)}),autofocus:!0}),a(oe,{children:e("labels.continue")})]})]}),a(Oe,{hidden:!t.actions.back.enabled&&!t.actions.skip.enabled,children:[a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.back,children:e("labels.back")}),a(G,{loadingSpinnerPosition:"left",flowAction:t.actions.skip,children:e("labels.skip")})]})]})};var yn=te(597),zt={};zt.setAttributes=Ze(),zt.insert=o=>{window._hankoStyle=o},zt.domAPI=Be(),zt.insertStyleElement=Je(),Ve()(yn.A,zt);const Fe=yn.A&&yn.A.locals?yn.A.locals:void 0,Ht=function({name:o,columnSelector:e,contentSelector:t,data:n=[],checkedItemID:i,setCheckedItemID:r,dropdown:s=!1}){const c=(0,g.useCallback)(d=>`${o}-${d}`,[o]),u=(0,g.useCallback)(d=>c(d)===i,[i,c]),l=d=>{if(!(d.target instanceof HTMLInputElement))return;const h=parseInt(d.target.value,10),v=c(h);r(v===i?null:v)};return a("div",{className:Fe.accordion,children:n.map((d,h)=>a("div",{className:Fe.accordionItem,children:[a("input",{type:"radio",className:Fe.accordionInput,id:`${o}-${h}`,name:o,onClick:l,value:h,checked:u(h)}),a("label",{className:Q()(Fe.label,s&&Fe.dropdown),for:`${o}-${h}`,children:a("span",{className:Fe.labelText,children:e(d,h)})}),a("div",{className:Q()(Fe.accordionContent,s&&Fe.dropdownContent),children:t(d,h)})]},h))})},$e=({children:o})=>a("h2",{part:"headline2",className:Q()(hn.headline,hn.grade2),children:o});var oo=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Ir=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{const{t:i}=(0,g.useContext)(Z.TranslateContext),r=(0,g.useMemo)(()=>!1,[]);return a(Ht,{name:"email-edit-dropdown",columnSelector:s=>{const c=a("span",{className:Fe.description,children:s.is_verified?s.is_primary?a(b.Fragment,{children:[" -"," ",i("labels.primaryEmail")]}):null:a(b.Fragment,{children:[" -"," ",i("labels.unverifiedEmail")]})});return s.is_primary?a(b.Fragment,{children:[a("b",{children:s.address}),c]}):a(b.Fragment,{children:[s.address,c]})},data:t.payload.user.emails,contentSelector:s=>{var c,u;return a(b.Fragment,{children:[s.is_primary?a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.isPrimaryEmail")}),i("texts.isPrimaryEmail")]})}):a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.setPrimaryEmail")}),i("texts.setPrimaryEmail"),a("br",{}),a(G,{flowAction:t.actions.email_set_primary,onClick:l=>((d,h)=>oo(void 0,void 0,void 0,function*(){d.preventDefault();const v=yield t.actions.email_set_primary.run({email_id:h},{dispatchAfterStateChangeEvent:!1});return n(v)}))(l,s.id),loadingSpinnerPosition:"right",children:i("labels.setAsPrimaryEmail")})]})}),s.is_verified?a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.emailVerified")}),i("texts.emailVerified")]})}):a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.emailUnverified")}),i("texts.emailUnverified"),a("br",{}),a(G,{flowAction:t.actions.email_verify,onClick:l=>((d,h)=>oo(void 0,void 0,void 0,function*(){d.preventDefault();const v=yield t.actions.email_verify.run({email_id:h},{dispatchAfterStateChangeEvent:!1});return n(v)}))(l,s.id),loadingSpinnerPosition:"right",children:i("labels.verify")})]})}),!((c=t.actions.email_delete.inputs.email_id.allowed_values)===null||c===void 0)&&c.map(l=>l.value).includes(s.id)?a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.emailDelete")}),i("texts.emailDelete"),a("br",{}),a(G,{dangerous:!0,flowAction:t.actions.email_delete,onClick:l=>((d,h)=>oo(void 0,void 0,void 0,function*(){d.preventDefault();const v=yield t.actions.email_delete.run({email_id:h},{dispatchAfterStateChangeEvent:!1});return n(v)}))(l,s.id),disabled:r,loadingSpinnerPosition:"right",children:i("labels.delete")})]})}):null,((u=s.identities)===null||u===void 0?void 0:u.length)>0?a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.connectedAccounts")}),s.identities.map(l=>l.provider).join(", ")]})}):null]})},checkedItemID:o,setCheckedItemID:e})},Tr=({onCredentialNameSubmit:o,oldName:e,onBack:t,credential:n,credentialType:i,flowState:r})=>{const{t:s}=(0,g.useContext)(Z.TranslateContext),[c,u]=(0,g.useState)(e);return a(b.Fragment,{children:[a(we,{children:[a(le,{children:s(i==="security-key"?"headlines.renameSecurityKey":"headlines.renamePasskey")}),a(Se,{flowError:null}),a(W,{children:s(i==="security-key"?"texts.renameSecurityKey":"texts.renamePasskey")}),a(ne,{flowAction:r.actions.webauthn_credential_rename,onSubmit:l=>o(l,n.id,c),children:[a(Le,{type:"text",name:i,value:c,minLength:3,maxLength:32,required:!0,placeholder:s(i==="security-key"?"labels.newSecurityKeyName":"labels.newPasskeyName"),onInput:l=>function(d,h,v,f){return new(v||(v=Promise))(function(w,A){function C(k){try{K(f.next(k))}catch(E){A(E)}}function $(k){try{K(f.throw(k))}catch(E){A(E)}}function K(k){var E;k.done?w(k.value):(E=k.value,E instanceof v?E:new v(function(O){O(E)})).then(C,$)}K((f=f.apply(d,[])).next())})}(void 0,void 0,void 0,function*(){l.target instanceof HTMLInputElement&&u(l.target.value)}),autofocus:!0}),a(oe,{children:s("labels.save")})]})]}),a(Oe,{children:a(G,{onClick:t,loadingSpinnerPosition:"right",children:s("labels.back")})})]})},_i=({credentials:o=[],checkedItemID:e,setCheckedItemID:t,onBack:n,onCredentialNameSubmit:i,allowCredentialDeletion:r,credentialType:s,onCredentialDelete:c,flowState:u})=>{const{t:l}=(0,g.useContext)(Z.TranslateContext),{setPage:d}=(0,g.useContext)(De),h=f=>{if(f.name)return f.name;const w=f.public_key.replace(/[\W_]/g,"");return`${s==="security-key"?"SecurityKey":"Passkey"}-${w.substring(w.length-7,w.length)}`},v=f=>new Date(f).toLocaleString();return a(Ht,{name:s==="security-key"?"security-key-edit-dropdown":"passkey-edit-dropdown",columnSelector:f=>h(f),data:o,contentSelector:f=>a(b.Fragment,{children:[a(W,{children:[a($e,{children:l(s==="security-key"?"headlines.renameSecurityKey":"headlines.renamePasskey")}),l(s==="security-key"?"texts.renameSecurityKey":"texts.renamePasskey"),a("br",{}),a(G,{onClick:w=>((A,C,$)=>{A.preventDefault(),d(a(Tr,{oldName:h(C),credential:C,credentialType:$,onBack:n,onCredentialNameSubmit:i,flowState:u}))})(w,f,s),loadingSpinnerPosition:"right",children:l("labels.rename")})]}),a(W,{hidden:!r,children:[a($e,{children:l(s==="security-key"?"headlines.deleteSecurityKey":"headlines.deletePasskey")}),l(s==="security-key"?"texts.deleteSecurityKey":"texts.deletePasskey"),a("br",{}),a(G,{dangerous:!0,flowAction:u.actions.webauthn_credential_delete,onClick:w=>c(w,f.id),loadingSpinnerPosition:"right",children:l("labels.delete")})]}),a(W,{children:[a($e,{children:l("headlines.lastUsedAt")}),f.last_used_at?v(f.last_used_at):"-"]}),a(W,{children:[a($e,{children:l("headlines.createdAt")}),v(f.created_at)]})]}),checkedItemID:e,setCheckedItemID:t})},_t=({name:o,title:e,children:t,checkedItemID:n,setCheckedItemID:i})=>a(Ht,{dropdown:!0,name:o,columnSelector:()=>e,contentSelector:()=>a(b.Fragment,{children:t}),setCheckedItemID:i,checkedItemID:n,data:[{}]}),bn=({flowError:o})=>{const{t:e}=(0,g.useContext)(Z.TranslateContext);return a(b.Fragment,{children:o?a("div",{className:pi.errorMessage,children:e(`flowErrors.${o==null?void 0:o.code}`)}):null})},Ur=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{var i;const{t:r}=(0,g.useContext)(Z.TranslateContext),{setUIState:s}=(0,g.useContext)(De),[c,u]=(0,g.useState)();return a(_t,{name:"email-create-dropdown",title:r("labels.addEmail"),checkedItemID:o,setCheckedItemID:e,children:[a(bn,{flowError:(i=t.actions.email_create.inputs.email)===null||i===void 0?void 0:i.error}),a(ne,{flowAction:t.actions.email_create,onSubmit:l=>((d,h)=>function(v,f,w,A){return new(w||(w=Promise))(function(C,$){function K(O){try{E(A.next(O))}catch(M){$(M)}}function k(O){try{E(A.throw(O))}catch(M){$(M)}}function E(O){var M;O.done?C(O.value):(M=O.value,M instanceof w?M:new w(function(z){z(M)})).then(K,k)}E((A=A.apply(v,[])).next())})}(void 0,void 0,void 0,function*(){d.preventDefault(),s(f=>Object.assign(Object.assign({},f),{email:h}));const v=yield t.actions.email_create.run({email:h},{dispatchAfterStateChangeEvent:!1});return n(v)}))(l,c).then(()=>u("")),children:[a(Le,{markError:!0,type:"email",placeholder:r("labels.newEmailAddress"),onInput:l=>{l.preventDefault(),l.target instanceof HTMLInputElement&&u(l.target.value)},value:c,flowInput:t.actions.email_create.inputs.email}),a(oe,{children:r("labels.save")})]})]})};var yi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const $r=({checkedItemID:o,setCheckedItemID:e,onState:t,flowState:n})=>{var i,r,s;const{t:c}=(0,g.useContext)(Z.TranslateContext),[u,l]=(0,g.useState)(""),d=n.actions.password_create.enabled?n.actions.password_create:n.actions.password_update;return a(_t,{name:"password-edit-dropdown",title:c(n.actions.password_create.enabled?"labels.setPassword":"labels.changePassword"),checkedItemID:o,setCheckedItemID:e,children:[a(W,{children:c("texts.passwordFormatHint",{minLength:(i=d.inputs.password.min_length)===null||i===void 0?void 0:i.toString(10),maxLength:(r=d.inputs.password.max_length)===null||r===void 0?void 0:r.toString(10)})}),a(bn,{flowError:(s=n.actions.password_create.inputs.password)===null||s===void 0?void 0:s.error}),a(ne,{flowAction:d,onSubmit:h=>((v,f)=>yi(void 0,void 0,void 0,function*(){v.preventDefault();const w=yield d.run({password:f},{dispatchAfterStateChangeEvent:!1});return t(w)}))(h,u).then(()=>l("")),children:[a(Le,{markError:!0,autoComplete:"new-password",placeholder:c("labels.newPassword"),type:"password",onInput:h=>{h.preventDefault(),h.target instanceof HTMLInputElement&&l(h.target.value)},value:u,flowInput:d.inputs.password}),a(oe,{children:c("labels.save")})]}),a(G,{dangerous:!0,flowAction:n.actions.password_delete,onClick:h=>(v=>yi(void 0,void 0,void 0,function*(){v.preventDefault();const f=yield n.actions.password_delete.run(null,{dispatchAfterStateChangeEvent:!1});return t(f)}))(h).then(()=>l("")),loadingSpinnerPosition:"right",children:c("labels.delete")})]})},bi=({checkedItemID:o,setCheckedItemID:e,credentialType:t,flowState:n,onState:i})=>{const{t:r}=(0,g.useContext)(Z.TranslateContext),s=gt.supported(),c=t=="passkey"?n.actions.webauthn_credential_create:n.actions.security_key_create;return a(_t,{name:t==="security-key"?"security-key-create-dropdown":"passkey-create-dropdown",title:r(t==="security-key"?"labels.createSecurityKey":"labels.createPasskey"),checkedItemID:o,setCheckedItemID:e,children:[a(W,{children:r(t==="security-key"?"texts.securityKeySetUp":"texts.setupPasskey")}),a(ne,{onSubmit:u=>function(l,d,h,v){return new(h||(h=Promise))(function(f,w){function A(K){try{$(v.next(K))}catch(k){w(k)}}function C(K){try{$(v.throw(K))}catch(k){w(k)}}function $(K){var k;K.done?f(K.value):(k=K.value,k instanceof h?k:new h(function(E){E(k)})).then(A,C)}$((v=v.apply(l,[])).next())})}(void 0,void 0,void 0,function*(){u.preventDefault();const l=yield c.run(null,{dispatchAfterStateChangeEvent:!1});return i(l)}),flowAction:c,children:a(oe,{title:s?null:r("labels.webauthnUnsupported"),children:r(t==="security-key"?"labels.createSecurityKey":"labels.createPasskey")})})]})};var ki=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Dr=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{var i,r;const{t:s}=(0,g.useContext)(Z.TranslateContext),[c,u]=(0,g.useState)();return a(_t,{name:"username-edit-dropdown",title:s(t.payload.user.username?"labels.changeUsername":"labels.setUsername"),checkedItemID:o,setCheckedItemID:e,children:[a(bn,{flowError:t.payload.user.username?(i=t.actions.username_update.inputs.username)===null||i===void 0?void 0:i.error:(r=t.actions.username_create.inputs.username)===null||r===void 0?void 0:r.error}),a(ne,{flowAction:t.payload.user.username?t.actions.username_update:t.actions.username_create,onSubmit:l=>ki(void 0,void 0,void 0,function*(){l.preventDefault();const d=t.payload.user.username?t.actions.username_update:t.actions.username_create,h=yield d.run({username:c},{dispatchAfterStateChangeEvent:!1});return n(h).then(()=>u(""))}),children:[a(Le,{markError:!0,placeholder:s("labels.username"),type:"text",onInput:l=>{l.preventDefault(),l.target instanceof HTMLInputElement&&u(l.target.value)},value:c,flowInput:t.payload.user.username?t.actions.username_update.inputs.username:t.actions.username_create.inputs.username}),a(oe,{children:s("labels.save")})]}),a(G,{flowAction:t.actions.username_delete,onClick:l=>ki(void 0,void 0,void 0,function*(){l.preventDefault();const d=yield t.actions.username_delete.run(null,{dispatchAfterStateChangeEvent:!1});return n(d).then(()=>u(""))}),dangerous:!0,loadingSpinnerPosition:"right",children:s("labels.delete")})]})},Lr=({state:o,onBack:e})=>{const{t}=(0,g.useContext)(Z.TranslateContext);return a(b.Fragment,{children:[a(we,{children:[a(le,{children:t("headlines.deleteAccount")}),a(Se,{flowError:null}),a(W,{children:t("texts.deleteAccount")}),a(ne,{flowAction:o.actions.account_delete,children:[a(eo,{required:!0,type:"checkbox",label:t("labels.deleteAccount")}),a(oe,{children:t("labels.delete")})]})]}),a(Oe,{children:a(G,{onClick:e,children:t("labels.back")})})]})},Nr=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{const{t:i}=(0,g.useContext)(Z.TranslateContext),r=s=>new Date(s).toLocaleString();return a(Ht,{name:"session-edit-dropdown",columnSelector:s=>{const c=a("b",{children:s.user_agent?s.user_agent:s.id}),u=s.current?a("span",{className:Fe.description,children:a(b.Fragment,{children:[" -"," ",i("labels.currentSession")]})}):null;return a(b.Fragment,{children:[c,u]})},data:t.payload.sessions,contentSelector:s=>{var c,u,l;return a(b.Fragment,{children:[a(W,{hidden:!s.ip_address,children:[a($e,{children:i("headlines.ipAddress")}),s.ip_address]}),a(W,{children:[a($e,{children:i("headlines.lastUsed")}),r(s.last_used)]}),a(W,{children:[a($e,{children:i("headlines.createdAt")}),r(s.created_at)]}),!((l=(u=(c=t.actions.session_delete.inputs.session_id)===null||c===void 0?void 0:c.allowed_values)===null||u===void 0?void 0:u.map(d=>d.value))===null||l===void 0)&&l.includes(s.id)?a(W,{children:[a($e,{children:i("headlines.revokeSession")}),a(G,{dangerous:!0,onClick:d=>((h,v)=>function(f,w,A,C){return new(A||(A=Promise))(function($,K){function k(M){try{O(C.next(M))}catch(z){K(z)}}function E(M){try{O(C.throw(M))}catch(z){K(z)}}function O(M){var z;M.done?$(M.value):(z=M.value,z instanceof A?z:new A(function(F){F(z)})).then(k,E)}O((C=C.apply(f,[])).next())})}(void 0,void 0,void 0,function*(){h.preventDefault();const f=yield t.actions.session_delete.run({session_id:v},{dispatchAfterStateChangeEvent:!1});return n(f)}))(d,s.id),loadingSpinnerPosition:"right",children:i("labels.revoke")})]}):null]})},checkedItemID:o,setCheckedItemID:e})};var wi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Mr=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{var i,r,s,c;const{t:u}=(0,g.useContext)(Z.TranslateContext),l=a("span",{className:Fe.description,children:!((i=t.payload.user.mfa_config)===null||i===void 0)&&i.auth_app_set_up?a(b.Fragment,{children:[" -"," ",u("labels.configured")]}):null}),d=a(b.Fragment,{children:[u("labels.authenticatorAppManage")," ",l]});return a(_t,{name:"authenticator-app-manage-dropdown",title:d,checkedItemID:o,setCheckedItemID:e,children:[a($e,{children:u(!((r=t.payload.user.mfa_config)===null||r===void 0)&&r.auth_app_set_up?"headlines.authenticatorAppAlreadySetUp":"headlines.authenticatorAppNotSetUp")}),a(W,{children:[u(!((s=t.payload.user.mfa_config)===null||s===void 0)&&s.auth_app_set_up?"texts.authenticatorAppAlreadySetUp":"texts.authenticatorAppNotSetUp"),a("br",{}),!((c=t.payload.user.mfa_config)===null||c===void 0)&&c.auth_app_set_up?a(G,{flowAction:t.actions.otp_secret_delete,onClick:h=>wi(void 0,void 0,void 0,function*(){h.preventDefault();const v=yield t.actions.otp_secret_delete.run(null,{dispatchAfterStateChangeEvent:!1});return n(v)}),loadingSpinnerPosition:"right",dangerous:!0,children:u("labels.delete")}):a(G,{flowAction:t.actions.continue_to_otp_secret_creation,onClick:h=>wi(void 0,void 0,void 0,function*(){h.preventDefault();const v=yield t.actions.continue_to_otp_secret_creation.run(null,{dispatchAfterStateChangeEvent:!1});return n(v)}),loadingSpinnerPosition:"right",children:u("labels.authenticatorAppAdd")})]})]})},Rr=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{const{t:i}=(0,g.useContext)(Z.TranslateContext),r=(0,g.useMemo)(()=>!1,[]);return a(Ht,{name:"connected-accounts",columnSelector:s=>{const c=a("b",{children:s.provider});return a(b.Fragment,{children:c})},contentSelector:s=>a(b.Fragment,{children:a(b.Fragment,{children:a(W,{children:[a($e,{children:i("headlines.deleteIdentity")}),a(G,{dangerous:!0,flowAction:t.actions.disconnect_thirdparty_oauth_provider,onClick:c=>((u,l)=>function(d,h,v,f){return new(v||(v=Promise))(function(w,A){function C(k){try{K(f.next(k))}catch(E){A(E)}}function $(k){try{K(f.throw(k))}catch(E){A(E)}}function K(k){var E;k.done?w(k.value):(E=k.value,E instanceof v?E:new v(function(O){O(E)})).then(C,$)}K((f=f.apply(d,[])).next())})}(void 0,void 0,void 0,function*(){u.preventDefault();const d=yield t.actions.disconnect_thirdparty_oauth_provider.run({identity_id:l},{dispatchAfterStateChangeEvent:!1});return n(d)}))(c,s.identity_id),disabled:r,loadingSpinnerPosition:"right",children:i("labels.delete")})]})})}),checkedItemID:o,setCheckedItemID:e,data:t.payload.user.identities})},zr=({checkedItemID:o,setCheckedItemID:e,flowState:t,onState:n})=>{var i,r;const{t:s}=(0,g.useContext)(Z.TranslateContext);return a(_t,{name:"connect-account-dropdown",title:s("labels.connectAccount"),checkedItemID:o,setCheckedItemID:e,children:[a(bn,{flowError:(i=t.actions.connect_thirdparty_oauth_provider.inputs.provider)===null||i===void 0?void 0:i.error}),(r=t.actions.connect_thirdparty_oauth_provider.inputs.provider.allowed_values)===null||r===void 0?void 0:r.map(c=>a(ne,{flowAction:t.actions.connect_thirdparty_oauth_provider,onSubmit:u=>((l,d)=>function(h,v,f,w){return new(f||(f=Promise))(function(A,C){function $(E){try{k(w.next(E))}catch(O){C(O)}}function K(E){try{k(w.throw(E))}catch(O){C(O)}}function k(E){var O;E.done?A(E.value):(O=E.value,O instanceof f?O:new f(function(M){M(O)})).then($,K)}k((w=w.apply(h,[])).next())})}(void 0,void 0,void 0,function*(){l.preventDefault();const h=on();an(h);try{const v=yield t.actions.connect_thirdparty_oauth_provider.run({provider:d,redirect_to:window.location.href,code_verifier:h});return v.error&&tt(),n(v)}catch(v){throw tt(),v}}))(u,c.value),children:a(oe,{icon:c.value.startsWith("custom_")?"customProvider":c.value,children:c.name},c)},c.value))]})};var kn=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Si=o=>{var e,t,n,i,r,s,c;const{t:u}=(0,g.useContext)(Z.TranslateContext),{setPage:l}=(0,g.useContext)(De),{flowState:d}=Pe(o.state),[h,v]=(0,g.useState)(""),f=C=>kn(void 0,void 0,void 0,function*(){C!=null&&C.error||(v(null),yield new Promise($=>setTimeout($,360))),C.dispatchAfterStateChangeEvent()}),w=(C,$,K)=>kn(void 0,void 0,void 0,function*(){C.preventDefault();const k=yield d.actions.webauthn_credential_rename.run({passkey_id:$,passkey_name:K},{dispatchAfterStateChangeEvent:!1});return f(k)}),A=C=>(C.preventDefault(),l(a(Si,{state:d,enablePasskeys:o.enablePasskeys})),Promise.resolve());return a(we,{children:[a(Se,{state:((e=d==null?void 0:d.error)===null||e===void 0?void 0:e.code)!=="form_data_invalid_error"?d:null}),d.actions.username_create.enabled||d.actions.username_update.enabled||d.actions.username_delete.enabled?a(b.Fragment,{children:[a(le,{children:u("labels.username")}),d.payload.user.username?a(W,{children:a("b",{children:d.payload.user.username.username})}):null,a(W,{children:d.actions.username_create.enabled||d.actions.username_update.enabled?a(Dr,{onState:f,flowState:d,checkedItemID:h,setCheckedItemID:v}):null})]}):null,!((n=(t=d.payload)===null||t===void 0?void 0:t.user)===null||n===void 0)&&n.emails||d.actions.email_create.enabled?a(b.Fragment,{children:[a(le,{children:u("headlines.profileEmails")}),a(W,{children:[a(Ir,{flowState:d,onState:f,checkedItemID:h,setCheckedItemID:v}),d.actions.email_create.enabled?a(Ur,{flowState:d,onState:f,checkedItemID:h,setCheckedItemID:v}):null]})]}):null,d.actions.password_create.enabled||d.actions.password_update.enabled?a(b.Fragment,{children:[a(le,{children:u("headlines.profilePassword")}),a(W,{children:a($r,{flowState:d,onState:f,checkedItemID:h,setCheckedItemID:v})})]}):null,o.enablePasskeys&&(!((r=(i=d.payload)===null||i===void 0?void 0:i.user)===null||r===void 0)&&r.passkeys||d.actions.webauthn_credential_create.enabled)?a(b.Fragment,{children:[a(le,{children:u("headlines.profilePasskeys")}),a(W,{children:[a(_i,{flowState:d,onBack:A,onCredentialNameSubmit:w,onCredentialDelete:(C,$)=>kn(void 0,void 0,void 0,function*(){C.preventDefault();const K=yield d.actions.webauthn_credential_delete.run({passkey_id:$},{dispatchAfterStateChangeEvent:!1});return f(K)}),credentials:d.payload.user.passkeys,checkedItemID:h,setCheckedItemID:v,allowCredentialDeletion:!!d.actions.webauthn_credential_delete.enabled,credentialType:"passkey"}),d.actions.webauthn_credential_create.enabled?a(bi,{flowState:d,onState:f,credentialType:"passkey",checkedItemID:h,setCheckedItemID:v}):null]})]}):null,!((s=d.payload.user.mfa_config)===null||s===void 0)&&s.security_keys_enabled?a(b.Fragment,{children:[a(le,{children:u("headlines.securityKeys")}),a(W,{children:[a(_i,{onBack:A,flowState:d,onCredentialNameSubmit:w,onCredentialDelete:(C,$)=>kn(void 0,void 0,void 0,function*(){C.preventDefault();const K=yield d.actions.security_key_delete.run({security_key_id:$},{dispatchAfterStateChangeEvent:!1});return f(K)}),credentials:d.payload.user.security_keys,checkedItemID:h,setCheckedItemID:v,allowCredentialDeletion:!!d.actions.security_key_delete.enabled,credentialType:"security-key"}),d.actions.security_key_create.enabled?a(bi,{flowState:d,onState:f,credentialType:"security-key",checkedItemID:h,setCheckedItemID:v}):null]})]}):null,!((c=d.payload.user.mfa_config)===null||c===void 0)&&c.totp_enabled?a(b.Fragment,{children:[a(le,{children:u("headlines.authenticatorApp")}),a(W,{children:a(Mr,{onState:f,flowState:d,checkedItemID:h,setCheckedItemID:v})})]}):null,d.actions.connect_thirdparty_oauth_provider.enabled||d.actions.disconnect_thirdparty_oauth_provider.enabled?a(b.Fragment,{children:[a(le,{children:u("headlines.connectedAccounts")}),a(Rr,{flowState:d,onState:f,checkedItemID:h,setCheckedItemID:v}),d.actions.connect_thirdparty_oauth_provider.enabled?a(zr,{setCheckedItemID:v,flowState:d,onState:f,checkedItemID:h}):null]}):null,d.payload.sessions?a(b.Fragment,{children:[a(le,{children:u("headlines.profileSessions")}),a(W,{children:a(Nr,{flowState:d,onState:f,checkedItemID:h,setCheckedItemID:v})})]}):null,d.actions.account_delete.enabled?a(b.Fragment,{children:[a(fn,{}),a(W,{children:a(Gn,{})}),a(W,{children:a(ne,{onSubmit:C=>(C.preventDefault(),l(a(Lr,{onBack:A,state:d})),Promise.resolve()),flowAction:d.actions.account_delete,children:a(oe,{dangerous:!0,children:u("headlines.deleteAccount")})})})]}):null]})},Hr=Si,Ai=({state:o,error:e})=>{const{t}=(0,g.useContext)(Z.TranslateContext),{init:n,componentName:i}=(0,g.useContext)(De),[r,s]=(0,g.useState)(!1),c=(0,g.useCallback)(()=>n(i),[i,n]),{flowState:u}=Pe(o);return(0,g.useEffect)(()=>(addEventListener("hankoAuthSuccess",c),()=>{removeEventListener("hankoAuthSuccess",c)}),[c]),a(we,{children:[a(le,{children:t("headlines.error")}),a(Se,{state:u,error:e}),a(ne,{onSubmit:l=>{l.preventDefault(),s(!0),c()},children:a(oe,{isLoading:r,children:t("labels.continue")})})]})};var Ci=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const qr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)();return a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.createEmail")}),a(Se,{state:t}),a(ne,{onSubmit:r=>Ci(void 0,void 0,void 0,function*(){return r.preventDefault(),t.actions.email_address_set.run({email:n})}),flowAction:t.actions.email_address_set,children:[a(Le,{type:"email",autoComplete:"email",autoCorrect:"off",flowInput:t.actions.email_address_set.inputs.email,onInput:r=>Ci(void 0,void 0,void 0,function*(){r.target instanceof HTMLInputElement&&i(r.target.value)}),placeholder:e("labels.email"),pattern:"^.*[^0-9]+$",value:n}),a(oe,{children:e("labels.continue")})]})]}),a(Oe,{hidden:!t.actions.skip.enabled,children:[a("span",{hidden:!0}),a(G,{flowAction:t.actions.skip,loadingSpinnerPosition:"left",children:e("labels.skip")})]})]})};var xi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const jr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)();return a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.createUsername")}),a(Se,{state:t}),a(ne,{flowAction:t.actions.username_create,onSubmit:r=>xi(void 0,void 0,void 0,function*(){return r.preventDefault(),t.actions.username_create.run({username:n})}),children:[a(Le,{type:"text",autoComplete:"username",autoCorrect:"off",flowInput:t.actions.username_create.inputs.username,onInput:r=>xi(void 0,void 0,void 0,function*(){r.target instanceof HTMLInputElement&&i(r.target.value)}),value:n,placeholder:e("labels.username")}),a(oe,{children:e("labels.continue")})]})]}),a(Oe,{hidden:!t.actions.skip.enabled,children:[a("span",{hidden:!0}),a(G,{flowAction:t.actions.skip,loadingSpinnerPosition:"left",children:e("labels.skip")})]})]})},Fr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state);return a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.setupLoginMethod")}),a(Se,{flowError:t==null?void 0:t.error}),a(W,{children:e("texts.selectLoginMethodForFutureLogins")}),a(ne,{flowAction:t.actions.continue_to_passkey_registration,children:a(oe,{secondary:!0,icon:"passkey",children:e("labels.passkey")})}),a(ne,{flowAction:t.actions.continue_to_password_registration,children:a(oe,{secondary:!0,icon:"password",children:e("labels.password")})})]}),a(Oe,{hidden:!t.actions.back.enabled&&!t.actions.skip.enabled,children:[a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.back,children:e("labels.back")}),a(G,{loadingSpinnerPosition:"left",flowAction:t.actions.skip,children:e("labels.skip")})]})]})};var Pi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Kr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)([]),r=(0,g.useCallback)(s=>Pi(void 0,void 0,void 0,function*(){return t.actions.otp_code_validate.run({otp_code:s})}),[t]);return(0,g.useEffect)(()=>{i([])},[t]),a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.otpLogin")}),a(Se,{state:t}),a(W,{children:e("texts.otpLogin")}),a(ne,{flowAction:t.actions.otp_code_validate,onSubmit:s=>Pi(void 0,void 0,void 0,function*(){return s.preventDefault(),r(n.join(""))}),children:[a(no,{onInput:s=>{if(i(s),s.filter(c=>c!=="").length===6)return r(s.join(""))},passcodeDigits:n,numberOfInputs:6}),a(oe,{children:e("labels.continue")})]})]}),a(Oe,{hidden:!t.actions.continue_to_login_security_key.enabled,children:a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.continue_to_login_security_key,children:e("labels.useAnotherMethod")})})]})},Wr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state);return a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.securityKeyLogin")}),a(Se,{state:t}),a(W,{children:e("texts.securityKeyLogin")}),a(ne,{flowAction:t.actions.webauthn_generate_request_options,children:a(oe,{autofocus:!0,icon:"securityKey",children:e("labels.securityKeyUse")})})]}),a(Oe,{hidden:!t.actions.continue_to_login_otp.enabled,children:a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.continue_to_login_otp,children:e("labels.useAnotherMethod")})})]})},Vr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),n=(0,g.useMemo)(()=>{const{actions:i}=t;return i.continue_to_security_key_creation.enabled&&!i.continue_to_otp_secret_creation.enabled?i.continue_to_security_key_creation:!i.continue_to_security_key_creation.enabled&&i.continue_to_otp_secret_creation.enabled?i.continue_to_otp_secret_creation:void 0},[t]);return a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.mfaSetUp")}),a(Se,{flowError:t==null?void 0:t.error}),a(W,{children:e("texts.mfaSetUp")}),n?a(ne,{flowAction:n,children:a(oe,{children:e("labels.continue")})}):a(b.Fragment,{children:[a(ne,{flowAction:t.actions.continue_to_security_key_creation,children:a(oe,{secondary:!0,icon:"securityKey",children:e("labels.securityKey")})}),a(ne,{flowAction:t.actions.continue_to_otp_secret_creation,children:a(oe,{secondary:!0,icon:"qrCodeScanner",children:e("labels.authenticatorApp")})})]})]}),a(Oe,{children:[a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.back,children:e("labels.back")}),a(G,{loadingSpinnerPosition:"left",flowAction:t.actions.skip,children:e("labels.skip")})]})]})};var wn=te(8),qt={};qt.setAttributes=Ze(),qt.insert=o=>{window._hankoStyle=o},qt.domAPI=Be(),qt.insertStyleElement=Je(),Ve()(wn.A,qt);const Br=wn.A&&wn.A.locals?wn.A.locals:void 0,Zr=({children:o,text:e})=>{const{t}=(0,g.useContext)(Z.TranslateContext),[n,i]=(0,g.useState)(!1);return a("section",{className:Ot.clipboardContainer,children:[a("div",{children:[o," "]}),a("div",{className:Ot.clipboardIcon,onClick:r=>function(s,c,u,l){return new(u||(u=Promise))(function(d,h){function v(A){try{w(l.next(A))}catch(C){h(C)}}function f(A){try{w(l.throw(A))}catch(C){h(C)}}function w(A){var C;A.done?d(A.value):(C=A.value,C instanceof u?C:new u(function($){$(C)})).then(v,f)}w((l=l.apply(s,[])).next())})}(void 0,void 0,void 0,function*(){r.preventDefault();try{yield navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),1500)}catch(s){console.error("Failed to copy: ",s)}}),children:n?a("span",{children:["- ",t("labels.copied")]}):a(Tt,{name:"copy",secondary:!0,size:13})})]})},Jr=({src:o,secret:e})=>{const{t}=(0,g.useContext)(Z.TranslateContext);return a("div",{className:Br.otpCreationDetails,children:[a("img",{alt:"QR-Code",src:o}),a(fn,{}),a(Zr,{text:e,children:t("texts.otpSecretKey")}),a("div",{children:e})]})};var Ei=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,[])).next())})};const Yr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state),[n,i]=(0,g.useState)([]),r=(0,g.useCallback)(s=>Ei(void 0,void 0,void 0,function*(){return t.actions.otp_code_verify.run({otp_code:s})}),[t]);return(0,g.useEffect)(()=>{var s;((s=t.error)===null||s===void 0?void 0:s.code)==="passcode_invalid"&&i([])},[t]),a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.otpSetUp")}),a(Se,{state:t}),a(W,{children:e("texts.otpScanQRCode")}),a(Jr,{src:t.payload.otp_image_source,secret:t.payload.otp_secret}),a(W,{children:e("texts.otpEnterVerificationCode")}),a(ne,{flowAction:t.actions.otp_code_verify,onSubmit:s=>Ei(void 0,void 0,void 0,function*(){return s.preventDefault(),r(n.join(""))}),children:[a(no,{onInput:s=>{if(i(s),s.filter(c=>c!=="").length===6)return r(s.join(""))},passcodeDigits:n,numberOfInputs:6}),a(oe,{children:e("labels.continue")})]})]}),a(Oe,{children:a(G,{flowAction:t.actions.back,loadingSpinnerPosition:"right",children:e("labels.back")})})]})},Qr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state);return a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.securityKeySetUp")}),a(Se,{state:t}),a(W,{children:e("texts.securityKeySetUp")}),a(ne,{flowAction:t.actions.webauthn_generate_creation_options,children:a(oe,{autofocus:!0,icon:"securityKey",children:e("labels.createSecurityKey")})})]}),a(Oe,{hidden:!t.actions.back.enabled,children:a(G,{loadingSpinnerPosition:"right",flowAction:t.actions.back,children:e("labels.back")})})]})},Gr=o=>{const{t:e}=(0,g.useContext)(Z.TranslateContext),{flowState:t}=Pe(o.state);return a(b.Fragment,{children:[a(we,{children:[a(le,{children:e("headlines.trustDevice")}),a(Se,{flowError:t==null?void 0:t.error}),a(W,{children:e("texts.trustDevice")}),a(ne,{flowAction:t.actions.trust_device,children:a(oe,{children:e("labels.trustDevice")})})]}),a(Oe,{children:[a(G,{flowAction:t.actions.back,loadingSpinnerPosition:"right",children:e("labels.back")}),a(G,{flowAction:t.actions.skip,loadingSpinnerPosition:"left",children:e("labels.skip")})]})]})};var Oi=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,e||[])).next())})};const De=(0,b.createContext)(null),Xr=o=>{var e,{lang:t,prefilledEmail:n,prefilledUsername:i,globalOptions:r,createWebauthnAbortSignal:s,nonce:c}=o,u=function(q,H){var Ee={};for(var se in q)Object.prototype.hasOwnProperty.call(q,se)&&H.indexOf(se)<0&&(Ee[se]=q[se]);if(q!=null&&typeof Object.getOwnPropertySymbols=="function"){var Ie=0;for(se=Object.getOwnPropertySymbols(q);Ie<se.length;Ie++)H.indexOf(se[Ie])<0&&Object.prototype.propertyIsEnumerable.call(q,se[Ie])&&(Ee[se[Ie]]=q[se[Ie]])}return Ee}(o,["lang","prefilledEmail","prefilledUsername","globalOptions","createWebauthnAbortSignal","nonce"]);const{hanko:l,injectStyles:d,hidePasskeyButtonOnLogin:h,translations:v,translationsLocation:f,fallbackLanguage:w}=r;l.setLang((t==null?void 0:t.toString())||w);const A=(0,g.useRef)(null),C=(0,g.useMemo)(()=>`${r.storageKey}_last_login`,[r.storageKey]),[$,K]=(0,g.useState)(u.componentName),[k,E]=(0,g.useState)((e=u.mode)!==null&&e!==void 0?e:"login"),O=(0,g.useRef)(!1),[M,z]=(0,g.useState)(!1),F=(0,g.useMemo)(()=>({auth:k,login:"login",registration:"registration",profile:"profile",events:null}),[k]),V=(0,g.useMemo)(()=>a(br,{}),[]),[ee,N]=(0,g.useState)(V),[,ge]=(0,g.useState)(l),[_e,ue]=(0,g.useState)(),[de,re]=(0,g.useState)({email:n,username:i}),ye=function(q,H){var Ee;(Ee=A.current)===null||Ee===void 0||Ee.dispatchEvent(new CustomEvent(q,{detail:H,bubbles:!1,composed:!0}))},Me=(0,g.useCallback)(q=>F[$]==q.flowName,[F,$,k]),ct=q=>{N(a(Ai,{error:q instanceof st?q:new je(q)}))};(0,g.useMemo)(()=>l.onBeforeStateChange(({state:q})=>{Me(q)&&re(H=>Object.assign(Object.assign({},H),{isDisabled:!0,error:void 0}))}),[l,Me]),(0,g.useEffect)(()=>{re(q=>Object.assign(Object.assign(Object.assign({},q),n&&{email:n}),i&&{username:i}))},[n,i]),(0,g.useEffect)(()=>l.onAfterStateChange(q=>Oi(void 0,[q],void 0,function*({state:H}){var Ee;if(Me(H))switch(["onboarding_verify_passkey_attestation","webauthn_credential_verification","login_passkey","thirdparty"].includes(H.name)||re(se=>Object.assign(Object.assign({},se),{isDisabled:!1})),H.name){case"login_init":N(a(kr,{state:H})),H.passkeyAutofillActivation();break;case"passcode_confirmation":N(a(Sr,{state:H}));break;case"login_otp":N(a(Kr,{state:H}));break;case"onboarding_create_passkey":N(a(Ar,{state:H}));break;case"login_password":N(a(Cr,{state:H}));break;case"login_password_recovery":N(a(xr,{state:H}));break;case"login_security_key":N(a(Wr,{state:H}));break;case"mfa_method_chooser":N(a(Vr,{state:H}));break;case"mfa_otp_secret_creation":N(a(Yr,{state:H}));break;case"mfa_security_key_creation":N(a(Qr,{state:H}));break;case"login_method_chooser":N(a(Pr,{state:H}));break;case"registration_init":N(a(Er,{state:H}));break;case"password_creation":N(a(Or,{state:H}));break;case"success":!((Ee=H.payload)===null||Ee===void 0)&&Ee.last_login&&localStorage.setItem(C,JSON.stringify(H.payload.last_login)),H.autoStep();break;case"profile_init":N(a(Hr,{state:H,enablePasskeys:r.enablePasskeys}));break;case"error":N(a(Ai,{state:H}));break;case"onboarding_email":N(a(qr,{state:H}));break;case"onboarding_username":N(a(jr,{state:H}));break;case"credential_onboarding_chooser":N(a(Fr,{state:H}));break;case"device_trust":N(a(Gr,{state:H}))}})),[$,F]);const lt=(0,g.useCallback)(q=>Oi(void 0,void 0,void 0,function*(){re(se=>Object.assign(Object.assign({},se),{isDisabled:!0}));const H=localStorage.getItem(C);H&&ue(JSON.parse(H));const Ee={excludeAutoSteps:["success"],cacheKey:"hanko-auth-flow-state",dispatchAfterStateChangeEvent:!1};if(new URLSearchParams(window.location.search).get("saml_hint")==="idp_initiated")E("token_exchange"),yield l.createState("token_exchange",Object.assign(Object.assign({},Ee),{dispatchAfterStateChangeEvent:!0}));else{const se=yield l.createState(q,Ee);E(se.flowName),setTimeout(()=>se.dispatchAfterStateChangeEvent(),500)}}),[]),x=(0,g.useCallback)(q=>{K(q);const H=F[q];H&&lt(H).catch(ct)},[F]);(0,g.useEffect)(()=>{if(!O.current){const q=setTimeout(()=>{var H;E((H=u.mode)!==null&&H!==void 0?H:"login"),z(!0)},0);return()=>clearTimeout(q)}},[u.mode]),(0,g.useEffect)(()=>{M&&!O.current&&(O.current=!0,x($))},[M,k,$,x]),(0,g.useEffect)(()=>{l.onUserDeleted(()=>{ye("onUserDeleted")}),l.onSessionCreated(q=>{ye("onSessionCreated",q)}),l.onSessionExpired(()=>{ye("onSessionExpired")}),l.onUserLoggedOut(()=>{ye("onUserLoggedOut")}),l.onBeforeStateChange(q=>{ye("onBeforeStateChange",q)}),l.onAfterStateChange(q=>{ye("onAfterStateChange",q)})},[l]),(0,g.useMemo)(()=>{const q=()=>{x($)};["auth","login","registration"].includes($)?(l.onUserLoggedOut(q),l.onSessionExpired(q),l.onUserDeleted(q)):$==="profile"&&l.onSessionCreated(q)},[$,l,x]);const I=De.Provider,D=Z.TranslateProvider,J=tr;return a(I,{value:{init:x,initialComponentName:u.componentName,setUIState:re,uiState:de,hanko:l,setHanko:ge,lang:(t==null?void 0:t.toString())||w,prefilledEmail:n,prefilledUsername:i,componentName:$,setComponentName:K,hidePasskeyButtonOnLogin:h,page:ee,setPage:N,lastLogin:_e,isOwnFlow:Me},children:a(D,{translations:v,fallbackLang:w,root:f,children:a(J,{ref:A,children:$!=="events"?a(b.Fragment,{children:[d?a("style",{nonce:c||void 0,dangerouslySetInnerHTML:{__html:window._hankoStyle.innerHTML}}):null,ee]}):null})})})},es={en:te(6).en};var Ii=function(o,e,t,n){return new(t||(t=Promise))(function(i,r){function s(l){try{u(n.next(l))}catch(d){r(d)}}function c(l){try{u(n.throw(l))}catch(d){r(d)}}function u(l){var d;l.done?i(l.value):(d=l.value,d instanceof t?d:new t(function(h){h(d)})).then(s,c)}u((n=n.apply(o,e||[])).next())})};const Ye={},jt=(o,e)=>{var t;const n=(t=document.getElementsByTagName(`hanko-${o}`).item(0))===null||t===void 0?void 0:t.nonce;return a(Xr,Object.assign({componentName:o,globalOptions:Ye,createWebauthnAbortSignal:rs},e,{nonce:n}))},ts=o=>jt("auth",o),ns=o=>jt("login",o),os=o=>jt("registration",o),is=o=>jt("profile",o),as=o=>jt("events",o);let Sn=new AbortController;const rs=()=>(Sn&&Sn.abort(),Sn=new AbortController,Sn.signal),Ft=o=>Ii(void 0,[o],void 0,function*({tagName:e,entryComponent:t,shadow:n=!0,observedAttributes:i}){customElements.get(e)||function(r,s,c,u){function l(){var d=Reflect.construct(HTMLElement,[],l);return d._vdomComponent=r,d._root=u&&u.shadow?d.attachShadow({mode:"open"}):d,d}(l.prototype=Object.create(HTMLElement.prototype)).constructor=l,l.prototype.connectedCallback=Aa,l.prototype.attributeChangedCallback=Ca,l.prototype.disconnectedCallback=xa,c=c||r.observedAttributes||Object.keys(r.propTypes||{}),l.observedAttributes=c,c.forEach(function(d){Object.defineProperty(l.prototype,d,{get:function(){var h,v,f,w;return(h=(v=this._vdom)==null||(f=v.props)==null?void 0:f[d])!=null?h:(w=this._props)==null?void 0:w[d]},set:function(h){this._vdom?this.attributeChangedCallback(d,null,h):(this._props||(this._props={}),this._props[d]=h,this.connectedCallback());var v=typeof h;h!=null&&v!=="string"&&v!=="boolean"&&v!=="number"||this.setAttribute(d,h)}})}),customElements.define(s||r.tagName||r.displayName||r.name,l)}(t,e,i,{shadow:n})}),Ti=(o,...e)=>Ii(void 0,[o,...e],void 0,function*(t,n={}){const i=["api","lang","prefilled-email","entry","mode"];return n=Object.assign({shadow:!0,injectStyles:!0,enablePasskeys:!0,hidePasskeyButtonOnLogin:!1,translations:null,translationsLocation:"/i18n",fallbackLanguage:"en",storageKey:"hanko",sessionCheckInterval:3e4},n),Ye.hanko=new di(t,{cookieName:n.storageKey,cookieDomain:n.cookieDomain,cookieSameSite:n.cookieSameSite,localStorageKey:n.storageKey,sessionCheckInterval:n.sessionCheckInterval,sessionTokenLocation:n.sessionTokenLocation}),Ye.injectStyles=n.injectStyles,Ye.enablePasskeys=n.enablePasskeys,Ye.hidePasskeyButtonOnLogin=n.hidePasskeyButtonOnLogin,Ye.translations=n.translations||es,Ye.translationsLocation=n.translationsLocation,Ye.fallbackLanguage=n.fallbackLanguage,Ye.storageKey=n.storageKey,yield Promise.all([Ft(Object.assign(Object.assign({},n),{tagName:"hanko-auth",entryComponent:ts,observedAttributes:i})),Ft(Object.assign(Object.assign({},n),{tagName:"hanko-login",entryComponent:ns,observedAttributes:i})),Ft(Object.assign(Object.assign({},n),{tagName:"hanko-registration",entryComponent:os,observedAttributes:i})),Ft(Object.assign(Object.assign({},n),{tagName:"hanko-profile",entryComponent:is,observedAttributes:i.filter(r=>["api","lang"].includes(r))})),Ft(Object.assign(Object.assign({},n),{tagName:"hanko-events",entryComponent:as,observedAttributes:[]}))]),{hanko:Ye.hanko}}),ss=Object.freeze(Object.defineProperty({__proto__:null,Action:Pt,Client:Bn,CustomEventWithDetail:Jo,Hanko:di,HankoError:st,HttpClient:Vn,Relay:Go,RequestTimeoutError:tn,SessionClient:Zn,State:He,TechnicalError:je,UnauthorizedError:ft,UserClient:li,WebauthnSupport:gt,clearStoredCodeVerifier:tt,generateCodeVerifier:on,getStoredCodeVerifier:ai,register:Ti,sessionCreatedType:qn,sessionExpiredType:jn,setStoredCodeVerifier:an,userDeletedType:Kn,userLoggedOutType:Fn},Symbol.toStringTag,{value:"Module"})),cs=Bi`
46
46
  :host {
47
47
  display: block;
48
48
  font-family: var(--font-family, var(--hot-font-sans));
@@ -316,7 +316,7 @@ var HankoAuth=function(Y){"use strict";/**
316
316
 
317
317
  .login-link {
318
318
  color: var(--login-btn-text-color, white);
319
- font-size: var(--login-btn-text-size, var(--hot-font-size-medium));
319
+ font-size: var(--hot-font-size-small);
320
320
  border-radius: var(
321
321
  --login-btn-border-radius,
322
322
  var(--hot-border-radius-medium)
@@ -345,11 +345,11 @@ var HankoAuth=function(Y){"use strict";/**
345
345
  border: none;
346
346
  }
347
347
  .login-link.filled.primary {
348
- background: var(--login-btn-bg-color, var(--hot-color-primary-1000));
348
+ background: var(--hot-color-gray-950);
349
349
  color: var(--login-btn-text-color, white);
350
350
  }
351
351
  .login-link.filled.primary:hover {
352
- background: var(--login-btn-hover-bg-color, var(--hot-color-primary-900));
352
+ background: var(--hot-color-primary-800);
353
353
  }
354
354
  .login-link.filled.neutral {
355
355
  background: var(--login-btn-bg-color, var(--hot-color-neutral-600));
@@ -372,8 +372,8 @@ var HankoAuth=function(Y){"use strict";/**
372
372
  border: 1px solid;
373
373
  }
374
374
  .login-link.outline.primary {
375
- border-color: var(--login-btn-bg-color, var(--hot-color-primary-1000));
376
- color: var(--login-btn-text-color, var(--hot-color-primary-1000));
375
+ border-color: var(--login-btn-bg-color, var(--hot-color-primary-950));
376
+ color: var(--login-btn-text-color, var(--hot-color-primary-950));
377
377
  }
378
378
  .login-link.outline.primary:hover {
379
379
  background: var(--login-btn-hover-bg-color, var(--hot-color-primary-50));
@@ -399,7 +399,7 @@ var HankoAuth=function(Y){"use strict";/**
399
399
  border: none;
400
400
  }
401
401
  .login-link.plain.primary {
402
- color: var(--login-btn-text-color, var(--hot-color-primary-1000));
402
+ color: var(--login-btn-text-color, var(--hot-color-primary-950));
403
403
  }
404
404
  .login-link.plain.primary:hover {
405
405
  background: var(--login-btn-hover-bg-color, var(--hot-color-primary-50));
@@ -568,7 +568,7 @@ var HankoAuth=function(Y){"use strict";/**
568
568
  font-weight: bold;
569
569
  text-decoration: underline;
570
570
  }
571
- `;var io={d:(o,e)=>{for(var t in e)io.o(e,t)&&!io.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e)},Ui={};io.d(Ui,{en:()=>ls});const ls={headlines:{error:"An error has occurred",loginEmail:"Sign in or create account",loginEmailNoSignup:"Sign in",loginFinished:"Login successful",loginPasscode:"Enter passcode",loginPassword:"Enter password",registerAuthenticator:"Create a passkey",registerConfirm:"Create account?",registerPassword:"Set new password",otpSetUp:"Set up authenticator app",profileEmails:"Emails",profilePassword:"Password",profilePasskeys:"Passkeys",isPrimaryEmail:"Primary email address",setPrimaryEmail:"Set primary email address",createEmail:"Enter a new email",createUsername:"Enter a new username",emailVerified:"Verified",emailUnverified:"Unverified",emailDelete:"Delete",renamePasskey:"Rename passkey",deletePasskey:"Delete passkey",lastUsedAt:"Last used at",createdAt:"Created at",connectedAccounts:"Connected accounts",deleteAccount:"Delete account",accountNotFound:"Account not found",signIn:"Sign in",signUp:"Create account",selectLoginMethod:"Select login method",setupLoginMethod:"Set up login method",lastUsed:"Last seen",ipAddress:"IP address",revokeSession:"Revoke session",profileSessions:"Sessions",mfaSetUp:"Set up MFA",securityKeySetUp:"Add security key",securityKeyLogin:"Security key",otpLogin:"Authentication code",renameSecurityKey:"Rename security key",deleteSecurityKey:"Delete security key",securityKeys:"Security keys",authenticatorApp:"Authenticator app",authenticatorAppAlreadySetUp:"Authenticator app is set up",authenticatorAppNotSetUp:"Set up authenticator app",trustDevice:"Trust this browser?",deleteIdentity:"Delete connection"},texts:{enterPasscode:"Enter the passcode sent to your email address.",enterPasscodeNoEmail:"Enter the passcode that was sent to your primary email address.",setupPasskey:"Sign in to your account easily and securely with a passkey. Note: Your biometric data is only stored on your devices and will never be shared with anyone.",createAccount:'No account exists for "{emailAddress}". Do you want to create a new account?',otpEnterVerificationCode:"Enter the one-time password (OTP) obtained from your authenticator app below:",otpScanQRCode:"Scan the QR code using your authenticator app (such as Google Authenticator or any other TOTP app). Alternatively, you can manually enter the OTP secret key into the app.",otpSecretKey:"OTP secret key",passwordFormatHint:"Must be between {minLength} and {maxLength} characters long.",securityKeySetUp:"Use a dedicated security key via USB, Bluetooth, or NFC, or your mobile phone. Connect or activate your security key, then click the button below and follow the prompts to complete the registration.",setPrimaryEmail:"Set this email address to be used for contacting you.",isPrimaryEmail:"This email address will be used to contact you if necessary.",emailVerified:"This email address has been verified.",emailUnverified:"This email address has not been verified.",emailDelete:"If you delete this email address, it can no longer be used to sign in.",renamePasskey:"Set a name for the passkey.",deletePasskey:"Delete this passkey from your account.",deleteAccount:"Are you sure you want to delete this account? All data will be deleted immediately and cannot be recovered.",noAccountExists:'No account exists for "{emailAddress}".',selectLoginMethodForFutureLogins:"Select one of the following login methods to use for future logins.",howDoYouWantToLogin:"How do you want to login?",mfaSetUp:"Protect your account with Multi-Factor Authentication (MFA). MFA adds an additional step to your login process, ensuring that even if your password or email account is compromised, your account stays secure.",securityKeyLogin:"Connect or activate your security key, then click the button below. Once ready, use it via USB, NFC, your mobile phone. Follow the prompts to complete the login process.",otpLogin:"Open your authenticator app to obtain the one-time password (OTP). Enter the code in the field below to complete your login.",renameSecurityKey:"Set a name for the security key.",deleteSecurityKey:"Delete this security key from your account.",authenticatorAppAlreadySetUp:"Your account is secured with an authenticator app that generates time-based one-time passwords (TOTP) for multi-factor authentication.",authenticatorAppNotSetUp:"Secure your account with an authenticator app that generates time-based one-time passwords (TOTP) for multi-factor authentication.",trustDevice:"If you trust this browser, you won’t need to enter your OTP (One-Time-Password) or use your security key for multi-factor authentication (MFA) the next time you log in."},labels:{or:"or",no:"no",yes:"yes",email:"Email",continue:"Continue",copied:"copied",skip:"Skip",save:"Save",password:"Password",passkey:"Passkey",passcode:"Passcode",signInPassword:"Sign in with a password",signInPasscode:"Sign in with a passcode",forgotYourPassword:"Forgot your password?",back:"Back",signInPasskey:"Sign in with a passkey",registerAuthenticator:"Create a passkey",signIn:"Sign in",signUp:"Create account",sendNewPasscode:"Send new code",passwordRetryAfter:"Retry in {passwordRetryAfter}",passcodeResendAfter:"Request a new code in {passcodeResendAfter}",unverifiedEmail:"unverified",primaryEmail:"primary",setAsPrimaryEmail:"Set as primary",verify:"Verify",delete:"Delete",newEmailAddress:"New email address",newPassword:"New password",rename:"Rename",newPasskeyName:"New passkey name",addEmail:"Add email",createPasskey:"Create a passkey",webauthnUnsupported:"Passkeys are not supported by your browser",signInWith:"Continue with {provider}",deleteAccount:"Yes, delete this account.",emailOrUsername:"Email or username",username:"Username",optional:"optional",dontHaveAnAccount:"Don't have an account?",alreadyHaveAnAccount:"Already have an account?",changeUsername:"Change username",setUsername:"Set username",changePassword:"Change password",setPassword:"Set password",revoke:"Revoke",currentSession:"Current session",authenticatorApp:"Authenticator app",securityKey:"Security key",securityKeyUse:"Use security key",newSecurityKeyName:"New security key name",createSecurityKey:"Add a security key",authenticatorAppManage:"Manage authenticator app",authenticatorAppAdd:"Set up",configured:"configured",useAnotherMethod:"Use another method",lastUsed:"Last used",trustDevice:"Trust this browser",staySignedIn:"Stay signed in",connectAccount:"Connect account"},errors:{somethingWentWrong:"A technical error has occurred. Please try again later.",requestTimeout:"The request timed out.",invalidPassword:"Wrong email or password.",invalidPasscode:"The passcode provided was not correct.",passcodeAttemptsReached:"The passcode was entered incorrectly too many times. Please request a new code.",tooManyRequests:"Too many requests have been made. Please wait to repeat the requested operation.",unauthorized:"Your session has expired. Please log in again.",invalidWebauthnCredential:"This passkey cannot be used anymore.",passcodeExpired:"The passcode has expired. Please request a new one.",userVerification:"User verification required. Please ensure your authenticator device is protected with a PIN or biometric.",emailAddressAlreadyExistsError:"The email address already exists.",maxNumOfEmailAddressesReached:"No further email addresses can be added.",thirdPartyAccessDenied:"Access denied. The request was cancelled by the user or the provider has denied access for other reasons.",thirdPartyMultipleAccounts:"Cannot identify account. The email address is used by multiple accounts.",thirdPartyUnverifiedEmail:"Email verification required. Please verify the used email address with your provider.",signupDisabled:"Account registration is disabled.",handlerNotFoundError:"The current step in your process is not supported by this application version. Please try again later or contact support if the issue persists."},flowErrors:{technical_error:"A technical error has occurred. Please try again later.",flow_expired_error:"The session has expired, please click the button to restart.",value_invalid_error:"The entered value is invalid.",passcode_invalid:"The passcode provided was not correct.",passkey_invalid:"This passkey cannot be used anymore.",passcode_max_attempts_reached:"The passcode was entered incorrectly too many times. Please request a new code.",rate_limit_exceeded:"Too many requests have been made. Please wait to repeat the requested operation.",unknown_username_error:"The username is unknown.",unknown_email_error:"The email address is unknown.",username_already_exists:"The username is already taken.",invalid_username_error:"The username must contain only letters, numbers, and underscores.",email_already_exists:"The email is already taken.",not_found:"The requested resource was not found.",operation_not_permitted_error:"The operation is not permitted.",flow_discontinuity_error:"The process cannot be continued due to user settings or the provider's configuration.",form_data_invalid_error:"The submitted form data contains errors.",unauthorized:"Your session has expired. Please log in again.",value_missing_error:"The value is missing.",value_too_long_error:"Value is too long.",value_too_short_error:"The value is too short.",webauthn_credential_invalid_mfa_only:"This credential can be used as a second factor security key only.",webauthn_credential_already_exists:"The request either timed out, was canceled or the device is already registered. Please try again or try using another device.",platform_authenticator_required:"Your account is configured to use platform authenticators, but your current device or browser does not support this feature. Please try again with a compatible device or browser.",third_party_access_denied:"Access denied. The request was cancelled by the user or the provider has denied access for other reasons."}},yt=Ui.en;var ao={d:(o,e)=>{for(var t in e)ao.o(e,t)&&!ao.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e)},$i={};ao.d($i,{fr:()=>ds});const ds={headlines:{error:"Une erreur s'est produite",loginEmail:"Se connecter ou s'inscrire",loginEmailNoSignup:"Se connecter",loginFinished:"Connexion réussie",loginPasscode:"Entrez le code d'accès",loginPassword:"Entrez le mot de passe",registerAuthenticator:"Créer une clé d'identification",registerConfirm:"Créer un compte ?",registerPassword:"Définir un nouveau mot de passe",otpSetUp:"Configurer l'application d'authentification",profileEmails:"Adresses e-mail",profilePassword:"Mot de passe",profilePasskeys:"Clés d'identification",isPrimaryEmail:"Adresse e-mail principale",setPrimaryEmail:"Définir l'adresse e-mail principale",createEmail:"Entrer un nouvel e-mail",createUsername:"Entrer un nouveau nom d'utilisateur",emailVerified:"Vérifié",emailUnverified:"Non vérifié",emailDelete:"Supprimer",renamePasskey:"Renommer la clé d'identification",deletePasskey:"Supprimer la clé d'identification",lastUsedAt:"Dernière utilisation le",createdAt:"Créé le",connectedAccounts:"Comptes connectés",deleteAccount:"Supprimer le compte",accountNotFound:"Compte non trouvé",signIn:"Se connecter",signUp:"S'inscrire",selectLoginMethod:"Sélectionner la méthode de connexion",setupLoginMethod:"Configurer la méthode de connexion",lastUsed:"Dernière vue",ipAddress:"Adresse IP",revokeSession:"Révoquer la session",profileSessions:"Sessions",mfaSetUp:"Configurer MFA",securityKeySetUp:"Ajouter une clé de sécurité",securityKeyLogin:"Clé de sécurité",otpLogin:"Code d'authentification",renameSecurityKey:"Renommer la clé de sécurité",deleteSecurityKey:"Supprimer la clé de sécurité",securityKeys:"Clés de sécurité",authenticatorApp:"Application d'authentification",authenticatorAppAlreadySetUp:"L'application d'authentification est configurée",authenticatorAppNotSetUp:"Configurer l'application d'authentification",trustDevice:"Faire confiance à ce navigateur ?",deleteIdentity:"Supprimer la connexion"},texts:{enterPasscode:"Saisissez le code d'accès envoyé à votre adresse e-mail.",enterPasscodeNoEmail:"Entrez le code envoyé à votre adresse e-mail principale.",setupPasskey:"Connectez-vous à votre compte facilement et en toute sécurité avec une clé d'identification. Remarque : Vos données biométriques sont uniquement stockées sur vos appareils et ne seront jamais partagées avec qui que ce soit.",createAccount:`Aucun compte n'existe pour "{emailAddress}". Voulez-vous créer un nouveau compte ?`,otpEnterVerificationCode:"Entrez le mot de passe à usage unique (OTP) obtenu à partir de votre application d'authentification ci-dessous :",otpScanQRCode:"Scannez le code QR en utilisant votre application d'authentification (comme Google Authenticator ou toute autre application TOTP). Alternativement, vous pouvez entrer manuellement la clé secrète OTP dans l'application.",otpSecretKey:"Clé secrète OTP",passwordFormatHint:"Doit contenir entre {minLength} et {maxLength} caractères.",setPrimaryEmail:"Définir cette adresse e-mail comme adresse de contact.",isPrimaryEmail:"Cette adresse e-mail sera utilisée pour vous contacter si nécessaire.",emailVerified:"Cette adresse e-mail a été vérifiée.",emailUnverified:"Cette adresse e-mail n'a pas été vérifiée.",emailDelete:"Si vous supprimez cette adresse e-mail, elle ne pourra plus être utilisée pour vous connecter à votre compte. Les clés d'identification qui ont pu être créées avec cette adresse e-mail resteront intactes.",renamePasskey:"Définissez un nom pour la clé d'identification qui vous aide à identifier où elle est stockée.",deletePasskey:"Supprimez cette clé d'identification de votre compte. Notez que la clé d'identification continuera d'exister sur vos appareils et devra également y être supprimée.",deleteAccount:"Êtes-vous sûr de vouloir supprimer ce compte ? Toutes les données seront supprimées immédiatement et ne pourront pas être récupérées.",noAccountExists:`Aucun compte n'existe pour "{emailAddress}".`,selectLoginMethodForFutureLogins:"Sélectionnez l'une des méthodes de connexion suivantes à utiliser pour les connexions futures.",howDoYouWantToLogin:"Comment souhaitez-vous vous connecter ?",mfaSetUp:"Protégez votre compte avec l'authentification à plusieurs facteurs (MFA). La MFA ajoute une étape supplémentaire à votre processus de connexion, garantissant que même si votre mot de passe ou votre compte e-mail est compromis, votre compte reste sécurisé.",securityKeyLogin:"Connectez ou activez votre clé de sécurité, puis cliquez sur le bouton ci-dessous. Une fois prêt, utilisez-le via USB, NFC ou votre téléphone mobile. Suivez les instructions pour terminer le processus de connexion.",otpLogin:"Ouvrez votre application d'authentification pour obtenir le mot de passe à usage unique (OTP). Entrez le code dans le champ ci-dessous pour terminer votre connexion.",renameSecurityKey:"Définissez un nom pour la clé de sécurité.",deleteSecurityKey:"Supprimez cette clé de sécurité de votre compte.",authenticatorAppAlreadySetUp:"Votre compte est sécurisé avec une application d'authentification qui génère des mots de passe à usage unique basés sur le temps (TOTP) pour l'authentification à plusieurs facteurs.",authenticatorAppNotSetUp:"Sécurisez votre compte avec une application d'authentification qui génère des mots de passe à usage unique basés sur le temps (TOTP) pour l'authentification à plusieurs facteurs.",securityKeySetUp:"Utilisez une clé de sécurité dédiée via USB, Bluetooth ou NFC, ou votre téléphone mobile. Connectez ou activez votre clé de sécurité, puis cliquez sur le bouton ci-dessous et suivez les instructions pour terminer l'enregistrement.",trustDevice:"Si vous faites confiance à ce navigateur, vous n'aurez pas besoin de saisir votre OTP (mot de passe à usage unique) ou d'utiliser votre clé de sécurité pour l'authentification à plusieurs facteurs (MFA) lors de votre prochaine connexion."},labels:{or:"ou",no:"non",yes:"oui",email:"E-mail",continue:"Continuer",copied:"copié",skip:"Passer",save:"Enregistrer",password:"Mot de passe",passkey:"Clé d'identification",passcode:"Code d'accès",signInPassword:"Se connecter avec un mot de passe",signInPasscode:"Se connecter avec un code d'accès",forgotYourPassword:"Mot de passe oublié ?",back:"Retour",signInPasskey:"Se connecter avec une clé d'identification",registerAuthenticator:"Créer une clé d'identification",signIn:"Se connecter",signUp:"S'inscrire",sendNewPasscode:"Envoyer un nouveau code",passwordRetryAfter:"Réessayez dans {passwordRetryAfter}",passcodeResendAfter:"Demander un nouveau code dans {passcodeResendAfter}",unverifiedEmail:"non vérifiée",primaryEmail:"principale",setAsPrimaryEmail:"Définir comme principale",verify:"Vérifier",delete:"Supprimer",newEmailAddress:"Nouvelle adresse e-mail",newPassword:"Nouveau mot de passe",rename:"Renommer",newPasskeyName:"Nouveau nom de clé d'identification",addEmail:"Ajouter une adresse e-mail",createPasskey:"Créer une clé d'identification",webauthnUnsupported:"Les clés d'identification ne sont pas prises en charge par votre navigateur",signInWith:"Se connecter avec {provider}",deleteAccount:"Oui, supprimer ce compte.",emailOrUsername:"E-mail ou Nom d'utilisateur",username:"Nom d'utilisateur",optional:"facultatif",dontHaveAnAccount:"Vous n'avez pas de compte ?",alreadyHaveAnAccount:"Vous avez déjà un compte ?",changeUsername:"Changer le nom d'utilisateur",setUsername:"Définir le nom d'utilisateur",changePassword:"Changer le mot de passe",setPassword:"Définir le mot de passe",revoke:"Révoquer",currentSession:"Session en cours",authenticatorApp:"Application d'authentification",securityKey:"Clé de sécurité",securityKeyUse:"Utiliser la clé de sécurité",newSecurityKeyName:"Nouveau nom de clé de sécurité",createSecurityKey:"Ajouter une clé de sécurité",authenticatorAppManage:"Gérer l'application d'authentification",authenticatorAppAdd:"Configurer",configured:"configuré",useAnotherMethod:"Utiliser une autre méthode",lastUsed:"Dernière utilisation",trustDevice:"Faire confiance à ce navigateur",staySignedIn:"Rester connecté",connectAccount:"Connecter un compte"},errors:{somethingWentWrong:"Une erreur technique s'est produite. Veuillez réessayer ultérieurement.",requestTimeout:"La demande a expiré.",invalidPassword:"Mauvais e-mail ou mot de passe.",invalidPasscode:"Le code d'accès fourni n'était pas correct.",passcodeAttemptsReached:"Le code d'accès a été saisi incorrectement trop de fois. Veuillez demander un nouveau code.",tooManyRequests:"Trop de demandes ont été effectuées. Veuillez attendre pour répéter l'opération demandée.",unauthorized:"Votre session a expiré. Veuillez vous connecter à nouveau.",invalidWebauthnCredential:"Cette clé d'identification ne peut plus être utilisée.",passcodeExpired:"Le code d'accès a expiré. Veuillez demander un nouveau code.",userVerification:"Vérification de l'utilisateur requise. Veuillez vous assurer que votre appareil d'authentification est protégé par un code PIN ou une biométrie.",emailAddressAlreadyExistsError:"L'adresse e-mail existe déjà.",maxNumOfEmailAddressesReached:"Aucune autre adresse e-mail ne peut être ajoutée.",thirdPartyAccessDenied:"Accès refusé. La demande a été annulée par l'utilisateur ou le fournisseur a refusé l'accès pour d'autres raisons.",thirdPartyMultipleAccounts:"Impossible d'identifier le compte. L'adresse e-mail est utilisée par plusieurs comptes.",thirdPartyUnverifiedEmail:"Vérification de l'adresse e-mail requise. Veuillez vérifier l'adresse e-mail utilisée avec votre fournisseur.",signupDisabled:"L'enregistrement du compte est désactivé.",handlerNotFoundError:"L'étape actuelle n'est pas prise en charge dans cette version de l'application. Veuillez réessayer plus tard ou contacter l'équipe d'assistance pour obtenir de l'aide."},flowErrors:{technical_error:"Une erreur technique s'est produite. Veuillez réessayer ultérieurement.",flow_expired_error:"La session a expiré, veuillez cliquer sur le bouton pour redémarrer.",value_invalid_error:"La valeur saisie est invalide.",passcode_invalid:"Le code fourni n'était pas correct.",passkey_invalid:"Cette clé de passe ne peut plus être utilisée.",passcode_max_attempts_reached:"Le code a été entré incorrectement trop de fois. Veuillez demander un nouveau code.",rate_limit_exceeded:"Trop de demandes ont été effectuées. Veuillez patienter pour répéter l'opération demandée.",unknown_username_error:"Le nom d'utilisateur est inconnu.",unknown_email_error:"L'adresse e-mail est inconnue.",username_already_exists:"Le nom d'utilisateur est déjà pris.",invalid_username_error:"Le nom d'utilisateur ne doit contenir que des lettres, des chiffres et des traits de soulignement.",email_already_exists:"L'adresse e-mail est déjà utilisée.",not_found:"La ressource demandée n'a pas été trouvée.",operation_not_permitted_error:"L'opération n'est pas autorisée.",flow_discontinuity_error:"Le processus ne peut pas continuer en raison des paramètres utilisateur ou de la configuration du fournisseur.",form_data_invalid_error:"Les données du formulaire soumises contiennent des erreurs.",unauthorized:"Votre session a expiré. Veuillez vous connecter à nouveau.",value_missing_error:"La valeur est manquante.",value_too_long_error:"La valeur est trop longue.",value_too_short_error:"La valeur est trop courte.",webauthn_credential_invalid_mfa_only:"Cette identité peut être utilisée uniquement comme clé de sécurité de deuxième facteur.",webauthn_credential_already_exists:"La demande a expiré, a été annulée ou le dispositif est déjà enregistré. Veuillez réessayer ou essayer d'utiliser un autre dispositif.",platform_authenticator_required:"Votre compte est configuré pour utiliser des authentificateurs de plate-forme, mais votre appareil ou navigateur actuel ne prend pas en charge cette fonctionnalité. Veuillez réessayer avec un appareil ou un navigateur compatible.",third_party_access_denied:"Accès refusé. La demande a été annulée par l'utilisateur ou le fournisseur a refusé l'accès pour d'autres raisons."}},us=$i.fr,ro={headlines:{signUp:"Create an account"},labels:{signUp:"Sign up here",alreadyHaveAnAccount:"Already have a HOT account?",dontHaveAnAccount:"Don't have a HOT account?"},texts:{enterPasscode:"Please enter below the passcode we’ve sent to your email address:"}},so={headlines:{error:"Ha ocurrido un error",loginEmail:"Iniciar sesión o crear cuenta",loginEmailNoSignup:"Iniciar sesión",loginFinished:"Inicio de sesión exitoso",loginPasscode:"Ingrese el código de acceso",loginPassword:"Ingrese la contraseña",registerAuthenticator:"Crear una llave de acceso",registerConfirm:"¿Crear cuenta?",registerPassword:"Establecer nueva contraseña",otpSetUp:"Configurar aplicación de autenticación",profileEmails:"Correos electrónicos",profilePassword:"Contraseña",profilePasskeys:"Llaves de acceso",isPrimaryEmail:"Dirección de correo principal",setPrimaryEmail:"Establecer correo principal",createEmail:"Ingrese un nuevo correo",createUsername:"Ingrese un nuevo nombre de usuario",emailVerified:"Verificado",emailUnverified:"No verificado",emailDelete:"Eliminar",renamePasskey:"Renombrar llave de acceso",deletePasskey:"Eliminar llave de acceso",lastUsedAt:"Último uso",createdAt:"Creado",connectedAccounts:"Cuentas conectadas",deleteAccount:"Eliminar cuenta",accountNotFound:"Cuenta no encontrada",signIn:"Iniciar sesión",signUp:"Crear cuenta",selectLoginMethod:"Seleccionar método de inicio de sesión",setupLoginMethod:"Configurar método de inicio de sesión",lastUsed:"Visto por última vez",ipAddress:"Dirección IP",revokeSession:"Revocar sesión",profileSessions:"Sesiones",mfaSetUp:"Configurar MFA",securityKeySetUp:"Agregar clave de seguridad",securityKeyLogin:"Clave de seguridad",otpLogin:"Código de autenticación",renameSecurityKey:"Renombrar clave de seguridad",deleteSecurityKey:"Eliminar clave de seguridad",securityKeys:"Claves de seguridad",authenticatorApp:"Aplicación de autenticación",authenticatorAppAlreadySetUp:"La aplicación de autenticación está configurada",authenticatorAppNotSetUp:"Configurar aplicación de autenticación",trustDevice:"¿Confiar en este navegador?"},texts:{enterPasscode:"Ingrese el código que se envió a su correo electrónico:",enterPasscodeNoEmail:"Ingrese el código que se envió a su dirección de correo principal.",setupPasskey:"Inicie sesión en su cuenta fácil y seguramente con una llave de acceso. Nota: Sus datos biométricos solo se almacenan en sus dispositivos y nunca se compartirán con nadie.",createAccount:'No existe una cuenta para "{emailAddress}". ¿Desea crear una nueva cuenta?',otpEnterVerificationCode:"Ingrese la contraseña de un solo uso (OTP) obtenida de su aplicación de autenticación a continuación:",otpScanQRCode:"Escanee el código QR usando su aplicación de autenticación (como Google Authenticator o cualquier otra aplicación TOTP). Alternativamente, puede ingresar manualmente la clave secreta OTP en la aplicación.",otpSecretKey:"Clave secreta OTP",passwordFormatHint:"Debe tener entre {minLength} y {maxLength} caracteres.",securityKeySetUp:"Use una clave de seguridad dedicada a través de USB, Bluetooth o NFC, o su teléfono móvil. Conecte o active su clave de seguridad, luego haga clic en el botón a continuación y siga las indicaciones para completar el registro.",setPrimaryEmail:"Establezca esta dirección de correo para ser usada para contactarlo.",isPrimaryEmail:"Esta dirección de correo se utilizará para contactarlo si es necesario.",emailVerified:"Esta dirección de correo ha sido verificada.",emailUnverified:"Esta dirección de correo no ha sido verificada.",emailDelete:"Si elimina esta dirección de correo, ya no podrá usarla para iniciar sesión.",renamePasskey:"Establecer un nombre para la llave de acceso.",deletePasskey:"Eliminar esta llave de acceso de su cuenta.",deleteAccount:"¿Está seguro de que desea eliminar esta cuenta? Todos los datos se eliminarán inmediatamente y no se podrán recuperar.",noAccountExists:'No existe una cuenta para "{emailAddress}".',selectLoginMethodForFutureLogins:"Seleccione uno de los siguientes métodos de inicio de sesión para usar en futuros inicios de sesión.",howDoYouWantToLogin:"¿Cómo desea iniciar sesión?",mfaSetUp:"Proteja su cuenta con autenticación multifactor (MFA). MFA agrega un paso adicional a su proceso de inicio de sesión, asegurando que incluso si su contraseña o cuenta de correo está comprometida, su cuenta permanezca segura.",securityKeyLogin:"Conecte o active su clave de seguridad, luego haga clic en el botón a continuación. Una vez listo, úselo a través de USB, NFC o su teléfono móvil. Siga las indicaciones para completar el proceso de inicio de sesión.",otpLogin:"Abra su aplicación de autenticación para obtener la contraseña de un solo uso (OTP). Ingrese el código en el campo a continuación para completar su inicio de sesión.",renameSecurityKey:"Establecer un nombre para la clave de seguridad.",deleteSecurityKey:"Eliminar esta clave de seguridad de su cuenta.",authenticatorAppAlreadySetUp:"Su cuenta está protegida con una aplicación de autenticación que genera contraseñas de un solo uso basadas en tiempo (TOTP) para autenticación multifactor.",authenticatorAppNotSetUp:"Proteja su cuenta con una aplicación de autenticación que genera contraseñas de un solo uso basadas en tiempo (TOTP) para autenticación multifactor.",trustDevice:"Si confía en este navegador, no necesitará ingresar su OTP (contraseña de un solo uso) o usar su clave de seguridad para la autenticación multifactor (MFA) la próxima vez que inicie sesión."},labels:{or:"o",no:"no",yes:"sí",email:"Correo electrónico",continue:"Continuar",copied:"copiado",skip:"Omitir",save:"Guardar",password:"Contraseña",passkey:"Llave de acceso",passcode:"Código de acceso",signInPassword:"Iniciar sesión con contraseña",signInPasscode:"Iniciar sesión con código",forgotYourPassword:"¿Olvidó su contraseña?",back:"Atrás",signInPasskey:"Iniciar sesión con llave de acceso",registerAuthenticator:"Crear una llave de acceso",signIn:"Iniciar sesión",signUp:"Regístrese aquí",sendNewPasscode:"Enviar nuevo código",passwordRetryAfter:"Reintentar en {passwordRetryAfter}",passcodeResendAfter:"Solicitar nuevo código en {passcodeResendAfter}",unverifiedEmail:"no verificado",primaryEmail:"principal",setAsPrimaryEmail:"Establecer como principal",verify:"Verificar",delete:"Eliminar",newEmailAddress:"Nueva dirección de correo",newPassword:"Nueva contraseña",rename:"Renombrar",newPasskeyName:"Nuevo nombre de llave de acceso",addEmail:"Agregar correo",createPasskey:"Crear una llave de acceso",webauthnUnsupported:"Las llaves de acceso no son compatibles con su navegador",signInWith:"Iniciar sesión con {provider}",deleteAccount:"Sí, eliminar esta cuenta.",emailOrUsername:"Correo o nombre de usuario",username:"Nombre de usuario",optional:"opcional",dontHaveAnAccount:"¿No tiene una cuenta HOT?",alreadyHaveAnAccount:"¿Ya tiene una cuenta?",changeUsername:"Cambiar nombre de usuario",setUsername:"Establecer nombre de usuario",changePassword:"Cambiar contraseña",setPassword:"Establecer contraseña",revoke:"Revocar",currentSession:"Sesión actual",authenticatorApp:"Aplicación de autenticación",securityKey:"Clave de seguridad",securityKeyUse:"Usar clave de seguridad",newSecurityKeyName:"Nuevo nombre de clave de seguridad",createSecurityKey:"Agregar una clave de seguridad",authenticatorAppManage:"Administrar aplicación de autenticación",authenticatorAppAdd:"Configurar",configured:"configurado",useAnotherMethod:"Usar otro método",lastUsed:"Último uso",trustDevice:"Confiar en este navegador",staySignedIn:"Mantener sesión iniciada"}},co={headlines:{error:"Une erreur s'est produite",loginEmail:"Se connecter ou créer un compte",loginEmailNoSignup:"Se connecter",loginFinished:"Connexion réussie",loginPasscode:"Entrez le code d'accès",loginPassword:"Entrez le mot de passe",registerAuthenticator:"Créer une clé d'accès",registerConfirm:"Créer un compte ?",registerPassword:"Définir un nouveau mot de passe",otpSetUp:"Configurer l'application d'authentification",profileEmails:"Adresses e-mail",profilePassword:"Mot de passe",profilePasskeys:"Clés d'accès",isPrimaryEmail:"Adresse e-mail principale",setPrimaryEmail:"Définir comme e-mail principal",createEmail:"Entrez un nouvel e-mail",createUsername:"Entrez un nouveau nom d'utilisateur",emailVerified:"Vérifié",emailUnverified:"Non vérifié",emailDelete:"Supprimer",renamePasskey:"Renommer la clé d'accès",deletePasskey:"Supprimer la clé d'accès",lastUsedAt:"Dernière utilisation",createdAt:"Créé",connectedAccounts:"Comptes connectés",deleteAccount:"Supprimer le compte",accountNotFound:"Compte introuvable",signIn:"Se connecter",signUp:"Créer un compte",selectLoginMethod:"Sélectionner la méthode de connexion",setupLoginMethod:"Configurer la méthode de connexion",lastUsed:"Vu pour la dernière fois",ipAddress:"Adresse IP",revokeSession:"Révoquer la session",profileSessions:"Sessions",mfaSetUp:"Configurer MFA",securityKeySetUp:"Ajouter une clé de sécurité",securityKeyLogin:"Clé de sécurité",otpLogin:"Code d'authentification",renameSecurityKey:"Renommer la clé de sécurité",deleteSecurityKey:"Supprimer la clé de sécurité",securityKeys:"Clés de sécurité",authenticatorApp:"Application d'authentification",authenticatorAppAlreadySetUp:"L'application d'authentification est configurée",authenticatorAppNotSetUp:"Configurer l'application d'authentification",trustDevice:"Faire confiance à ce navigateur ?"},texts:{enterPasscode:"Entrez le code envoyé à votre adresse e-mail:",enterPasscodeNoEmail:"Entrez le code envoyé à votre adresse e-mail principale.",setupPasskey:"Connectez-vous à votre compte facilement et en toute sécurité avec une clé d'accès. Remarque : Vos données biométriques ne sont stockées que sur vos appareils et ne seront jamais partagées avec personne.",createAccount:`Aucun compte n'existe pour "{emailAddress}". Souhaitez-vous créer un nouveau compte ?`,otpEnterVerificationCode:"Entrez le mot de passe à usage unique (OTP) obtenu depuis votre application d'authentification ci-dessous :",otpScanQRCode:"Scannez le code QR avec votre application d'authentification (comme Google Authenticator ou toute autre application TOTP). Vous pouvez également saisir manuellement la clé secrète OTP dans l'application.",otpSecretKey:"Clé secrète OTP",passwordFormatHint:"Doit contenir entre {minLength} et {maxLength} caractères.",securityKeySetUp:"Utilisez une clé de sécurité dédiée via USB, Bluetooth ou NFC, ou votre téléphone mobile. Connectez ou activez votre clé de sécurité, puis cliquez sur le bouton ci-dessous et suivez les instructions pour terminer l'inscription.",setPrimaryEmail:"Définir cette adresse e-mail pour être utilisée pour vous contacter.",isPrimaryEmail:"Cette adresse e-mail sera utilisée pour vous contacter si nécessaire.",emailVerified:"Cette adresse e-mail a été vérifiée.",emailUnverified:"Cette adresse e-mail n'a pas été vérifiée.",emailDelete:"Si vous supprimez cette adresse e-mail, vous ne pourrez plus l'utiliser pour vous connecter.",renamePasskey:"Définir un nom pour la clé d'accès.",deletePasskey:"Supprimer cette clé d'accès de votre compte.",deleteAccount:"Êtes-vous sûr de vouloir supprimer ce compte ? Toutes les données seront supprimées immédiatement et ne pourront pas être récupérées.",noAccountExists:`Aucun compte n'existe pour "{emailAddress}".`,selectLoginMethodForFutureLogins:"Sélectionnez l'une des méthodes de connexion suivantes à utiliser pour les futures connexions.",howDoYouWantToLogin:"Comment souhaitez-vous vous connecter ?",mfaSetUp:"Protégez votre compte avec l'authentification multifacteur (MFA). MFA ajoute une étape supplémentaire à votre processus de connexion, garantissant que même si votre mot de passe ou compte e-mail est compromis, votre compte reste sécurisé.",securityKeyLogin:"Connectez ou activez votre clé de sécurité, puis cliquez sur le bouton ci-dessous. Une fois prêt, utilisez-la via USB, NFC ou votre téléphone mobile. Suivez les instructions pour terminer le processus de connexion.",otpLogin:"Ouvrez votre application d'authentification pour obtenir le mot de passe à usage unique (OTP). Entrez le code dans le champ ci-dessous pour terminer votre connexion.",renameSecurityKey:"Définir un nom pour la clé de sécurité.",deleteSecurityKey:"Supprimer cette clé de sécurité de votre compte.",authenticatorAppAlreadySetUp:"Votre compte est protégé par une application d'authentification qui génère des mots de passe à usage unique basés sur le temps (TOTP) pour l'authentification multifacteur.",authenticatorAppNotSetUp:"Protégez votre compte avec une application d'authentification qui génère des mots de passe à usage unique basés sur le temps (TOTP) pour l'authentification multifacteur.",trustDevice:"Si vous faites confiance à ce navigateur, vous n'aurez pas besoin de saisir votre OTP (mot de passe à usage unique) ou d'utiliser votre clé de sécurité pour l'authentification multifacteur (MFA) la prochaine fois que vous vous connecterez."},labels:{or:"ou",no:"non",yes:"oui",email:"E-mail",continue:"Continuer",copied:"copié",skip:"Ignorer",save:"Enregistrer",password:"Mot de passe",passkey:"Clé d'accès",passcode:"Code d'accès",signInPassword:"Se connecter avec mot de passe",signInPasscode:"Se connecter avec code",forgotYourPassword:"Mot de passe oublié ?",back:"Retour",signInPasskey:"Se connecter avec clé d'accès",registerAuthenticator:"Créer une clé d'accès",signIn:"Se connecter",signUp:"S'inscrire ici",sendNewPasscode:"Envoyer un nouveau code",passwordRetryAfter:"Réessayer dans {passwordRetryAfter}",passcodeResendAfter:"Demander un nouveau code dans {passcodeResendAfter}",unverifiedEmail:"non vérifié",primaryEmail:"principal",setAsPrimaryEmail:"Définir comme principal",verify:"Vérifier",delete:"Supprimer",newEmailAddress:"Nouvelle adresse e-mail",newPassword:"Nouveau mot de passe",rename:"Renommer",newPasskeyName:"Nouveau nom de clé d'accès",addEmail:"Ajouter un e-mail",createPasskey:"Créer une clé d'accès",webauthnUnsupported:"Les clés d'accès ne sont pas compatibles avec votre navigateur",signInWith:"Se connecter avec {provider}",deleteAccount:"Oui, supprimer ce compte.",emailOrUsername:"E-mail ou nom d'utilisateur",username:"Nom d'utilisateur",optional:"optionnel",dontHaveAnAccount:"Vous n'avez pas de compte HOT ?",alreadyHaveAnAccount:"Vous avez déjà un compte ?",changeUsername:"Changer le nom d'utilisateur",setUsername:"Définir le nom d'utilisateur",changePassword:"Changer le mot de passe",setPassword:"Définir le mot de passe",revoke:"Révoquer",currentSession:"Session actuelle",authenticatorApp:"Application d'authentification",securityKey:"Clé de sécurité",securityKeyUse:"Utiliser la clé de sécurité",newSecurityKeyName:"Nouveau nom de clé de sécurité",createSecurityKey:"Ajouter une clé de sécurité",authenticatorAppManage:"Gérer l'application d'authentification",authenticatorAppAdd:"Configurer",configured:"configuré",useAnotherMethod:"Utiliser une autre méthode",lastUsed:"Dernière utilisation",trustDevice:"Faire confiance à ce navigateur",staySignedIn:"Rester connecté"}},lo={headlines:{error:"Ocorreu um erro",loginEmail:"Entrar ou criar conta",loginEmailNoSignup:"Entrar",loginFinished:"Login bem-sucedido",loginPasscode:"Digite o código de acesso",loginPassword:"Digite a senha",registerAuthenticator:"Criar uma chave de acesso",registerConfirm:"Criar conta?",registerPassword:"Definir nova senha",otpSetUp:"Configurar aplicativo de autenticação",profileEmails:"Endereços de e-mail",profilePassword:"Senha",profilePasskeys:"Chaves de acesso",isPrimaryEmail:"Endereço de e-mail principal",setPrimaryEmail:"Definir e-mail principal",createEmail:"Digite um novo e-mail",createUsername:"Digite um novo nome de usuário",emailVerified:"Verificado",emailUnverified:"Não verificado",emailDelete:"Excluir",renamePasskey:"Renomear chave de acesso",deletePasskey:"Excluir chave de acesso",lastUsedAt:"Último uso",createdAt:"Criado",connectedAccounts:"Contas conectadas",deleteAccount:"Excluir conta",accountNotFound:"Conta não encontrada",signIn:"Entrar",signUp:"Criar conta",selectLoginMethod:"Selecionar método de login",setupLoginMethod:"Configurar método de login",lastUsed:"Visto pela última vez",ipAddress:"Endereço IP",revokeSession:"Revogar sessão",profileSessions:"Sessões",mfaSetUp:"Configurar MFA",securityKeySetUp:"Adicionar chave de segurança",securityKeyLogin:"Chave de segurança",otpLogin:"Código de autenticação",renameSecurityKey:"Renomear chave de segurança",deleteSecurityKey:"Excluir chave de segurança",securityKeys:"Chaves de segurança",authenticatorApp:"Aplicativo de autenticação",authenticatorAppAlreadySetUp:"O aplicativo de autenticação está configurado",authenticatorAppNotSetUp:"Configurar aplicativo de autenticação",trustDevice:"Confiar neste navegador?"},texts:{enterPasscode:"Digite o código enviado para o seu endereço de e-mail:",enterPasscodeNoEmail:"Digite o código enviado para seu endereço de e-mail principal.",setupPasskey:"Faça login na sua conta de forma fácil e segura com uma chave de acesso. Nota: Seus dados biométricos são armazenados apenas em seus dispositivos e nunca serão compartilhados com ninguém.",createAccount:'Não existe uma conta para "{emailAddress}". Deseja criar uma nova conta?',otpEnterVerificationCode:"Digite a senha de uso único (OTP) obtida do seu aplicativo de autenticação abaixo:",otpScanQRCode:"Digitalize o código QR usando seu aplicativo de autenticação (como Google Authenticator ou qualquer outro aplicativo TOTP). Alternativamente, você pode inserir manualmente a chave secreta OTP no aplicativo.",otpSecretKey:"Chave secreta OTP",passwordFormatHint:"Deve ter entre {minLength} e {maxLength} caracteres.",securityKeySetUp:"Use uma chave de segurança dedicada via USB, Bluetooth ou NFC, ou seu telefone celular. Conecte ou ative sua chave de segurança, depois clique no botão abaixo e siga as instruções para concluir o registro.",setPrimaryEmail:"Defina este endereço de e-mail para ser usado para entrar em contato com você.",isPrimaryEmail:"Este endereço de e-mail será usado para entrar em contato com você, se necessário.",emailVerified:"Este endereço de e-mail foi verificado.",emailUnverified:"Este endereço de e-mail não foi verificado.",emailDelete:"Se você excluir este endereço de e-mail, não poderá mais usá-lo para fazer login.",renamePasskey:"Definir um nome para a chave de acesso.",deletePasskey:"Excluir esta chave de acesso da sua conta.",deleteAccount:"Tem certeza de que deseja excluir esta conta? Todos os dados serão excluídos imediatamente e não poderão ser recuperados.",noAccountExists:'Não existe uma conta para "{emailAddress}".',selectLoginMethodForFutureLogins:"Selecione um dos seguintes métodos de login para usar em futuros logins.",howDoYouWantToLogin:"Como você deseja fazer login?",mfaSetUp:"Proteja sua conta com autenticação multifator (MFA). MFA adiciona uma etapa extra ao seu processo de login, garantindo que, mesmo se sua senha ou conta de e-mail for comprometida, sua conta permaneça segura.",securityKeyLogin:"Conecte ou ative sua chave de segurança, depois clique no botão abaixo. Uma vez pronto, use-a via USB, NFC ou seu telefone celular. Siga as instruções para concluir o processo de login.",otpLogin:"Abra seu aplicativo de autenticação para obter a senha de uso único (OTP). Digite o código no campo abaixo para concluir seu login.",renameSecurityKey:"Definir um nome para a chave de segurança.",deleteSecurityKey:"Excluir esta chave de segurança da sua conta.",authenticatorAppAlreadySetUp:"Sua conta está protegida com um aplicativo de autenticação que gera senhas de uso único baseadas em tempo (TOTP) para autenticação multifator.",authenticatorAppNotSetUp:"Proteja sua conta com um aplicativo de autenticação que gera senhas de uso único baseadas em tempo (TOTP) para autenticação multifator.",trustDevice:"Se você confiar neste navegador, não precisará inserir seu OTP (senha de uso único) ou usar sua chave de segurança para autenticação multifator (MFA) na próxima vez que fizer login."},labels:{or:"ou",no:"não",yes:"sim",email:"E-mail",continue:"Continuar",copied:"copiado",skip:"Pular",save:"Salvar",password:"Senha",passkey:"Chave de acesso",passcode:"Código de acesso",signInPassword:"Entrar com senha",signInPasscode:"Entrar com código",forgotYourPassword:"Esqueceu sua senha?",back:"Voltar",signInPasskey:"Entrar com chave de acesso",registerAuthenticator:"Criar uma chave de acesso",signIn:"Entrar",signUp:"Cadastre-se aqui",sendNewPasscode:"Enviar novo código",passwordRetryAfter:"Tentar novamente em {passwordRetryAfter}",passcodeResendAfter:"Solicitar novo código em {passcodeResendAfter}",unverifiedEmail:"não verificado",primaryEmail:"principal",setAsPrimaryEmail:"Definir como principal",verify:"Verificar",delete:"Excluir",newEmailAddress:"Novo endereço de e-mail",newPassword:"Nova senha",rename:"Renomear",newPasskeyName:"Novo nome de chave de acesso",addEmail:"Adicionar e-mail",createPasskey:"Criar uma chave de acesso",webauthnUnsupported:"As chaves de acesso não são compatíveis com seu navegador",signInWith:"Entrar com {provider}",deleteAccount:"Sim, excluir esta conta.",emailOrUsername:"E-mail ou nome de usuário",username:"Nome de usuário",optional:"opcional",dontHaveAnAccount:"Não tem uma conta HOT?",alreadyHaveAnAccount:"Já tem uma conta?",changeUsername:"Alterar nome de usuário",setUsername:"Definir nome de usuário",changePassword:"Alterar senha",setPassword:"Definir senha",revoke:"Revogar",currentSession:"Sessão atual",authenticatorApp:"Aplicativo de autenticação",securityKey:"Chave de segurança",securityKeyUse:"Usar chave de segurança",newSecurityKeyName:"Novo nome de chave de segurança",createSecurityKey:"Adicionar uma chave de segurança",authenticatorAppManage:"Gerenciar aplicativo de autenticação",authenticatorAppAdd:"Configurar",configured:"configurado",useAnotherMethod:"Usar outro método",lastUsed:"Último uso",trustDevice:"Confiar neste navegador",staySignedIn:"Permanecer conectado"}};Object.assign(yt.headlines,ro.headlines),Object.assign(yt.labels,ro.labels),Object.assign(yt.texts,ro.texts);const An=JSON.parse(JSON.stringify(us));Object.assign(An.headlines,co.headlines),Object.assign(An.labels,co.labels),Object.assign(An.texts,co.texts);const Cn=JSON.parse(JSON.stringify(yt));Object.assign(Cn.headlines,so.headlines),Object.assign(Cn.labels,so.labels),Object.assign(Cn.texts,so.texts);const xn=JSON.parse(JSON.stringify(yt));Object.assign(xn.headlines,lo.headlines),Object.assign(xn.labels,lo.labels),Object.assign(xn.texts,lo.texts);function Di(){return{en:yt,es:Cn,fr:An,pt:xn}}const uo={en:{logIn:"Log in",logOut:"Log Out",myHotAccount:"My HOT Account",connectToOsm:"Connect to OSM",connectedToOsm:"Connected to OSM",connectedToOpenStreetMap:"Connected to OpenStreetMap",connectingToOpenStreetMap:"Connecting to OpenStreetMap...",checkingOsmConnection:"Checking OSM connection...",osmRequired:"OSM Required",osmRequiredText:"This endpoint requires OSM connection.",connectOsmAccount:"Connect OSM Account",openAccountMenu:"Open account menu",connectedToOsmAs:"Connected to OSM as",osmConnectionRequired:"OSM connection required",signUpSubtitle:"Access all HOT tools and services",loginSubtitle:"With your HOT account"},es:{logIn:"Iniciar sesión",logOut:"Cerrar sesión",myHotAccount:"Mi cuenta HOT",connectToOsm:"Conectar a OSM",connectedToOsm:"Conectado a OSM",connectedToOpenStreetMap:"Conectado a OpenStreetMap",connectingToOpenStreetMap:"Conectando a OpenStreetMap...",checkingOsmConnection:"Verificando conexión OSM...",osmRequired:"OSM Requerido",osmRequiredText:"Este endpoint requiere conexión OSM.",connectOsmAccount:"Conectar cuenta OSM",openAccountMenu:"Abrir menú de cuenta",connectedToOsmAs:"Conectado a OSM como",osmConnectionRequired:"Se requiere conexión OSM",signUpSubtitle:"Accede a todas las herramientas y servicios de HOT",loginSubtitle:"Con tu cuenta HOT"},fr:{logIn:"Se connecter",logOut:"Se déconnecter",myHotAccount:"Mon compte HOT",connectToOsm:"Connecter à OSM",connectedToOsm:"Connecté à OSM",connectedToOpenStreetMap:"Connecté à OpenStreetMap",connectingToOpenStreetMap:"Connexion à OpenStreetMap...",checkingOsmConnection:"Vérification de la connexion OSM...",osmRequired:"OSM requis",osmRequiredText:"Ce point de terminaison nécessite une connexion OSM.",connectOsmAccount:"Connecter le compte OSM",openAccountMenu:"Ouvrir le menu du compte",connectedToOsmAs:"Connecté à OSM en tant que",osmConnectionRequired:"Connexion OSM requise",signUpSubtitle:"Accédez à tous les outils et services HOT",loginSubtitle:"Avec votre compte HOT"},pt:{logIn:"Entrar",logOut:"Sair",myHotAccount:"Minha conta HOT",connectToOsm:"Conectar ao OSM",connectedToOsm:"Conectado ao OSM",connectedToOpenStreetMap:"Conectado ao OpenStreetMap",connectingToOpenStreetMap:"Conectando ao OpenStreetMap...",checkingOsmConnection:"Verificando conexão OSM...",osmRequired:"OSM Necessário",osmRequiredText:"Este endpoint requer conexão OSM.",connectOsmAccount:"Conectar conta OSM",openAccountMenu:"Abrir menu da conta",connectedToOsmAs:"Conectado ao OSM como",osmConnectionRequired:"Conexão OSM necessária",signUpSubtitle:"Acesse todas as ferramentas e serviços HOT",loginSubtitle:"Com a sua conta HOT"}},Li="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-person-vcard'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M5%208a2%202%200%201%200%200-4%202%202%200%200%200%200%204m4-2.5a.5.5%200%200%201%20.5-.5h4a.5.5%200%200%201%200%201h-4a.5.5%200%200%201-.5-.5M9%208a.5.5%200%200%201%20.5-.5h4a.5.5%200%200%201%200%201h-4A.5.5%200%200%201%209%208m1%202.5a.5.5%200%200%201%20.5-.5h3a.5.5%200%200%201%200%201h-3a.5.5%200%200%201-.5-.5'/%3e%3cpath%20d='M2%202a2%202%200%200%200-2%202v8a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V4a2%202%200%200%200-2-2zM1%204a1%201%200%200%201%201-1h12a1%201%200%200%201%201%201v8a1%201%200%200%201-1%201H8.96q.04-.245.04-.5C9%2010.567%207.21%209%205%209c-2.086%200-3.8%201.398-3.984%203.181A1%201%200%200%201%201%2012z'/%3e%3c/svg%3e",Ni="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-box-arrow-right'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill-rule='evenodd'%20d='M10%2012.5a.5.5%200%200%201-.5.5h-8a.5.5%200%200%201-.5-.5v-9a.5.5%200%200%201%20.5-.5h8a.5.5%200%200%201%20.5.5v2a.5.5%200%200%200%201%200v-2A1.5%201.5%200%200%200%209.5%202h-8A1.5%201.5%200%200%200%200%203.5v9A1.5%201.5%200%200%200%201.5%2014h8a1.5%201.5%200%200%200%201.5-1.5v-2a.5.5%200%200%200-1%200z'/%3e%3cpath%20fill-rule='evenodd'%20d='M15.854%208.354a.5.5%200%200%200%200-.708l-3-3a.5.5%200%200%200-.708.708L14.293%207.5H5.5a.5.5%200%200%200%200%201h8.793l-2.147%202.146a.5.5%200%200%200%20.708.708z'/%3e%3c/svg%3e",Mi="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-map'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill-rule='evenodd'%20d='M15.817.113A.5.5%200%200%201%2016%20.5v14a.5.5%200%200%201-.402.49l-5%201a.5.5%200%200%201-.196%200L5.5%2015.01l-4.902.98A.5.5%200%200%201%200%2015.5v-14a.5.5%200%200%201%20.402-.49l5-1a.5.5%200%200%201%20.196%200L10.5.99l4.902-.98a.5.5%200%200%201%20.415.103M10%201.91l-4-.8v12.98l4%20.8zm1%2012.98%204-.8V1.11l-4%20.8zm-6-.8V1.11l-4%20.8v12.98z'/%3e%3c/svg%3e",Ri="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-person-check'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M12.5%2016a3.5%203.5%200%201%200%200-7%203.5%203.5%200%200%200%200%207m1.679-4.493-1.335%202.226a.75.75%200%200%201-1.174.144l-.774-.773a.5.5%200%200%201%20.708-.708l.547.548%201.17-1.951a.5.5%200%201%201%20.858.514M11%205a3%203%200%201%201-6%200%203%203%200%200%201%206%200M8%207a2%202%200%201%200%200-4%202%202%200%200%200%200%204'/%3e%3cpath%20d='M8.256%2014a4.5%204.5%200%200%201-.229-1.004H3c.001-.246.154-.986.832-1.664C4.484%2010.68%205.711%2010%208%2010q.39%200%20.74.025c.226-.341.496-.65.804-.918Q8.844%209.002%208%209c-5%200-6%203-6%204s1%201%201%201z'/%3e%3c/svg%3e",hs="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-chevron-down'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill-rule='evenodd'%20d='M1.646%204.646a.5.5%200%200%201%20.708%200L8%2010.293l5.646-5.647a.5.5%200%200%201%20.708.708l-6%206a.5.5%200%200%201-.708%200l-6-6a.5.5%200%200%201%200-.708'/%3e%3c/svg%3e",ps="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-chevron-up'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill-rule='evenodd'%20d='M7.646%204.646a.5.5%200%200%201%20.708%200l6%206a.5.5%200%200%201-.708.708L8%205.707l-5.646%205.647a.5.5%200%200%201-.708-.708z'/%3e%3c/svg%3e";var ms=Object.defineProperty,fs=Object.getOwnPropertyDescriptor,ae=(o,e,t,n)=>{for(var i=n>1?void 0:n?fs(e,t):e,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(e,t,i):s(i))||i);return n&&i&&ms(e,t,i),i};let zi=!1,Kt=null;async function gs(o){if(!zi)return Kt||(Kt=(async()=>{console.log("[hanko-auth] Pre-registering Hanko translations...");try{await Ti(o,{enablePasskeys:!1,hidePasskeyButtonOnLogin:!0,translations:Di(),fallbackLanguage:"en"}),zi=!0,console.log("[hanko-auth] Hanko registration complete")}catch(e){throw console.error("[hanko-auth] Hanko registration failed:",e),Kt=null,e}})(),Kt)}const X={primary:null,user:null,osmConnected:!1,osmData:null,loading:!0,hanko:null,initialized:!1,instances:new Set,profileDisplayName:"",profilePictureUrl:"",hankoReady:!1},Hi=o=>`hanko-verified-${o}`,qi=o=>`hanko-onboarding-${o}`;return Y.HankoAuth=class extends xt{constructor(){super(),this.hankoUrlAttr="",this.basePath="",this.authPath="/api/auth/osm",this.osmRequired=!1,this.osmScopes="read_prefs",this.showProfile=!1,this.redirectAfterLogin="",this.autoConnect=!1,this.verifySession=!1,this.redirectAfterLogout="",this.displayNameAttr="",this.mappingCheckUrl="",this.appId="",this.loginUrl="",this.lang="en",this.buttonVariant="plain",this.buttonColor="primary",this.display="default",this.user=null,this.osmConnected=!1,this.osmData=null,this.osmLoading=!1,this.loading=!0,this.error=null,this.hankoReady=!1,this.profileDisplayName="",this.profilePictureUrl="",this.hasAppMapping=!1,this.userProfileLanguage=null,this.isOpen=!1,this.handleOutsideClick=e=>{this.contains(e.target)||this.closeDropdown()},this._debugMode=!1,this._lastSessionId=null,this._hanko=null,this._isPrimary=!1,this._hankoObserver=null,this._signUpHeadlines=new Set(["Create an account","Crear cuenta","Créer un compte","Criar conta"]),this._loginHeadlines=new Set(["Sign in or create account","Sign in","Iniciar sesión o crear cuenta","Iniciar sesión","Se connecter ou s'inscrire","Se connecter","Entrar ou criar conta","Entrar"]),this._handleVisibilityChange=()=>{this._isPrimary&&!document.hidden&&!this.showProfile&&!this.user&&(this.log("Page visible, re-checking session..."),this.checkSession())},this._handleWindowFocus=()=>{this._isPrimary&&!this.showProfile&&!this.user&&(this.log("Window focused, re-checking session..."),this.checkSession())},this._handleExternalLogin=e=>{var n;if(!this._isPrimary)return;const t=e;!this.showProfile&&!this.user&&((n=t.detail)!=null&&n.user)&&(this.log("External login detected, updating user state..."),this.user=t.detail.user,this._broadcastState(),this.osmRequired&&this.checkOSMConnection())},this._currentHankoAuthElement=null;try{const e=localStorage.getItem("hotosm-auth-user");if(e){const t=JSON.parse(e);this.user=t,this.loading=!1,t.avatarUrl&&(this.profilePictureUrl=t.avatarUrl)}}catch{}}toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen?setTimeout(()=>{document.addEventListener("click",this.handleOutsideClick)},0):document.removeEventListener("click",this.handleOutsideClick)}closeDropdown(){this.isOpen=!1,document.removeEventListener("click",this.handleOutsideClick)}renderBarDropdownContent(){var e;return fe`
571
+ `;var io={d:(o,e)=>{for(var t in e)io.o(e,t)&&!io.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e)},Ui={};io.d(Ui,{en:()=>ls});const ls={headlines:{error:"An error has occurred",loginEmail:"Sign in or create account",loginEmailNoSignup:"Sign in",loginFinished:"Login successful",loginPasscode:"Enter passcode",loginPassword:"Enter password",registerAuthenticator:"Create a passkey",registerConfirm:"Create account?",registerPassword:"Set new password",otpSetUp:"Set up authenticator app",profileEmails:"Emails",profilePassword:"Password",profilePasskeys:"Passkeys",isPrimaryEmail:"Primary email address",setPrimaryEmail:"Set primary email address",createEmail:"Enter a new email",createUsername:"Enter a new username",emailVerified:"Verified",emailUnverified:"Unverified",emailDelete:"Delete",renamePasskey:"Rename passkey",deletePasskey:"Delete passkey",lastUsedAt:"Last used at",createdAt:"Created at",connectedAccounts:"Connected accounts",deleteAccount:"Delete account",accountNotFound:"Account not found",signIn:"Sign in",signUp:"Create account",selectLoginMethod:"Select login method",setupLoginMethod:"Set up login method",lastUsed:"Last seen",ipAddress:"IP address",revokeSession:"Revoke session",profileSessions:"Sessions",mfaSetUp:"Set up MFA",securityKeySetUp:"Add security key",securityKeyLogin:"Security key",otpLogin:"Authentication code",renameSecurityKey:"Rename security key",deleteSecurityKey:"Delete security key",securityKeys:"Security keys",authenticatorApp:"Authenticator app",authenticatorAppAlreadySetUp:"Authenticator app is set up",authenticatorAppNotSetUp:"Set up authenticator app",trustDevice:"Trust this browser?",deleteIdentity:"Delete connection"},texts:{enterPasscode:"Enter the passcode sent to your email address.",enterPasscodeNoEmail:"Enter the passcode that was sent to your primary email address.",setupPasskey:"Sign in to your account easily and securely with a passkey. Note: Your biometric data is only stored on your devices and will never be shared with anyone.",createAccount:'No account exists for "{emailAddress}". Do you want to create a new account?',otpEnterVerificationCode:"Enter the one-time password (OTP) obtained from your authenticator app below:",otpScanQRCode:"Scan the QR code using your authenticator app (such as Google Authenticator or any other TOTP app). Alternatively, you can manually enter the OTP secret key into the app.",otpSecretKey:"OTP secret key",passwordFormatHint:"Must be between {minLength} and {maxLength} characters long.",securityKeySetUp:"Use a dedicated security key via USB, Bluetooth, or NFC, or your mobile phone. Connect or activate your security key, then click the button below and follow the prompts to complete the registration.",setPrimaryEmail:"Set this email address to be used for contacting you.",isPrimaryEmail:"This email address will be used to contact you if necessary.",emailVerified:"This email address has been verified.",emailUnverified:"This email address has not been verified.",emailDelete:"If you delete this email address, it can no longer be used to sign in.",renamePasskey:"Set a name for the passkey.",deletePasskey:"Delete this passkey from your account.",deleteAccount:"Are you sure you want to delete this account? All data will be deleted immediately and cannot be recovered.",noAccountExists:'No account exists for "{emailAddress}".',selectLoginMethodForFutureLogins:"Select one of the following login methods to use for future logins.",howDoYouWantToLogin:"How do you want to login?",mfaSetUp:"Protect your account with Multi-Factor Authentication (MFA). MFA adds an additional step to your login process, ensuring that even if your password or email account is compromised, your account stays secure.",securityKeyLogin:"Connect or activate your security key, then click the button below. Once ready, use it via USB, NFC, your mobile phone. Follow the prompts to complete the login process.",otpLogin:"Open your authenticator app to obtain the one-time password (OTP). Enter the code in the field below to complete your login.",renameSecurityKey:"Set a name for the security key.",deleteSecurityKey:"Delete this security key from your account.",authenticatorAppAlreadySetUp:"Your account is secured with an authenticator app that generates time-based one-time passwords (TOTP) for multi-factor authentication.",authenticatorAppNotSetUp:"Secure your account with an authenticator app that generates time-based one-time passwords (TOTP) for multi-factor authentication.",trustDevice:"If you trust this browser, you won’t need to enter your OTP (One-Time-Password) or use your security key for multi-factor authentication (MFA) the next time you log in."},labels:{or:"or",no:"no",yes:"yes",email:"Email",continue:"Continue",copied:"copied",skip:"Skip",save:"Save",password:"Password",passkey:"Passkey",passcode:"Passcode",signInPassword:"Sign in with a password",signInPasscode:"Sign in with a passcode",forgotYourPassword:"Forgot your password?",back:"Back",signInPasskey:"Sign in with a passkey",registerAuthenticator:"Create a passkey",signIn:"Sign in",signUp:"Create account",sendNewPasscode:"Send new code",passwordRetryAfter:"Retry in {passwordRetryAfter}",passcodeResendAfter:"Request a new code in {passcodeResendAfter}",unverifiedEmail:"unverified",primaryEmail:"primary",setAsPrimaryEmail:"Set as primary",verify:"Verify",delete:"Delete",newEmailAddress:"New email address",newPassword:"New password",rename:"Rename",newPasskeyName:"New passkey name",addEmail:"Add email",createPasskey:"Create a passkey",webauthnUnsupported:"Passkeys are not supported by your browser",signInWith:"Continue with {provider}",deleteAccount:"Yes, delete this account.",emailOrUsername:"Email or username",username:"Username",optional:"optional",dontHaveAnAccount:"Don't have an account?",alreadyHaveAnAccount:"Already have an account?",changeUsername:"Change username",setUsername:"Set username",changePassword:"Change password",setPassword:"Set password",revoke:"Revoke",currentSession:"Current session",authenticatorApp:"Authenticator app",securityKey:"Security key",securityKeyUse:"Use security key",newSecurityKeyName:"New security key name",createSecurityKey:"Add a security key",authenticatorAppManage:"Manage authenticator app",authenticatorAppAdd:"Set up",configured:"configured",useAnotherMethod:"Use another method",lastUsed:"Last used",trustDevice:"Trust this browser",staySignedIn:"Stay signed in",connectAccount:"Connect account"},errors:{somethingWentWrong:"A technical error has occurred. Please try again later.",requestTimeout:"The request timed out.",invalidPassword:"Wrong email or password.",invalidPasscode:"The passcode provided was not correct.",passcodeAttemptsReached:"The passcode was entered incorrectly too many times. Please request a new code.",tooManyRequests:"Too many requests have been made. Please wait to repeat the requested operation.",unauthorized:"Your session has expired. Please log in again.",invalidWebauthnCredential:"This passkey cannot be used anymore.",passcodeExpired:"The passcode has expired. Please request a new one.",userVerification:"User verification required. Please ensure your authenticator device is protected with a PIN or biometric.",emailAddressAlreadyExistsError:"The email address already exists.",maxNumOfEmailAddressesReached:"No further email addresses can be added.",thirdPartyAccessDenied:"Access denied. The request was cancelled by the user or the provider has denied access for other reasons.",thirdPartyMultipleAccounts:"Cannot identify account. The email address is used by multiple accounts.",thirdPartyUnverifiedEmail:"Email verification required. Please verify the used email address with your provider.",signupDisabled:"Account registration is disabled.",handlerNotFoundError:"The current step in your process is not supported by this application version. Please try again later or contact support if the issue persists."},flowErrors:{technical_error:"A technical error has occurred. Please try again later.",flow_expired_error:"The session has expired, please click the button to restart.",value_invalid_error:"The entered value is invalid.",passcode_invalid:"The passcode provided was not correct.",passkey_invalid:"This passkey cannot be used anymore.",passcode_max_attempts_reached:"The passcode was entered incorrectly too many times. Please request a new code.",rate_limit_exceeded:"Too many requests have been made. Please wait to repeat the requested operation.",unknown_username_error:"The username is unknown.",unknown_email_error:"The email address is unknown.",username_already_exists:"The username is already taken.",invalid_username_error:"The username must contain only letters, numbers, and underscores.",email_already_exists:"The email is already taken.",not_found:"The requested resource was not found.",operation_not_permitted_error:"The operation is not permitted.",flow_discontinuity_error:"The process cannot be continued due to user settings or the provider's configuration.",form_data_invalid_error:"The submitted form data contains errors.",unauthorized:"Your session has expired. Please log in again.",value_missing_error:"The value is missing.",value_too_long_error:"Value is too long.",value_too_short_error:"The value is too short.",webauthn_credential_invalid_mfa_only:"This credential can be used as a second factor security key only.",webauthn_credential_already_exists:"The request either timed out, was canceled or the device is already registered. Please try again or try using another device.",platform_authenticator_required:"Your account is configured to use platform authenticators, but your current device or browser does not support this feature. Please try again with a compatible device or browser.",third_party_access_denied:"Access denied. The request was cancelled by the user or the provider has denied access for other reasons."}},yt=Ui.en;var ao={d:(o,e)=>{for(var t in e)ao.o(e,t)&&!ao.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e)},$i={};ao.d($i,{fr:()=>ds});const ds={headlines:{error:"Une erreur s'est produite",loginEmail:"Se connecter ou s'inscrire",loginEmailNoSignup:"Se connecter",loginFinished:"Connexion réussie",loginPasscode:"Entrez le code d'accès",loginPassword:"Entrez le mot de passe",registerAuthenticator:"Créer une clé d'identification",registerConfirm:"Créer un compte ?",registerPassword:"Définir un nouveau mot de passe",otpSetUp:"Configurer l'application d'authentification",profileEmails:"Adresses e-mail",profilePassword:"Mot de passe",profilePasskeys:"Clés d'identification",isPrimaryEmail:"Adresse e-mail principale",setPrimaryEmail:"Définir l'adresse e-mail principale",createEmail:"Entrer un nouvel e-mail",createUsername:"Entrer un nouveau nom d'utilisateur",emailVerified:"Vérifié",emailUnverified:"Non vérifié",emailDelete:"Supprimer",renamePasskey:"Renommer la clé d'identification",deletePasskey:"Supprimer la clé d'identification",lastUsedAt:"Dernière utilisation le",createdAt:"Créé le",connectedAccounts:"Comptes connectés",deleteAccount:"Supprimer le compte",accountNotFound:"Compte non trouvé",signIn:"Se connecter",signUp:"S'inscrire",selectLoginMethod:"Sélectionner la méthode de connexion",setupLoginMethod:"Configurer la méthode de connexion",lastUsed:"Dernière vue",ipAddress:"Adresse IP",revokeSession:"Révoquer la session",profileSessions:"Sessions",mfaSetUp:"Configurer MFA",securityKeySetUp:"Ajouter une clé de sécurité",securityKeyLogin:"Clé de sécurité",otpLogin:"Code d'authentification",renameSecurityKey:"Renommer la clé de sécurité",deleteSecurityKey:"Supprimer la clé de sécurité",securityKeys:"Clés de sécurité",authenticatorApp:"Application d'authentification",authenticatorAppAlreadySetUp:"L'application d'authentification est configurée",authenticatorAppNotSetUp:"Configurer l'application d'authentification",trustDevice:"Faire confiance à ce navigateur ?",deleteIdentity:"Supprimer la connexion"},texts:{enterPasscode:"Saisissez le code d'accès envoyé à votre adresse e-mail.",enterPasscodeNoEmail:"Entrez le code envoyé à votre adresse e-mail principale.",setupPasskey:"Connectez-vous à votre compte facilement et en toute sécurité avec une clé d'identification. Remarque : Vos données biométriques sont uniquement stockées sur vos appareils et ne seront jamais partagées avec qui que ce soit.",createAccount:`Aucun compte n'existe pour "{emailAddress}". Voulez-vous créer un nouveau compte ?`,otpEnterVerificationCode:"Entrez le mot de passe à usage unique (OTP) obtenu à partir de votre application d'authentification ci-dessous :",otpScanQRCode:"Scannez le code QR en utilisant votre application d'authentification (comme Google Authenticator ou toute autre application TOTP). Alternativement, vous pouvez entrer manuellement la clé secrète OTP dans l'application.",otpSecretKey:"Clé secrète OTP",passwordFormatHint:"Doit contenir entre {minLength} et {maxLength} caractères.",setPrimaryEmail:"Définir cette adresse e-mail comme adresse de contact.",isPrimaryEmail:"Cette adresse e-mail sera utilisée pour vous contacter si nécessaire.",emailVerified:"Cette adresse e-mail a été vérifiée.",emailUnverified:"Cette adresse e-mail n'a pas été vérifiée.",emailDelete:"Si vous supprimez cette adresse e-mail, elle ne pourra plus être utilisée pour vous connecter à votre compte. Les clés d'identification qui ont pu être créées avec cette adresse e-mail resteront intactes.",renamePasskey:"Définissez un nom pour la clé d'identification qui vous aide à identifier où elle est stockée.",deletePasskey:"Supprimez cette clé d'identification de votre compte. Notez que la clé d'identification continuera d'exister sur vos appareils et devra également y être supprimée.",deleteAccount:"Êtes-vous sûr de vouloir supprimer ce compte ? Toutes les données seront supprimées immédiatement et ne pourront pas être récupérées.",noAccountExists:`Aucun compte n'existe pour "{emailAddress}".`,selectLoginMethodForFutureLogins:"Sélectionnez l'une des méthodes de connexion suivantes à utiliser pour les connexions futures.",howDoYouWantToLogin:"Comment souhaitez-vous vous connecter ?",mfaSetUp:"Protégez votre compte avec l'authentification à plusieurs facteurs (MFA). La MFA ajoute une étape supplémentaire à votre processus de connexion, garantissant que même si votre mot de passe ou votre compte e-mail est compromis, votre compte reste sécurisé.",securityKeyLogin:"Connectez ou activez votre clé de sécurité, puis cliquez sur le bouton ci-dessous. Une fois prêt, utilisez-le via USB, NFC ou votre téléphone mobile. Suivez les instructions pour terminer le processus de connexion.",otpLogin:"Ouvrez votre application d'authentification pour obtenir le mot de passe à usage unique (OTP). Entrez le code dans le champ ci-dessous pour terminer votre connexion.",renameSecurityKey:"Définissez un nom pour la clé de sécurité.",deleteSecurityKey:"Supprimez cette clé de sécurité de votre compte.",authenticatorAppAlreadySetUp:"Votre compte est sécurisé avec une application d'authentification qui génère des mots de passe à usage unique basés sur le temps (TOTP) pour l'authentification à plusieurs facteurs.",authenticatorAppNotSetUp:"Sécurisez votre compte avec une application d'authentification qui génère des mots de passe à usage unique basés sur le temps (TOTP) pour l'authentification à plusieurs facteurs.",securityKeySetUp:"Utilisez une clé de sécurité dédiée via USB, Bluetooth ou NFC, ou votre téléphone mobile. Connectez ou activez votre clé de sécurité, puis cliquez sur le bouton ci-dessous et suivez les instructions pour terminer l'enregistrement.",trustDevice:"Si vous faites confiance à ce navigateur, vous n'aurez pas besoin de saisir votre OTP (mot de passe à usage unique) ou d'utiliser votre clé de sécurité pour l'authentification à plusieurs facteurs (MFA) lors de votre prochaine connexion."},labels:{or:"ou",no:"non",yes:"oui",email:"E-mail",continue:"Continuer",copied:"copié",skip:"Passer",save:"Enregistrer",password:"Mot de passe",passkey:"Clé d'identification",passcode:"Code d'accès",signInPassword:"Se connecter avec un mot de passe",signInPasscode:"Se connecter avec un code d'accès",forgotYourPassword:"Mot de passe oublié ?",back:"Retour",signInPasskey:"Se connecter avec une clé d'identification",registerAuthenticator:"Créer une clé d'identification",signIn:"Se connecter",signUp:"S'inscrire",sendNewPasscode:"Envoyer un nouveau code",passwordRetryAfter:"Réessayez dans {passwordRetryAfter}",passcodeResendAfter:"Demander un nouveau code dans {passcodeResendAfter}",unverifiedEmail:"non vérifiée",primaryEmail:"principale",setAsPrimaryEmail:"Définir comme principale",verify:"Vérifier",delete:"Supprimer",newEmailAddress:"Nouvelle adresse e-mail",newPassword:"Nouveau mot de passe",rename:"Renommer",newPasskeyName:"Nouveau nom de clé d'identification",addEmail:"Ajouter une adresse e-mail",createPasskey:"Créer une clé d'identification",webauthnUnsupported:"Les clés d'identification ne sont pas prises en charge par votre navigateur",signInWith:"Se connecter avec {provider}",deleteAccount:"Oui, supprimer ce compte.",emailOrUsername:"E-mail ou Nom d'utilisateur",username:"Nom d'utilisateur",optional:"facultatif",dontHaveAnAccount:"Vous n'avez pas de compte ?",alreadyHaveAnAccount:"Vous avez déjà un compte ?",changeUsername:"Changer le nom d'utilisateur",setUsername:"Définir le nom d'utilisateur",changePassword:"Changer le mot de passe",setPassword:"Définir le mot de passe",revoke:"Révoquer",currentSession:"Session en cours",authenticatorApp:"Application d'authentification",securityKey:"Clé de sécurité",securityKeyUse:"Utiliser la clé de sécurité",newSecurityKeyName:"Nouveau nom de clé de sécurité",createSecurityKey:"Ajouter une clé de sécurité",authenticatorAppManage:"Gérer l'application d'authentification",authenticatorAppAdd:"Configurer",configured:"configuré",useAnotherMethod:"Utiliser une autre méthode",lastUsed:"Dernière utilisation",trustDevice:"Faire confiance à ce navigateur",staySignedIn:"Rester connecté",connectAccount:"Connecter un compte"},errors:{somethingWentWrong:"Une erreur technique s'est produite. Veuillez réessayer ultérieurement.",requestTimeout:"La demande a expiré.",invalidPassword:"Mauvais e-mail ou mot de passe.",invalidPasscode:"Le code d'accès fourni n'était pas correct.",passcodeAttemptsReached:"Le code d'accès a été saisi incorrectement trop de fois. Veuillez demander un nouveau code.",tooManyRequests:"Trop de demandes ont été effectuées. Veuillez attendre pour répéter l'opération demandée.",unauthorized:"Votre session a expiré. Veuillez vous connecter à nouveau.",invalidWebauthnCredential:"Cette clé d'identification ne peut plus être utilisée.",passcodeExpired:"Le code d'accès a expiré. Veuillez demander un nouveau code.",userVerification:"Vérification de l'utilisateur requise. Veuillez vous assurer que votre appareil d'authentification est protégé par un code PIN ou une biométrie.",emailAddressAlreadyExistsError:"L'adresse e-mail existe déjà.",maxNumOfEmailAddressesReached:"Aucune autre adresse e-mail ne peut être ajoutée.",thirdPartyAccessDenied:"Accès refusé. La demande a été annulée par l'utilisateur ou le fournisseur a refusé l'accès pour d'autres raisons.",thirdPartyMultipleAccounts:"Impossible d'identifier le compte. L'adresse e-mail est utilisée par plusieurs comptes.",thirdPartyUnverifiedEmail:"Vérification de l'adresse e-mail requise. Veuillez vérifier l'adresse e-mail utilisée avec votre fournisseur.",signupDisabled:"L'enregistrement du compte est désactivé.",handlerNotFoundError:"L'étape actuelle n'est pas prise en charge dans cette version de l'application. Veuillez réessayer plus tard ou contacter l'équipe d'assistance pour obtenir de l'aide."},flowErrors:{technical_error:"Une erreur technique s'est produite. Veuillez réessayer ultérieurement.",flow_expired_error:"La session a expiré, veuillez cliquer sur le bouton pour redémarrer.",value_invalid_error:"La valeur saisie est invalide.",passcode_invalid:"Le code fourni n'était pas correct.",passkey_invalid:"Cette clé de passe ne peut plus être utilisée.",passcode_max_attempts_reached:"Le code a été entré incorrectement trop de fois. Veuillez demander un nouveau code.",rate_limit_exceeded:"Trop de demandes ont été effectuées. Veuillez patienter pour répéter l'opération demandée.",unknown_username_error:"Le nom d'utilisateur est inconnu.",unknown_email_error:"L'adresse e-mail est inconnue.",username_already_exists:"Le nom d'utilisateur est déjà pris.",invalid_username_error:"Le nom d'utilisateur ne doit contenir que des lettres, des chiffres et des traits de soulignement.",email_already_exists:"L'adresse e-mail est déjà utilisée.",not_found:"La ressource demandée n'a pas été trouvée.",operation_not_permitted_error:"L'opération n'est pas autorisée.",flow_discontinuity_error:"Le processus ne peut pas continuer en raison des paramètres utilisateur ou de la configuration du fournisseur.",form_data_invalid_error:"Les données du formulaire soumises contiennent des erreurs.",unauthorized:"Votre session a expiré. Veuillez vous connecter à nouveau.",value_missing_error:"La valeur est manquante.",value_too_long_error:"La valeur est trop longue.",value_too_short_error:"La valeur est trop courte.",webauthn_credential_invalid_mfa_only:"Cette identité peut être utilisée uniquement comme clé de sécurité de deuxième facteur.",webauthn_credential_already_exists:"La demande a expiré, a été annulée ou le dispositif est déjà enregistré. Veuillez réessayer ou essayer d'utiliser un autre dispositif.",platform_authenticator_required:"Votre compte est configuré pour utiliser des authentificateurs de plate-forme, mais votre appareil ou navigateur actuel ne prend pas en charge cette fonctionnalité. Veuillez réessayer avec un appareil ou un navigateur compatible.",third_party_access_denied:"Accès refusé. La demande a été annulée par l'utilisateur ou le fournisseur a refusé l'accès pour d'autres raisons."}},us=$i.fr,ro={headlines:{signUp:"Create an account"},labels:{signUp:"Sign up here",alreadyHaveAnAccount:"Already have a HOT account?",dontHaveAnAccount:"Don't have a HOT account?"},texts:{enterPasscode:"Please enter below the passcode we’ve sent to your email address:"}},so={headlines:{error:"Ha ocurrido un error",loginEmail:"Iniciar sesión o crear cuenta",loginEmailNoSignup:"Iniciar sesión",loginFinished:"Inicio de sesión exitoso",loginPasscode:"Ingrese el código de acceso",loginPassword:"Ingrese la contraseña",registerAuthenticator:"Crear una llave de acceso",registerConfirm:"¿Crear cuenta?",registerPassword:"Establecer nueva contraseña",otpSetUp:"Configurar aplicación de autenticación",profileEmails:"Correos electrónicos",profilePassword:"Contraseña",profilePasskeys:"Llaves de acceso",isPrimaryEmail:"Dirección de correo principal",setPrimaryEmail:"Establecer correo principal",createEmail:"Ingrese un nuevo correo",createUsername:"Ingrese un nuevo nombre de usuario",emailVerified:"Verificado",emailUnverified:"No verificado",emailDelete:"Eliminar",renamePasskey:"Renombrar llave de acceso",deletePasskey:"Eliminar llave de acceso",lastUsedAt:"Último uso",createdAt:"Creado",connectedAccounts:"Cuentas conectadas",deleteAccount:"Eliminar cuenta",accountNotFound:"Cuenta no encontrada",signIn:"Iniciar sesión",signUp:"Crear cuenta",selectLoginMethod:"Seleccionar método de inicio de sesión",setupLoginMethod:"Configurar método de inicio de sesión",lastUsed:"Visto por última vez",ipAddress:"Dirección IP",revokeSession:"Revocar sesión",profileSessions:"Sesiones",mfaSetUp:"Configurar MFA",securityKeySetUp:"Agregar clave de seguridad",securityKeyLogin:"Clave de seguridad",otpLogin:"Código de autenticación",renameSecurityKey:"Renombrar clave de seguridad",deleteSecurityKey:"Eliminar clave de seguridad",securityKeys:"Claves de seguridad",authenticatorApp:"Aplicación de autenticación",authenticatorAppAlreadySetUp:"La aplicación de autenticación está configurada",authenticatorAppNotSetUp:"Configurar aplicación de autenticación",trustDevice:"¿Confiar en este navegador?"},texts:{enterPasscode:"Ingrese el código que se envió a su correo electrónico:",enterPasscodeNoEmail:"Ingrese el código que se envió a su dirección de correo principal.",setupPasskey:"Inicie sesión en su cuenta fácil y seguramente con una llave de acceso. Nota: Sus datos biométricos solo se almacenan en sus dispositivos y nunca se compartirán con nadie.",createAccount:'No existe una cuenta para "{emailAddress}". ¿Desea crear una nueva cuenta?',otpEnterVerificationCode:"Ingrese la contraseña de un solo uso (OTP) obtenida de su aplicación de autenticación a continuación:",otpScanQRCode:"Escanee el código QR usando su aplicación de autenticación (como Google Authenticator o cualquier otra aplicación TOTP). Alternativamente, puede ingresar manualmente la clave secreta OTP en la aplicación.",otpSecretKey:"Clave secreta OTP",passwordFormatHint:"Debe tener entre {minLength} y {maxLength} caracteres.",securityKeySetUp:"Use una clave de seguridad dedicada a través de USB, Bluetooth o NFC, o su teléfono móvil. Conecte o active su clave de seguridad, luego haga clic en el botón a continuación y siga las indicaciones para completar el registro.",setPrimaryEmail:"Establezca esta dirección de correo para ser usada para contactarlo.",isPrimaryEmail:"Esta dirección de correo se utilizará para contactarlo si es necesario.",emailVerified:"Esta dirección de correo ha sido verificada.",emailUnverified:"Esta dirección de correo no ha sido verificada.",emailDelete:"Si elimina esta dirección de correo, ya no podrá usarla para iniciar sesión.",renamePasskey:"Establecer un nombre para la llave de acceso.",deletePasskey:"Eliminar esta llave de acceso de su cuenta.",deleteAccount:"¿Está seguro de que desea eliminar esta cuenta? Todos los datos se eliminarán inmediatamente y no se podrán recuperar.",noAccountExists:'No existe una cuenta para "{emailAddress}".',selectLoginMethodForFutureLogins:"Seleccione uno de los siguientes métodos de inicio de sesión para usar en futuros inicios de sesión.",howDoYouWantToLogin:"¿Cómo desea iniciar sesión?",mfaSetUp:"Proteja su cuenta con autenticación multifactor (MFA). MFA agrega un paso adicional a su proceso de inicio de sesión, asegurando que incluso si su contraseña o cuenta de correo está comprometida, su cuenta permanezca segura.",securityKeyLogin:"Conecte o active su clave de seguridad, luego haga clic en el botón a continuación. Una vez listo, úselo a través de USB, NFC o su teléfono móvil. Siga las indicaciones para completar el proceso de inicio de sesión.",otpLogin:"Abra su aplicación de autenticación para obtener la contraseña de un solo uso (OTP). Ingrese el código en el campo a continuación para completar su inicio de sesión.",renameSecurityKey:"Establecer un nombre para la clave de seguridad.",deleteSecurityKey:"Eliminar esta clave de seguridad de su cuenta.",authenticatorAppAlreadySetUp:"Su cuenta está protegida con una aplicación de autenticación que genera contraseñas de un solo uso basadas en tiempo (TOTP) para autenticación multifactor.",authenticatorAppNotSetUp:"Proteja su cuenta con una aplicación de autenticación que genera contraseñas de un solo uso basadas en tiempo (TOTP) para autenticación multifactor.",trustDevice:"Si confía en este navegador, no necesitará ingresar su OTP (contraseña de un solo uso) o usar su clave de seguridad para la autenticación multifactor (MFA) la próxima vez que inicie sesión."},labels:{or:"o",no:"no",yes:"sí",email:"Correo electrónico",continue:"Continuar",copied:"copiado",skip:"Omitir",save:"Guardar",password:"Contraseña",passkey:"Llave de acceso",passcode:"Código de acceso",signInPassword:"Iniciar sesión con contraseña",signInPasscode:"Iniciar sesión con código",forgotYourPassword:"¿Olvidó su contraseña?",back:"Atrás",signInPasskey:"Iniciar sesión con llave de acceso",registerAuthenticator:"Crear una llave de acceso",signIn:"Iniciar sesión",signUp:"Regístrese aquí",sendNewPasscode:"Enviar nuevo código",passwordRetryAfter:"Reintentar en {passwordRetryAfter}",passcodeResendAfter:"Solicitar nuevo código en {passcodeResendAfter}",unverifiedEmail:"no verificado",primaryEmail:"principal",setAsPrimaryEmail:"Establecer como principal",verify:"Verificar",delete:"Eliminar",newEmailAddress:"Nueva dirección de correo",newPassword:"Nueva contraseña",rename:"Renombrar",newPasskeyName:"Nuevo nombre de llave de acceso",addEmail:"Agregar correo",createPasskey:"Crear una llave de acceso",webauthnUnsupported:"Las llaves de acceso no son compatibles con su navegador",signInWith:"Iniciar sesión con {provider}",deleteAccount:"Sí, eliminar esta cuenta.",emailOrUsername:"Correo o nombre de usuario",username:"Nombre de usuario",optional:"opcional",dontHaveAnAccount:"¿No tiene una cuenta HOT?",alreadyHaveAnAccount:"¿Ya tiene una cuenta?",changeUsername:"Cambiar nombre de usuario",setUsername:"Establecer nombre de usuario",changePassword:"Cambiar contraseña",setPassword:"Establecer contraseña",revoke:"Revocar",currentSession:"Sesión actual",authenticatorApp:"Aplicación de autenticación",securityKey:"Clave de seguridad",securityKeyUse:"Usar clave de seguridad",newSecurityKeyName:"Nuevo nombre de clave de seguridad",createSecurityKey:"Agregar una clave de seguridad",authenticatorAppManage:"Administrar aplicación de autenticación",authenticatorAppAdd:"Configurar",configured:"configurado",useAnotherMethod:"Usar otro método",lastUsed:"Último uso",trustDevice:"Confiar en este navegador",staySignedIn:"Mantener sesión iniciada"}},co={headlines:{error:"Une erreur s'est produite",loginEmail:"Se connecter ou créer un compte",loginEmailNoSignup:"Se connecter",loginFinished:"Connexion réussie",loginPasscode:"Entrez le code d'accès",loginPassword:"Entrez le mot de passe",registerAuthenticator:"Créer une clé d'accès",registerConfirm:"Créer un compte ?",registerPassword:"Définir un nouveau mot de passe",otpSetUp:"Configurer l'application d'authentification",profileEmails:"Adresses e-mail",profilePassword:"Mot de passe",profilePasskeys:"Clés d'accès",isPrimaryEmail:"Adresse e-mail principale",setPrimaryEmail:"Définir comme e-mail principal",createEmail:"Entrez un nouvel e-mail",createUsername:"Entrez un nouveau nom d'utilisateur",emailVerified:"Vérifié",emailUnverified:"Non vérifié",emailDelete:"Supprimer",renamePasskey:"Renommer la clé d'accès",deletePasskey:"Supprimer la clé d'accès",lastUsedAt:"Dernière utilisation",createdAt:"Créé",connectedAccounts:"Comptes connectés",deleteAccount:"Supprimer le compte",accountNotFound:"Compte introuvable",signIn:"Se connecter",signUp:"Créer un compte",selectLoginMethod:"Sélectionner la méthode de connexion",setupLoginMethod:"Configurer la méthode de connexion",lastUsed:"Vu pour la dernière fois",ipAddress:"Adresse IP",revokeSession:"Révoquer la session",profileSessions:"Sessions",mfaSetUp:"Configurer MFA",securityKeySetUp:"Ajouter une clé de sécurité",securityKeyLogin:"Clé de sécurité",otpLogin:"Code d'authentification",renameSecurityKey:"Renommer la clé de sécurité",deleteSecurityKey:"Supprimer la clé de sécurité",securityKeys:"Clés de sécurité",authenticatorApp:"Application d'authentification",authenticatorAppAlreadySetUp:"L'application d'authentification est configurée",authenticatorAppNotSetUp:"Configurer l'application d'authentification",trustDevice:"Faire confiance à ce navigateur ?"},texts:{enterPasscode:"Entrez le code envoyé à votre adresse e-mail:",enterPasscodeNoEmail:"Entrez le code envoyé à votre adresse e-mail principale.",setupPasskey:"Connectez-vous à votre compte facilement et en toute sécurité avec une clé d'accès. Remarque : Vos données biométriques ne sont stockées que sur vos appareils et ne seront jamais partagées avec personne.",createAccount:`Aucun compte n'existe pour "{emailAddress}". Souhaitez-vous créer un nouveau compte ?`,otpEnterVerificationCode:"Entrez le mot de passe à usage unique (OTP) obtenu depuis votre application d'authentification ci-dessous :",otpScanQRCode:"Scannez le code QR avec votre application d'authentification (comme Google Authenticator ou toute autre application TOTP). Vous pouvez également saisir manuellement la clé secrète OTP dans l'application.",otpSecretKey:"Clé secrète OTP",passwordFormatHint:"Doit contenir entre {minLength} et {maxLength} caractères.",securityKeySetUp:"Utilisez une clé de sécurité dédiée via USB, Bluetooth ou NFC, ou votre téléphone mobile. Connectez ou activez votre clé de sécurité, puis cliquez sur le bouton ci-dessous et suivez les instructions pour terminer l'inscription.",setPrimaryEmail:"Définir cette adresse e-mail pour être utilisée pour vous contacter.",isPrimaryEmail:"Cette adresse e-mail sera utilisée pour vous contacter si nécessaire.",emailVerified:"Cette adresse e-mail a été vérifiée.",emailUnverified:"Cette adresse e-mail n'a pas été vérifiée.",emailDelete:"Si vous supprimez cette adresse e-mail, vous ne pourrez plus l'utiliser pour vous connecter.",renamePasskey:"Définir un nom pour la clé d'accès.",deletePasskey:"Supprimer cette clé d'accès de votre compte.",deleteAccount:"Êtes-vous sûr de vouloir supprimer ce compte ? Toutes les données seront supprimées immédiatement et ne pourront pas être récupérées.",noAccountExists:`Aucun compte n'existe pour "{emailAddress}".`,selectLoginMethodForFutureLogins:"Sélectionnez l'une des méthodes de connexion suivantes à utiliser pour les futures connexions.",howDoYouWantToLogin:"Comment souhaitez-vous vous connecter ?",mfaSetUp:"Protégez votre compte avec l'authentification multifacteur (MFA). MFA ajoute une étape supplémentaire à votre processus de connexion, garantissant que même si votre mot de passe ou compte e-mail est compromis, votre compte reste sécurisé.",securityKeyLogin:"Connectez ou activez votre clé de sécurité, puis cliquez sur le bouton ci-dessous. Une fois prêt, utilisez-la via USB, NFC ou votre téléphone mobile. Suivez les instructions pour terminer le processus de connexion.",otpLogin:"Ouvrez votre application d'authentification pour obtenir le mot de passe à usage unique (OTP). Entrez le code dans le champ ci-dessous pour terminer votre connexion.",renameSecurityKey:"Définir un nom pour la clé de sécurité.",deleteSecurityKey:"Supprimer cette clé de sécurité de votre compte.",authenticatorAppAlreadySetUp:"Votre compte est protégé par une application d'authentification qui génère des mots de passe à usage unique basés sur le temps (TOTP) pour l'authentification multifacteur.",authenticatorAppNotSetUp:"Protégez votre compte avec une application d'authentification qui génère des mots de passe à usage unique basés sur le temps (TOTP) pour l'authentification multifacteur.",trustDevice:"Si vous faites confiance à ce navigateur, vous n'aurez pas besoin de saisir votre OTP (mot de passe à usage unique) ou d'utiliser votre clé de sécurité pour l'authentification multifacteur (MFA) la prochaine fois que vous vous connecterez."},labels:{or:"ou",no:"non",yes:"oui",email:"E-mail",continue:"Continuer",copied:"copié",skip:"Ignorer",save:"Enregistrer",password:"Mot de passe",passkey:"Clé d'accès",passcode:"Code d'accès",signInPassword:"Se connecter avec mot de passe",signInPasscode:"Se connecter avec code",forgotYourPassword:"Mot de passe oublié ?",back:"Retour",signInPasskey:"Se connecter avec clé d'accès",registerAuthenticator:"Créer une clé d'accès",signIn:"Se connecter",signUp:"S'inscrire ici",sendNewPasscode:"Envoyer un nouveau code",passwordRetryAfter:"Réessayer dans {passwordRetryAfter}",passcodeResendAfter:"Demander un nouveau code dans {passcodeResendAfter}",unverifiedEmail:"non vérifié",primaryEmail:"principal",setAsPrimaryEmail:"Définir comme principal",verify:"Vérifier",delete:"Supprimer",newEmailAddress:"Nouvelle adresse e-mail",newPassword:"Nouveau mot de passe",rename:"Renommer",newPasskeyName:"Nouveau nom de clé d'accès",addEmail:"Ajouter un e-mail",createPasskey:"Créer une clé d'accès",webauthnUnsupported:"Les clés d'accès ne sont pas compatibles avec votre navigateur",signInWith:"Se connecter avec {provider}",deleteAccount:"Oui, supprimer ce compte.",emailOrUsername:"E-mail ou nom d'utilisateur",username:"Nom d'utilisateur",optional:"optionnel",dontHaveAnAccount:"Vous n'avez pas de compte HOT ?",alreadyHaveAnAccount:"Vous avez déjà un compte ?",changeUsername:"Changer le nom d'utilisateur",setUsername:"Définir le nom d'utilisateur",changePassword:"Changer le mot de passe",setPassword:"Définir le mot de passe",revoke:"Révoquer",currentSession:"Session actuelle",authenticatorApp:"Application d'authentification",securityKey:"Clé de sécurité",securityKeyUse:"Utiliser la clé de sécurité",newSecurityKeyName:"Nouveau nom de clé de sécurité",createSecurityKey:"Ajouter une clé de sécurité",authenticatorAppManage:"Gérer l'application d'authentification",authenticatorAppAdd:"Configurer",configured:"configuré",useAnotherMethod:"Utiliser une autre méthode",lastUsed:"Dernière utilisation",trustDevice:"Faire confiance à ce navigateur",staySignedIn:"Rester connecté"}},lo={headlines:{error:"Ocorreu um erro",loginEmail:"Entrar ou criar conta",loginEmailNoSignup:"Entrar",loginFinished:"Login bem-sucedido",loginPasscode:"Digite o código de acesso",loginPassword:"Digite a senha",registerAuthenticator:"Criar uma chave de acesso",registerConfirm:"Criar conta?",registerPassword:"Definir nova senha",otpSetUp:"Configurar aplicativo de autenticação",profileEmails:"Endereços de e-mail",profilePassword:"Senha",profilePasskeys:"Chaves de acesso",isPrimaryEmail:"Endereço de e-mail principal",setPrimaryEmail:"Definir e-mail principal",createEmail:"Digite um novo e-mail",createUsername:"Digite um novo nome de usuário",emailVerified:"Verificado",emailUnverified:"Não verificado",emailDelete:"Excluir",renamePasskey:"Renomear chave de acesso",deletePasskey:"Excluir chave de acesso",lastUsedAt:"Último uso",createdAt:"Criado",connectedAccounts:"Contas conectadas",deleteAccount:"Excluir conta",accountNotFound:"Conta não encontrada",signIn:"Entrar",signUp:"Criar conta",selectLoginMethod:"Selecionar método de login",setupLoginMethod:"Configurar método de login",lastUsed:"Visto pela última vez",ipAddress:"Endereço IP",revokeSession:"Revogar sessão",profileSessions:"Sessões",mfaSetUp:"Configurar MFA",securityKeySetUp:"Adicionar chave de segurança",securityKeyLogin:"Chave de segurança",otpLogin:"Código de autenticação",renameSecurityKey:"Renomear chave de segurança",deleteSecurityKey:"Excluir chave de segurança",securityKeys:"Chaves de segurança",authenticatorApp:"Aplicativo de autenticação",authenticatorAppAlreadySetUp:"O aplicativo de autenticação está configurado",authenticatorAppNotSetUp:"Configurar aplicativo de autenticação",trustDevice:"Confiar neste navegador?"},texts:{enterPasscode:"Digite o código enviado para o seu endereço de e-mail:",enterPasscodeNoEmail:"Digite o código enviado para seu endereço de e-mail principal.",setupPasskey:"Faça login na sua conta de forma fácil e segura com uma chave de acesso. Nota: Seus dados biométricos são armazenados apenas em seus dispositivos e nunca serão compartilhados com ninguém.",createAccount:'Não existe uma conta para "{emailAddress}". Deseja criar uma nova conta?',otpEnterVerificationCode:"Digite a senha de uso único (OTP) obtida do seu aplicativo de autenticação abaixo:",otpScanQRCode:"Digitalize o código QR usando seu aplicativo de autenticação (como Google Authenticator ou qualquer outro aplicativo TOTP). Alternativamente, você pode inserir manualmente a chave secreta OTP no aplicativo.",otpSecretKey:"Chave secreta OTP",passwordFormatHint:"Deve ter entre {minLength} e {maxLength} caracteres.",securityKeySetUp:"Use uma chave de segurança dedicada via USB, Bluetooth ou NFC, ou seu telefone celular. Conecte ou ative sua chave de segurança, depois clique no botão abaixo e siga as instruções para concluir o registro.",setPrimaryEmail:"Defina este endereço de e-mail para ser usado para entrar em contato com você.",isPrimaryEmail:"Este endereço de e-mail será usado para entrar em contato com você, se necessário.",emailVerified:"Este endereço de e-mail foi verificado.",emailUnverified:"Este endereço de e-mail não foi verificado.",emailDelete:"Se você excluir este endereço de e-mail, não poderá mais usá-lo para fazer login.",renamePasskey:"Definir um nome para a chave de acesso.",deletePasskey:"Excluir esta chave de acesso da sua conta.",deleteAccount:"Tem certeza de que deseja excluir esta conta? Todos os dados serão excluídos imediatamente e não poderão ser recuperados.",noAccountExists:'Não existe uma conta para "{emailAddress}".',selectLoginMethodForFutureLogins:"Selecione um dos seguintes métodos de login para usar em futuros logins.",howDoYouWantToLogin:"Como você deseja fazer login?",mfaSetUp:"Proteja sua conta com autenticação multifator (MFA). MFA adiciona uma etapa extra ao seu processo de login, garantindo que, mesmo se sua senha ou conta de e-mail for comprometida, sua conta permaneça segura.",securityKeyLogin:"Conecte ou ative sua chave de segurança, depois clique no botão abaixo. Uma vez pronto, use-a via USB, NFC ou seu telefone celular. Siga as instruções para concluir o processo de login.",otpLogin:"Abra seu aplicativo de autenticação para obter a senha de uso único (OTP). Digite o código no campo abaixo para concluir seu login.",renameSecurityKey:"Definir um nome para a chave de segurança.",deleteSecurityKey:"Excluir esta chave de segurança da sua conta.",authenticatorAppAlreadySetUp:"Sua conta está protegida com um aplicativo de autenticação que gera senhas de uso único baseadas em tempo (TOTP) para autenticação multifator.",authenticatorAppNotSetUp:"Proteja sua conta com um aplicativo de autenticação que gera senhas de uso único baseadas em tempo (TOTP) para autenticação multifator.",trustDevice:"Se você confiar neste navegador, não precisará inserir seu OTP (senha de uso único) ou usar sua chave de segurança para autenticação multifator (MFA) na próxima vez que fizer login."},labels:{or:"ou",no:"não",yes:"sim",email:"E-mail",continue:"Continuar",copied:"copiado",skip:"Pular",save:"Salvar",password:"Senha",passkey:"Chave de acesso",passcode:"Código de acesso",signInPassword:"Entrar com senha",signInPasscode:"Entrar com código",forgotYourPassword:"Esqueceu sua senha?",back:"Voltar",signInPasskey:"Entrar com chave de acesso",registerAuthenticator:"Criar uma chave de acesso",signIn:"Entrar",signUp:"Cadastre-se aqui",sendNewPasscode:"Enviar novo código",passwordRetryAfter:"Tentar novamente em {passwordRetryAfter}",passcodeResendAfter:"Solicitar novo código em {passcodeResendAfter}",unverifiedEmail:"não verificado",primaryEmail:"principal",setAsPrimaryEmail:"Definir como principal",verify:"Verificar",delete:"Excluir",newEmailAddress:"Novo endereço de e-mail",newPassword:"Nova senha",rename:"Renomear",newPasskeyName:"Novo nome de chave de acesso",addEmail:"Adicionar e-mail",createPasskey:"Criar uma chave de acesso",webauthnUnsupported:"As chaves de acesso não são compatíveis com seu navegador",signInWith:"Entrar com {provider}",deleteAccount:"Sim, excluir esta conta.",emailOrUsername:"E-mail ou nome de usuário",username:"Nome de usuário",optional:"opcional",dontHaveAnAccount:"Não tem uma conta HOT?",alreadyHaveAnAccount:"Já tem uma conta?",changeUsername:"Alterar nome de usuário",setUsername:"Definir nome de usuário",changePassword:"Alterar senha",setPassword:"Definir senha",revoke:"Revogar",currentSession:"Sessão atual",authenticatorApp:"Aplicativo de autenticação",securityKey:"Chave de segurança",securityKeyUse:"Usar chave de segurança",newSecurityKeyName:"Novo nome de chave de segurança",createSecurityKey:"Adicionar uma chave de segurança",authenticatorAppManage:"Gerenciar aplicativo de autenticação",authenticatorAppAdd:"Configurar",configured:"configurado",useAnotherMethod:"Usar outro método",lastUsed:"Último uso",trustDevice:"Confiar neste navegador",staySignedIn:"Permanecer conectado"}};Object.assign(yt.headlines,ro.headlines),Object.assign(yt.labels,ro.labels),Object.assign(yt.texts,ro.texts);const An=JSON.parse(JSON.stringify(us));Object.assign(An.headlines,co.headlines),Object.assign(An.labels,co.labels),Object.assign(An.texts,co.texts);const Cn=JSON.parse(JSON.stringify(yt));Object.assign(Cn.headlines,so.headlines),Object.assign(Cn.labels,so.labels),Object.assign(Cn.texts,so.texts);const xn=JSON.parse(JSON.stringify(yt));Object.assign(xn.headlines,lo.headlines),Object.assign(xn.labels,lo.labels),Object.assign(xn.texts,lo.texts);function Di(){return{en:yt,es:Cn,fr:An,pt:xn}}const uo={en:{logIn:"Log in",logOut:"Log Out",myHotAccount:"My HOT Account",connectToOsm:"Connect to OSM",connectedToOsm:"Connected to OSM",connectedToOpenStreetMap:"Connected to OpenStreetMap",connectingToOpenStreetMap:"Connecting to OpenStreetMap...",checkingOsmConnection:"Checking OSM connection...",osmRequired:"OSM Required",osmRequiredText:"This endpoint requires OSM connection.",connectOsmAccount:"Connect OSM Account",openAccountMenu:"Open account menu",connectedToOsmAs:"Connected to OSM as",osmConnectionRequired:"OSM connection required",signUpSubtitle:"Access all HOT tools and services",loginSubtitle:"With your HOT account"},es:{logIn:"Iniciar sesión",logOut:"Cerrar sesión",myHotAccount:"Mi cuenta HOT",connectToOsm:"Conectar a OSM",connectedToOsm:"Conectado a OSM",connectedToOpenStreetMap:"Conectado a OpenStreetMap",connectingToOpenStreetMap:"Conectando a OpenStreetMap...",checkingOsmConnection:"Verificando conexión OSM...",osmRequired:"OSM Requerido",osmRequiredText:"Este endpoint requiere conexión OSM.",connectOsmAccount:"Conectar cuenta OSM",openAccountMenu:"Abrir menú de cuenta",connectedToOsmAs:"Conectado a OSM como",osmConnectionRequired:"Se requiere conexión OSM",signUpSubtitle:"Accede a todas las herramientas y servicios de HOT",loginSubtitle:"Con tu cuenta HOT"},fr:{logIn:"Se connecter",logOut:"Se déconnecter",myHotAccount:"Mon compte HOT",connectToOsm:"Connecter à OSM",connectedToOsm:"Connecté à OSM",connectedToOpenStreetMap:"Connecté à OpenStreetMap",connectingToOpenStreetMap:"Connexion à OpenStreetMap...",checkingOsmConnection:"Vérification de la connexion OSM...",osmRequired:"OSM requis",osmRequiredText:"Ce point de terminaison nécessite une connexion OSM.",connectOsmAccount:"Connecter le compte OSM",openAccountMenu:"Ouvrir le menu du compte",connectedToOsmAs:"Connecté à OSM en tant que",osmConnectionRequired:"Connexion OSM requise",signUpSubtitle:"Accédez à tous les outils et services HOT",loginSubtitle:"Avec votre compte HOT"},pt:{logIn:"Entrar",logOut:"Sair",myHotAccount:"Minha conta HOT",connectToOsm:"Conectar ao OSM",connectedToOsm:"Conectado ao OSM",connectedToOpenStreetMap:"Conectado ao OpenStreetMap",connectingToOpenStreetMap:"Conectando ao OpenStreetMap...",checkingOsmConnection:"Verificando conexão OSM...",osmRequired:"OSM Necessário",osmRequiredText:"Este endpoint requer conexão OSM.",connectOsmAccount:"Conectar conta OSM",openAccountMenu:"Abrir menu da conta",connectedToOsmAs:"Conectado ao OSM como",osmConnectionRequired:"Conexão OSM necessária",signUpSubtitle:"Acesse todas as ferramentas e serviços HOT",loginSubtitle:"Com a sua conta HOT"}},Li="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-person-vcard'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M5%208a2%202%200%201%200%200-4%202%202%200%200%200%200%204m4-2.5a.5.5%200%200%201%20.5-.5h4a.5.5%200%200%201%200%201h-4a.5.5%200%200%201-.5-.5M9%208a.5.5%200%200%201%20.5-.5h4a.5.5%200%200%201%200%201h-4A.5.5%200%200%201%209%208m1%202.5a.5.5%200%200%201%20.5-.5h3a.5.5%200%200%201%200%201h-3a.5.5%200%200%201-.5-.5'/%3e%3cpath%20d='M2%202a2%202%200%200%200-2%202v8a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V4a2%202%200%200%200-2-2zM1%204a1%201%200%200%201%201-1h12a1%201%200%200%201%201%201v8a1%201%200%200%201-1%201H8.96q.04-.245.04-.5C9%2010.567%207.21%209%205%209c-2.086%200-3.8%201.398-3.984%203.181A1%201%200%200%201%201%2012z'/%3e%3c/svg%3e",Ni="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-box-arrow-right'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill-rule='evenodd'%20d='M10%2012.5a.5.5%200%200%201-.5.5h-8a.5.5%200%200%201-.5-.5v-9a.5.5%200%200%201%20.5-.5h8a.5.5%200%200%201%20.5.5v2a.5.5%200%200%200%201%200v-2A1.5%201.5%200%200%200%209.5%202h-8A1.5%201.5%200%200%200%200%203.5v9A1.5%201.5%200%200%200%201.5%2014h8a1.5%201.5%200%200%200%201.5-1.5v-2a.5.5%200%200%200-1%200z'/%3e%3cpath%20fill-rule='evenodd'%20d='M15.854%208.354a.5.5%200%200%200%200-.708l-3-3a.5.5%200%200%200-.708.708L14.293%207.5H5.5a.5.5%200%200%200%200%201h8.793l-2.147%202.146a.5.5%200%200%200%20.708.708z'/%3e%3c/svg%3e",Mi="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-map'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill-rule='evenodd'%20d='M15.817.113A.5.5%200%200%201%2016%20.5v14a.5.5%200%200%201-.402.49l-5%201a.5.5%200%200%201-.196%200L5.5%2015.01l-4.902.98A.5.5%200%200%201%200%2015.5v-14a.5.5%200%200%201%20.402-.49l5-1a.5.5%200%200%201%20.196%200L10.5.99l4.902-.98a.5.5%200%200%201%20.415.103M10%201.91l-4-.8v12.98l4%20.8zm1%2012.98%204-.8V1.11l-4%20.8zm-6-.8V1.11l-4%20.8v12.98z'/%3e%3c/svg%3e",Ri="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-person-check'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M12.5%2016a3.5%203.5%200%201%200%200-7%203.5%203.5%200%200%200%200%207m1.679-4.493-1.335%202.226a.75.75%200%200%201-1.174.144l-.774-.773a.5.5%200%200%201%20.708-.708l.547.548%201.17-1.951a.5.5%200%201%201%20.858.514M11%205a3%203%200%201%201-6%200%203%203%200%200%201%206%200M8%207a2%202%200%201%200%200-4%202%202%200%200%200%200%204'/%3e%3cpath%20d='M8.256%2014a4.5%204.5%200%200%201-.229-1.004H3c.001-.246.154-.986.832-1.664C4.484%2010.68%205.711%2010%208%2010q.39%200%20.74.025c.226-.341.496-.65.804-.918Q8.844%209.002%208%209c-5%200-6%203-6%204s1%201%201%201z'/%3e%3c/svg%3e",hs="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-chevron-down'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill-rule='evenodd'%20d='M1.646%204.646a.5.5%200%200%201%20.708%200L8%2010.293l5.646-5.647a.5.5%200%200%201%20.708.708l-6%206a.5.5%200%200%201-.708%200l-6-6a.5.5%200%200%201%200-.708'/%3e%3c/svg%3e",ps="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-chevron-up'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill-rule='evenodd'%20d='M7.646%204.646a.5.5%200%200%201%20.708%200l6%206a.5.5%200%200%201-.708.708L8%205.707l-5.646%205.647a.5.5%200%200%201-.708-.708z'/%3e%3c/svg%3e";var ms=Object.defineProperty,fs=Object.getOwnPropertyDescriptor,ae=(o,e,t,n)=>{for(var i=n>1?void 0:n?fs(e,t):e,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(e,t,i):s(i))||i);return n&&i&&ms(e,t,i),i};let zi=!1,Kt=null;async function gs(o){if(!zi)return Kt||(Kt=(async()=>{console.log("[hanko-auth] Pre-registering Hanko translations...");try{await Ti(o,{enablePasskeys:!1,hidePasskeyButtonOnLogin:!0,translations:Di(),fallbackLanguage:"en"}),zi=!0,console.log("[hanko-auth] Hanko registration complete")}catch(e){throw console.error("[hanko-auth] Hanko registration failed:",e),Kt=null,e}})(),Kt)}const X={primary:null,user:null,osmConnected:!1,osmData:null,loading:!0,hanko:null,initialized:!1,instances:new Set,profileDisplayName:"",profilePictureUrl:"",hankoReady:!1},Hi=o=>`hanko-verified-${o}`,qi=o=>`hanko-onboarding-${o}`;return Y.HankoAuth=class extends xt{constructor(){super(),this.hankoUrlAttr="",this.basePath="",this.authPath="/api/auth/osm",this.osmRequired=!1,this.osmScopes="read_prefs",this.showProfile=!1,this.redirectAfterLogin="",this.autoConnect=!1,this.verifySession=!1,this.redirectAfterLogout="",this.displayNameAttr="",this.mappingCheckUrl="",this.appId="",this.loginUrl="",this.lang="en",this.buttonVariant="plain",this.buttonColor="primary",this.display="default",this.user=null,this.osmConnected=!1,this.osmData=null,this.osmLoading=!1,this.loading=!0,this.error=null,this.hankoReady=!1,this.profileDisplayName="",this.profilePictureUrl="",this.hasAppMapping=!1,this.userProfileLanguage=null,this.isOpen=!1,this.handleOutsideClick=e=>{this.contains(e.target)||this.closeDropdown()},this._debugMode=!1,this._lastSessionId=null,this._hanko=null,this._isPrimary=!1,this._sessionCheckFailures=0,this._sessionCheckBackoffTimer=null,this._hankoObserver=null,this._signUpHeadlines=new Set(["Create an account","Crear cuenta","Créer un compte","Criar conta"]),this._loginHeadlines=new Set(["Sign in or create account","Sign in","Iniciar sesión o crear cuenta","Iniciar sesión","Se connecter ou s'inscrire","Se connecter","Entrar ou criar conta","Entrar"]),this._handleVisibilityChange=()=>{this._isPrimary&&(this._sessionCheckBackoffTimer||!document.hidden&&!this.showProfile&&!this.user&&(this.log("Page visible, re-checking session..."),this.checkSession()))},this._handleWindowFocus=()=>{this._isPrimary&&(this._sessionCheckBackoffTimer||!this.showProfile&&!this.user&&(this.log("Window focused, re-checking session..."),this.checkSession()))},this._handleExternalLogin=e=>{var n;if(!this._isPrimary)return;const t=e;!this.showProfile&&!this.user&&((n=t.detail)!=null&&n.user)&&(this.log("External login detected, updating user state..."),this.user=t.detail.user,this._broadcastState(),this.osmRequired&&this.checkOSMConnection())},this._currentHankoAuthElement=null;try{const e=localStorage.getItem("hotosm-auth-user");if(e){const t=JSON.parse(e);this.user=t,this.loading=!1,t.avatarUrl&&(this.profilePictureUrl=t.avatarUrl)}}catch{}}toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen?setTimeout(()=>{document.addEventListener("click",this.handleOutsideClick)},0):document.removeEventListener("click",this.handleOutsideClick)}closeDropdown(){this.isOpen=!1,document.removeEventListener("click",this.handleOutsideClick)}renderBarDropdownContent(){var e;return fe`
572
572
  <div class="dropdown-content ${this.isOpen?"open":""}">
573
573
  <button data-action="profile" @click=${this.handleDropdownSelect}>
574
574
  <img src="${Li}" class="icon" alt="Account icon" />
@@ -593,10 +593,10 @@ var HankoAuth=function(Y){"use strict";/**
593
593
  ${this.t("logOut")}
594
594
  </button>
595
595
  </div>
596
- `}get hankoUrl(){if(this.hankoUrlAttr)return this.hankoUrlAttr;const e=document.querySelector('meta[name="hanko-url"]');if(e){const n=e.getAttribute("content");if(n)return this.log("hanko-url auto-detected from <meta> tag:",n),n}if(window.HANKO_URL)return this.log("hanko-url auto-detected from window.HANKO_URL:",window.HANKO_URL),window.HANKO_URL;const t=window.location.origin;return this.log("hanko-url auto-detected from window.location.origin:",t),t}connectedCallback(){super.connectedCallback(),this._debugMode=this._checkDebugMode(),this.log("hanko-auth connectedCallback called"),this.injectHotStyles(),X.instances.add(this),document.addEventListener("visibilitychange",this._handleVisibilityChange),window.addEventListener("focus",this._handleWindowFocus),document.addEventListener("hanko-login",this._handleExternalLogin)}firstUpdated(){this.log("hanko-auth firstUpdated called"),this.log(" hankoUrl:",this.hankoUrl),this.log(" basePath:",this.basePath),X.initialized||X.primary?(this.log("Using shared state from primary instance"),this._syncFromShared(),this._isPrimary=!1):(this.log("This is the primary instance"),this._isPrimary=!0,X.primary=this,X.initialized=!0,this.init())}disconnectedCallback(){if(super.disconnectedCallback(),document.removeEventListener("visibilitychange",this._handleVisibilityChange),window.removeEventListener("focus",this._handleWindowFocus),document.removeEventListener("hanko-login",this._handleExternalLogin),document.removeEventListener("click",this.handleOutsideClick),X.instances.delete(this),this._isPrimary&&X.instances.size>0){const e=X.instances.values().next().value;e&&(this.log("Promoting new primary instance"),e._isPrimary=!0,X.primary=e)}X.instances.size===0&&(X.initialized=!1,X.primary=null)}_syncFromShared(){this.user!==X.user&&(this.user=X.user),this.osmConnected!==X.osmConnected&&(this.osmConnected=X.osmConnected),this.osmData!==X.osmData&&(this.osmData=X.osmData),this.loading!==X.loading&&(this.loading=X.loading),this._hanko!==X.hanko&&(this._hanko=X.hanko),this.profileDisplayName!==X.profileDisplayName&&(this.profileDisplayName=X.profileDisplayName),this.profilePictureUrl!==X.profilePictureUrl&&(this.profilePictureUrl=X.profilePictureUrl),this.hankoReady!==X.hankoReady&&(this.hankoReady=X.hankoReady)}_broadcastState(){X.user=this.user,X.osmConnected=this.osmConnected,X.osmData=this.osmData,X.loading=this.loading,X.profileDisplayName=this.profileDisplayName,X.profilePictureUrl=this.profilePictureUrl,X.hankoReady=this.hankoReady,X.instances.forEach(e=>{e!==this&&e._syncFromShared()})}_checkDebugMode(){if(new URLSearchParams(window.location.search).get("debug")==="true")return!0;try{return localStorage.getItem("hanko-auth-debug")==="true"}catch{return!1}}log(...e){this._debugMode&&console.log(...e)}t(e){const t=this.user&&this.userProfileLanguage?this.userProfileLanguage:this.lang;return(uo[t]||uo.en)[e]||uo.en[e]||e}logError(...e){console.error(...e)}getBasePath(){return this.basePath?(this.log("getBasePath() using basePath:",this.basePath),this.basePath):(this.log("getBasePath() using default: empty string"),"")}injectHotStyles(){[{id:"hot-design-system",href:"https://cdn.jsdelivr.net/npm/@hotosm/ui-design@latest/dist/hot.css"},{id:"google-font-archivo",href:"https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&display=swap"}].forEach(({id:t,href:n})=>{if(!document.getElementById(t)){const i=document.createElement("link");i.rel="stylesheet",i.href=n,i.id=t,document.head.appendChild(i)}})}async init(){if(!this._isPrimary){this.log("Not primary, skipping init...");return}try{this.log("Ensuring Hanko is registered with translations for: en, es, fr, pt"),this.log("Current lang prop:",this.lang),await gs(this.hankoUrl),this.hankoReady=!0,this._broadcastState();const{Hanko:e}=await Promise.resolve().then(()=>ss),t=window.location.hostname,n=t==="localhost"||t==="127.0.0.1",i=t.split("."),r=i.length>=2?`.${i.slice(-2).join(".")}`:t,s=n?{}:{cookieDomain:r,cookieName:"hanko",cookieSameSite:"lax"};this._hanko=new e(this.hankoUrl,s),X.hanko=this._hanko,this._hanko.onSessionExpired(()=>{this.log("Hanko session expired event received"),this.handleSessionExpired()}),this._hanko.onUserLoggedOut(()=>{this.log("Hanko user logged out event received"),this.handleUserLoggedOut()}),await this.checkSession(),this.user&&(this.osmRequired&&await this.checkOSMConnection(),await this.fetchProfileDisplayName()),this.loading=!1,this._broadcastState(),this.setupEventListeners()}catch(e){this.logError("Failed to initialize hanko-auth:",e),this.error=e.message,this.loading=!1,this._broadcastState()}}async checkSession(){var e,t,n,i,r;if(this.log("Checking for existing Hanko session..."),!this._hanko){this.log("Hanko instance not initialized yet");return}try{this.log("Checking session validity via cookie...");try{const s=await fetch(`${this.hankoUrl}/sessions/validate`,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(s.ok){const c=await s.json();if(c.is_valid===!1){this.log("Session validation returned is_valid:false - no valid session"),this.user&&(this.user=null,this.profilePictureUrl="",this.dispatchEvent(new CustomEvent("logout",{bubbles:!0,composed:!0})));return}this.log("Valid Hanko session found via cookie"),this.log("Session data:",c);try{const u=await fetch(`${this.hankoUrl}/me`,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});let l=!0;if(u.ok){const d=await u.json();this.log("User data retrieved from /me:",d),d.email?(this.user={id:d.user_id||d.id,email:d.email,username:d.username||null,emailVerified:d.email_verified||d.verified||!1},l=!1):this.log("/me has no email, will use SDK fallback")}if(l){this.log("Using SDK to get user with email");const d=await this._hanko.getCurrentUser();this.user={id:d.user_id,email:((t=(e=d.emails)==null?void 0:e[0])==null?void 0:t.address)||null,username:((n=d.username)==null?void 0:n.username)||null,emailVerified:((r=(i=d.emails)==null?void 0:i[0])==null?void 0:r.is_verified)||!1}}}catch(u){this.log("Failed to get user data:",u),c.user_id&&(this.user={id:c.user_id,email:c.email||null,username:null,emailVerified:!1})}if(this.user){const u=Hi(window.location.hostname),l=sessionStorage.getItem(u);if(this.verifySession&&this.redirectAfterLogin&&!l){this.log("verify-session enabled, redirecting to callback for app verification..."),sessionStorage.setItem(u,"true"),window.location.href=this.redirectAfterLogin;return}if(!await this.checkAppMapping())return;await this.fetchProfileDisplayName(),this.user&&this.profilePictureUrl&&(this.user={...this.user,avatarUrl:this.profilePictureUrl}),this.dispatchEvent(new CustomEvent("hanko-login",{detail:{user:this.user},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("auth-complete",{bubbles:!0,composed:!0})),this.osmRequired&&await this.checkOSMConnection(),this.osmRequired&&this.autoConnect&&!this.osmConnected&&(this.log("Auto-connecting to OSM (from existing session)..."),this.handleOSMConnect())}}else this.log("No valid session cookie found - user needs to login")}catch(s){this.log("Session validation failed:",s),this.log("No valid session - user needs to login")}}catch(s){this.log("Session check error:",s),this.log("No existing session - user needs to login")}finally{this._isPrimary&&this._broadcastState()}}async checkOSMConnection(){if(!this.osmRequired){this.log("OSM not required, skipping connection check");return}if(this.osmConnected){this.log("Already connected to OSM, skipping check");return}const e=this.loading;e||(this.osmLoading=!0);try{const t=this.getBasePath(),n=this.authPath,r=`${`${t}${n}/status`}`;this.log("Checking OSM connection at:",r),this.log(" basePath:",t),this.log(" authPath:",n),this.log("Current cookies:",document.cookie);const s=await fetch(r,{credentials:"include",redirect:"follow"});if(this.log("OSM status response:",s.status),this.log("Final URL after redirects:",s.url),this.log("Response headers:",[...s.headers.entries()]),s.ok){const c=await s.text();this.log("OSM raw response:",c.substring(0,200));let u;try{u=JSON.parse(c)}catch{throw this.logError("Failed to parse OSM response as JSON:",c.substring(0,500)),new Error("Invalid JSON response from OSM status endpoint")}this.log("OSM status data:",u),u.connected?(this.log("OSM is connected:",u.osm_username),this.osmConnected=!0,this.osmData=u,this.dispatchEvent(new CustomEvent("osm-connected",{detail:{osmData:u},bubbles:!0,composed:!0}))):(this.log("OSM is NOT connected"),this.osmConnected=!1,this.osmData=null)}}catch(t){this.logError("OSM connection check failed:",t)}finally{e||(this.osmLoading=!1),this._isPrimary&&this._broadcastState()}}async checkAppMapping(){if(!this.mappingCheckUrl||!this.user)return!0;const e=qi(window.location.hostname);if(sessionStorage.getItem(e))return this.log("Onboarding already completed this session, skipping check"),this.hasAppMapping=!0,!0;this.log("Checking app mapping at:",this.mappingCheckUrl);try{const n=await fetch(this.mappingCheckUrl,{credentials:"include"});if(n.ok){const i=await n.json();if(this.log("Mapping check response:",i),i.needs_onboarding){this.log("User needs onboarding, redirecting...");const r=encodeURIComponent(window.location.origin),s=this.appId?`onboarding=${this.appId}`:"";return window.location.href=`${this.hankoUrl}/app?${s}&return_to=${r}`,!1}return sessionStorage.setItem(e,"true"),this.hasAppMapping=!0,this.log("User has app mapping, onboarding marked complete"),!0}else if(n.status===401||n.status===403){this.log("401/403 - User needs onboarding, redirecting...");const i=encodeURIComponent(window.location.origin),r=this.appId?`onboarding=${this.appId}`:"";return window.location.href=`${this.hankoUrl}/app?${r}&return_to=${i}`,!1}return this.log("Unexpected status from mapping check:",n.status),!0}catch(n){return this.log("App mapping check failed:",n),!0}}async fetchProfileDisplayName(){try{const e=`${this.hankoUrl}/api/profile/me`;this.log("Fetching profile from:",e);const t=await fetch(e,{credentials:"include"});if(t.ok){const n=await t.json();this.log("Profile data:",n),(n.first_name||n.last_name)&&(this.profileDisplayName=`${n.first_name||""} ${n.last_name||""}`.trim(),this.log("Display name set to:",this.profileDisplayName));const i=n.osm_avatar_url||n.picture_url;this.profilePictureUrl=i||"",this.log("Profile picture set to:",this.profilePictureUrl),n.language&&(this.userProfileLanguage=n.language,this.log("Language set from profile:",this.userProfileLanguage))}}catch(e){this.log("Could not fetch profile:",e)}}updated(e){super.updated(e),(e.has("user")&&this.user===null&&this.showProfile||e.has("lang"))&&(this._currentHankoAuthElement=null,this.setupEventListeners())}setupEventListeners(){this.updateComplete.then(()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("hanko-auth");if(!(e&&e===this._currentHankoAuthElement)&&e){this._currentHankoAuthElement=e;const n=e.shadowRoot;if(n&&!n.querySelector("#hot-hanko-overrides")){const i=document.createElement("style");i.id="hot-hanko-overrides",i.textContent=`
596
+ `}get hankoUrl(){if(this.hankoUrlAttr)return this.hankoUrlAttr;const e=document.querySelector('meta[name="hanko-url"]');if(e){const n=e.getAttribute("content");if(n)return this.log("hanko-url auto-detected from <meta> tag:",n),n}if(window.HANKO_URL)return this.log("hanko-url auto-detected from window.HANKO_URL:",window.HANKO_URL),window.HANKO_URL;const t=window.location.origin;return this.log("hanko-url auto-detected from window.location.origin:",t),t}connectedCallback(){super.connectedCallback(),this._debugMode=this._checkDebugMode(),this.log("hanko-auth connectedCallback called"),this.injectHotStyles(),X.instances.add(this),document.addEventListener("visibilitychange",this._handleVisibilityChange),window.addEventListener("focus",this._handleWindowFocus),document.addEventListener("hanko-login",this._handleExternalLogin)}firstUpdated(){this.log("hanko-auth firstUpdated called"),this.log(" hankoUrl:",this.hankoUrl),this.log(" basePath:",this.basePath),X.initialized||X.primary?(this.log("Using shared state from primary instance"),this._syncFromShared(),this._isPrimary=!1):(this.log("This is the primary instance"),this._isPrimary=!0,X.primary=this,X.initialized=!0,this.init())}disconnectedCallback(){if(super.disconnectedCallback(),document.removeEventListener("visibilitychange",this._handleVisibilityChange),window.removeEventListener("focus",this._handleWindowFocus),document.removeEventListener("hanko-login",this._handleExternalLogin),document.removeEventListener("click",this.handleOutsideClick),X.instances.delete(this),this._isPrimary&&X.instances.size>0){const e=X.instances.values().next().value;e&&(this.log("Promoting new primary instance"),e._isPrimary=!0,X.primary=e)}X.instances.size===0&&(X.initialized=!1,X.primary=null)}_syncFromShared(){this.user!==X.user&&(this.user=X.user),this.osmConnected!==X.osmConnected&&(this.osmConnected=X.osmConnected),this.osmData!==X.osmData&&(this.osmData=X.osmData),this.loading!==X.loading&&(this.loading=X.loading),this._hanko!==X.hanko&&(this._hanko=X.hanko),this.profileDisplayName!==X.profileDisplayName&&(this.profileDisplayName=X.profileDisplayName),this.profilePictureUrl!==X.profilePictureUrl&&(this.profilePictureUrl=X.profilePictureUrl),this.hankoReady!==X.hankoReady&&(this.hankoReady=X.hankoReady)}_broadcastState(){X.user=this.user,X.osmConnected=this.osmConnected,X.osmData=this.osmData,X.loading=this.loading,X.profileDisplayName=this.profileDisplayName,X.profilePictureUrl=this.profilePictureUrl,X.hankoReady=this.hankoReady,X.instances.forEach(e=>{e!==this&&e._syncFromShared()})}_checkDebugMode(){if(new URLSearchParams(window.location.search).get("debug")==="true")return!0;try{return localStorage.getItem("hanko-auth-debug")==="true"}catch{return!1}}log(...e){this._debugMode&&console.log(...e)}t(e){const t=this.user&&this.userProfileLanguage?this.userProfileLanguage:this.lang;return(uo[t]||uo.en)[e]||uo.en[e]||e}logError(...e){console.error(...e)}getBasePath(){return this.basePath?(this.log("getBasePath() using basePath:",this.basePath),this.basePath):(this.log("getBasePath() using default: empty string"),"")}injectHotStyles(){[{id:"hot-design-system",href:"https://cdn.jsdelivr.net/npm/@hotosm/ui-design@latest/dist/hot.css"},{id:"google-font-archivo",href:"https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&display=swap"}].forEach(({id:t,href:n})=>{if(!document.getElementById(t)){const i=document.createElement("link");i.rel="stylesheet",i.href=n,i.id=t,document.head.appendChild(i)}})}async init(){if(!this._isPrimary){this.log("Not primary, skipping init...");return}try{this.log("Ensuring Hanko is registered with translations for: en, es, fr, pt"),this.log("Current lang prop:",this.lang),await gs(this.hankoUrl),this.hankoReady=!0,this._broadcastState();const{Hanko:e}=await Promise.resolve().then(()=>ss),t=window.location.hostname,n=t==="localhost"||t==="127.0.0.1",i=t.split("."),r=i.length>=2?`.${i.slice(-2).join(".")}`:t,s=n?{}:{cookieDomain:r,cookieName:"hanko",cookieSameSite:"lax"};this._hanko=new e(this.hankoUrl,s),X.hanko=this._hanko,this._hanko.onSessionExpired(()=>{this.log("Hanko session expired event received"),this.handleSessionExpired()}),this._hanko.onUserLoggedOut(()=>{this.log("Hanko user logged out event received"),this.handleUserLoggedOut()}),await this.checkSession(),this.user&&(this.osmRequired&&await this.checkOSMConnection(),await this.fetchProfileDisplayName()),this.loading=!1,this._broadcastState(),this.setupEventListeners()}catch(e){this.logError("Failed to initialize hanko-auth:",e),this.error=e.message,this.loading=!1,this._broadcastState()}}_scheduleSessionRetry(){if(this._sessionCheckBackoffTimer)return;const e=Math.min(1e3*2**this._sessionCheckFailures,6e4);this.log(`Session check failed, retrying in ${e/1e3}s (attempt ${this._sessionCheckFailures})`),this._sessionCheckBackoffTimer=setTimeout(()=>{this._sessionCheckBackoffTimer=null,this.checkSession()},e)}async checkSession(){var e,t,n,i,r;if(this.log("Checking for existing Hanko session..."),!this._hanko){this.log("Hanko instance not initialized yet");return}try{this.log("Checking session validity via cookie...");try{const s=await fetch(`${this.hankoUrl}/sessions/validate`,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(s.ok){const c=await s.json();if(c.is_valid===!1){this.log("Session validation returned is_valid:false - no valid session"),this.user&&(this.user=null,this.profilePictureUrl="",this.dispatchEvent(new CustomEvent("logout",{bubbles:!0,composed:!0})));return}this._sessionCheckFailures=0,this.log("Valid Hanko session found via cookie"),this.log("Session data:",c);try{const u=await fetch(`${this.hankoUrl}/me`,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});let l=!0;if(u.ok){const d=await u.json();this.log("User data retrieved from /me:",d),d.email?(this.user={id:d.user_id||d.id,email:d.email,username:d.username||null,emailVerified:d.email_verified||d.verified||!1},l=!1):this.log("/me has no email, will use SDK fallback")}if(l){this.log("Using SDK to get user with email");const d=await this._hanko.getCurrentUser();this.user={id:d.user_id,email:((t=(e=d.emails)==null?void 0:e[0])==null?void 0:t.address)||null,username:((n=d.username)==null?void 0:n.username)||null,emailVerified:((r=(i=d.emails)==null?void 0:i[0])==null?void 0:r.is_verified)||!1}}}catch(u){this.log("Failed to get user data:",u),c.user_id&&(this.user={id:c.user_id,email:c.email||null,username:null,emailVerified:!1})}if(this.user){const u=Hi(window.location.hostname),l=sessionStorage.getItem(u);if(this.verifySession&&this.redirectAfterLogin&&!l){this.log("verify-session enabled, redirecting to callback for app verification..."),sessionStorage.setItem(u,"true"),window.location.href=this.redirectAfterLogin;return}if(!await this.checkAppMapping())return;await this.fetchProfileDisplayName(),this.user&&this.profilePictureUrl&&(this.user={...this.user,avatarUrl:this.profilePictureUrl}),this.dispatchEvent(new CustomEvent("hanko-login",{detail:{user:this.user},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("auth-complete",{bubbles:!0,composed:!0})),this.osmRequired&&await this.checkOSMConnection(),this.osmRequired&&this.autoConnect&&!this.osmConnected&&(this.log("Auto-connecting to OSM (from existing session)..."),this.handleOSMConnect())}}else this.log("No valid session cookie found - user needs to login")}catch(s){this._sessionCheckFailures++,this.log("Session validation failed:",s),this._scheduleSessionRetry();return}}catch(s){this._sessionCheckFailures++,this.log("Session check error:",s),this._scheduleSessionRetry();return}finally{this._isPrimary&&this._broadcastState()}}async checkOSMConnection(){if(!this.osmRequired){this.log("OSM not required, skipping connection check");return}if(this.osmConnected){this.log("Already connected to OSM, skipping check");return}const e=this.loading;e||(this.osmLoading=!0);try{const t=this.getBasePath(),n=this.authPath,r=`${`${t}${n}/status`}`;this.log("Checking OSM connection at:",r),this.log(" basePath:",t),this.log(" authPath:",n),this.log("Current cookies:",document.cookie);const s=await fetch(r,{credentials:"include",redirect:"follow"});if(this.log("OSM status response:",s.status),this.log("Final URL after redirects:",s.url),this.log("Response headers:",[...s.headers.entries()]),s.ok){const c=await s.text();this.log("OSM raw response:",c.substring(0,200));let u;try{u=JSON.parse(c)}catch{throw this.logError("Failed to parse OSM response as JSON:",c.substring(0,500)),new Error("Invalid JSON response from OSM status endpoint")}this.log("OSM status data:",u),u.connected?(this.log("OSM is connected:",u.osm_username),this.osmConnected=!0,this.osmData=u,this.dispatchEvent(new CustomEvent("osm-connected",{detail:{osmData:u},bubbles:!0,composed:!0}))):(this.log("OSM is NOT connected"),this.osmConnected=!1,this.osmData=null)}}catch(t){this.logError("OSM connection check failed:",t)}finally{e||(this.osmLoading=!1),this._isPrimary&&this._broadcastState()}}async checkAppMapping(){if(!this.mappingCheckUrl||!this.user)return!0;const e=qi(window.location.hostname);if(sessionStorage.getItem(e))return this.log("Onboarding already completed this session, skipping check"),this.hasAppMapping=!0,!0;this.log("Checking app mapping at:",this.mappingCheckUrl);try{const n=await fetch(this.mappingCheckUrl,{credentials:"include"});if(n.ok){const i=await n.json();if(this.log("Mapping check response:",i),i.needs_onboarding){this.log("User needs onboarding, redirecting...");const r=encodeURIComponent(window.location.origin),s=this.appId?`onboarding=${this.appId}`:"";return window.location.href=`${this.hankoUrl}/app?${s}&return_to=${r}`,!1}return sessionStorage.setItem(e,"true"),this.hasAppMapping=!0,this.log("User has app mapping, onboarding marked complete"),!0}else if(n.status===401||n.status===403){this.log("401/403 - User needs onboarding, redirecting...");const i=encodeURIComponent(window.location.origin),r=this.appId?`onboarding=${this.appId}`:"";return window.location.href=`${this.hankoUrl}/app?${r}&return_to=${i}`,!1}return this.log("Unexpected status from mapping check:",n.status),!0}catch(n){return this.log("App mapping check failed:",n),!0}}async fetchProfileDisplayName(){try{const e=`${this.hankoUrl}/api/profile/me`;this.log("Fetching profile from:",e);const t=await fetch(e,{credentials:"include"});if(t.ok){const n=await t.json();this.log("Profile data:",n),(n.first_name||n.last_name)&&(this.profileDisplayName=`${n.first_name||""} ${n.last_name||""}`.trim(),this.log("Display name set to:",this.profileDisplayName));const i=n.osm_avatar_url||n.picture_url;this.profilePictureUrl=i||"",this.log("Profile picture set to:",this.profilePictureUrl),n.language&&(this.userProfileLanguage=n.language,this.log("Language set from profile:",this.userProfileLanguage))}}catch(e){this.log("Could not fetch profile:",e)}}updated(e){super.updated(e),(e.has("user")&&this.user===null&&this.showProfile||e.has("lang"))&&(this._currentHankoAuthElement=null,this.setupEventListeners())}setupEventListeners(){this.updateComplete.then(()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("hanko-auth");if(!(e&&e===this._currentHankoAuthElement)&&e){this._currentHankoAuthElement=e;const n=e.shadowRoot;if(n&&!n.querySelector("#hot-hanko-overrides")){const i=document.createElement("style");i.id="hot-hanko-overrides",i.textContent=`
597
597
  .hanko_lastUsed { margin-left: 8px; }
598
598
  .hanko_form .hanko_li { min-width: 100%; }
599
- `,n.appendChild(i)}this._setupSignUpSubtitleObserver(e),e.addEventListener("onSessionCreated",i=>{var s,c;this.log("Hanko event: onSessionCreated",i.detail);const r=(c=(s=i.detail)==null?void 0:s.claims)==null?void 0:c.session_id;if(r&&this._lastSessionId===r){this.log("Skipping duplicate session event");return}this._lastSessionId=r,this.handleHankoSuccess(i)}),e.addEventListener("hankoAuthLogout",()=>this.handleLogout())}})}_setupSignUpSubtitleObserver(e){const t=()=>{var v,f,k,A,C;const i=e.shadowRoot;if(!i)return;const r=i.querySelector("h1[part='headline1']"),s=((v=r==null?void 0:r.textContent)==null?void 0:v.trim())??"",c=i.querySelector(".hot-subtitle"),u=this._signUpHeadlines.has(s),l=this._loginHeadlines.has(s);if(!u&&!l){c&&((f=this._hankoObserver)==null||f.disconnect(),c.remove(),(k=this._hankoObserver)==null||k.observe(i,{childList:!0,subtree:!0}));return}const d=u?this.t("signUpSubtitle"):this.t("loginSubtitle");if(c&&c.textContent===d||!r)return;(A=this._hankoObserver)==null||A.disconnect(),c&&c.remove();const h=document.createElement("p");h.className="hot-subtitle",h.textContent=d,h.style.cssText="margin: -4px 0 16px; text-align: center; font-size: var(--hot-font-size-large); color: var(--hot-color-gray-600, #6b7280); font-weight: normal;",r.insertAdjacentElement("afterend",h),(C=this._hankoObserver)==null||C.observe(i,{childList:!0,subtree:!0})};this._hankoObserver&&this._hankoObserver.disconnect();const n=e.shadowRoot;n&&(this._hankoObserver=new MutationObserver(()=>t()),this._hankoObserver.observe(n,{childList:!0,subtree:!0}),t())}async handleHankoSuccess(e){var i,r,s,c,u,l;if(this.log("Hanko auth success:",e.detail),!this._hanko){this.logError("Hanko instance not initialized");return}let t=!1;try{const d=new AbortController,h=setTimeout(()=>d.abort(),5e3),v=await fetch(`${this.hankoUrl}/me`,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"},signal:d.signal});if(clearTimeout(h),v.ok){const f=await v.json();this.log("User data retrieved from /me:",f),f.email?(this.user={id:f.user_id||f.id,email:f.email,username:f.username||null,emailVerified:f.email_verified||f.verified||!1},t=!0):this.log("/me has no email, will try SDK fallback")}else this.log("/me endpoint returned non-OK status, will try SDK fallback")}catch(d){this.log("/me endpoint fetch failed (timeout or cross-origin TLS issue):",d)}if(!t)try{this.log("Trying SDK fallback for user info...");const d=new Promise((v,f)=>setTimeout(()=>f(new Error("SDK timeout")),5e3)),h=await Promise.race([this._hanko.getCurrentUser(),d]);this.user={id:h.user_id,email:((r=(i=h.emails)==null?void 0:i[0])==null?void 0:r.address)||null,username:((s=h.username)==null?void 0:s.username)||null,emailVerified:((u=(c=h.emails)==null?void 0:c[0])==null?void 0:u.is_verified)||!1},t=!0,this.log("User info retrieved via SDK fallback")}catch(d){this.log("SDK fallback failed, trying JWT claims:",d);try{const h=(l=e.detail)==null?void 0:l.claims;if(h!=null&&h.sub)this.user={id:h.sub,email:h.email||null,username:null,emailVerified:h.email_verified||!1},t=!0,this.log("User info extracted from JWT claims");else{this.logError("No user claims available in event"),this.user=null;return}}catch(h){this.logError("Failed to extract user info from claims:",h),this.user=null;return}}if(this.log("User state updated:",this.user),await this.fetchProfileDisplayName(),this.user&&this.profilePictureUrl&&(this.user={...this.user,avatarUrl:this.profilePictureUrl}),this._isPrimary&&this._broadcastState(),this.dispatchEvent(new CustomEvent("hanko-login",{detail:{user:this.user},bubbles:!0,composed:!0})),this.osmRequired&&await this.checkOSMConnection(),this.osmRequired&&this.autoConnect&&!this.osmConnected){this.log("Auto-connecting to OSM..."),this.handleOSMConnect();return}const n=!this.osmRequired||this.osmConnected;this.log("Checking redirect-after-login:",this.redirectAfterLogin,"showProfile:",this.showProfile,"canRedirect:",n),n?(this.dispatchEvent(new CustomEvent("auth-complete",{bubbles:!0,composed:!0})),this.redirectAfterLogin?(this.log("Redirecting to:",this.redirectAfterLogin),window.location.href=this.redirectAfterLogin):this.log("No redirect (redirectAfterLogin not set)")):this.log("Waiting for OSM connection before redirect")}async handleOSMConnect(){const e=this.osmScopes.split(" ").join("+"),t=this.getBasePath(),n=this.authPath,r=`${`${t}${n}/login`}?scopes=${e}`;this.log("OSM Connect clicked!"),this.log(" basePath:",t),this.log(" authPath:",n),this.log(" Login path:",r),this.log(" Fetching redirect URL from backend...");try{const s=await fetch(r,{method:"GET",credentials:"include",redirect:"manual"});if(this.log(" Response status:",s.status),this.log(" Response type:",s.type),s.status===0||s.type==="opaqueredirect"){const c=s.headers.get("Location")||s.url;this.log("Got redirect URL:",c),window.location.href=c}else if(s.status>=300&&s.status<400){const c=s.headers.get("Location");this.log("Got redirect URL from header:",c),c&&(window.location.href=c)}else{this.logError("Unexpected response:",s.status);const c=await s.text();this.logError(" Response body:",c.substring(0,200))}}catch(s){this.logError("Failed to fetch redirect URL:",s)}}async handleLogout(){this.log("Logout initiated"),this.log("Current state before logout:",{user:this.user,osmConnected:this.osmConnected,osmData:this.osmData}),this.log("Cookies before logout:",document.cookie);try{const e=this.getBasePath(),t=this.authPath,n=`${e}${t}/disconnect`,i=n.startsWith("http")?n:`${window.location.origin}${n}`;this.log("Calling OSM disconnect:",i);const r=await fetch(i,{method:"POST",credentials:"include"});this.log("Disconnect response status:",r.status);const s=await r.json();this.log("Disconnect response data:",s),this.log("OSM disconnected")}catch(e){this.logError("OSM disconnect failed:",e)}if(this._hanko)try{await this._hanko.logout(),this.log("Hanko logout successful")}catch(e){this.logError("Hanko logout failed:",e)}if(this._clearAuthState(),this.log("Logout complete - component will re-render with updated state"),this.redirectAfterLogout){const e=window.location.href.replace(/\/$/,""),t=this.redirectAfterLogout.replace(/\/$/,"");e!==t&&!e.startsWith(t+"#")?(this.log("Redirecting after logout to:",this.redirectAfterLogout),window.location.href=this.redirectAfterLogout):this.log("Already on logout target, skipping redirect")}}_clearAuthState(){const e=window.location.hostname;document.cookie=`hanko=; path=/; domain=${e}; max-age=0`,document.cookie="hanko=; path=/; max-age=0",document.cookie=`osm_connection=; path=/; domain=${e}; max-age=0`,document.cookie="osm_connection=; path=/; max-age=0",this.log("Cookies cleared");const t=Hi(e),n=qi(e);sessionStorage.removeItem(t),sessionStorage.removeItem(n),this.log("Session flags cleared"),this.user=null,this.osmConnected=!1,this.osmData=null,this.hasAppMapping=!1,this.userProfileLanguage=null,this.profilePictureUrl="",this._isPrimary&&this._broadcastState(),this.dispatchEvent(new CustomEvent("logout",{bubbles:!0,composed:!0}))}async handleSessionExpired(){if(this.log("Session expired event received"),this.log("Current state:",{user:this.user,osmConnected:this.osmConnected,loading:this.loading}),this.loading){this.log("Still loading, ignoring session expired event during init");return}if(this.user){this.log("User is logged in, ignoring stale session expired event");return}this.log("No active user - cleaning up state");try{const e=this.getBasePath(),t=this.authPath,n=`${e}${t}/disconnect`,i=n.startsWith("http")?n:`${window.location.origin}${n}`;this.log("Calling OSM disconnect (session expired):",i);const r=await fetch(i,{method:"POST",credentials:"include"});this.log("Disconnect response status:",r.status);const s=await r.json();this.log("Disconnect response data:",s),this.log("OSM disconnected")}catch(e){this.logError("OSM disconnect failed:",e)}if(this._clearAuthState(),this.log("Session cleanup complete"),this.redirectAfterLogout){const e=window.location.href.replace(/\/$/,""),t=this.redirectAfterLogout.replace(/\/$/,"");e!==t&&!e.startsWith(t+"#")?(this.log("Redirecting after session expired to:",this.redirectAfterLogout),window.location.href=this.redirectAfterLogout):this.log("Already on logout target, skipping redirect")}}handleUserLoggedOut(){this.log("User logged out in another window/tab"),this.handleSessionExpired()}handleDropdownSelect(e){const n=e.currentTarget.dataset.action;if(this.log("Dropdown item selected:",n),n==="profile"){const i=this.hankoUrl,r=this.redirectAfterLogin||window.location.origin;window.location.href=`${i}/app/profile?return_to=${encodeURIComponent(r)}`}else if(n==="connect-osm"){const s=window.location.pathname.includes("/app")?window.location.origin:window.location.href,c=this.hankoUrl;window.location.href=`${c}/app?return_to=${encodeURIComponent(s)}&osm_required=true`}else n==="logout"&&this.handleLogout();this.closeDropdown()}render(){var e,t,n;if(this.log("RENDER - showProfile:",this.showProfile,"user:",!!this.user,"loading:",this.loading,"lang:",this.lang),this.loading)return fe`<span class="loading-placeholder"
599
+ `,n.appendChild(i)}this._setupSignUpSubtitleObserver(e),e.addEventListener("onSessionCreated",i=>{var s,c;this.log("Hanko event: onSessionCreated",i.detail);const r=(c=(s=i.detail)==null?void 0:s.claims)==null?void 0:c.session_id;if(r&&this._lastSessionId===r){this.log("Skipping duplicate session event");return}this._lastSessionId=r,this.handleHankoSuccess(i)}),e.addEventListener("hankoAuthLogout",()=>this.handleLogout())}})}_setupSignUpSubtitleObserver(e){const t=()=>{var v,f,w,A,C;const i=e.shadowRoot;if(!i)return;const r=i.querySelector("h1[part='headline1']"),s=((v=r==null?void 0:r.textContent)==null?void 0:v.trim())??"",c=i.querySelector(".hot-subtitle"),u=this._signUpHeadlines.has(s),l=this._loginHeadlines.has(s);if(!u&&!l){c&&((f=this._hankoObserver)==null||f.disconnect(),c.remove(),(w=this._hankoObserver)==null||w.observe(i,{childList:!0,subtree:!0}));return}const d=u?this.t("signUpSubtitle"):this.t("loginSubtitle");if(c&&c.textContent===d||!r)return;(A=this._hankoObserver)==null||A.disconnect(),c&&c.remove();const h=document.createElement("p");h.className="hot-subtitle",h.textContent=d,h.style.cssText="margin: -4px 0 16px; text-align: center; font-size: var(--hot-font-size-large); color: var(--hot-color-gray-600, #6b7280); font-weight: normal;",r.insertAdjacentElement("afterend",h),(C=this._hankoObserver)==null||C.observe(i,{childList:!0,subtree:!0})};this._hankoObserver&&this._hankoObserver.disconnect();const n=e.shadowRoot;n&&(this._hankoObserver=new MutationObserver(()=>t()),this._hankoObserver.observe(n,{childList:!0,subtree:!0}),t())}async handleHankoSuccess(e){var i,r,s,c,u,l;if(this.log("Hanko auth success:",e.detail),!this._hanko){this.logError("Hanko instance not initialized");return}let t=!1;try{const d=new AbortController,h=setTimeout(()=>d.abort(),5e3),v=await fetch(`${this.hankoUrl}/me`,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"},signal:d.signal});if(clearTimeout(h),v.ok){const f=await v.json();this.log("User data retrieved from /me:",f),f.email?(this.user={id:f.user_id||f.id,email:f.email,username:f.username||null,emailVerified:f.email_verified||f.verified||!1},t=!0):this.log("/me has no email, will try SDK fallback")}else this.log("/me endpoint returned non-OK status, will try SDK fallback")}catch(d){this.log("/me endpoint fetch failed (timeout or cross-origin TLS issue):",d)}if(!t)try{this.log("Trying SDK fallback for user info...");const d=new Promise((v,f)=>setTimeout(()=>f(new Error("SDK timeout")),5e3)),h=await Promise.race([this._hanko.getCurrentUser(),d]);this.user={id:h.user_id,email:((r=(i=h.emails)==null?void 0:i[0])==null?void 0:r.address)||null,username:((s=h.username)==null?void 0:s.username)||null,emailVerified:((u=(c=h.emails)==null?void 0:c[0])==null?void 0:u.is_verified)||!1},t=!0,this.log("User info retrieved via SDK fallback")}catch(d){this.log("SDK fallback failed, trying JWT claims:",d);try{const h=(l=e.detail)==null?void 0:l.claims;if(h!=null&&h.sub)this.user={id:h.sub,email:h.email||null,username:null,emailVerified:h.email_verified||!1},t=!0,this.log("User info extracted from JWT claims");else{this.logError("No user claims available in event"),this.user=null;return}}catch(h){this.logError("Failed to extract user info from claims:",h),this.user=null;return}}if(this.log("User state updated:",this.user),await this.fetchProfileDisplayName(),this.user&&this.profilePictureUrl&&(this.user={...this.user,avatarUrl:this.profilePictureUrl}),this._isPrimary&&this._broadcastState(),this.dispatchEvent(new CustomEvent("hanko-login",{detail:{user:this.user},bubbles:!0,composed:!0})),this.osmRequired&&await this.checkOSMConnection(),this.osmRequired&&this.autoConnect&&!this.osmConnected){this.log("Auto-connecting to OSM..."),this.handleOSMConnect();return}const n=!this.osmRequired||this.osmConnected;this.log("Checking redirect-after-login:",this.redirectAfterLogin,"showProfile:",this.showProfile,"canRedirect:",n),n?(this.dispatchEvent(new CustomEvent("auth-complete",{bubbles:!0,composed:!0})),this.redirectAfterLogin?(this.log("Redirecting to:",this.redirectAfterLogin),window.location.href=this.redirectAfterLogin):this.log("No redirect (redirectAfterLogin not set)")):this.log("Waiting for OSM connection before redirect")}async handleOSMConnect(){const e=this.osmScopes.split(" ").join("+"),t=this.getBasePath(),n=this.authPath,r=`${`${t}${n}/login`}?scopes=${e}`;this.log("OSM Connect clicked!"),this.log(" basePath:",t),this.log(" authPath:",n),this.log(" Login path:",r),this.log(" Fetching redirect URL from backend...");try{const s=await fetch(r,{method:"GET",credentials:"include",redirect:"manual"});if(this.log(" Response status:",s.status),this.log(" Response type:",s.type),s.status===0||s.type==="opaqueredirect"){const c=s.headers.get("Location")||s.url;this.log("Got redirect URL:",c),window.location.href=c}else if(s.status>=300&&s.status<400){const c=s.headers.get("Location");this.log("Got redirect URL from header:",c),c&&(window.location.href=c)}else{this.logError("Unexpected response:",s.status);const c=await s.text();this.logError(" Response body:",c.substring(0,200))}}catch(s){this.logError("Failed to fetch redirect URL:",s)}}async handleLogout(){this.log("Logout initiated"),this.log("Current state before logout:",{user:this.user,osmConnected:this.osmConnected,osmData:this.osmData}),this.log("Cookies before logout:",document.cookie);try{const e=this.getBasePath(),t=this.authPath,n=`${e}${t}/disconnect`,i=n.startsWith("http")?n:`${window.location.origin}${n}`;this.log("Calling OSM disconnect:",i);const r=await fetch(i,{method:"POST",credentials:"include"});this.log("Disconnect response status:",r.status);const s=await r.json();this.log("Disconnect response data:",s),this.log("OSM disconnected")}catch(e){this.logError("OSM disconnect failed:",e)}if(this._hanko)try{await this._hanko.logout(),this.log("Hanko logout successful")}catch(e){this.logError("Hanko logout failed:",e)}if(this._clearAuthState(),this.log("Logout complete - component will re-render with updated state"),this.redirectAfterLogout){const e=window.location.href.replace(/\/$/,""),t=this.redirectAfterLogout.replace(/\/$/,"");e!==t&&!e.startsWith(t+"#")?(this.log("Redirecting after logout to:",this.redirectAfterLogout),window.location.href=this.redirectAfterLogout):this.log("Already on logout target, skipping redirect")}}_clearAuthState(){const e=window.location.hostname;document.cookie=`hanko=; path=/; domain=${e}; max-age=0`,document.cookie="hanko=; path=/; max-age=0",document.cookie=`osm_connection=; path=/; domain=${e}; max-age=0`,document.cookie="osm_connection=; path=/; max-age=0",this.log("Cookies cleared");const t=Hi(e),n=qi(e);sessionStorage.removeItem(t),sessionStorage.removeItem(n),this.log("Session flags cleared"),this.user=null,this.osmConnected=!1,this.osmData=null,this.hasAppMapping=!1,this.userProfileLanguage=null,this.profilePictureUrl="",this._isPrimary&&this._broadcastState(),this.dispatchEvent(new CustomEvent("logout",{bubbles:!0,composed:!0}))}async handleSessionExpired(){if(this.log("Session expired event received"),this.log("Current state:",{user:this.user,osmConnected:this.osmConnected,loading:this.loading}),this.loading){this.log("Still loading, ignoring session expired event during init");return}if(this.user){this.log("User is logged in, ignoring stale session expired event");return}this.log("No active user - cleaning up state");try{const e=this.getBasePath(),t=this.authPath,n=`${e}${t}/disconnect`,i=n.startsWith("http")?n:`${window.location.origin}${n}`;this.log("Calling OSM disconnect (session expired):",i);const r=await fetch(i,{method:"POST",credentials:"include"});this.log("Disconnect response status:",r.status);const s=await r.json();this.log("Disconnect response data:",s),this.log("OSM disconnected")}catch(e){this.logError("OSM disconnect failed:",e)}if(this._clearAuthState(),this.log("Session cleanup complete"),this.redirectAfterLogout){const e=window.location.href.replace(/\/$/,""),t=this.redirectAfterLogout.replace(/\/$/,"");e!==t&&!e.startsWith(t+"#")?(this.log("Redirecting after session expired to:",this.redirectAfterLogout),window.location.href=this.redirectAfterLogout):this.log("Already on logout target, skipping redirect")}}handleUserLoggedOut(){this.log("User logged out in another window/tab"),this.handleSessionExpired()}handleDropdownSelect(e){const n=e.currentTarget.dataset.action;if(this.log("Dropdown item selected:",n),n==="profile"){const i=this.hankoUrl,r=this.redirectAfterLogin||window.location.origin;window.location.href=`${i}/app/profile?return_to=${encodeURIComponent(r)}`}else if(n==="connect-osm"){const s=window.location.pathname.includes("/app")?window.location.origin:window.location.href,c=this.hankoUrl;window.location.href=`${c}/app?return_to=${encodeURIComponent(s)}&osm_required=true`}else n==="logout"&&this.handleLogout();this.closeDropdown()}render(){var e,t,n;if(this.log("RENDER - showProfile:",this.showProfile,"user:",!!this.user,"loading:",this.loading,"lang:",this.lang),this.loading)return fe`<span class="loading-placeholder"
600
600
  ><span class="loading-placeholder-text">${this.t("logIn")}</span
601
601
  ><span class="spinner-small"></span
602
602
  ></span>`;if(this.error)return fe`