@masonitestudios/spartanauth-widgets 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sa-widgets.mjs +1079 -1046
- package/dist/sa-widgets.umd.js +14 -4
- package/package.json +1 -1
package/dist/sa-widgets.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Ke){typeof define=="function"&&define.amd?define(Ke):Ke()})(function(){"use strict";const ze={equals:(e,t)=>e===t};let ut=lt;const Ae=1,Ne=2,it={owned:null,cleanups:null,context:null,owner:null};var te=null;let Ge=null,Rt=null,V=null,Q=null,pe=null,Me=0;function qt(e,t){const n=V,r=te,s=e.length===0,u=t===void 0?r:t,a=s?it:{owned:null,cleanups:null,context:u?u.context:null,owner:u},o=s?e:()=>e(()=>je(()=>Oe(a)));te=a,V=null;try{return Te(o,!0)}finally{V=n,te=r}}function F(e,t){t=t?Object.assign({},ze,t):ze;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),ot(n,s));return[at.bind(n),r]}function x(e,t,n){const r=We(e,t,!1,Ae);Se(r)}function Lt(e,t,n){ut=Vt;const r=We(e,t,!1,Ae);r.user=!0,pe?pe.push(r):Se(r)}function m(e,t,n){n=n?Object.assign({},ze,n):ze;const r=We(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Se(r),at.bind(r)}function je(e){if(V===null)return e();const t=V;V=null;try{return e()}finally{V=t}}function He(e){Lt(()=>je(e))}function at(){if(this.sources&&this.state)if(this.state===Ae)Se(this);else{const e=Q;Q=null,Te(()=>qe(this),!1),Q=e}if(V){const e=this.observers?this.observers.length:0;V.sources?(V.sources.push(this),V.sourceSlots.push(e)):(V.sources=[this],V.sourceSlots=[e]),this.observers?(this.observers.push(V),this.observerSlots.push(V.sources.length-1)):(this.observers=[V],this.observerSlots=[V.sources.length-1])}return this.value}function ot(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Te(()=>{for(let s=0;s<e.observers.length;s+=1){const u=e.observers[s],a=Ge&&Ge.running;a&&Ge.disposed.has(u),(a?!u.tState:!u.state)&&(u.pure?Q.push(u):pe.push(u),u.observers&&ct(u)),a||(u.state=Ae)}if(Q.length>1e6)throw Q=[],new Error},!1)),t}function Se(e){if(!e.fn)return;Oe(e);const t=Me;Ut(e,e.value,t)}function Ut(e,t,n){let r;const s=te,u=V;V=te=e;try{r=e.fn(t)}catch(a){return e.pure&&(e.state=Ae,e.owned&&e.owned.forEach(Oe),e.owned=null),e.updatedAt=n+1,dt(a)}finally{V=u,te=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?ot(e,r):e.value=r,e.updatedAt=n)}function We(e,t,n,r=Ae,s){const u={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:te,context:te?te.context:null,pure:n};return te===null||te!==it&&(te.owned?te.owned.push(u):te.owned=[u]),u}function Re(e){if(e.state===0)return;if(e.state===Ne)return qe(e);if(e.suspense&&je(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Me);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Ae)Se(e);else if(e.state===Ne){const r=Q;Q=null,Te(()=>qe(e,t[0]),!1),Q=r}}function Te(e,t){if(Q)return e();let n=!1;t||(Q=[]),pe?n=!0:pe=[],Me++;try{const r=e();return Jt(n),r}catch(r){n||(pe=null),Q=null,dt(r)}}function Jt(e){if(Q&&(lt(Q),Q=null),e)return;const t=pe;pe=null,t.length&&Te(()=>ut(t),!1)}function lt(e){for(let t=0;t<e.length;t++)Re(e[t])}function Vt(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Re(r)}for(t=0;t<n;t++)Re(e[t])}function qe(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const s=r.state;s===Ae?r!==t&&(!r.updatedAt||r.updatedAt<Me)&&Re(r):s===Ne&&qe(r,t)}}}function ct(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Ne,n.pure?Q.push(n):pe.push(n),n.observers&&ct(n))}}function Oe(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),s=n.observers;if(s&&s.length){const u=s.pop(),a=n.observerSlots.pop();r<s.length&&(u.sourceSlots[a]=r,s[r]=u,n.observerSlots[r]=a)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Oe(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Oe(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Kt(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function dt(e,t=te){throw Kt(e)}function Gt(e,t,n){let r=n.length,s=t.length,u=r,a=0,o=0,A=t[s-1].nextSibling,$=null;for(;a<s||o<u;){if(t[a]===n[o]){a++,o++;continue}for(;t[s-1]===n[u-1];)s--,u--;if(s===a){const h=u<r?o?n[o-1].nextSibling:n[u-o]:A;for(;o<u;)e.insertBefore(n[o++],h)}else if(u===o)for(;a<s;)(!$||!$.has(t[a]))&&t[a].remove(),a++;else if(t[a]===n[u-1]&&n[o]===t[s-1]){const h=t[--s].nextSibling;e.insertBefore(n[o++],t[a++].nextSibling),e.insertBefore(n[--u],h),t[s]=n[u]}else{if(!$){$=new Map;let _=o;for(;_<u;)$.set(n[_],_++)}const h=$.get(t[a]);if(h!=null)if(o<h&&h<u){let _=a,ne=1,ue;for(;++_<s&&_<u&&!((ue=$.get(t[_]))==null||ue!==h+ne);)ne++;if(ne>h-o){const De=t[a];for(;o<h;)e.insertBefore(n[o++],De)}else e.replaceChild(n[o++],t[a++])}else a++;else t[a++].remove()}}}const ft="_$DX_DELEGATE";function y(e,t,n,r){let s;const u=()=>{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},a=()=>(s||(s=u())).cloneNode(!0);return a.cloneNode=a,a}function Ze(e,t=window.document){const n=t[ft]||(t[ft]=new Set);for(let r=0,s=e.length;r<s;r++){const u=e[r];n.has(u)||(n.add(u),t.addEventListener(u,Ht))}}function oe(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function ht(e,t,n){return je(()=>e(t,n))}function d(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Le(e,t,r,n);x(s=>Le(e,t(),s,n),r)}function Ht(e){let t=e.target;const n=`$$${e.type}`,r=e.target,s=e.currentTarget,u=A=>Object.defineProperty(e,"target",{configurable:!0,value:A}),a=()=>{const A=t[n];if(A&&!t.disabled){const $=t[`${n}Data`];if($!==void 0?A.call(t,$,e):A.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&u(t.host),!0},o=()=>{for(;a()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const A=e.composedPath();u(A[0]);for(let $=0;$<A.length-2&&(t=A[$],!!a());$++){if(t._$host){t=t._$host,o();break}if(t.parentNode===s)break}}else o();u(r)}function Le(e,t,n,r,s){for(;typeof n=="function";)n=n();if(t===n)return n;const u=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,u==="string"||u==="number"){if(u==="number"&&(t=t.toString(),t===n))return n;if(a){let o=n[0];o&&o.nodeType===3?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=ye(e,n,r,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||u==="boolean")n=ye(e,n,r);else{if(u==="function")return x(()=>{let o=t();for(;typeof o=="function";)o=o();n=Le(e,o,n,r)}),()=>n;if(Array.isArray(t)){const o=[],A=n&&Array.isArray(n);if(Ye(o,t,n,s))return x(()=>n=Le(e,o,n,r,!0)),()=>n;if(o.length===0){if(n=ye(e,n,r),a)return n}else A?n.length===0?pt(e,o,r):Gt(e,n,o):(n&&ye(e),pt(e,o));n=o}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=ye(e,n,r,t);ye(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Ye(e,t,n,r){let s=!1;for(let u=0,a=t.length;u<a;u++){let o=t[u],A=n&&n[e.length],$;if(!(o==null||o===!0||o===!1))if(($=typeof o)=="object"&&o.nodeType)e.push(o);else if(Array.isArray(o))s=Ye(e,o,A)||s;else if($==="function")if(r){for(;typeof o=="function";)o=o();s=Ye(e,Array.isArray(o)?o:[o],Array.isArray(A)?A:[A])||s}else e.push(o),s=!0;else{const h=String(o);A&&A.nodeType===3&&A.data===h?e.push(A):e.push(document.createTextNode(h))}}return s}function pt(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function ye(e,t,n,r){if(n===void 0)return e.textContent="";const s=r||document.createTextNode("");if(t.length){let u=!1;for(let a=t.length-1;a>=0;a--){const o=t[a];if(s!==o){const A=o.parentNode===e;!u&&!a?A?e.replaceChild(s,o):e.insertBefore(s,n):A&&o.remove()}else u=!0}}else e.insertBefore(s,n);return[s]}function Wt(e){return Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=Object.assign({},s),mt(s.value)&&!en(s.value)&&!Array.isArray(s.value)&&(n[r].value=Object.assign({},s.value)),Array.isArray(s.value)&&(n[r].value=s.value.slice(0)),n},{})}function Zt(e){return e?Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=mt(s)&&"value"in s?s:{value:s},n[r].attribute||(n[r].attribute=Qt(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function Yt(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function Xt(e,t){const n=Wt(t);return Object.keys(t).forEach(s=>{const u=n[s],a=e.getAttribute(u.attribute),o=e[s];a!=null&&(u.value=u.parse?Dt(a):a),o!=null&&(u.value=Array.isArray(o)?o.slice(0):o),u.reflect&>(e,u.attribute,u.value,!!u.parse),Object.defineProperty(e,s,{get(){return u.value},set(A){const $=u.value;u.value=A,u.reflect&>(this,u.attribute,u.value,!!u.parse);for(let h=0,_=this.__propertyChangedCallbacks.length;h<_;h++)this.__propertyChangedCallbacks[h](s,A,$)},enumerable:!0,configurable:!0})}),n}function Dt(e){if(e)try{return JSON.parse(e)}catch{return e}}function gt(e,t,n,r){if(n==null||n===!1)return e.removeAttribute(t);let s=r?JSON.stringify(n):n;e.__updating[t]=!0,s==="true"&&(s=""),e.setAttribute(t,s),Promise.resolve().then(()=>delete e.__updating[t])}function Qt(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function mt(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function en(e){return Object.prototype.toString.call(e)==="[object Function]"}function tn(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let Xe;function nn(e,t){const n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(s=>t[s].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=Xt(this,t);const s=Yt(this.props),u=this.Component,a=Xe;try{Xe=this,this.__initialized=!0,tn(u)?new u(s,{element:this}):u(s,{element:this})}finally{Xe=a}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let s=null;for(;s=this.__releaseCallbacks.pop();)s(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(s,u,a){if(this.__initialized&&!this.__updating[s]&&(s=this.lookupProp(s),s in t)){if(a==null&&!this[s])return;this[s]=t[s].parse?Dt(a):a}}lookupProp(s){if(t)return n.find(u=>s===u||s===t[u].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(s){this.__releaseCallbacks.push(s)}addPropertyChangedCallback(s){this.__propertyChangedCallbacks.push(s)}}}function rn(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:s,customElements:u=window.customElements}=n;return a=>{if(!e)throw new Error("tag is required to register a Component");let o=u.get(e);return o?(o.prototype.Component=a,o):(o=nn(r,Zt(t)),o.prototype.Component=a,o.prototype.registeredTag=e,u.define(e,o,s),o)}}function sn(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[s,u]=F(e[t[r]]);Object.defineProperty(n,t[r],{get:s,set(a){u(()=>a)}})}return n}function un(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function an(e){return(t,n)=>{const{element:r}=n;return qt(s=>{const u=sn(t);r.addPropertyChangedCallback((o,A)=>u[o]=A),r.addReleaseCallback(()=>{r.renderRoot.textContent="",s()});const a=e(u,n);return d(r.renderRoot,a)},un(r))}}function Qe(e,t,n){return arguments.length===2&&(n=t,t={}),rn(e,t)(an(n))}var on="٠١٢٣٤٥٦٧٨٩",ln="۰۱۲۳۴۵۶۷۸۹",cn="൦൧൨൩൪൫൬൭൮൯",dn="೦೧೨೩೪೫೬೭೮೯",fn="໐໑໒໓໔໕໖໗໘໙",hn="୦୧୨୩୪୫୬୭୮୯",pn="០១២៣៤៥៦៧៨៩",Dn="߀߁߂߃߄߅߆߇߈߉",gn="੦੧੨੩੪੫੬੭੮੯",mn="૦૧૨૩૪૫૬૭૮૯",bn="०१२३४५६७८९",Cn="၀၁၂၃၄၅၆၇၈၉",vn="௦௧௨௩௪௫௬௭௮௯",An="౦౧౨౩౪౫౬౭౮౯",wn="๐๑๒๓๔๕๖๗๘๙",En="༠༡༢༣༤༥༦༧༨༩",bt={ar:on,fa:ln,ml:cn,kn:dn,lo:fn,or:hn,kh:pn,nqo:Dn,pa:gn,gu:mn,hi:bn,my:Cn,ta:vn,te:An,th:wn,bo:En},Fn=["ru"],yn=["id"],$n=["id"],Bn=["ady-cyrl"],kn=["aeb-arab"],xn=["sq"],_n=["ru"],Sn=["zh-hant"],Tn=["es"],On=["hi"],In=["es"],Pn=["ar"],zn=["ar"],Nn=["ar"],Mn=["es"],jn=["fr"],Rn=["ru"],qn=["fr","es","ru"],Ln=["hi"],Un=["es"],Jn=["fa"],Vn=["ru"],Kn=["id"],Gn=["de"],Hn=["bbc-latn"],Wn=["fa"],Zn=["fa"],Yn=["bho"],Xn=["en"],Qn=["id"],er=["fr"],tr=["bn"],nr=["fa"],rr=["fr"],sr=["id"],ur=["id"],ir=["ru"],ar=["oc"],or=["nan","zh-hant"],lr=["ru"],cr=["it"],dr=["crh-latn"],fr=["sk"],hr=["pl"],pr=["ru"],Dr=["hsb","de"],gr=["ms"],mr=["ne"],br=["it"],Cr=["it"],vr=["es"],Ar=["fr"],wr=["fi"],Er=["fr"],Fr=["fr"],yr=["de"],$r=["it"],Br=["tr"],kr=["gan-hant","zh-hant","zh-hans"],xr=["fr"],_r=["pt"],Sr=["fa"],Tr=["es"],Or=["gom-deva"],Ir=["id"],Pr=["de"],zr=["es"],Nr=["zh-hant"],Mr=["hif-latn"],jr=["de"],Rr=["dsb","de"],qr=["fr"],Lr=["hy"],Ur=["zh-cn","zh-hans"],Jr=["ru"],Vr=["eo"],Kr=["ike-cans"],Gr=["en"],Hr=["da"],Wr=["id"],Zr=["kk-latn","kk-cyrl"],Yr=["fr"],Xr=["kbd-cyrl"],Qr=["fr"],es=["ur"],ts=["tr"],ns=["my"],rs=["kk-cyrl"],ss=["da"],us=["ru"],is=["ru"],as=["fi"],os=["ks-arab"],ls=["de"],cs=["ku-latn"],ds=["ru"],fs=["ru"],hs=["es"],ps=["de"],Ds=["ru"],gs=["ru","az"],ms=["nl"],bs=["it"],Cs=["et"],vs=["fa"],As=["it","rm","fur"],ws=["pms","eml","lij","vec","it"],Es=["fr"],Fs=["fa"],ys=["lv"],$s=["fa"],Bs=["zh-hant"],ks=["tr"],xs=["id"],_s=["hi"],Ss=["myv","ru"],Ts=["fr"],Os=["mrj","ru"],Is=["id"],Ps=["my"],zs=["ro"],Ns=["mhr","ru"],Ms=["pt"],js=["mdf","ru"],Rs=["fa"],qs=["es"],Ls=["cdo","zh-hant"],Us=["it"],Js=["nn"],Vs=["de"],Ks=["id"],Gs=["nb"],Hs=["fr"],Ws=["ca","fr"],Zs=["fi"],Ys=["ru"],Xs=["fr"],Qs=["de"],eu=["de"],tu=["de"],nu=["en"],ru=["it"],su=["el"],uu=["pt-br"],iu=["qug","es"],au=["qu","es"],ou=["it"],lu=["ro"],cu=["uk","ru"],du=["ro"],fu=["ruq-latn","ro"],hu=["hi"],pu=["ru"],Du=["it"],gu=["en"],mu=["it"],bu=["cbk","fa"],Cu=["fr"],vu=["fr"],Au=["lt"],wu=["bs","sr-el","hr"],Eu=["fr"],Fu=["shy-latn"],yu=["cs"],$u=["skr-arab"],Bu=["de"],ku=["fi"],xu=["sr-ec"],_u=["nl"],Su=["de"],Tu=["ru"],Ou=["id"],Iu=["pl"],Pu=["zh-tw","zh-hant","zh-hans"],zu=["zh-tw","zh-hant","zh-hans"],Nu=["kn"],Mu=["pt"],ju=["tg-cyrl"],Ru=["zh-tw","zh-hant","zh-hans"],qu=["tt-cyrl","ru"],Lu=["fr"],Uu=["ru"],Ju=["ru"],Vu=["ug-arab"],Ku=["it"],Gu=["et"],Hu=["nl"],Wu=["de"],Zu=["fi"],Yu=["et"],Xu=["fr"],Qu=["fr"],ei=["zh-hans"],ti=["ru"],ni=["ka"],ri=["he"],si=["zh-hans"],ui=["nl"],ii=["kab"],ai=["zh-hans"],Ct={ab:Fn,abs:yn,ace:$n,ady:Bn,aeb:kn,"aeb-arab":["ar"],aln:xn,alt:_n,ami:Sn,an:Tn,anp:On,arn:In,arq:Pn,ary:zn,arz:Nn,ast:Mn,atj:jn,av:Rn,avk:qn,awa:Ln,ay:Un,azb:Jn,ba:Vn,ban:Kn,"ban-bali":["ban"],bar:Gn,bbc:Hn,"bbc-latn":["id"],bcc:Wn,"be-tarask":["be"],bgn:Zn,bh:Yn,bi:Xn,bjn:Qn,bm:er,bpy:tr,bqi:nr,br:rr,btm:sr,bug:ur,bxr:ir,ca:ar,"cbk-zam":["es"],cdo:or,ce:lr,co:cr,crh:dr,"crh-cyrl":["ru"],cs:fr,csb:hr,cv:pr,"de-at":["de"],"de-ch":["de"],"de-formal":["de"],dsb:Dr,dtp:gr,dty:mr,egl:br,eml:Cr,"en-ca":["en"],"en-gb":["en"],"es-419":["es"],"es-formal":["es"],ext:vr,ff:Ar,fit:wr,frc:Er,frp:Fr,frr:yr,fur:$r,gag:Br,gan:kr,"gan-hans":["zh-hans"],"gan-hant":["zh-hant","zh-hans"],gcr:xr,gl:_r,glk:Sr,gn:Tr,gom:Or,"gom-deva":["hi"],gor:Ir,gsw:Pr,guc:zr,hak:Nr,hif:Mr,hrx:jr,hsb:Rr,ht:qr,"hu-formal":["hu"],hyw:Lr,ii:Ur,inh:Jr,io:Vr,iu:Kr,jam:Gr,jut:Hr,jv:Wr,kaa:Zr,kab:Yr,kbd:Xr,kbp:Qr,khw:es,kiu:ts,kjp:ns,kk:rs,"kk-arab":["kk-cyrl"],"kk-cn":["kk-arab","kk-cyrl"],"kk-kz":["kk-cyrl"],"kk-latn":["kk-cyrl"],"kk-tr":["kk-latn","kk-cyrl"],kl:ss,"ko-kp":["ko"],koi:us,krc:is,krl:as,ks:os,ksh:ls,ku:cs,"ku-arab":["ckb"],kum:ds,kv:fs,lad:hs,lb:ps,lbe:Ds,lez:gs,li:ms,lij:bs,liv:Cs,lki:vs,lld:As,lmo:ws,ln:Es,lrc:Fs,ltg:ys,luz:$s,lzh:Bs,lzz:ks,mad:xs,mai:_s,"map-bms":["jv","id"],mdf:Ss,mg:Ts,mhr:Os,min:Is,mnw:Ps,mo:zs,mrj:Ns,"ms-arab":["ms"],mwl:Ms,myv:js,mzn:Rs,nah:qs,nan:Ls,nap:Us,nb:Js,nds:Vs,"nds-nl":["nl"],nia:Ks,"nl-informal":["nl"],nn:Gs,nrm:Hs,oc:Ws,olo:Zs,os:Ys,pcd:Xs,pdc:Qs,pdt:eu,pfl:tu,pih:nu,pms:ru,pnt:su,pt:uu,"pt-br":["pt"],qu:iu,qug:au,rgn:ou,rmy:lu,"roa-tara":["it"],rue:cu,rup:du,ruq:fu,"ruq-cyrl":["mk"],"ruq-latn":["ro"],sa:hu,sah:pu,scn:Du,sco:gu,sdc:mu,sdh:bu,ses:Cu,sg:vu,sgs:Au,sh:wu,shi:Eu,shy:Fu,"shy-latn":["fr"],sk:yu,skr:$u,"skr-arab":["ur","pnb"],sli:Bu,smn:ku,sr:xu,srn:_u,stq:Su,sty:Tu,su:Ou,szl:Iu,szy:Pu,tay:zu,tcy:Nu,tet:Mu,tg:ju,trv:Ru,tt:qu,"tt-cyrl":["ru"],ty:Lu,tyv:Uu,udm:Ju,ug:Vu,vec:Ku,vep:Gu,vls:Hu,vmf:Wu,vot:Zu,vro:Yu,wa:Xu,wo:Qu,wuu:ei,xal:ti,xmf:ni,yi:ri,za:si,zea:ui,zgh:ii,zh:ai,"zh-cn":["zh-hans"],"zh-hant":["zh-hans"],"zh-hk":["zh-hant","zh-hans"],"zh-mo":["zh-hk","zh-hant","zh-hans"],"zh-my":["zh-sg","zh-hans"],"zh-sg":["zh-hans"],"zh-tw":["zh-hant","zh-hans"]};let se=class{constructor(e){this.locale=e}convertPlural(e,t){const n=/\d+=/i;if(!t||t.length===0)return"";for(let s=0;s<t.length;s++){const u=t[s];if(n.test(u)){if(parseInt(u.slice(0,u.indexOf("=")),10)===e)return u.slice(u.indexOf("=")+1);t[s]=void 0}}t=t.filter(s=>!!s);let r=this.getPluralForm(e,this.locale);return r=Math.min(r,t.length-1),t[r]}getPluralForm(e,t){const n=["zero","one","two","few","many","other"],r=new Intl.PluralRules(t),s=r.resolvedOptions().pluralCategories,u=r.select(e);return n.filter(a=>s.includes(a)).indexOf(u)}convertNumber(e,t=!1){let n=this.digitTransformTable(this.locale),r="";if(t){if(parseFloat(e,10)===e||!n)return e;const s=[];for(const a in n)s[n[a]]=a;n=s;const u=String(e);for(let a=0;a<u.length;a++)r+=n[u[a]]||u[a];return parseFloat(r,10)}if(Intl.NumberFormat){let s;const u=[...Ct[this.locale]||[],"en"];return Intl.NumberFormat.supportedLocalesOf(this.locale).length?s=[this.locale]:s=u,r=new Intl.NumberFormat(s).format(e),r==="NaN"&&(r=e),r}}convertGrammar(e){return e}gender(e,t){if(!t||t.length===0)return"";for(;t.length<2;)t.push(t[t.length-1]);return e==="male"?t[0]:e==="female"?t[1]:t.length===3?t[2]:t[0]}digitTransformTable(e){return bt[e]?bt[e].split(""):!1}},oi=class extends se{convertGrammar(e,t){switch(t){case"prefixed":case"תחילית":e.slice(0,1)==="ו"&&e.slice(0,2)!=="וו"&&(e="ו"+e),e.slice(0,1)==="ה"&&(e=e.slice(1)),(e.slice(0,1)<"א"||e.slice(0,1)>"ת")&&(e="־"+e)}return e}},li=class extends se{convertGrammar(t,n){switch(n){case"instrumental":t="s "+t;break;case"lokativ":t="o "+t;break}return t}},ci=class extends se{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},di=class extends se{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},fi=class extends se{convertGrammar(e,t){let n=e.match(/[aou][^äöy]*$/i);const r=e;switch(e.match(/wiki$/i)&&(n=!1),e.match(/[bcdfghjklmnpqrstvwxz]$/i)&&(e+="i"),t){case"genitive":e+="n";break;case"elative":e+=n?"sta":"stä";break;case"partitive":e+=n?"a":"ä";break;case"illative":e+=e.slice(-1)+"n";break;case"inessive":e+=n?"ssa":"ssä";break;default:e=r;break}return e}},hi=class extends se{convertGrammar(e,t){return t==="genitive"&&(e.slice(-1)==="ь"?e=e.slice(0,-1)+"я":e.slice(-2)==="ия"?e=e.slice(0,-2)+"ии":e.slice(-2)==="ка"?e=e.slice(0,-2)+"ки":e.slice(-2)==="ти"?e=e.slice(0,-2)+"тей":e.slice(-2)==="ды"?e=e.slice(0,-2)+"дов":e.slice(-3)==="ник"&&(e=e.slice(0,-3)+"ника")),e}};class pi extends se{convertGrammar(t,n){switch(n){case"mestnik":t="o "+t;break;case"orodnik":t="z "+t;break}return t}}let Di=class extends se{convertGrammar(e,t){switch(t){case"genitive":e=e.replace(/u[ms]$/i,"i"),e=e.replace(/ommunia$/i,"ommunium"),e=e.replace(/a$/i,"ae"),e=e.replace(/libri$/i,"librorum"),e=e.replace(/nuntii$/i,"nuntiorum"),e=e.replace(/tio$/i,"tionis"),e=e.replace(/ns$/i,"ntis"),e=e.replace(/as$/i,"atis"),e=e.replace(/es$/i,"ei");break;case"accusative":e=e.replace(/u[ms]$/i,"um"),e=e.replace(/ommunia$/i,"am"),e=e.replace(/a$/i,"ommunia"),e=e.replace(/libri$/i,"libros"),e=e.replace(/nuntii$/i,"nuntios"),e=e.replace(/tio$/i,"tionem"),e=e.replace(/ns$/i,"ntem"),e=e.replace(/as$/i,"atem"),e=e.replace(/es$/i,"em");break;case"ablative":e=e.replace(/u[ms]$/i,"o"),e=e.replace(/ommunia$/i,"ommunibus"),e=e.replace(/a$/i,"a"),e=e.replace(/libri$/i,"libris"),e=e.replace(/nuntii$/i,"nuntiis"),e=e.replace(/tio$/i,"tione"),e=e.replace(/ns$/i,"nte"),e=e.replace(/as$/i,"ate"),e=e.replace(/es$/i,"e");break}return e}};class gi extends se{convertGrammar(t,n){return n==="genitive"&&(t.slice(-1)==="ա"?t=t.slice(0,-1)+"այի":t.slice(-1)==="ո"?t=t.slice(0,-1)+"ոյի":t.slice(-4)==="գիրք"?t=t.slice(0,-4)+"գրքի":t=t+"ի"),t}}let mi=class extends se{convertGrammar(e,t){if(t==="ainmlae")switch(e){case"an Domhnach":e="Dé Domhnaigh";break;case"an Luan":e="Dé Luain";break;case"an Mháirt":e="Dé Mháirt";break;case"an Chéadaoin":e="Dé Chéadaoin";break;case"an Déardaoin":e="Déardaoin";break;case"an Aoine":e="Dé hAoine";break;case"an Satharn":e="Dé Sathairn";break}return e}},bi=class extends se{convertGrammar(e,t){switch(t){case"rol":e+="ról";break;case"ba":e+="ba";break;case"k":e+="k";break}return e}},Ci=class extends se{convertGrammar(e,t){let n,r,s,u;switch(n="мæ",r="",s="",u="",e.match(/тæ$/i)?(e=e.slice(0,-1),n="æм"):e.match(/[аæеёиоыэюя]$/i)?r="й":e.match(/у$/i)?e.slice(-2,-1).match(/[аæеёиоыэюя]$/i)||(r="й"):e.match(/[бвгджзйклмнопрстфхцчшщьъ]$/i)||(s="-"),t){case"genitive":u=s+r+"ы";break;case"dative":u=s+r+"æн";break;case"allative":u=s+n;break;case"ablative":r==="й"?u=s+r+"æ":u=s+r+"æй";break;case"superessive":u=s+r+"ыл";break;case"equative":u=s+r+"ау";break;case"comitative":u=s+"имæ";break}return e+u}};class vi extends se{convertGrammar(t,n){switch(n){case"genitive":t.slice(-1)==="ь"?t=t.slice(0,-1)+"я":t.slice(-2)==="ія"?t=t.slice(0,-2)+"ії":t.slice(-2)==="ка"?t=t.slice(0,-2)+"ки":t.slice(-2)==="ти"?t=t.slice(0,-2)+"тей":t.slice(-2)==="ды"?t=t.slice(0,-2)+"дов":t.slice(-3)==="ник"&&(t=t.slice(0,-3)+"ника");break;case"accusative":t.slice(-2)==="ія"&&(t=t.slice(0,-2)+"ію");break}return t}}var vt={bs:li,default:se,dsb:ci,fi,ga:mi,he:oi,hsb:di,hu:bi,hy:gi,la:Di,os:Ci,ru:hi,sl:pi,uk:vi};const Ai=new RegExp("(?:([A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁːˑˠ-ˤˮͰ-ͳͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-҂Ҋ-ԯԱ-Ֆՙ-՟ա-և։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ঀংঃঅ-ঌএঐও-নপ-রলশ-হঽ-ীেৈোৌৎৗড়ঢ়য়-ৡ০-ৱ৴-৺ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ીૉોૌૐૠૡ૦-૰ૹଂଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽାୀେୈୋୌୗଡ଼ଢ଼ୟ-ୡ୦-୷ஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹாிுூெ-ைொ-ௌௐௗ௦-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౚౠౡ౦-౯౿ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊೋೕೖೞೠೡ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ീെ-ൈൊ-ൌൎൗൟ-ൡ൦-൵൹-ൿංඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-෴ก-ะาำเ-ๆ๏-๛ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆ໐-໙ໜ-ໟༀ-༗༚-༴༶༸༾-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿚က-ာေးျြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃႄႇ-ႌႎ-ႜ႞-ჅჇჍა-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፼ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙿᚁ-ᚚᚠ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះៈ។-៚ៜ០-៩᠐-᠙ᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸ᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨖᨙᨚ᨞-ᩕᩗᩡᩣᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-ᭋ᭐-᭪᭴-᭼ᮂ-ᮡᮦᮧ᮪ᮮ-ᯥᯧᯪ-ᯬᯮ᯲᯳᯼-ᰫᰴᰵ᰻-᱉ᱍ-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳳᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〮〯〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎ㆐-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿕ꀀ-ꒌꓐ-ꘌꘐ-ꘫꙀ-ꙮꚀ-ꚝꚠ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꣽ꤀-ꤥ꤮-ꥆꥒ꥓꥟-ꥼꦃ-ꦲꦴꦵꦺꦻꦽ-꧍ꧏ-꧙꧞-ꧤꧦ-ꧾꨀ-ꨨꨯꨰꨳꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-ꩻꩽ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫫꫮ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭥꭰ-ꯤꯦꯧꯩ-꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]|\uD800[\uDC00-\uDC0B]|\uD800[\uDC0D-\uDC26]|\uD800[\uDC28-\uDC3A]|𐀼|𐀽|\uD800[\uDC3F-\uDC4D]|\uD800[\uDC50-\uDC5D]|\uD800[\uDC80-\uDCFA]|𐄀|𐄂|\uD800[\uDD07-\uDD33]|\uD800[\uDD37-\uDD3F]|\uD800[\uDDD0-\uDDFC]|\uD800[\uDE80-\uDE9C]|\uD800[\uDEA0-\uDED0]|\uD800[\uDF00-\uDF23]|\uD800[\uDF30-\uDF4A]|\uD800[\uDF50-\uDF75]|\uD800[\uDF80-\uDF9D]|\uD800[\uDF9F-\uDFC3]|\uD800[\uDFC8-\uDFD5]|\uD801[\uDC00-\uDC9D]|\uD801[\uDCA0-\uDCA9]|\uD801[\uDD00-\uDD27]|\uD801[\uDD30-\uDD63]|𐕯|\uD801[\uDE00-\uDF36]|\uD801[\uDF40-\uDF55]|\uD801[\uDF60-\uDF67]|𑀀|\uD804[\uDC02-\uDC37]|\uD804[\uDC47-\uDC4D]|\uD804[\uDC66-\uDC6F]|\uD804[\uDC82-\uDCB2]|𑂷|𑂸|\uD804[\uDCBB-\uDCC1]|\uD804[\uDCD0-\uDCE8]|\uD804[\uDCF0-\uDCF9]|\uD804[\uDD03-\uDD26]|𑄬|\uD804[\uDD36-\uDD43]|\uD804[\uDD50-\uDD72]|\uD804[\uDD74-\uDD76]|\uD804[\uDD82-\uDDB5]|\uD804[\uDDBF-\uDDC9]|𑇍|\uD804[\uDDD0-\uDDDF]|\uD804[\uDDE1-\uDDF4]|\uD804[\uDE00-\uDE11]|\uD804[\uDE13-\uDE2E]|𑈲|𑈳|𑈵|\uD804[\uDE38-\uDE3D]|\uD804[\uDE80-\uDE86]|𑊈|\uD804[\uDE8A-\uDE8D]|\uD804[\uDE8F-\uDE9D]|\uD804[\uDE9F-\uDEA9]|\uD804[\uDEB0-\uDEDE]|\uD804[\uDEE0-\uDEE2]|\uD804[\uDEF0-\uDEF9]|𑌂|𑌃|\uD804[\uDF05-\uDF0C]|𑌏|𑌐|\uD804[\uDF13-\uDF28]|\uD804[\uDF2A-\uDF30]|𑌲|𑌳|\uD804[\uDF35-\uDF39]|\uD804[\uDF3D-\uDF3F]|\uD804[\uDF41-\uDF44]|𑍇|𑍈|\uD804[\uDF4B-\uDF4D]|𑍐|𑍗|\uD804[\uDF5D-\uDF63]|\uD805[\uDC80-\uDCB2]|𑒹|\uD805[\uDCBB-\uDCBE]|𑓁|\uD805[\uDCC4-\uDCC7]|\uD805[\uDCD0-\uDCD9]|\uD805[\uDD80-\uDDB1]|\uD805[\uDDB8-\uDDBB]|𑖾|\uD805[\uDDC1-\uDDDB]|\uD805[\uDE00-\uDE32]|𑘻|𑘼|𑘾|\uD805[\uDE41-\uDE44]|\uD805[\uDE50-\uDE59]|\uD805[\uDE80-\uDEAA]|𑚬|𑚮|𑚯|𑚶|\uD805[\uDEC0-\uDEC9]|\uD805[\uDF00-\uDF19]|𑜠|𑜡|𑜦|\uD805[\uDF30-\uDF3F]|\uD806[\uDCA0-\uDCF2]|𑣿|\uD806[\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E]|\uD809[\uDC70-\uDC74]|\uD809[\uDC80-\uDD43]|\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38]|\uD81A[\uDE40-\uDE5E]|\uD81A[\uDE60-\uDE69]|𖩮|𖩯|\uD81A[\uDED0-\uDEED]|𖫵|\uD81A[\uDF00-\uDF2F]|\uD81A[\uDF37-\uDF45]|\uD81A[\uDF50-\uDF59]|\uD81A[\uDF5B-\uDF61]|\uD81A[\uDF63-\uDF77]|\uD81A[\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44]|\uD81B[\uDF50-\uDF7E]|\uD81B[\uDF93-\uDF9F]|𛀀|𛀁|\uD82F[\uDC00-\uDC6A]|\uD82F[\uDC70-\uDC7C]|\uD82F[\uDC80-\uDC88]|\uD82F[\uDC90-\uDC99]|𛲜|𛲟|\uD834[\uDC00-\uDCF5]|\uD834[\uDD00-\uDD26]|\uD834[\uDD29-\uDD66]|\uD834[\uDD6A-\uDD72]|𝆃|𝆄|\uD834[\uDD8C-\uDDA9]|\uD834[\uDDAE-\uDDE8]|\uD834[\uDF60-\uDF71]|\uD835[\uDC00-\uDC54]|\uD835[\uDC56-\uDC9C]|𝒞|𝒟|𝒢|𝒥|𝒦|\uD835[\uDCA9-\uDCAC]|\uD835[\uDCAE-\uDCB9]|𝒻|\uD835[\uDCBD-\uDCC3]|\uD835[\uDCC5-\uDD05]|\uD835[\uDD07-\uDD0A]|\uD835[\uDD0D-\uDD14]|\uD835[\uDD16-\uDD1C]|\uD835[\uDD1E-\uDD39]|\uD835[\uDD3B-\uDD3E]|\uD835[\uDD40-\uDD44]|𝕆|\uD835[\uDD4A-\uDD50]|\uD835[\uDD52-\uDEA5]|\uD835[\uDEA8-\uDEDA]|\uD835[\uDEDC-\uDF14]|\uD835[\uDF16-\uDF4E]|\uD835[\uDF50-\uDF88]|\uD835[\uDF8A-\uDFC2]|\uD835[\uDFC4-\uDFCB]|\uD836[\uDC00-\uDDFF]|\uD836[\uDE37-\uDE3A]|\uD836[\uDE6D-\uDE74]|\uD836[\uDE76-\uDE83]|\uD836[\uDE85-\uDE8B]|\uD83C[\uDD10-\uDD2E]|\uD83C[\uDD30-\uDD69]|\uD83C[\uDD70-\uDD9A]|\uD83C[\uDDE6-\uDE02]|\uD83C[\uDE10-\uDE3A]|\uD83C[\uDE40-\uDE48]|🉐|🉑|[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6]|\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34]|\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|[\uDB80-\uDBBE][\uDC00-\uDFFF]|\uDBBF[\uDC00-\uDFFD]|[\uDBC0-\uDBFE][\uDC00-\uDFFF]|\uDBFF[\uDC00-\uDFFD])|([־׀׃׆-߀-ߪߴߵߺ-ࠕࠚࠤࠨ-ࡘ-࢟יִײַ-ﬨשׁ-ﭏ؈؋؍؛-ي٭-ٯٱ-ەۥۦۮۯۺ-ܐܒ-ܯ-ޥޱ-ࢠ-ﭐ-ﴽ﵀-﷏ﷰ-﷼﷾﷿ﹰ-]|\uD802[\uDC00-\uDD1E]|\uD802[\uDD20-\uDE00]||\uD802[\uDE07-\uDE0B]|\uD802[\uDE10-\uDE37]|\uD802[\uDE3B-\uDE3E]|\uD802[\uDE40-\uDEE4]|\uD802[\uDEE7-\uDF38]|\uD802[\uDF40-\uDFFF]|\uD803[\uDC00-\uDE5F]|\uD803[\uDE7F-\uDFFF]|\uD83A[\uDC00-\uDCCF]|\uD83A[\uDCD7-\uDFFF]|\uD83B[\uDC00-\uDDFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDE00-\uDEEF]|\uD83B[\uDEF2-\uDEFF]))");let At=class{constructor(e){this.locale=$e(e),this.language=new(vt[this.locale]||vt.default)(this.locale)}emit(e,t){let n,r,s;switch(typeof e){case"string":case"number":n=e;break;case"object":if(r=e.slice(1).map(u=>this.emit(u,t)),s=e[0].toLowerCase(),typeof this[s]=="function")n=this[s](r,t);else throw new Error('unknown operation "'+s+'"');break;case"undefined":n="";break;default:throw new Error("unexpected type in AST: "+typeof e)}return n}concat(e){let t="";return e.forEach(n=>{t+=n}),t}replace(e,t){const n=parseInt(e[0],10);return n<t.length?t[n]:"$"+(n+1)}plural(e){const t=parseFloat(this.language.convertNumber(e[0],10)),n=e.slice(1);return n.length?this.language.convertPlural(t,n):""}gender(e){const t=e[0],n=e.slice(1);return this.language.gender(t,n)}grammar(e){const t=e[0],n=e[1];return n&&t&&this.language.convertGrammar(n,t)}wikilink(e){let t,n=e[0];n.charAt(0)===":"&&(n=n.slice(1));const r=`./${n}`;return e.length===1?t=n:t=e[1],`<a href="${r}" title="${n}">${t}</a>`}extlink(e){if(e.length!==2)throw new Error("Expected two items in the node");return`<a href="${e[0]}">${e[1]}</a>`}bidi(e){const t=wi(e[0]);return t==="ltr"?""+e[0]+"":t==="rtl"?""+e[0]+"":e[0]}formatnum(e){const t=!!e[1]&&e[1]==="R",n=e[0];return typeof n=="string"||typeof n=="number"?this.language.convertNumber(n,t):n}htmlattributes(e){const t={};for(let n=0,r=e.length;n<r;n+=2)t[e[n]]=e[n+1];return t}htmlelement(e){const t=e.shift(),n=e.shift();let r=e,s="";for(const a in n)s+=` ${a}="${n[a]}"`;Array.isArray(r)||(r=[r]);const u=r.join("");return`<${t}${s}>${u}</${t}>`}};function $e(e){return typeof e=="string"?e.toLowerCase():e}function wi(e){const t=e.match(Ai);return t?t[2]===void 0?"ltr":"rtl":null}function Ei(e,{wikilinks:t=!1}={}){let n=0;function r(l){return()=>{for(let f=0;f<l.length;f++){const B=l[f]();if(B!==null)return B}return null}}function s(l){const f=n,B=[];for(let p=0;p<l.length;p++){const c=l[p]();if(c===null)return n=f,null;B.push(c)}return B}function u(l,f){return()=>{const B=n,p=[];let c=f();for(;c!==null;)p.push(c),c=f();return p.length<l?(n=B,null):p}}function a(l){const f=l.length;return()=>{let B=null;return e.slice(n,n+f)===l&&(B=l,n+=f),B}}function o(l){return()=>{const f=e.slice(n).match(l);return f===null?null:(n+=f[0].length,f[0])}}const A=o(/^\s+/),$=a("|"),h=a(":"),_=a("\\"),ne=o(/^./),ue=a("$"),De=o(/^\d+/),N=a('"'),re=a("'"),ee=o(t?/^[^{}[\]$<\\]/:/^[^{}$<\\]/),ie=o(t?/^[^{}[\]$\\|]/:/^[^{}$\\|]/),R=o(t?/^[^{}[\]$\s]/:/^[^{}$\s]/);function X(l,f){return()=>{const B=l();return B===null?null:f(B)}}function K(){const l=u(1,G)();return l===null?null:l.join("")}function de(){const l=u(1,ge)();return l===null?null:l.join("")}const fe=r([k,R]);function he(){const l=u(1,fe)();return l===null?null:l.join("")}function k(){const l=s([_,ne]);return l===null?null:l[1]}const G=r([k,ie]),ge=r([k,ee]);function v(){const l=s([ue,De]);return l===null?null:["REPLACE",parseInt(l[1],10)-1]}const ae=X(o(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/),function(l){return l.toString()});function me(){const l=s([$,u(0,i)]);if(l===null)return null;const f=l[1];return f.length>1?["CONCAT"].concat(f):f[0]}function ce(){const l=s([ae,h,v]);return l===null?null:[l[0],l[2]]}function ke(){const l=s([ae,h,i]);return l===null?null:[l[0],l[2]]}function Ie(){const l=s([ae,h]);return l===null?null:[l[0],""]}const Pe=r([function(){const l=s([r([ce,ke,Ie]),u(0,me)]);return l===null?null:l[0].concat(l[1])},function(){const l=s([ae,u(0,me)]);return l===null?null:[l[0]].concat(l[1])}]),Ee=a("{{"),D=a("}}"),be=a("[["),we=a("]]"),Ce=a("["),xe=a("]");function Fe(){const l=s([Ee,Pe,D]);return l===null?null:l[1]}function E(){const l=s([u(1,i),$,u(1,Y)]);return l===null?null:[["CONCAT"].concat(l[0]),["CONCAT"].concat(l[2])]}function w(){const l=s([u(1,i)]);return l===null?null:[["CONCAT"].concat(l[0])]}const T=r([E,w]);function q(){let l=null;const f=s([be,T,we]);if(f!==null){const B=f[1];l=["WIKILINK"].concat(B)}return l}function M(){let l=null;const f=s([Ce,u(1,Z),A,u(1,Y),xe]);return f!==null&&(l=["EXTLINK",f[1].length===1?f[1][0]:["CONCAT"].concat(f[1]),["CONCAT"].concat(f[3])]),l}const O=o(/^[A-Za-z]+/);function j(l,f,B,p={allowedHtmlElements:["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","li","dt","dd"],allowedHtmlCommonAttributes:["id","class","style","lang","dir","title","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"],allowedHtmlAttributesByElement:{}}){if(l=l.toLowerCase(),f=f.toLowerCase(),l!==f||p.allowedHtmlElements.indexOf(l)===-1)return!1;const c=/[\000-\010\013\016-\037\177]|expression|filter\s*:|accelerator\s*:|-o-link\s*:|-o-link-source\s*:|-o-replace\s*:|url\s*\(|image\s*\(|image-set\s*\(/i;for(let C=0,z=B.length;C<z;C+=2){const ve=B[C];if(p.allowedHtmlCommonAttributes.indexOf(ve)===-1&&(p.allowedHtmlAttributesByElement[l]||[]).indexOf(ve)===-1||ve==="style"&&B[C+1].search(c)!==-1)return!1}return!0}function L(){const l=o(/^[^"]*/),f=s([N,l,N]);return f===null?null:f[1]}function P(){const l=o(/^[^']*/),f=s([re,l,re]);return f===null?null:f[1]}function H(){const l=o(/^\s*=\s*/),f=s([A,O,l,r([L,P])]);return f===null?null:[f[1],f[3]]}function J(){const l=u(0,H)();return Array.prototype.concat.apply(["HTMLATTRIBUTES"],l)}function W(){let l=null;const f=n,B=a("<"),p=o(/^\/?/),c=o(/^\s*>/),C=s([B,O,J,p,c]);if(C===null)return null;const z=n,ve=C[1],_e=u(0,Y)(),ga=n,ma=a("</"),Nt=s([ma,O,c]);if(Nt===null)return["CONCAT",e.slice(f,z)].concat(_e);const ba=n,Ca=Nt[1],Mt=C[2],va=Mt.slice(1);if(j(ve,Ca,va))l=["HTMLELEMENT",ve,Mt].concat(_e);else{const jt=Aa=>Aa.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");l=["CONCAT",jt(e.slice(f,z))].concat(_e,jt(e.slice(ga,ba)))}return l}const Z=r([Fe,v,q,M,he]),Y=r([Fe,v,q,M,W,de]),i=r([Fe,v,K]);function g(){const l=u(0,Y)();return l===null?null:["CONCAT"].concat(l)}const b=g();if(b===null||n!==e.length)throw new Error("Parse error at position "+n.toString()+" in input: "+e);return b}class wt{constructor(t,{wikilinks:n=!1}={}){this.locale=$e(t),this.wikilinks=n,this.emitter=new At(this.locale)}parse(t,n){if(t.includes("{{")||t.includes("<")||this.wikilinks&&t.includes("[")){const r=Ei(t,{wikilinks:this.wikilinks});return this.emitter.emit(r,n)}else return this.simpleParse(t,n)}simpleParse(t,n){return t.replace(/\$(\d+)/g,(r,s)=>{const u=parseInt(s,10)-1;return n[u]!==void 0?n[u]:"$"+s})}}class Fi{constructor(){this.sourceMap=new Map}load(t,n){if(typeof t!="object")throw new Error("Invalid message source. Must be an object");if(n=$e(n),n){if(!/^[a-zA-Z0-9-]+$/.test(n))throw new Error(`Invalid locale ${n}`);for(const r in t)if(r.indexOf("@")!==0){if(typeof t[r]=="object")return this.load(t);if(typeof t[r]!="string")throw new Error(`Invalid message for message ${r} in ${n} locale.`);break}this.sourceMap.has(n)?this.sourceMap.set(n,Object.assign(this.sourceMap.get(n),t)):this.sourceMap.set(n,t)}else for(n in t)this.load(t[n],n)}getMessage(t,n){const r=this.sourceMap.get($e(n));return r?r[t]:null}hasLocale(t){return this.sourceMap.has(t)}}class yi{constructor(t,{finalFallback:n="en",messages:r=void 0,wikilinks:s=!1}={}){this.locale=$e(t),this.parser=new wt(this.locale,{wikilinks:s}),this.messageStore=new Fi,r&&this.load(r,this.locale),this.finalFallback=n,this.wikilinks=s}load(t,n){return this.messageStore.load(t,n||this.locale)}i18n(t,...n){return this.parser.parse(this.getMessage(t),n)}setLocale(t){this.locale=$e(t),this.parser=new wt(this.locale,{wikilinks:this.wikilinks})}getFallbackLocales(){return[...Ct[this.locale]||[],this.finalFallback]}getMessage(t){let n=this.locale,r=0;const s=this.getFallbackLocales(this.locale);for(;n;){const u=n.split("-");let a=u.length;do{const o=u.slice(0,a).join("-"),A=this.messageStore.getMessage(t,o);if(typeof A=="string")return A;a--}while(a);n=s[r],r++}return t}registerParserPlugin(t,n){At.prototype[t]=n}}const Et={"@metadata":{authors:["Mason Payne"],"last-updated":"2024-01-08",locale:"en"},"sa-login":"Login","sa-username":"Email","sa-password":"Password","sa-use-password":"Use Password","sa-code":"Code","sa-signup":"Sign up","sa-signup-complete":"Sign up complete","sa-back":"Back","sa-error-creating-user":"Error creating user.","sa-remember":"Remember me","sa-forgot":"Forgot your password?","sa-register":"Register","sa-error.login":"Invalid email or password","sa-error.register":"Invalid email or password","sa-error.unknown":"Unknown error","sa-account-settings":"Account Settings","sa-webauthn-security-keys":"Your passkeys","sa-add-security-key":"Add passkey","webauthn-not-enrolled":"WebAuthn not enrolled","sa-webauthn-key-name":"Key Name","sa-cancel":"Cancel","sa-no-security-keys":"No passkeys","sa-webauthn-key-actions":"Actions","sa-remove":"Remove","not-authenticated":"Not authenticated","error-otp-registration":"Error registering OTP","sa-confirm-delete-key":"Are you sure you want to delete this key?","sa-add-mfa":"Manage MFA","sa-add-email":"Add Email","sa-email":"Email","sa-phone":"Phone","sa-add-sms":"Add SMS","sa-mfa":"MFA Registrations","error-otp-list":"Error listing OTPs","sa-type":"Type","sa-mfa-destination":"Destination","sa-mfa-validated":"Validated","sa-validate":"Validate","sa-mfa-action":"Action","sa-no":"No","sa-yes":"Yes","error-otp-remove":"Error removing MFA Registration","error-webauthn-remove":"Error removing WebAuthn Registration","sa-register-mfa":"Register MFA","sa-otp-required":"A one-time code is required.","sa-otp-choose":"Choose how to receive your code:","sa-otp-no-registrations":"No MFA methods registered.","sa-otp-send-code":"Send Code","sa-otp-verify":"Verify Code","sa-unknown-challenge":"Unknown challenge type.","sa-invite-otp":"Verification Code","sa-invite-otp-hint":"Enter the code from your invite email","sa-invite-password":"Choose a Password","sa-invite-password-hint":"Create a secure password for your account","sa-invite-submit":"Complete Registration","sa-invite-success":"Registration complete! Redirecting to login...","sa-invite-error-otp":"Invalid or expired verification code","sa-invite-error-expired":"This invite has expired. Please contact your administrator.","sa-invite-error-generic":"Unable to complete registration. Please try again.","sa-invite-completing":"Completing registration...","sa-forgot-password":"Forgot your password?","sa-reset-password":"Reset Password","sa-reset-email-sent":"If an account exists with that email, a reset code has been sent.","sa-new-password":"New Password","sa-reset-code":"Reset Code","sa-reset-submit":"Reset Password","sa-reset-success":"Password reset successfully! You can now log in.","sa-reset-error":"Unable to reset password. Please try again.","sa-reset-error-code":"Invalid or expired reset code","sa-or":"Or","sa-social-google":"Continue with Google","sa-social-github":"Continue with GitHub","sa-social-apple":"Continue with Apple","sa-social-oidc":"Continue with SSO","sa-social-error":"Error starting social login","sa-signup-mfa-title":"Verify Your Email","sa-signup-verify-prompt":"A verification code has been sent to your email. Enter it below to activate multi-factor authentication.","sa-signup-verify-error":"Invalid or expired verification code.","sa-signup-webauthn-prompt":"Your account is secure! Optionally, add a passkey for faster and easier logins.","sa-signup-webauthn-setup":"Set Up Passkey","sa-signup-webauthn-done":"Skip for now","sa-signup-webauthn-error":"Error setting up passkey. Please try again from your account settings."},$i={en:Et,fr:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"fr"},"sa-login":"Connexion","sa-username":"Adresse e-mail","sa-password":"Mot de passe","sa-use-password":"Utiliser le mot de passe","sa-code":"code à deux facteurs","sa-remember":"Souviens-toi de moi","sa-forgot":"Mot de passe oublié?","sa-register":"S'inscrire","sa-error.login":"E-mail ou mot de passe invalide","sa-error.register":"E-mail ou mot de passe invalide","sa-error.unknown":"Erreur inconnue","sa-otp-required":"Un code à usage unique est requis.","sa-otp-choose":"Choisissez comment recevoir votre code :","sa-otp-no-registrations":"Aucune méthode MFA enregistrée.","sa-otp-send-code":"Envoyer le code","sa-otp-verify":"Vérifier le code","sa-unknown-challenge":"Type de défi inconnu.","sa-complete-invite":"Complétez votre invitation","sa-invite-otp":"Code de vérification","sa-invite-otp-hint":"Entrez le code de votre email d'invitation","sa-invite-password":"Choisissez un mot de passe","sa-invite-password-hint":"Créez un mot de passe sécurisé pour votre compte","sa-invite-submit":"Terminer l'inscription","sa-invite-success":"Inscription terminée ! Redirection vers la connexion...","sa-invite-error-otp":"Code de vérification invalide ou expiré","sa-invite-error-expired":"Cette invitation a expiré. Veuillez contacter votre administrateur.","sa-invite-error-generic":"Impossible de terminer l'inscription. Veuillez réessayer.","sa-invite-completing":"Finalisation de l'inscription...","sa-forgot-password":"Mot de passe oublié ?","sa-reset-password":"Réinitialiser le mot de passe","sa-reset-email-sent":"Si un compte existe avec cet e-mail, un code de réinitialisation a été envoyé.","sa-new-password":"Nouveau mot de passe","sa-reset-code":"Code de réinitialisation","sa-reset-submit":"Réinitialiser le mot de passe","sa-reset-success":"Mot de passe réinitialisé avec succès ! Vous pouvez maintenant vous connecter.","sa-reset-error":"Impossible de réinitialiser le mot de passe. Veuillez réessayer.","sa-reset-error-code":"Code de réinitialisation invalide ou expiré","sa-or":"Ou","sa-social-google":"Continuer avec Google","sa-social-github":"Continuer avec GitHub","sa-social-apple":"Continuer avec Apple","sa-social-oidc":"Continuer avec SSO","sa-social-error":"Erreur lors de la connexion sociale","sa-signup-mfa-title":"Vérifiez votre e-mail","sa-signup-verify-prompt":"Un code de vérification a été envoyé à votre e-mail. Entrez-le ci-dessous pour activer l'authentification multi-facteurs.","sa-signup-verify-error":"Code de vérification invalide ou expiré.","sa-signup-webauthn-prompt":"Votre compte est sécurisé ! Ajoutez optionnellement une clé d'accès pour des connexions plus rapides.","sa-signup-webauthn-setup":"Configurer la clé d'accès","sa-signup-webauthn-done":"Ignorer pour l'instant","sa-signup-webauthn-error":"Erreur lors de la configuration de la clé d'accès. Veuillez réessayer depuis les paramètres de votre compte."},es:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"es"},"sa-login":"Acceso","sa-username":"Correo electrónico","sa-password":"Clave","sa-use-password":"Usar contraseña","sa-code":"Código","sa-remember":"Acuérdate de mí","sa-forgot":"¿Olvidaste tu contraseña?","sa-register":"Registro","sa-error.login":"Correo electrónico o contraseña inválidos","sa-error.register":"Correo electrónico o contraseña inválidos","sa-error.unknown":"Error desconocido","sa-otp-required":"Se requiere un código de un solo uso.","sa-otp-choose":"Elige cómo recibir tu código:","sa-otp-no-registrations":"No hay métodos MFA registrados.","sa-unknown-challenge":"Tipo de desafío desconocido.","sa-complete-invite":"Completa tu invitación","sa-invite-otp":"Código de verificación","sa-invite-otp-hint":"Ingresa el código de tu correo de invitación","sa-invite-password":"Elige una contraseña","sa-invite-password-hint":"Crea una contraseña segura para tu cuenta","sa-invite-submit":"Completar registro","sa-invite-success":"¡Registro completo! Redirigiendo al inicio de sesión...","sa-invite-error-otp":"Código de verificación inválido o expirado","sa-invite-error-expired":"Esta invitación ha expirado. Por favor contacta a tu administrador.","sa-invite-error-generic":"No se pudo completar el registro. Por favor intenta de nuevo.","sa-invite-completing":"Completando registro...","sa-forgot-password":"¿Olvidaste tu contraseña?","sa-reset-password":"Restablecer contraseña","sa-reset-email-sent":"Si existe una cuenta con ese correo, se ha enviado un código de restablecimiento.","sa-new-password":"Nueva contraseña","sa-reset-code":"Código de restablecimiento","sa-reset-submit":"Restablecer contraseña","sa-reset-success":"¡Contraseña restablecida con éxito! Ya puedes iniciar sesión.","sa-reset-error":"No se pudo restablecer la contraseña. Por favor intenta de nuevo.","sa-reset-error-code":"Código de restablecimiento inválido o expirado","sa-or":"O","sa-social-google":"Continuar con Google","sa-social-github":"Continuar con GitHub","sa-social-apple":"Continuar con Apple","sa-social-oidc":"Continuar con SSO","sa-social-error":"Error al iniciar sesión social","sa-signup-mfa-title":"Verifica tu correo electrónico","sa-signup-verify-prompt":"Se ha enviado un código de verificación a tu correo. Ingrésalo para activar la autenticación multifactor.","sa-signup-verify-error":"Código de verificación inválido o expirado.","sa-signup-webauthn-prompt":"¡Tu cuenta está protegida! Opcionalmente, agrega una clave de acceso para inicios de sesión más rápidos.","sa-signup-webauthn-setup":"Configurar clave de acceso","sa-signup-webauthn-done":"Omitir por ahora","sa-signup-webauthn-error":"Error al configurar la clave de acceso. Intenta de nuevo desde la configuración de tu cuenta."},ja:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"ja"},"sa-login":"ログイン","sa-username":"メールアドレス","sa-password":"パスワード","sa-use-password":"パスワードを使用する","sa-code":"コード","sa-remember":"私を覚えてますか","sa-forgot":"パスワードをお忘れですか?","sa-register":"登録","sa-error.login":"メールアドレスかパスワードが無効","sa-error.register":"メールアドレスかパスワードが無効","sa-error.unknown":"未知のエラー","sa-otp-required":"ワンタイムコードが必要です。","sa-otp-choose":"コードの受け取り方法を選択してください:","sa-otp-no-registrations":"MFA方法が登録されていません。","sa-otp-send-code":"コードを送信","sa-otp-verify":"コードを確認","sa-unknown-challenge":"不明なチャレンジタイプです。","sa-complete-invite":"招待を完了する","sa-invite-otp":"確認コード","sa-invite-otp-hint":"招待メールのコードを入力してください","sa-invite-password":"パスワードを選択","sa-invite-password-hint":"アカウント用の安全なパスワードを作成してください","sa-invite-submit":"登録を完了","sa-invite-success":"登録完了!ログインページへリダイレクト中...","sa-invite-error-otp":"無効または期限切れの確認コード","sa-invite-error-expired":"この招待は期限切れです。管理者にお問い合わせください。","sa-invite-error-generic":"登録を完了できませんでした。もう一度お試しください。","sa-invite-completing":"登録を完了しています...","sa-forgot-password":"パスワードをお忘れですか?","sa-reset-password":"パスワードをリセット","sa-reset-email-sent":"そのメールアドレスのアカウントが存在する場合、リセットコードが送信されました。","sa-new-password":"新しいパスワード","sa-reset-code":"リセットコード","sa-reset-submit":"パスワードをリセット","sa-reset-success":"パスワードが正常にリセットされました!ログインできます。","sa-reset-error":"パスワードをリセットできませんでした。もう一度お試しください。","sa-reset-error-code":"無効または期限切れのリセットコード","sa-or":"または","sa-social-google":"Googleで続ける","sa-social-github":"GitHubで続ける","sa-social-apple":"Appleで続ける","sa-social-oidc":"SSOで続ける","sa-social-error":"ソーシャルログイン開始エラー","sa-signup-mfa-title":"メールを確認してください","sa-signup-verify-prompt":"確認コードがメールに送信されました。多要素認証を有効にするために入力してください。","sa-signup-verify-error":"無効または期限切れの確認コードです。","sa-signup-webauthn-prompt":"アカウントが保護されました!パスキーを追加してより速く簡単にログインできます(任意)。","sa-signup-webauthn-setup":"パスキーを設定","sa-signup-webauthn-done":"今はスキップ","sa-signup-webauthn-error":"パスキーの設定中にエラーが発生しました。アカウント設定から再試行してください。"}};function et(e){const t=new yi("en",{messages:Et});return e!=="en"&&(t.load($i[e],e),t.setLocale(e)),t}function Ft(e){const t="==".slice(0,(4-e.length%4)%4),n=e.replace(/-/g,"+").replace(/_/g,"/")+t,r=atob(n),s=new ArrayBuffer(r.length),u=new Uint8Array(s);for(let a=0;a<r.length;a++)u[a]=r.charCodeAt(a);return s}function yt(e){const t=new Uint8Array(e);let n="";for(const u of t)n+=String.fromCharCode(u);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var S="copy",le="convert";function Be(e,t,n){if(t===S)return n;if(t===le)return e(n);if(t instanceof Array)return n.map(r=>Be(e,t[0],r));if(t instanceof Object){const r={};for(const[s,u]of Object.entries(t)){if(u.derive){const a=u.derive(n);a!==void 0&&(n[s]=a)}if(!(s in n)){if(u.required)throw new Error(`Missing key: ${s}`);continue}if(n[s]==null){r[s]=null;continue}r[s]=Be(e,u.schema,n[s])}return r}}function tt(e,t){return{required:!0,schema:e,derive:t}}function I(e){return{required:!0,schema:e}}function U(e){return{required:!1,schema:e}}var $t={type:I(S),id:I(le),transports:U(S)},Bt={appid:U(S),appidExclude:U(S),credProps:U(S)},kt={appid:U(S),appidExclude:U(S),credProps:U(S)},Bi={publicKey:I({rp:I(S),user:I({id:I(le),name:I(S),displayName:I(S)}),challenge:I(le),pubKeyCredParams:I(S),timeout:U(S),excludeCredentials:U([$t]),authenticatorSelection:U(S),attestation:U(S),extensions:U(Bt)}),signal:U(S)},ki={type:I(S),id:I(S),rawId:I(le),authenticatorAttachment:U(S),response:I({clientDataJSON:I(le),attestationObject:I(le),transports:tt(S,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:tt(kt,e=>e.getClientExtensionResults())},xi={mediation:U(S),publicKey:I({challenge:I(le),timeout:U(S),rpId:U(S),allowCredentials:U([$t]),userVerification:U(S),extensions:U(Bt)}),signal:U(S)},_i={type:I(S),id:I(S),rawId:I(le),authenticatorAttachment:U(S),response:I({clientDataJSON:I(le),authenticatorData:I(le),signature:I(le),userHandle:I(le)}),clientExtensionResults:tt(kt,e=>e.getClientExtensionResults())};function xt(e){return Be(Ft,Bi,e)}function Si(e){return Be(yt,ki,e)}function Ti(e){return Be(Ft,xi,e)}function Oi(e){return Be(yt,_i,e)}async function _t(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>Si(t),t}async function Ii(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>Oi(t),t}function nt(e){this.message=e}nt.prototype=new Error,nt.prototype.name="InvalidCharacterError";var St=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new nt("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,s=0,u=0,a="";r=t.charAt(u++);~r&&(n=s%4?64*n+r:r,s++%4)?a+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function Pi(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(St(n).replace(/(.)/g,function(r,s){var u=s.charCodeAt(0).toString(16).toUpperCase();return u.length<2&&(u="0"+u),"%"+u}))}(t)}catch{return St(t)}}function Ue(e){this.message=e}function zi(e,t){if(typeof e!="string")throw new Ue("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(Pi(e.split(".")[n]))}catch(r){throw new Ue("Invalid token specified: "+r.message)}}Ue.prototype=new Error,Ue.prototype.name="InvalidTokenError";const Je="spartan-token";function Tt(){const e=localStorage.getItem(Je);let t=null;if(e)try{if(t=zi(e),t.exp>Mi())return t;localStorage.removeItem(Je)}catch(n){console.error("Error decoding token",n),localStorage.removeItem(Je)}return null}function Ni(){const e=localStorage.getItem(Je);return e||null}function Mi(){return Math.round(new Date().getTime()/1e3)}var ji=y(`<form class=login-frame><style>.login-frame {
|
|
1
|
+
(function(He){typeof define=="function"&&define.amd?define(He):He()})(function(){"use strict";const ze={equals:(e,t)=>e===t};let at=dt;const Ae=1,Ne=2,ot={owned:null,cleanups:null,context:null,owner:null};var te=null;let We=null,qt=null,H=null,ee=null,ge=null,Me=0;function Ut(e,t){const n=H,r=te,s=e.length===0,u=t===void 0?r:t,o=s?ot:{owned:null,cleanups:null,context:u?u.context:null,owner:u},l=s?e:()=>e(()=>je(()=>_e(o)));te=o,H=null;try{return Se(l,!0)}finally{H=n,te=r}}function F(e,t){t=t?Object.assign({},ze,t):ze;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),ct(n,s));return[lt.bind(n),r]}function $(e,t,n){const r=Ye(e,t,!1,Ae);xe(r)}function Jt(e,t,n){at=Gt;const r=Ye(e,t,!1,Ae);r.user=!0,ge?ge.push(r):xe(r)}function p(e,t,n){n=n?Object.assign({},ze,n):ze;const r=Ye(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,xe(r),lt.bind(r)}function je(e){if(H===null)return e();const t=H;H=null;try{return e()}finally{H=t}}function Ze(e){Jt(()=>je(e))}function lt(){if(this.sources&&this.state)if(this.state===Ae)xe(this);else{const e=ee;ee=null,Se(()=>Le(this),!1),ee=e}if(H){const e=this.observers?this.observers.length:0;H.sources?(H.sources.push(this),H.sourceSlots.push(e)):(H.sources=[this],H.sourceSlots=[e]),this.observers?(this.observers.push(H),this.observerSlots.push(H.sources.length-1)):(this.observers=[H],this.observerSlots=[H.sources.length-1])}return this.value}function ct(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Se(()=>{for(let s=0;s<e.observers.length;s+=1){const u=e.observers[s],o=We&&We.running;o&&We.disposed.has(u),(o?!u.tState:!u.state)&&(u.pure?ee.push(u):ge.push(u),u.observers&&ft(u)),o||(u.state=Ae)}if(ee.length>1e6)throw ee=[],new Error},!1)),t}function xe(e){if(!e.fn)return;_e(e);const t=Me;Vt(e,e.value,t)}function Vt(e,t,n){let r;const s=te,u=H;H=te=e;try{r=e.fn(t)}catch(o){return e.pure&&(e.state=Ae,e.owned&&e.owned.forEach(_e),e.owned=null),e.updatedAt=n+1,ht(o)}finally{H=u,te=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?ct(e,r):e.value=r,e.updatedAt=n)}function Ye(e,t,n,r=Ae,s){const u={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:te,context:te?te.context:null,pure:n};return te===null||te!==ot&&(te.owned?te.owned.push(u):te.owned=[u]),u}function Re(e){if(e.state===0)return;if(e.state===Ne)return Le(e);if(e.suspense&&je(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Me);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Ae)xe(e);else if(e.state===Ne){const r=ee;ee=null,Se(()=>Le(e,t[0]),!1),ee=r}}function Se(e,t){if(ee)return e();let n=!1;t||(ee=[]),ge?n=!0:ge=[],Me++;try{const r=e();return Kt(n),r}catch(r){n||(ge=null),ee=null,ht(r)}}function Kt(e){if(ee&&(dt(ee),ee=null),e)return;const t=ge;ge=null,t.length&&Se(()=>at(t),!1)}function dt(e){for(let t=0;t<e.length;t++)Re(e[t])}function Gt(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Re(r)}for(t=0;t<n;t++)Re(e[t])}function Le(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const s=r.state;s===Ae?r!==t&&(!r.updatedAt||r.updatedAt<Me)&&Re(r):s===Ne&&Le(r,t)}}}function ft(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Ne,n.pure?ee.push(n):ge.push(n),n.observers&&ft(n))}}function _e(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),s=n.observers;if(s&&s.length){const u=s.pop(),o=n.observerSlots.pop();r<s.length&&(u.sourceSlots[o]=r,s[r]=u,n.observerSlots[r]=o)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)_e(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)_e(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Ht(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function ht(e,t=te){throw Ht(e)}function Wt(e,t,n){let r=n.length,s=t.length,u=r,o=0,l=0,v=t[s-1].nextSibling,B=null;for(;o<s||l<u;){if(t[o]===n[l]){o++,l++;continue}for(;t[s-1]===n[u-1];)s--,u--;if(s===o){const D=u<r?l?n[l-1].nextSibling:n[u-l]:v;for(;l<u;)e.insertBefore(n[l++],D)}else if(u===l)for(;o<s;)(!B||!B.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[u-1]&&n[l]===t[s-1]){const D=t[--s].nextSibling;e.insertBefore(n[l++],t[o++].nextSibling),e.insertBefore(n[--u],D),t[s]=n[u]}else{if(!B){B=new Map;let x=l;for(;x<u;)B.set(n[x],x++)}const D=B.get(t[o]);if(D!=null)if(l<D&&D<u){let x=o,ne=1,ie;for(;++x<s&&x<u&&!((ie=B.get(t[x]))==null||ie!==D+ne);)ne++;if(ne>D-l){const me=t[o];for(;l<D;)e.insertBefore(n[l++],me)}else e.replaceChild(n[l++],t[o++])}else o++;else t[o++].remove()}}}const Dt="_$DX_DELEGATE";function E(e,t,n,r){let s;const u=()=>{const l=document.createElement("template");return l.innerHTML=e,l.content.firstChild},o=()=>(s||(s=u())).cloneNode(!0);return o.cloneNode=o,o}function Xe(e,t=window.document){const n=t[Dt]||(t[Dt]=new Set);for(let r=0,s=e.length;r<s;r++){const u=e[r];n.has(u)||(n.add(u),t.addEventListener(u,Zt))}}function ae(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function pt(e,t,n){return je(()=>e(t,n))}function f(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return qe(e,t,r,n);$(s=>qe(e,t(),s,n),r)}function Zt(e){let t=e.target;const n=`$$${e.type}`,r=e.target,s=e.currentTarget,u=v=>Object.defineProperty(e,"target",{configurable:!0,value:v}),o=()=>{const v=t[n];if(v&&!t.disabled){const B=t[`${n}Data`];if(B!==void 0?v.call(t,B,e):v.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&u(t.host),!0},l=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const v=e.composedPath();u(v[0]);for(let B=0;B<v.length-2&&(t=v[B],!!o());B++){if(t._$host){t=t._$host,l();break}if(t.parentNode===s)break}}else l();u(r)}function qe(e,t,n,r,s){for(;typeof n=="function";)n=n();if(t===n)return n;const u=typeof t,o=r!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,u==="string"||u==="number"){if(u==="number"&&(t=t.toString(),t===n))return n;if(o){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Ee(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||u==="boolean")n=Ee(e,n,r);else{if(u==="function")return $(()=>{let l=t();for(;typeof l=="function";)l=l();n=qe(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],v=n&&Array.isArray(n);if(Qe(l,t,n,s))return $(()=>n=qe(e,l,n,r,!0)),()=>n;if(l.length===0){if(n=Ee(e,n,r),o)return n}else v?n.length===0?gt(e,l,r):Wt(e,n,l):(n&&Ee(e),gt(e,l));n=l}else if(t.nodeType){if(Array.isArray(n)){if(o)return n=Ee(e,n,r,t);Ee(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Qe(e,t,n,r){let s=!1;for(let u=0,o=t.length;u<o;u++){let l=t[u],v=n&&n[e.length],B;if(!(l==null||l===!0||l===!1))if((B=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))s=Qe(e,l,v)||s;else if(B==="function")if(r){for(;typeof l=="function";)l=l();s=Qe(e,Array.isArray(l)?l:[l],Array.isArray(v)?v:[v])||s}else e.push(l),s=!0;else{const D=String(l);v&&v.nodeType===3&&v.data===D?e.push(v):e.push(document.createTextNode(D))}}return s}function gt(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function Ee(e,t,n,r){if(n===void 0)return e.textContent="";const s=r||document.createTextNode("");if(t.length){let u=!1;for(let o=t.length-1;o>=0;o--){const l=t[o];if(s!==l){const v=l.parentNode===e;!u&&!o?v?e.replaceChild(s,l):e.insertBefore(s,n):v&&l.remove()}else u=!0}}else e.insertBefore(s,n);return[s]}function Yt(e){return Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=Object.assign({},s),Ct(s.value)&&!nn(s.value)&&!Array.isArray(s.value)&&(n[r].value=Object.assign({},s.value)),Array.isArray(s.value)&&(n[r].value=s.value.slice(0)),n},{})}function Xt(e){return e?Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=Ct(s)&&"value"in s?s:{value:s},n[r].attribute||(n[r].attribute=tn(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function Qt(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function en(e,t){const n=Yt(t);return Object.keys(t).forEach(s=>{const u=n[s],o=e.getAttribute(u.attribute),l=e[s];o!=null&&(u.value=u.parse?mt(o):o),l!=null&&(u.value=Array.isArray(l)?l.slice(0):l),u.reflect&&bt(e,u.attribute,u.value,!!u.parse),Object.defineProperty(e,s,{get(){return u.value},set(v){const B=u.value;u.value=v,u.reflect&&bt(this,u.attribute,u.value,!!u.parse);for(let D=0,x=this.__propertyChangedCallbacks.length;D<x;D++)this.__propertyChangedCallbacks[D](s,v,B)},enumerable:!0,configurable:!0})}),n}function mt(e){if(e)try{return JSON.parse(e)}catch{return e}}function bt(e,t,n,r){if(n==null||n===!1)return e.removeAttribute(t);let s=r?JSON.stringify(n):n;e.__updating[t]=!0,s==="true"&&(s=""),e.setAttribute(t,s),Promise.resolve().then(()=>delete e.__updating[t])}function tn(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function Ct(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function nn(e){return Object.prototype.toString.call(e)==="[object Function]"}function rn(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let et;function sn(e,t){const n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(s=>t[s].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=en(this,t);const s=Qt(this.props),u=this.Component,o=et;try{et=this,this.__initialized=!0,rn(u)?new u(s,{element:this}):u(s,{element:this})}finally{et=o}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let s=null;for(;s=this.__releaseCallbacks.pop();)s(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(s,u,o){if(this.__initialized&&!this.__updating[s]&&(s=this.lookupProp(s),s in t)){if(o==null&&!this[s])return;this[s]=t[s].parse?mt(o):o}}lookupProp(s){if(t)return n.find(u=>s===u||s===t[u].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(s){this.__releaseCallbacks.push(s)}addPropertyChangedCallback(s){this.__propertyChangedCallbacks.push(s)}}}function un(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:s,customElements:u=window.customElements}=n;return o=>{if(!e)throw new Error("tag is required to register a Component");let l=u.get(e);return l?(l.prototype.Component=o,l):(l=sn(r,Xt(t)),l.prototype.Component=o,l.prototype.registeredTag=e,u.define(e,l,s),l)}}function an(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[s,u]=F(e[t[r]]);Object.defineProperty(n,t[r],{get:s,set(o){u(()=>o)}})}return n}function on(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function ln(e){return(t,n)=>{const{element:r}=n;return Ut(s=>{const u=an(t);r.addPropertyChangedCallback((l,v)=>u[l]=v),r.addReleaseCallback(()=>{r.renderRoot.textContent="",s()});const o=e(u,n);return f(r.renderRoot,o)},on(r))}}function tt(e,t,n){return arguments.length===2&&(n=t,t={}),un(e,t)(ln(n))}var cn="٠١٢٣٤٥٦٧٨٩",dn="۰۱۲۳۴۵۶۷۸۹",fn="൦൧൨൩൪൫൬൭൮൯",hn="೦೧೨೩೪೫೬೭೮೯",Dn="໐໑໒໓໔໕໖໗໘໙",pn="୦୧୨୩୪୫୬୭୮୯",gn="០១២៣៤៥៦៧៨៩",mn="߀߁߂߃߄߅߆߇߈߉",bn="੦੧੨੩੪੫੬੭੮੯",Cn="૦૧૨૩૪૫૬૭૮૯",vn="०१२३४५६७८९",An="၀၁၂၃၄၅၆၇၈၉",wn="௦௧௨௩௪௫௬௭௮௯",Fn="౦౧౨౩౪౫౬౭౮౯",En="๐๑๒๓๔๕๖๗๘๙",yn="༠༡༢༣༤༥༦༧༨༩",vt={ar:cn,fa:dn,ml:fn,kn:hn,lo:Dn,or:pn,kh:gn,nqo:mn,pa:bn,gu:Cn,hi:vn,my:An,ta:wn,te:Fn,th:En,bo:yn},$n=["ru"],Bn=["id"],kn=["id"],xn=["ady-cyrl"],Sn=["aeb-arab"],_n=["sq"],Tn=["ru"],On=["zh-hant"],In=["es"],Pn=["hi"],zn=["es"],Nn=["ar"],Mn=["ar"],jn=["ar"],Rn=["es"],Ln=["fr"],qn=["ru"],Un=["fr","es","ru"],Jn=["hi"],Vn=["es"],Kn=["fa"],Gn=["ru"],Hn=["id"],Wn=["de"],Zn=["bbc-latn"],Yn=["fa"],Xn=["fa"],Qn=["bho"],er=["en"],tr=["id"],nr=["fr"],rr=["bn"],sr=["fa"],ur=["fr"],ir=["id"],ar=["id"],or=["ru"],lr=["oc"],cr=["nan","zh-hant"],dr=["ru"],fr=["it"],hr=["crh-latn"],Dr=["sk"],pr=["pl"],gr=["ru"],mr=["hsb","de"],br=["ms"],Cr=["ne"],vr=["it"],Ar=["it"],wr=["es"],Fr=["fr"],Er=["fi"],yr=["fr"],$r=["fr"],Br=["de"],kr=["it"],xr=["tr"],Sr=["gan-hant","zh-hant","zh-hans"],_r=["fr"],Tr=["pt"],Or=["fa"],Ir=["es"],Pr=["gom-deva"],zr=["id"],Nr=["de"],Mr=["es"],jr=["zh-hant"],Rr=["hif-latn"],Lr=["de"],qr=["dsb","de"],Ur=["fr"],Jr=["hy"],Vr=["zh-cn","zh-hans"],Kr=["ru"],Gr=["eo"],Hr=["ike-cans"],Wr=["en"],Zr=["da"],Yr=["id"],Xr=["kk-latn","kk-cyrl"],Qr=["fr"],es=["kbd-cyrl"],ts=["fr"],ns=["ur"],rs=["tr"],ss=["my"],us=["kk-cyrl"],is=["da"],as=["ru"],os=["ru"],ls=["fi"],cs=["ks-arab"],ds=["de"],fs=["ku-latn"],hs=["ru"],Ds=["ru"],ps=["es"],gs=["de"],ms=["ru"],bs=["ru","az"],Cs=["nl"],vs=["it"],As=["et"],ws=["fa"],Fs=["it","rm","fur"],Es=["pms","eml","lij","vec","it"],ys=["fr"],$s=["fa"],Bs=["lv"],ks=["fa"],xs=["zh-hant"],Ss=["tr"],_s=["id"],Ts=["hi"],Os=["myv","ru"],Is=["fr"],Ps=["mrj","ru"],zs=["id"],Ns=["my"],Ms=["ro"],js=["mhr","ru"],Rs=["pt"],Ls=["mdf","ru"],qs=["fa"],Us=["es"],Js=["cdo","zh-hant"],Vs=["it"],Ks=["nn"],Gs=["de"],Hs=["id"],Ws=["nb"],Zs=["fr"],Ys=["ca","fr"],Xs=["fi"],Qs=["ru"],eu=["fr"],tu=["de"],nu=["de"],ru=["de"],su=["en"],uu=["it"],iu=["el"],au=["pt-br"],ou=["qug","es"],lu=["qu","es"],cu=["it"],du=["ro"],fu=["uk","ru"],hu=["ro"],Du=["ruq-latn","ro"],pu=["hi"],gu=["ru"],mu=["it"],bu=["en"],Cu=["it"],vu=["cbk","fa"],Au=["fr"],wu=["fr"],Fu=["lt"],Eu=["bs","sr-el","hr"],yu=["fr"],$u=["shy-latn"],Bu=["cs"],ku=["skr-arab"],xu=["de"],Su=["fi"],_u=["sr-ec"],Tu=["nl"],Ou=["de"],Iu=["ru"],Pu=["id"],zu=["pl"],Nu=["zh-tw","zh-hant","zh-hans"],Mu=["zh-tw","zh-hant","zh-hans"],ju=["kn"],Ru=["pt"],Lu=["tg-cyrl"],qu=["zh-tw","zh-hant","zh-hans"],Uu=["tt-cyrl","ru"],Ju=["fr"],Vu=["ru"],Ku=["ru"],Gu=["ug-arab"],Hu=["it"],Wu=["et"],Zu=["nl"],Yu=["de"],Xu=["fi"],Qu=["et"],ei=["fr"],ti=["fr"],ni=["zh-hans"],ri=["ru"],si=["ka"],ui=["he"],ii=["zh-hans"],ai=["nl"],oi=["kab"],li=["zh-hans"],At={ab:$n,abs:Bn,ace:kn,ady:xn,aeb:Sn,"aeb-arab":["ar"],aln:_n,alt:Tn,ami:On,an:In,anp:Pn,arn:zn,arq:Nn,ary:Mn,arz:jn,ast:Rn,atj:Ln,av:qn,avk:Un,awa:Jn,ay:Vn,azb:Kn,ba:Gn,ban:Hn,"ban-bali":["ban"],bar:Wn,bbc:Zn,"bbc-latn":["id"],bcc:Yn,"be-tarask":["be"],bgn:Xn,bh:Qn,bi:er,bjn:tr,bm:nr,bpy:rr,bqi:sr,br:ur,btm:ir,bug:ar,bxr:or,ca:lr,"cbk-zam":["es"],cdo:cr,ce:dr,co:fr,crh:hr,"crh-cyrl":["ru"],cs:Dr,csb:pr,cv:gr,"de-at":["de"],"de-ch":["de"],"de-formal":["de"],dsb:mr,dtp:br,dty:Cr,egl:vr,eml:Ar,"en-ca":["en"],"en-gb":["en"],"es-419":["es"],"es-formal":["es"],ext:wr,ff:Fr,fit:Er,frc:yr,frp:$r,frr:Br,fur:kr,gag:xr,gan:Sr,"gan-hans":["zh-hans"],"gan-hant":["zh-hant","zh-hans"],gcr:_r,gl:Tr,glk:Or,gn:Ir,gom:Pr,"gom-deva":["hi"],gor:zr,gsw:Nr,guc:Mr,hak:jr,hif:Rr,hrx:Lr,hsb:qr,ht:Ur,"hu-formal":["hu"],hyw:Jr,ii:Vr,inh:Kr,io:Gr,iu:Hr,jam:Wr,jut:Zr,jv:Yr,kaa:Xr,kab:Qr,kbd:es,kbp:ts,khw:ns,kiu:rs,kjp:ss,kk:us,"kk-arab":["kk-cyrl"],"kk-cn":["kk-arab","kk-cyrl"],"kk-kz":["kk-cyrl"],"kk-latn":["kk-cyrl"],"kk-tr":["kk-latn","kk-cyrl"],kl:is,"ko-kp":["ko"],koi:as,krc:os,krl:ls,ks:cs,ksh:ds,ku:fs,"ku-arab":["ckb"],kum:hs,kv:Ds,lad:ps,lb:gs,lbe:ms,lez:bs,li:Cs,lij:vs,liv:As,lki:ws,lld:Fs,lmo:Es,ln:ys,lrc:$s,ltg:Bs,luz:ks,lzh:xs,lzz:Ss,mad:_s,mai:Ts,"map-bms":["jv","id"],mdf:Os,mg:Is,mhr:Ps,min:zs,mnw:Ns,mo:Ms,mrj:js,"ms-arab":["ms"],mwl:Rs,myv:Ls,mzn:qs,nah:Us,nan:Js,nap:Vs,nb:Ks,nds:Gs,"nds-nl":["nl"],nia:Hs,"nl-informal":["nl"],nn:Ws,nrm:Zs,oc:Ys,olo:Xs,os:Qs,pcd:eu,pdc:tu,pdt:nu,pfl:ru,pih:su,pms:uu,pnt:iu,pt:au,"pt-br":["pt"],qu:ou,qug:lu,rgn:cu,rmy:du,"roa-tara":["it"],rue:fu,rup:hu,ruq:Du,"ruq-cyrl":["mk"],"ruq-latn":["ro"],sa:pu,sah:gu,scn:mu,sco:bu,sdc:Cu,sdh:vu,ses:Au,sg:wu,sgs:Fu,sh:Eu,shi:yu,shy:$u,"shy-latn":["fr"],sk:Bu,skr:ku,"skr-arab":["ur","pnb"],sli:xu,smn:Su,sr:_u,srn:Tu,stq:Ou,sty:Iu,su:Pu,szl:zu,szy:Nu,tay:Mu,tcy:ju,tet:Ru,tg:Lu,trv:qu,tt:Uu,"tt-cyrl":["ru"],ty:Ju,tyv:Vu,udm:Ku,ug:Gu,vec:Hu,vep:Wu,vls:Zu,vmf:Yu,vot:Xu,vro:Qu,wa:ei,wo:ti,wuu:ni,xal:ri,xmf:si,yi:ui,za:ii,zea:ai,zgh:oi,zh:li,"zh-cn":["zh-hans"],"zh-hant":["zh-hans"],"zh-hk":["zh-hant","zh-hans"],"zh-mo":["zh-hk","zh-hant","zh-hans"],"zh-my":["zh-sg","zh-hans"],"zh-sg":["zh-hans"],"zh-tw":["zh-hant","zh-hans"]};let ue=class{constructor(e){this.locale=e}convertPlural(e,t){const n=/\d+=/i;if(!t||t.length===0)return"";for(let s=0;s<t.length;s++){const u=t[s];if(n.test(u)){if(parseInt(u.slice(0,u.indexOf("=")),10)===e)return u.slice(u.indexOf("=")+1);t[s]=void 0}}t=t.filter(s=>!!s);let r=this.getPluralForm(e,this.locale);return r=Math.min(r,t.length-1),t[r]}getPluralForm(e,t){const n=["zero","one","two","few","many","other"],r=new Intl.PluralRules(t),s=r.resolvedOptions().pluralCategories,u=r.select(e);return n.filter(o=>s.includes(o)).indexOf(u)}convertNumber(e,t=!1){let n=this.digitTransformTable(this.locale),r="";if(t){if(parseFloat(e,10)===e||!n)return e;const s=[];for(const o in n)s[n[o]]=o;n=s;const u=String(e);for(let o=0;o<u.length;o++)r+=n[u[o]]||u[o];return parseFloat(r,10)}if(Intl.NumberFormat){let s;const u=[...At[this.locale]||[],"en"];return Intl.NumberFormat.supportedLocalesOf(this.locale).length?s=[this.locale]:s=u,r=new Intl.NumberFormat(s).format(e),r==="NaN"&&(r=e),r}}convertGrammar(e){return e}gender(e,t){if(!t||t.length===0)return"";for(;t.length<2;)t.push(t[t.length-1]);return e==="male"?t[0]:e==="female"?t[1]:t.length===3?t[2]:t[0]}digitTransformTable(e){return vt[e]?vt[e].split(""):!1}},ci=class extends ue{convertGrammar(e,t){switch(t){case"prefixed":case"תחילית":e.slice(0,1)==="ו"&&e.slice(0,2)!=="וו"&&(e="ו"+e),e.slice(0,1)==="ה"&&(e=e.slice(1)),(e.slice(0,1)<"א"||e.slice(0,1)>"ת")&&(e="־"+e)}return e}},di=class extends ue{convertGrammar(t,n){switch(n){case"instrumental":t="s "+t;break;case"lokativ":t="o "+t;break}return t}},fi=class extends ue{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},hi=class extends ue{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},Di=class extends ue{convertGrammar(e,t){let n=e.match(/[aou][^äöy]*$/i);const r=e;switch(e.match(/wiki$/i)&&(n=!1),e.match(/[bcdfghjklmnpqrstvwxz]$/i)&&(e+="i"),t){case"genitive":e+="n";break;case"elative":e+=n?"sta":"stä";break;case"partitive":e+=n?"a":"ä";break;case"illative":e+=e.slice(-1)+"n";break;case"inessive":e+=n?"ssa":"ssä";break;default:e=r;break}return e}},pi=class extends ue{convertGrammar(e,t){return t==="genitive"&&(e.slice(-1)==="ь"?e=e.slice(0,-1)+"я":e.slice(-2)==="ия"?e=e.slice(0,-2)+"ии":e.slice(-2)==="ка"?e=e.slice(0,-2)+"ки":e.slice(-2)==="ти"?e=e.slice(0,-2)+"тей":e.slice(-2)==="ды"?e=e.slice(0,-2)+"дов":e.slice(-3)==="ник"&&(e=e.slice(0,-3)+"ника")),e}};class gi extends ue{convertGrammar(t,n){switch(n){case"mestnik":t="o "+t;break;case"orodnik":t="z "+t;break}return t}}let mi=class extends ue{convertGrammar(e,t){switch(t){case"genitive":e=e.replace(/u[ms]$/i,"i"),e=e.replace(/ommunia$/i,"ommunium"),e=e.replace(/a$/i,"ae"),e=e.replace(/libri$/i,"librorum"),e=e.replace(/nuntii$/i,"nuntiorum"),e=e.replace(/tio$/i,"tionis"),e=e.replace(/ns$/i,"ntis"),e=e.replace(/as$/i,"atis"),e=e.replace(/es$/i,"ei");break;case"accusative":e=e.replace(/u[ms]$/i,"um"),e=e.replace(/ommunia$/i,"am"),e=e.replace(/a$/i,"ommunia"),e=e.replace(/libri$/i,"libros"),e=e.replace(/nuntii$/i,"nuntios"),e=e.replace(/tio$/i,"tionem"),e=e.replace(/ns$/i,"ntem"),e=e.replace(/as$/i,"atem"),e=e.replace(/es$/i,"em");break;case"ablative":e=e.replace(/u[ms]$/i,"o"),e=e.replace(/ommunia$/i,"ommunibus"),e=e.replace(/a$/i,"a"),e=e.replace(/libri$/i,"libris"),e=e.replace(/nuntii$/i,"nuntiis"),e=e.replace(/tio$/i,"tione"),e=e.replace(/ns$/i,"nte"),e=e.replace(/as$/i,"ate"),e=e.replace(/es$/i,"e");break}return e}};class bi extends ue{convertGrammar(t,n){return n==="genitive"&&(t.slice(-1)==="ա"?t=t.slice(0,-1)+"այի":t.slice(-1)==="ո"?t=t.slice(0,-1)+"ոյի":t.slice(-4)==="գիրք"?t=t.slice(0,-4)+"գրքի":t=t+"ի"),t}}let Ci=class extends ue{convertGrammar(e,t){if(t==="ainmlae")switch(e){case"an Domhnach":e="Dé Domhnaigh";break;case"an Luan":e="Dé Luain";break;case"an Mháirt":e="Dé Mháirt";break;case"an Chéadaoin":e="Dé Chéadaoin";break;case"an Déardaoin":e="Déardaoin";break;case"an Aoine":e="Dé hAoine";break;case"an Satharn":e="Dé Sathairn";break}return e}},vi=class extends ue{convertGrammar(e,t){switch(t){case"rol":e+="ról";break;case"ba":e+="ba";break;case"k":e+="k";break}return e}},Ai=class extends ue{convertGrammar(e,t){let n,r,s,u;switch(n="мæ",r="",s="",u="",e.match(/тæ$/i)?(e=e.slice(0,-1),n="æм"):e.match(/[аæеёиоыэюя]$/i)?r="й":e.match(/у$/i)?e.slice(-2,-1).match(/[аæеёиоыэюя]$/i)||(r="й"):e.match(/[бвгджзйклмнопрстфхцчшщьъ]$/i)||(s="-"),t){case"genitive":u=s+r+"ы";break;case"dative":u=s+r+"æн";break;case"allative":u=s+n;break;case"ablative":r==="й"?u=s+r+"æ":u=s+r+"æй";break;case"superessive":u=s+r+"ыл";break;case"equative":u=s+r+"ау";break;case"comitative":u=s+"имæ";break}return e+u}};class wi extends ue{convertGrammar(t,n){switch(n){case"genitive":t.slice(-1)==="ь"?t=t.slice(0,-1)+"я":t.slice(-2)==="ія"?t=t.slice(0,-2)+"ії":t.slice(-2)==="ка"?t=t.slice(0,-2)+"ки":t.slice(-2)==="ти"?t=t.slice(0,-2)+"тей":t.slice(-2)==="ды"?t=t.slice(0,-2)+"дов":t.slice(-3)==="ник"&&(t=t.slice(0,-3)+"ника");break;case"accusative":t.slice(-2)==="ія"&&(t=t.slice(0,-2)+"ію");break}return t}}var wt={bs:di,default:ue,dsb:fi,fi:Di,ga:Ci,he:ci,hsb:hi,hu:vi,hy:bi,la:mi,os:Ai,ru:pi,sl:gi,uk:wi};const Fi=new RegExp("(?:([A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁːˑˠ-ˤˮͰ-ͳͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-҂Ҋ-ԯԱ-Ֆՙ-՟ա-և։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ঀংঃঅ-ঌএঐও-নপ-রলশ-হঽ-ীেৈোৌৎৗড়ঢ়য়-ৡ০-ৱ৴-৺ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ીૉોૌૐૠૡ૦-૰ૹଂଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽାୀେୈୋୌୗଡ଼ଢ଼ୟ-ୡ୦-୷ஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹாிுூெ-ைொ-ௌௐௗ௦-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౚౠౡ౦-౯౿ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊೋೕೖೞೠೡ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ീെ-ൈൊ-ൌൎൗൟ-ൡ൦-൵൹-ൿංඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-෴ก-ะาำเ-ๆ๏-๛ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆ໐-໙ໜ-ໟༀ-༗༚-༴༶༸༾-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿚က-ာေးျြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃႄႇ-ႌႎ-ႜ႞-ჅჇჍა-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፼ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙿᚁ-ᚚᚠ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះៈ។-៚ៜ០-៩᠐-᠙ᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸ᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨖᨙᨚ᨞-ᩕᩗᩡᩣᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-ᭋ᭐-᭪᭴-᭼ᮂ-ᮡᮦᮧ᮪ᮮ-ᯥᯧᯪ-ᯬᯮ᯲᯳᯼-ᰫᰴᰵ᰻-᱉ᱍ-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳳᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〮〯〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎ㆐-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿕ꀀ-ꒌꓐ-ꘌꘐ-ꘫꙀ-ꙮꚀ-ꚝꚠ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꣽ꤀-ꤥ꤮-ꥆꥒ꥓꥟-ꥼꦃ-ꦲꦴꦵꦺꦻꦽ-꧍ꧏ-꧙꧞-ꧤꧦ-ꧾꨀ-ꨨꨯꨰꨳꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-ꩻꩽ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫫꫮ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭥꭰ-ꯤꯦꯧꯩ-꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]|\uD800[\uDC00-\uDC0B]|\uD800[\uDC0D-\uDC26]|\uD800[\uDC28-\uDC3A]|𐀼|𐀽|\uD800[\uDC3F-\uDC4D]|\uD800[\uDC50-\uDC5D]|\uD800[\uDC80-\uDCFA]|𐄀|𐄂|\uD800[\uDD07-\uDD33]|\uD800[\uDD37-\uDD3F]|\uD800[\uDDD0-\uDDFC]|\uD800[\uDE80-\uDE9C]|\uD800[\uDEA0-\uDED0]|\uD800[\uDF00-\uDF23]|\uD800[\uDF30-\uDF4A]|\uD800[\uDF50-\uDF75]|\uD800[\uDF80-\uDF9D]|\uD800[\uDF9F-\uDFC3]|\uD800[\uDFC8-\uDFD5]|\uD801[\uDC00-\uDC9D]|\uD801[\uDCA0-\uDCA9]|\uD801[\uDD00-\uDD27]|\uD801[\uDD30-\uDD63]|𐕯|\uD801[\uDE00-\uDF36]|\uD801[\uDF40-\uDF55]|\uD801[\uDF60-\uDF67]|𑀀|\uD804[\uDC02-\uDC37]|\uD804[\uDC47-\uDC4D]|\uD804[\uDC66-\uDC6F]|\uD804[\uDC82-\uDCB2]|𑂷|𑂸|\uD804[\uDCBB-\uDCC1]|\uD804[\uDCD0-\uDCE8]|\uD804[\uDCF0-\uDCF9]|\uD804[\uDD03-\uDD26]|𑄬|\uD804[\uDD36-\uDD43]|\uD804[\uDD50-\uDD72]|\uD804[\uDD74-\uDD76]|\uD804[\uDD82-\uDDB5]|\uD804[\uDDBF-\uDDC9]|𑇍|\uD804[\uDDD0-\uDDDF]|\uD804[\uDDE1-\uDDF4]|\uD804[\uDE00-\uDE11]|\uD804[\uDE13-\uDE2E]|𑈲|𑈳|𑈵|\uD804[\uDE38-\uDE3D]|\uD804[\uDE80-\uDE86]|𑊈|\uD804[\uDE8A-\uDE8D]|\uD804[\uDE8F-\uDE9D]|\uD804[\uDE9F-\uDEA9]|\uD804[\uDEB0-\uDEDE]|\uD804[\uDEE0-\uDEE2]|\uD804[\uDEF0-\uDEF9]|𑌂|𑌃|\uD804[\uDF05-\uDF0C]|𑌏|𑌐|\uD804[\uDF13-\uDF28]|\uD804[\uDF2A-\uDF30]|𑌲|𑌳|\uD804[\uDF35-\uDF39]|\uD804[\uDF3D-\uDF3F]|\uD804[\uDF41-\uDF44]|𑍇|𑍈|\uD804[\uDF4B-\uDF4D]|𑍐|𑍗|\uD804[\uDF5D-\uDF63]|\uD805[\uDC80-\uDCB2]|𑒹|\uD805[\uDCBB-\uDCBE]|𑓁|\uD805[\uDCC4-\uDCC7]|\uD805[\uDCD0-\uDCD9]|\uD805[\uDD80-\uDDB1]|\uD805[\uDDB8-\uDDBB]|𑖾|\uD805[\uDDC1-\uDDDB]|\uD805[\uDE00-\uDE32]|𑘻|𑘼|𑘾|\uD805[\uDE41-\uDE44]|\uD805[\uDE50-\uDE59]|\uD805[\uDE80-\uDEAA]|𑚬|𑚮|𑚯|𑚶|\uD805[\uDEC0-\uDEC9]|\uD805[\uDF00-\uDF19]|𑜠|𑜡|𑜦|\uD805[\uDF30-\uDF3F]|\uD806[\uDCA0-\uDCF2]|𑣿|\uD806[\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E]|\uD809[\uDC70-\uDC74]|\uD809[\uDC80-\uDD43]|\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38]|\uD81A[\uDE40-\uDE5E]|\uD81A[\uDE60-\uDE69]|𖩮|𖩯|\uD81A[\uDED0-\uDEED]|𖫵|\uD81A[\uDF00-\uDF2F]|\uD81A[\uDF37-\uDF45]|\uD81A[\uDF50-\uDF59]|\uD81A[\uDF5B-\uDF61]|\uD81A[\uDF63-\uDF77]|\uD81A[\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44]|\uD81B[\uDF50-\uDF7E]|\uD81B[\uDF93-\uDF9F]|𛀀|𛀁|\uD82F[\uDC00-\uDC6A]|\uD82F[\uDC70-\uDC7C]|\uD82F[\uDC80-\uDC88]|\uD82F[\uDC90-\uDC99]|𛲜|𛲟|\uD834[\uDC00-\uDCF5]|\uD834[\uDD00-\uDD26]|\uD834[\uDD29-\uDD66]|\uD834[\uDD6A-\uDD72]|𝆃|𝆄|\uD834[\uDD8C-\uDDA9]|\uD834[\uDDAE-\uDDE8]|\uD834[\uDF60-\uDF71]|\uD835[\uDC00-\uDC54]|\uD835[\uDC56-\uDC9C]|𝒞|𝒟|𝒢|𝒥|𝒦|\uD835[\uDCA9-\uDCAC]|\uD835[\uDCAE-\uDCB9]|𝒻|\uD835[\uDCBD-\uDCC3]|\uD835[\uDCC5-\uDD05]|\uD835[\uDD07-\uDD0A]|\uD835[\uDD0D-\uDD14]|\uD835[\uDD16-\uDD1C]|\uD835[\uDD1E-\uDD39]|\uD835[\uDD3B-\uDD3E]|\uD835[\uDD40-\uDD44]|𝕆|\uD835[\uDD4A-\uDD50]|\uD835[\uDD52-\uDEA5]|\uD835[\uDEA8-\uDEDA]|\uD835[\uDEDC-\uDF14]|\uD835[\uDF16-\uDF4E]|\uD835[\uDF50-\uDF88]|\uD835[\uDF8A-\uDFC2]|\uD835[\uDFC4-\uDFCB]|\uD836[\uDC00-\uDDFF]|\uD836[\uDE37-\uDE3A]|\uD836[\uDE6D-\uDE74]|\uD836[\uDE76-\uDE83]|\uD836[\uDE85-\uDE8B]|\uD83C[\uDD10-\uDD2E]|\uD83C[\uDD30-\uDD69]|\uD83C[\uDD70-\uDD9A]|\uD83C[\uDDE6-\uDE02]|\uD83C[\uDE10-\uDE3A]|\uD83C[\uDE40-\uDE48]|🉐|🉑|[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6]|\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34]|\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|[\uDB80-\uDBBE][\uDC00-\uDFFF]|\uDBBF[\uDC00-\uDFFD]|[\uDBC0-\uDBFE][\uDC00-\uDFFF]|\uDBFF[\uDC00-\uDFFD])|([־׀׃׆-߀-ߪߴߵߺ-ࠕࠚࠤࠨ-ࡘ-࢟יִײַ-ﬨשׁ-ﭏ؈؋؍؛-ي٭-ٯٱ-ەۥۦۮۯۺ-ܐܒ-ܯ-ޥޱ-ࢠ-ﭐ-ﴽ﵀-﷏ﷰ-﷼﷾﷿ﹰ-]|\uD802[\uDC00-\uDD1E]|\uD802[\uDD20-\uDE00]||\uD802[\uDE07-\uDE0B]|\uD802[\uDE10-\uDE37]|\uD802[\uDE3B-\uDE3E]|\uD802[\uDE40-\uDEE4]|\uD802[\uDEE7-\uDF38]|\uD802[\uDF40-\uDFFF]|\uD803[\uDC00-\uDE5F]|\uD803[\uDE7F-\uDFFF]|\uD83A[\uDC00-\uDCCF]|\uD83A[\uDCD7-\uDFFF]|\uD83B[\uDC00-\uDDFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDE00-\uDEEF]|\uD83B[\uDEF2-\uDEFF]))");let Ft=class{constructor(e){this.locale=ye(e),this.language=new(wt[this.locale]||wt.default)(this.locale)}emit(e,t){let n,r,s;switch(typeof e){case"string":case"number":n=e;break;case"object":if(r=e.slice(1).map(u=>this.emit(u,t)),s=e[0].toLowerCase(),typeof this[s]=="function")n=this[s](r,t);else throw new Error('unknown operation "'+s+'"');break;case"undefined":n="";break;default:throw new Error("unexpected type in AST: "+typeof e)}return n}concat(e){let t="";return e.forEach(n=>{t+=n}),t}replace(e,t){const n=parseInt(e[0],10);return n<t.length?t[n]:"$"+(n+1)}plural(e){const t=parseFloat(this.language.convertNumber(e[0],10)),n=e.slice(1);return n.length?this.language.convertPlural(t,n):""}gender(e){const t=e[0],n=e.slice(1);return this.language.gender(t,n)}grammar(e){const t=e[0],n=e[1];return n&&t&&this.language.convertGrammar(n,t)}wikilink(e){let t,n=e[0];n.charAt(0)===":"&&(n=n.slice(1));const r=`./${n}`;return e.length===1?t=n:t=e[1],`<a href="${r}" title="${n}">${t}</a>`}extlink(e){if(e.length!==2)throw new Error("Expected two items in the node");return`<a href="${e[0]}">${e[1]}</a>`}bidi(e){const t=Ei(e[0]);return t==="ltr"?""+e[0]+"":t==="rtl"?""+e[0]+"":e[0]}formatnum(e){const t=!!e[1]&&e[1]==="R",n=e[0];return typeof n=="string"||typeof n=="number"?this.language.convertNumber(n,t):n}htmlattributes(e){const t={};for(let n=0,r=e.length;n<r;n+=2)t[e[n]]=e[n+1];return t}htmlelement(e){const t=e.shift(),n=e.shift();let r=e,s="";for(const o in n)s+=` ${o}="${n[o]}"`;Array.isArray(r)||(r=[r]);const u=r.join("");return`<${t}${s}>${u}</${t}>`}};function ye(e){return typeof e=="string"?e.toLowerCase():e}function Ei(e){const t=e.match(Fi);return t?t[2]===void 0?"ltr":"rtl":null}function yi(e,{wikilinks:t=!1}={}){let n=0;function r(i){return()=>{for(let d=0;d<i.length;d++){const y=i[d]();if(y!==null)return y}return null}}function s(i){const d=n,y=[];for(let A=0;A<i.length;A++){const q=i[A]();if(q===null)return n=d,null;y.push(q)}return y}function u(i,d){return()=>{const y=n,A=[];let q=d();for(;q!==null;)A.push(q),q=d();return A.length<i?(n=y,null):A}}function o(i){const d=i.length;return()=>{let y=null;return e.slice(n,n+d)===i&&(y=i,n+=d),y}}function l(i){return()=>{const d=e.slice(n).match(i);return d===null?null:(n+=d[0].length,d[0])}}const v=l(/^\s+/),B=o("|"),D=o(":"),x=o("\\"),ne=l(/^./),ie=o("$"),me=l(/^\d+/),z=o('"'),W=o("'"),Z=l(t?/^[^{}[\]$<\\]/:/^[^{}$<\\]/),re=l(t?/^[^{}[\]$\\|]/:/^[^{}$\\|]/),K=l(t?/^[^{}[\]$\s]/:/^[^{}$\s]/);function Q(i,d){return()=>{const y=i();return y===null?null:d(y)}}function J(){const i=u(1,Y)();return i===null?null:i.join("")}function he(){const i=u(1,Ce)();return i===null?null:i.join("")}const be=r([k,K]);function De(){const i=u(1,be)();return i===null?null:i.join("")}function k(){const i=s([x,ne]);return i===null?null:i[1]}const Y=r([k,re]),Ce=r([k,Z]);function le(){const i=s([ie,me]);return i===null?null:["REPLACE",parseInt(i[1],10)-1]}const ce=Q(l(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/),function(i){return i.toString()});function b(){const i=s([B,u(0,G)]);if(i===null)return null;const d=i[1];return d.length>1?["CONCAT"].concat(d):d[0]}function pe(){const i=s([ce,D,le]);return i===null?null:[i[0],i[2]]}function Te(){const i=s([ce,D,G]);return i===null?null:[i[0],i[2]]}function de(){const i=s([ce,D]);return i===null?null:[i[0],""]}const Be=r([function(){const i=s([r([pe,Te,de]),u(0,b)]);return i===null?null:i[0].concat(i[1])},function(){const i=s([ce,u(0,b)]);return i===null?null:[i[0]].concat(i[1])}]),Oe=o("{{"),Ie=o("}}"),Fe=o("[["),h=o("]]"),ve=o("["),we=o("]");function fe(){const i=s([Oe,Be,Ie]);return i===null?null:i[1]}function ke(){const i=s([u(1,G),B,u(1,j)]);return i===null?null:[["CONCAT"].concat(i[0]),["CONCAT"].concat(i[2])]}function Pe(){const i=s([u(1,G)]);return i===null?null:[["CONCAT"].concat(i[0])]}const w=r([ke,Pe]);function C(){let i=null;const d=s([Fe,w,h]);if(d!==null){const y=d[1];i=["WIKILINK"].concat(y)}return i}function _(){let i=null;const d=s([ve,u(1,V),v,u(1,j),we]);return d!==null&&(i=["EXTLINK",d[1].length===1?d[1][0]:["CONCAT"].concat(d[1]),["CONCAT"].concat(d[3])]),i}const N=l(/^[A-Za-z]+/);function R(i,d,y,A={allowedHtmlElements:["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","li","dt","dd"],allowedHtmlCommonAttributes:["id","class","style","lang","dir","title","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"],allowedHtmlAttributesByElement:{}}){if(i=i.toLowerCase(),d=d.toLowerCase(),i!==d||A.allowedHtmlElements.indexOf(i)===-1)return!1;const q=/[\000-\010\013\016-\037\177]|expression|filter\s*:|accelerator\s*:|-o-link\s*:|-o-link-source\s*:|-o-replace\s*:|url\s*\(|image\s*\(|image-set\s*\(/i;for(let m=0,c=y.length;m<c;m+=2){const g=y[m];if(A.allowedHtmlCommonAttributes.indexOf(g)===-1&&(A.allowedHtmlAttributesByElement[i]||[]).indexOf(g)===-1||g==="style"&&y[m+1].search(q)!==-1)return!1}return!0}function P(){const i=l(/^[^"]*/),d=s([z,i,z]);return d===null?null:d[1]}function M(){const i=l(/^[^']*/),d=s([W,i,W]);return d===null?null:d[1]}function L(){const i=l(/^\s*=\s*/),d=s([v,N,i,r([P,M])]);return d===null?null:[d[1],d[3]]}function O(){const i=u(0,L)();return Array.prototype.concat.apply(["HTMLATTRIBUTES"],i)}function X(){let i=null;const d=n,y=o("<"),A=l(/^\/?/),q=l(/^\s*>/),m=s([y,N,O,A,q]);if(m===null)return null;const c=n,g=m[1],I=u(0,j)(),Ke=n,Ge=o("</"),jt=s([Ge,N,q]);if(jt===null)return["CONCAT",e.slice(d,c)].concat(I);const ba=n,Ca=jt[1],Rt=m[2],va=Rt.slice(1);if(R(g,Ca,va))i=["HTMLELEMENT",g,Rt].concat(I);else{const Lt=Aa=>Aa.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");i=["CONCAT",Lt(e.slice(d,c))].concat(I,Lt(e.slice(Ke,ba)))}return i}const V=r([fe,le,C,_,De]),j=r([fe,le,C,_,X,he]),G=r([fe,le,J]);function se(){const i=u(0,j)();return i===null?null:["CONCAT"].concat(i)}const a=se();if(a===null||n!==e.length)throw new Error("Parse error at position "+n.toString()+" in input: "+e);return a}class Et{constructor(t,{wikilinks:n=!1}={}){this.locale=ye(t),this.wikilinks=n,this.emitter=new Ft(this.locale)}parse(t,n){if(t.includes("{{")||t.includes("<")||this.wikilinks&&t.includes("[")){const r=yi(t,{wikilinks:this.wikilinks});return this.emitter.emit(r,n)}else return this.simpleParse(t,n)}simpleParse(t,n){return t.replace(/\$(\d+)/g,(r,s)=>{const u=parseInt(s,10)-1;return n[u]!==void 0?n[u]:"$"+s})}}class $i{constructor(){this.sourceMap=new Map}load(t,n){if(typeof t!="object")throw new Error("Invalid message source. Must be an object");if(n=ye(n),n){if(!/^[a-zA-Z0-9-]+$/.test(n))throw new Error(`Invalid locale ${n}`);for(const r in t)if(r.indexOf("@")!==0){if(typeof t[r]=="object")return this.load(t);if(typeof t[r]!="string")throw new Error(`Invalid message for message ${r} in ${n} locale.`);break}this.sourceMap.has(n)?this.sourceMap.set(n,Object.assign(this.sourceMap.get(n),t)):this.sourceMap.set(n,t)}else for(n in t)this.load(t[n],n)}getMessage(t,n){const r=this.sourceMap.get(ye(n));return r?r[t]:null}hasLocale(t){return this.sourceMap.has(t)}}class Bi{constructor(t,{finalFallback:n="en",messages:r=void 0,wikilinks:s=!1}={}){this.locale=ye(t),this.parser=new Et(this.locale,{wikilinks:s}),this.messageStore=new $i,r&&this.load(r,this.locale),this.finalFallback=n,this.wikilinks=s}load(t,n){return this.messageStore.load(t,n||this.locale)}i18n(t,...n){return this.parser.parse(this.getMessage(t),n)}setLocale(t){this.locale=ye(t),this.parser=new Et(this.locale,{wikilinks:this.wikilinks})}getFallbackLocales(){return[...At[this.locale]||[],this.finalFallback]}getMessage(t){let n=this.locale,r=0;const s=this.getFallbackLocales(this.locale);for(;n;){const u=n.split("-");let o=u.length;do{const l=u.slice(0,o).join("-"),v=this.messageStore.getMessage(t,l);if(typeof v=="string")return v;o--}while(o);n=s[r],r++}return t}registerParserPlugin(t,n){Ft.prototype[t]=n}}const yt={"@metadata":{authors:["Mason Payne"],"last-updated":"2024-01-08",locale:"en"},"sa-login":"Login","sa-username":"Email","sa-password":"Password","sa-use-password":"Use Password","sa-code":"Code","sa-signup":"Sign up","sa-signup-complete":"Sign up complete","sa-back":"Back","sa-error-creating-user":"Error creating user.","sa-remember":"Remember me","sa-forgot":"Forgot your password?","sa-register":"Register","sa-error.login":"Invalid email or password","sa-error.register":"Invalid email or password","sa-error.unknown":"Unknown error","sa-account-settings":"Account Settings","sa-webauthn-security-keys":"Your passkeys","sa-add-security-key":"Add passkey","webauthn-not-enrolled":"WebAuthn not enrolled","sa-webauthn-key-name":"Key Name","sa-cancel":"Cancel","sa-no-security-keys":"No passkeys","sa-webauthn-key-actions":"Actions","sa-remove":"Remove","not-authenticated":"Not authenticated","error-otp-registration":"Error registering OTP","sa-confirm-delete-key":"Are you sure you want to delete this key?","sa-add-mfa":"Manage MFA","sa-add-email":"Add Email","sa-email":"Email","sa-phone":"Phone","sa-add-sms":"Add SMS","sa-mfa":"MFA Registrations","error-otp-list":"Error listing OTPs","sa-type":"Type","sa-mfa-destination":"Destination","sa-mfa-validated":"Validated","sa-validate":"Validate","sa-mfa-action":"Action","sa-no":"No","sa-yes":"Yes","error-otp-remove":"Error removing MFA Registration","error-webauthn-remove":"Error removing WebAuthn Registration","sa-register-mfa":"Register MFA","sa-otp-required":"A one-time code is required.","sa-otp-choose":"Choose how to receive your code:","sa-otp-no-registrations":"No MFA methods registered.","sa-otp-send-code":"Send Code","sa-otp-verify":"Verify Code","sa-unknown-challenge":"Unknown challenge type.","sa-invite-otp":"Verification Code","sa-invite-otp-hint":"Enter the code from your invite email","sa-invite-password":"Choose a Password","sa-invite-password-hint":"Create a secure password for your account","sa-invite-submit":"Complete Registration","sa-invite-success":"Registration complete! Redirecting to login...","sa-invite-error-otp":"Invalid or expired verification code","sa-invite-error-expired":"This invite has expired. Please contact your administrator.","sa-invite-error-generic":"Unable to complete registration. Please try again.","sa-invite-completing":"Completing registration...","sa-forgot-password":"Forgot your password?","sa-reset-password":"Reset Password","sa-reset-email-sent":"If an account exists with that email, a reset code has been sent.","sa-new-password":"New Password","sa-reset-code":"Reset Code","sa-reset-submit":"Reset Password","sa-reset-success":"Password reset successfully! You can now log in.","sa-reset-error":"Unable to reset password. Please try again.","sa-reset-error-code":"Invalid or expired reset code","sa-or":"Or","sa-social-google":"Continue with Google","sa-social-github":"Continue with GitHub","sa-social-apple":"Continue with Apple","sa-social-oidc":"Continue with SSO","sa-loading":"Loading...","sa-social-error":"Error starting social login","sa-signup-mfa-title":"Verify Your Email","sa-signup-verify-prompt":"A verification code has been sent to your email. Enter it below to activate multi-factor authentication.","sa-signup-verify-error":"Invalid or expired verification code.","sa-signup-webauthn-prompt":"Your account is secure! Optionally, add a passkey for faster and easier logins.","sa-signup-webauthn-setup":"Set Up Passkey","sa-signup-webauthn-done":"Skip for now","sa-signup-webauthn-error":"Error setting up passkey. Please try again from your account settings."},ki={en:yt,fr:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"fr"},"sa-login":"Connexion","sa-username":"Adresse e-mail","sa-password":"Mot de passe","sa-use-password":"Utiliser le mot de passe","sa-code":"code à deux facteurs","sa-remember":"Souviens-toi de moi","sa-forgot":"Mot de passe oublié?","sa-register":"S'inscrire","sa-error.login":"E-mail ou mot de passe invalide","sa-error.register":"E-mail ou mot de passe invalide","sa-error.unknown":"Erreur inconnue","sa-otp-required":"Un code à usage unique est requis.","sa-otp-choose":"Choisissez comment recevoir votre code :","sa-otp-no-registrations":"Aucune méthode MFA enregistrée.","sa-otp-send-code":"Envoyer le code","sa-otp-verify":"Vérifier le code","sa-unknown-challenge":"Type de défi inconnu.","sa-complete-invite":"Complétez votre invitation","sa-invite-otp":"Code de vérification","sa-invite-otp-hint":"Entrez le code de votre email d'invitation","sa-invite-password":"Choisissez un mot de passe","sa-invite-password-hint":"Créez un mot de passe sécurisé pour votre compte","sa-invite-submit":"Terminer l'inscription","sa-invite-success":"Inscription terminée ! Redirection vers la connexion...","sa-invite-error-otp":"Code de vérification invalide ou expiré","sa-invite-error-expired":"Cette invitation a expiré. Veuillez contacter votre administrateur.","sa-invite-error-generic":"Impossible de terminer l'inscription. Veuillez réessayer.","sa-invite-completing":"Finalisation de l'inscription...","sa-forgot-password":"Mot de passe oublié ?","sa-reset-password":"Réinitialiser le mot de passe","sa-reset-email-sent":"Si un compte existe avec cet e-mail, un code de réinitialisation a été envoyé.","sa-new-password":"Nouveau mot de passe","sa-reset-code":"Code de réinitialisation","sa-reset-submit":"Réinitialiser le mot de passe","sa-reset-success":"Mot de passe réinitialisé avec succès ! Vous pouvez maintenant vous connecter.","sa-reset-error":"Impossible de réinitialiser le mot de passe. Veuillez réessayer.","sa-reset-error-code":"Code de réinitialisation invalide ou expiré","sa-or":"Ou","sa-social-google":"Continuer avec Google","sa-social-github":"Continuer avec GitHub","sa-social-apple":"Continuer avec Apple","sa-social-oidc":"Continuer avec SSO","sa-loading":"Chargement...","sa-social-error":"Erreur lors de la connexion sociale","sa-signup-mfa-title":"Vérifiez votre e-mail","sa-signup-verify-prompt":"Un code de vérification a été envoyé à votre e-mail. Entrez-le ci-dessous pour activer l'authentification multi-facteurs.","sa-signup-verify-error":"Code de vérification invalide ou expiré.","sa-signup-webauthn-prompt":"Votre compte est sécurisé ! Ajoutez optionnellement une clé d'accès pour des connexions plus rapides.","sa-signup-webauthn-setup":"Configurer la clé d'accès","sa-signup-webauthn-done":"Ignorer pour l'instant","sa-signup-webauthn-error":"Erreur lors de la configuration de la clé d'accès. Veuillez réessayer depuis les paramètres de votre compte."},es:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"es"},"sa-login":"Acceso","sa-username":"Correo electrónico","sa-password":"Clave","sa-use-password":"Usar contraseña","sa-code":"Código","sa-remember":"Acuérdate de mí","sa-forgot":"¿Olvidaste tu contraseña?","sa-register":"Registro","sa-error.login":"Correo electrónico o contraseña inválidos","sa-error.register":"Correo electrónico o contraseña inválidos","sa-error.unknown":"Error desconocido","sa-otp-required":"Se requiere un código de un solo uso.","sa-otp-choose":"Elige cómo recibir tu código:","sa-otp-no-registrations":"No hay métodos MFA registrados.","sa-unknown-challenge":"Tipo de desafío desconocido.","sa-complete-invite":"Completa tu invitación","sa-invite-otp":"Código de verificación","sa-invite-otp-hint":"Ingresa el código de tu correo de invitación","sa-invite-password":"Elige una contraseña","sa-invite-password-hint":"Crea una contraseña segura para tu cuenta","sa-invite-submit":"Completar registro","sa-invite-success":"¡Registro completo! Redirigiendo al inicio de sesión...","sa-invite-error-otp":"Código de verificación inválido o expirado","sa-invite-error-expired":"Esta invitación ha expirado. Por favor contacta a tu administrador.","sa-invite-error-generic":"No se pudo completar el registro. Por favor intenta de nuevo.","sa-invite-completing":"Completando registro...","sa-forgot-password":"¿Olvidaste tu contraseña?","sa-reset-password":"Restablecer contraseña","sa-reset-email-sent":"Si existe una cuenta con ese correo, se ha enviado un código de restablecimiento.","sa-new-password":"Nueva contraseña","sa-reset-code":"Código de restablecimiento","sa-reset-submit":"Restablecer contraseña","sa-reset-success":"¡Contraseña restablecida con éxito! Ya puedes iniciar sesión.","sa-reset-error":"No se pudo restablecer la contraseña. Por favor intenta de nuevo.","sa-reset-error-code":"Código de restablecimiento inválido o expirado","sa-or":"O","sa-social-google":"Continuar con Google","sa-social-github":"Continuar con GitHub","sa-social-apple":"Continuar con Apple","sa-social-oidc":"Continuar con SSO","sa-loading":"Cargando...","sa-social-error":"Error al iniciar sesión social","sa-signup-mfa-title":"Verifica tu correo electrónico","sa-signup-verify-prompt":"Se ha enviado un código de verificación a tu correo. Ingrésalo para activar la autenticación multifactor.","sa-signup-verify-error":"Código de verificación inválido o expirado.","sa-signup-webauthn-prompt":"¡Tu cuenta está protegida! Opcionalmente, agrega una clave de acceso para inicios de sesión más rápidos.","sa-signup-webauthn-setup":"Configurar clave de acceso","sa-signup-webauthn-done":"Omitir por ahora","sa-signup-webauthn-error":"Error al configurar la clave de acceso. Intenta de nuevo desde la configuración de tu cuenta."},ja:{"@metadata":{authors:["Mason Payne"],"last-updated":"2022-05-28",locale:"ja"},"sa-login":"ログイン","sa-username":"メールアドレス","sa-password":"パスワード","sa-use-password":"パスワードを使用する","sa-code":"コード","sa-remember":"私を覚えてますか","sa-forgot":"パスワードをお忘れですか?","sa-register":"登録","sa-error.login":"メールアドレスかパスワードが無効","sa-error.register":"メールアドレスかパスワードが無効","sa-error.unknown":"未知のエラー","sa-otp-required":"ワンタイムコードが必要です。","sa-otp-choose":"コードの受け取り方法を選択してください:","sa-otp-no-registrations":"MFA方法が登録されていません。","sa-otp-send-code":"コードを送信","sa-otp-verify":"コードを確認","sa-unknown-challenge":"不明なチャレンジタイプです。","sa-complete-invite":"招待を完了する","sa-invite-otp":"確認コード","sa-invite-otp-hint":"招待メールのコードを入力してください","sa-invite-password":"パスワードを選択","sa-invite-password-hint":"アカウント用の安全なパスワードを作成してください","sa-invite-submit":"登録を完了","sa-invite-success":"登録完了!ログインページへリダイレクト中...","sa-invite-error-otp":"無効または期限切れの確認コード","sa-invite-error-expired":"この招待は期限切れです。管理者にお問い合わせください。","sa-invite-error-generic":"登録を完了できませんでした。もう一度お試しください。","sa-invite-completing":"登録を完了しています...","sa-forgot-password":"パスワードをお忘れですか?","sa-reset-password":"パスワードをリセット","sa-reset-email-sent":"そのメールアドレスのアカウントが存在する場合、リセットコードが送信されました。","sa-new-password":"新しいパスワード","sa-reset-code":"リセットコード","sa-reset-submit":"パスワードをリセット","sa-reset-success":"パスワードが正常にリセットされました!ログインできます。","sa-reset-error":"パスワードをリセットできませんでした。もう一度お試しください。","sa-reset-error-code":"無効または期限切れのリセットコード","sa-or":"または","sa-social-google":"Googleで続ける","sa-social-github":"GitHubで続ける","sa-social-apple":"Appleで続ける","sa-social-oidc":"SSOで続ける","sa-loading":"読み込み中...","sa-social-error":"ソーシャルログイン開始エラー","sa-signup-mfa-title":"メールを確認してください","sa-signup-verify-prompt":"確認コードがメールに送信されました。多要素認証を有効にするために入力してください。","sa-signup-verify-error":"無効または期限切れの確認コードです。","sa-signup-webauthn-prompt":"アカウントが保護されました!パスキーを追加してより速く簡単にログインできます(任意)。","sa-signup-webauthn-setup":"パスキーを設定","sa-signup-webauthn-done":"今はスキップ","sa-signup-webauthn-error":"パスキーの設定中にエラーが発生しました。アカウント設定から再試行してください。"}};function nt(e){const t=new Bi("en",{messages:yt});return e!=="en"&&(t.load(ki[e],e),t.setLocale(e)),t}function $t(e){const t="==".slice(0,(4-e.length%4)%4),n=e.replace(/-/g,"+").replace(/_/g,"/")+t,r=atob(n),s=new ArrayBuffer(r.length),u=new Uint8Array(s);for(let o=0;o<r.length;o++)u[o]=r.charCodeAt(o);return s}function Bt(e){const t=new Uint8Array(e);let n="";for(const u of t)n+=String.fromCharCode(u);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var S="copy",oe="convert";function $e(e,t,n){if(t===S)return n;if(t===oe)return e(n);if(t instanceof Array)return n.map(r=>$e(e,t[0],r));if(t instanceof Object){const r={};for(const[s,u]of Object.entries(t)){if(u.derive){const o=u.derive(n);o!==void 0&&(n[s]=o)}if(!(s in n)){if(u.required)throw new Error(`Missing key: ${s}`);continue}if(n[s]==null){r[s]=null;continue}r[s]=$e(e,u.schema,n[s])}return r}}function rt(e,t){return{required:!0,schema:e,derive:t}}function T(e){return{required:!0,schema:e}}function U(e){return{required:!1,schema:e}}var kt={type:T(S),id:T(oe),transports:U(S)},xt={appid:U(S),appidExclude:U(S),credProps:U(S)},St={appid:U(S),appidExclude:U(S),credProps:U(S)},xi={publicKey:T({rp:T(S),user:T({id:T(oe),name:T(S),displayName:T(S)}),challenge:T(oe),pubKeyCredParams:T(S),timeout:U(S),excludeCredentials:U([kt]),authenticatorSelection:U(S),attestation:U(S),extensions:U(xt)}),signal:U(S)},Si={type:T(S),id:T(S),rawId:T(oe),authenticatorAttachment:U(S),response:T({clientDataJSON:T(oe),attestationObject:T(oe),transports:rt(S,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:rt(St,e=>e.getClientExtensionResults())},_i={mediation:U(S),publicKey:T({challenge:T(oe),timeout:U(S),rpId:U(S),allowCredentials:U([kt]),userVerification:U(S),extensions:U(xt)}),signal:U(S)},Ti={type:T(S),id:T(S),rawId:T(oe),authenticatorAttachment:U(S),response:T({clientDataJSON:T(oe),authenticatorData:T(oe),signature:T(oe),userHandle:T(oe)}),clientExtensionResults:rt(St,e=>e.getClientExtensionResults())};function _t(e){return $e($t,xi,e)}function Oi(e){return $e(Bt,Si,e)}function Ii(e){return $e($t,_i,e)}function Pi(e){return $e(Bt,Ti,e)}async function Tt(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>Oi(t),t}async function zi(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>Pi(t),t}function st(e){this.message=e}st.prototype=new Error,st.prototype.name="InvalidCharacterError";var Ot=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new st("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,s=0,u=0,o="";r=t.charAt(u++);~r&&(n=s%4?64*n+r:r,s++%4)?o+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return o};function Ni(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(Ot(n).replace(/(.)/g,function(r,s){var u=s.charCodeAt(0).toString(16).toUpperCase();return u.length<2&&(u="0"+u),"%"+u}))}(t)}catch{return Ot(t)}}function Ue(e){this.message=e}function Mi(e,t){if(typeof e!="string")throw new Ue("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(Ni(e.split(".")[n]))}catch(r){throw new Ue("Invalid token specified: "+r.message)}}Ue.prototype=new Error,Ue.prototype.name="InvalidTokenError";const Je="spartan-token";function It(){const e=localStorage.getItem(Je);let t=null;if(e)try{if(t=Mi(e),t.exp>Ri())return t;localStorage.removeItem(Je)}catch(n){console.error("Error decoding token",n),localStorage.removeItem(Je)}return null}function ji(){const e=localStorage.getItem(Je);return e||null}function Ri(){return Math.round(new Date().getTime()/1e3)}var Li=E(`<form class=login-frame><style>.login-frame {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
justify-content: center;
|
|
@@ -33,6 +33,11 @@
|
|
|
33
33
|
border-radius: 10px;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
.login-frame button:disabled {
|
|
37
|
+
opacity: 0.6;
|
|
38
|
+
cursor: not-allowed;
|
|
39
|
+
}
|
|
40
|
+
|
|
36
41
|
.login-frame select {
|
|
37
42
|
background-color: #ffffff;
|
|
38
43
|
border: 1px solid #ccc;
|
|
@@ -104,7 +109,7 @@
|
|
|
104
109
|
opacity: 0.6;
|
|
105
110
|
cursor: not-allowed;
|
|
106
111
|
}
|
|
107
|
-
</style><style></style><h1></h1><input type=text>`),Ri=y("<span class=error-message>"),rt=y("<span>"),Ot=y("<input type=password>"),st=y("<p>"),qi=y("<select>"),Li=y("<option> (<!>)"),Ui=y("<input type=text>"),It=y("<input type=text autocomplete=one-time-code>"),Ji=y("<input type=password autocomplete=new-password>"),Vi=y("<span class=checkbox-wrapper><input type=checkbox><span> "),Ki=y("<button type=submit>"),Gi=y("<button type=button>"),Ve=y("<a class=centered-text href=#>"),Hi=y("<div class=social-divider><span>"),Wi=y("<button type=button class=social-btn>"),Zi=y('<svg width=18 height=18 viewBox="0 0 18 18"xmlns=http://www.w3.org/2000/svg><path d="M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"fill=#4285F4></path><path d="M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18z"fill=#34A853></path><path d="M3.964 10.707c-.18-.54-.282-1.117-.282-1.707s.102-1.167.282-1.707V4.961H.957C.347 6.175 0 7.548 0 9s.348 2.825.957 4.039l3.007-2.332z"fill=#FBBC05></path><path d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.961L3.964 7.293C4.672 5.166 6.656 3.58 9 3.58z"fill=#EA4335>'),Yi=y('<svg width=18 height=18 viewBox="0 0 16 16"xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"fill=currentColor>'),Xi=y('<svg width=18 height=18 viewBox="20 16 16 19"xmlns=http://www.w3.org/2000/svg><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"fill=currentColor fill-rule=nonzero>'),Qi=y('<svg width=18 height=18 viewBox="0 0 24 24"xmlns=http://www.w3.org/2000/svg><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 4a3 3 0 110 6 3 3 0 010-6zm0 14c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08s5.97 1.09 6 3.08c-1.29 1.94-3.5 3.22-6 3.22z"fill=currentColor>');Qe("spartan-login",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",startMode:"password",styles:"",locale:"en",redirect:""},e=>{const[t,n]=F((e.startMode||"password").toLowerCase()),[r,s]=F(""),[u,a]=F(""),[o,A]=F(""),[$,h]=F(""),[_]=F(e.redirect),[ne,ue]=F(!1),[De,N]=F(!1),[re,ee]=F(!1),[ie,R]=F(""),[X,K]=F(""),[de,fe]=F([]),[he,k]=F(""),[G,ge]=F([]),[v,ae]=F(""),[me,ce]=F(!1),[ke,Ie]=F(""),[Pe,Ee]=F(""),D=et(e.locale);let be,we;try{we=e.styles}catch{we=""}console.log(we),He(async()=>{const i=new URLSearchParams(window.location.search);if(i.get("error")){history.replaceState({},"",window.location.pathname);const f=i.get("error_description");h(f||D.i18n("sa-social-error")),Ce(),xe();return}const b=i.get("code");if(b){history.replaceState({},"",window.location.pathname);try{const f=await fetch(`${e.domain}/api/v1/oauth/exchange`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:b})});if(!f.ok)throw new Error(D.i18n("sa-social-error"));const B=await f.json();localStorage.setItem("spartan-token",B.token),be.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:B.token}})),e.redirect!==""&&(window.location.href=e.redirect)}catch(f){h(f.message||D.i18n("sa-social-error"))}return}if(Tt()&&e.redirect!==""&&window.location.pathname!==e.redirect){window.location.href=e.redirect;return}Ce(),xe()});function Ce(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`,{method:"GET",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}}).then(i=>{if(i.ok)return i.json();throw new Error("Network response was not ok.")}).then(i=>{console.log(i),ue(i.SelfSignUpAllowed),ce(i.MFARequired||!1)}).catch(i=>{console.log(i),h(i.message)})}function xe(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`,{method:"GET",mode:"cors",cache:"no-cache"}).then(i=>{if(i.ok)return i.json();throw new Error("Failed to load social providers")}).then(i=>{const g=(i.providers||[]).filter(b=>b.enabled);ge(g)}).catch(()=>{})}function Fe(i){if(v())return;ae(i),h("");const g=window.location.origin+window.location.pathname;fetch(`${e.domain}/api/v1/oauth/${i}/initiate`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,redirectURI:g})}).then(b=>{if(b.ok)return b.json();throw new Error(D.i18n("sa-social-error"))}).then(b=>{window.location.href=b.authURL}).catch(b=>{ae(""),h(b.message)})}function E(i,g){h(""),Ee(g),fetch(`${e.domain}/api/v1/signup/mfa/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,sectorID:e.sector,transactionId:g})}).then(b=>{if(!b.ok)throw new Error(D.i18n("sa-signup-verify-error"))}).then(()=>{n("signup-verify")}).catch(b=>{h(b.message)})}function w(){h(""),fetch(`${e.domain}/api/v1/signup/mfa/verify`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),code:o().toUpperCase().trim(),sectorID:e.sector,transactionId:Pe()})}).then(i=>{if(i.ok)return i.json();throw i.status===400?new Error(D.i18n("sa-signup-verify-error")):new Error(D.i18n("sa-signup-verify-error"))}).then(i=>{Ie(i.token),localStorage.setItem("spartan-token",i.token),be.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:i.token}})),A(""),n("signup-webauthn")}).catch(i=>{h(i.message)})}async function T(){h("");try{const i=await fetch(`${e.domain}/api/v1/webauthn/registration/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${ke()}`},body:JSON.stringify({keyName:"Default",sectorID:e.sector})});if(!i.ok)throw new Error(D.i18n("sa-signup-webauthn-error"));const g=await i.json(),b=xt(g.Options),l=await _t(b);let f=JSON.parse(JSON.stringify(l));if(f.transactionID=g.TransactionID,!(await fetch(`${e.domain}/api/v1/webauthn/registration/finish`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${ke()}`},body:JSON.stringify(f)})).ok)throw new Error(D.i18n("sa-signup-webauthn-error"));q()}catch(i){h((i==null?void 0:i.message)||String(i))}}function q(){n(e.startMode),e.redirect!==""&&(window.location.href=e.redirect)}function M(i){i.preventDefault(),console.log("login"),h(""),t()==="password"?L():t()==="webauthn"?j():t()==="otp-pick"?J(he()):t()==="otp"?W():t()==="reset-email"?Z():t()==="reset-code"&&Y()}function O(i){i.preventDefault(),console.log("signup"),h(""),N(!1),fetch(`${e.domain}/api/v1/users`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:u(),sectorID:e.sector})}).then(g=>{if(g.ok)return g.json();throw new Error(D.i18n("sa-error-creating-user"))}).then(g=>{console.log(g),me()?E(r(),g.enrollmentTransactionId||""):(N(!0),n(e.startMode))}).catch(g=>{N(!1),h(g.message),console.log(g)})}function j(){console.log("webauthnLogin"),fetch(`${e.domain}/api/v1/login/webauthn/begin`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),sectorID:e.sector})}).then(i=>{if(i.ok)return i.json();throw i.status===401?(n("password"),h(D.i18n("webauthn-not-enrolled")),new Error(D.i18n("webauthn-not-enrolled"))):new Error(`${i.status} ${i.statusText}: Network response was not ok.`)}).then(i=>{console.log(i);const g=Ti(i.CredentialAssertion);return console.log("Parsed WebAuthn request options:",g),Ii(g).then(b=>{const l=JSON.stringify(b);let f=JSON.parse(l);return f.transactionID=i.TransactionID,f})}).then(i=>fetch(`${e.domain}/api/v1/login/webauthn/finish`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(i)})).then(P).catch(i=>{h(i.message),console.log(i)})}function L(){console.log("password login"),fetch(e.domain+"/api/v1/login/password",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:u(),sectorID:e.sector})}).then(P)}async function P(i){let g=Promise.resolve(i);return g.then(b=>{if(i.ok)return i.json();throw new Error("Network response was not ok.")}).then(b=>{if(console.log(b),localStorage.setItem("spartan-txid",b.transactionID),!b.token){if(b.challengeType==="email_enrollment"){E(r(),b.transactionID||"");return}b.challengeType.indexOf("otp")!==-1?H():b.challengeType.indexOf("webauthn")!==-1?(n("webauthn"),h(D.i18n("sa-webauthn-required"))):h(D.i18n("sa-unknown-challenge"));return}localStorage.setItem("spartan-token",b.token);const l=new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:b.token,transactionID:b.transactionID}});be.getRootNode().host.dispatchEvent(l),_()!==""&&(window.location.href=_())}).catch(b=>{b.json().then(l=>{console.log(l.message),h(l.message)}).catch(l=>{console.log(l)}),console.log(b)}),g}function H(){const i=localStorage.getItem("spartan-txid")||"";fetch(e.domain+`/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(i)}§orID=${encodeURIComponent(e.sector)}`,{method:"get",mode:"cors",cache:"no-cache"}).then(g=>{if(g.ok)return g.json();throw new Error(D.i18n("error-otp-list"))}).then(g=>{const b=g.registrations||[];if(b.length===0){h(D.i18n("sa-otp-no-registrations"));return}b.length===1?J(b[0].ID||""):(fe(b),k(b[0].ID||""),n("otp-pick"),h(""))}).catch(g=>{h(g.message),console.log(g)})}function J(i){console.log("begin OTP, registrationID:",i),fetch(e.domain+"/api/v1/login/otp/begin",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),transactionID:localStorage.getItem("spartan-txid"),registrationID:i,sectorID:e.sector})}).then(g=>{if(g.ok)return g.json();throw new Error(`${g.status} ${g.statusText}`)}).then(g=>{console.log(g),g.transactionID&&localStorage.setItem("spartan-txid",g.transactionID),A(""),h(""),n("otp")}).catch(g=>{h(g.message),console.log(g)})}function W(){console.log("OTP login submit"),fetch(e.domain+"/api/v1/login/otp",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:o(),transactionID:localStorage.getItem("spartan-txid"),sectorID:e.sector})}).then(P)}function Z(){console.log("begin password reset"),h(""),ee(!1),fetch(`${e.domain}/api/v1/password/reset/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),sectorID:e.sector})}).then(i=>{if(i.ok)return i.json();throw new Error(D.i18n("sa-reset-error"))}).then(i=>{console.log(i),h(D.i18n("sa-reset-email-sent")),R(""),K(""),n("reset-code")}).catch(i=>{h(i.message),console.log(i)})}function Y(){console.log("complete password reset"),h(""),fetch(`${e.domain}/api/v1/password/reset/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),code:ie().toUpperCase().trim(),newPassword:X(),sectorID:e.sector})}).then(i=>{if(i.ok)return i.json();throw i.status===400?new Error(D.i18n("sa-reset-error-code")):new Error(D.i18n("sa-reset-error"))}).then(i=>{console.log(i),ee(!0),R(""),K(""),a(""),n(e.startMode)}).catch(i=>{h(i.message),console.log(i)})}return(()=>{var i=ji(),g=i.firstChild,b=g.nextSibling,l=b.nextSibling,f=l.nextSibling,B=be;return typeof B=="function"?ht(B,i):be=i,i.addEventListener("submit",p=>{p.preventDefault(),t()==="sign-up"?O(p):t()==="signup-verify"?(p.preventDefault(),w()):M(p)}),d(b,we),d(l,(()=>{var p=m(()=>t()==="reset-email"||t()==="reset-code");return()=>p()?D.i18n("sa-reset-password"):m(()=>t()==="signup-verify"||t()==="signup-webauthn")()?D.i18n("sa-signup-mfa-title"):D.i18n("sa-login")})()),d(i,$&&(()=>{var p=Ri();return d(p,$),p})(),f),d(i,(()=>{var p=m(()=>!!De());return()=>p()&&(()=>{var c=rt();return d(c,()=>D.i18n("sa-signup-complete")),c})()})(),f),d(i,(()=>{var p=m(()=>!!re());return()=>p()&&(()=>{var c=rt();return d(c,()=>D.i18n("sa-reset-success")),c})()})(),f),f.$$input=p=>s(p.currentTarget.value),d(i,(()=>{var p=m(()=>t()!=="sign-up"&&t()!=="signup-verify"&&t()!=="signup-webauthn");return()=>p()&&[m(()=>m(()=>t()==="password")()&&(()=>{var c=Ot();return c.$$input=C=>a(C.currentTarget.value),x(()=>oe(c,"placeholder",D.i18n("sa-password"))),x(()=>c.value=u()),c})()),m(()=>m(()=>t()==="webauthn")()&&rt()),m(()=>m(()=>t()==="otp-pick")()&&[(()=>{var c=st();return d(c,()=>D.i18n("sa-otp-choose")),c})(),(()=>{var c=qi();return c.addEventListener("change",C=>k(C.currentTarget.value)),d(c,()=>de().map(C=>(()=>{var z=Li(),ve=z.firstChild,_e=ve.nextSibling;return _e.nextSibling,d(z,()=>C.DisplayName||C.ID,ve),d(z,()=>C.Type,_e),x(()=>z.value=C.ID),z})())),x(()=>c.value=he()),c})()]),m(()=>m(()=>t()==="otp")()&&(()=>{var c=Ui();return c.$$input=C=>A(C.currentTarget.value),x(()=>oe(c,"placeholder",D.i18n("sa-code"))),x(()=>c.value=o()),c})()),m(()=>m(()=>t()==="reset-code")()&&[(()=>{var c=It();return c.$$input=C=>R(C.currentTarget.value),x(()=>oe(c,"placeholder",D.i18n("sa-reset-code"))),x(()=>c.value=ie()),c})(),(()=>{var c=Ji();return c.$$input=C=>K(C.currentTarget.value),x(()=>oe(c,"placeholder",D.i18n("sa-new-password"))),x(()=>c.value=X()),c})()]),m(()=>m(()=>t()==="password"||t()==="webauthn")()&&(()=>{var c=Vi(),C=c.firstChild,z=C.nextSibling;return z.firstChild,c.$$click=()=>n(t()==="password"?"webauthn":"password"),d(z,()=>D.i18n("sa-use-password"),null),x(()=>C.checked=t()==="password"),c})())]})(),null),d(i,(()=>{var p=m(()=>t()==="sign-up");return()=>p()&&(()=>{var c=Ot();return c.$$input=C=>a(C.currentTarget.value),x(()=>oe(c,"placeholder",D.i18n("sa-password"))),x(()=>c.value=u()),c})()})(),null),d(i,(()=>{var p=m(()=>t()==="signup-verify");return()=>p()&&[(()=>{var c=st();return d(c,()=>D.i18n("sa-signup-verify-prompt")),c})(),(()=>{var c=It();return c.$$input=C=>A(C.currentTarget.value),x(()=>oe(c,"placeholder",D.i18n("sa-code"))),x(()=>c.value=o()),c})()]})(),null),d(i,(()=>{var p=m(()=>t()==="signup-webauthn");return()=>p()&&(()=>{var c=st();return d(c,()=>D.i18n("sa-signup-webauthn-prompt")),c})()})(),null),d(i,(()=>{var p=m(()=>t()!=="signup-webauthn");return()=>p()&&(()=>{var c=Ki();return d(c,(()=>{var C=m(()=>t()==="sign-up");return()=>C()?D.i18n("sa-signup"):m(()=>t()==="otp-pick")()?D.i18n("sa-otp-send-code"):m(()=>t()==="otp")()?D.i18n("sa-otp-verify"):m(()=>t()==="reset-email")()?D.i18n("sa-otp-send-code"):m(()=>t()==="reset-code")()?D.i18n("sa-reset-submit"):m(()=>t()==="signup-verify")()?D.i18n("sa-otp-verify"):D.i18n("sa-login")})()),c})()})(),null),d(i,(()=>{var p=m(()=>t()==="signup-webauthn");return()=>p()&&[(()=>{var c=Gi();return c.$$click=()=>T(),d(c,()=>D.i18n("sa-signup-webauthn-setup")),c})(),(()=>{var c=Ve();return c.$$click=()=>q(),d(c,()=>D.i18n("sa-signup-webauthn-done")),c})()]})(),null),d(i,(()=>{var p=m(()=>t()==="password");return()=>p()&&(()=>{var c=Ve();return c.$$click=()=>{h(""),ee(!1),n("reset-email")},d(c,()=>D.i18n("sa-forgot-password")),c})()})(),null),d(i,(()=>{var p=m(()=>t()==="reset-email"||t()==="reset-code");return()=>p()&&(()=>{var c=Ve();return c.$$click=()=>{h(""),R(""),K(""),n(e.startMode)},d(c,()=>D.i18n("sa-back")),c})()})(),null),d(i,(()=>{var p=m(()=>!!(ne()&&t()!=="reset-email"&&t()!=="reset-code"&&t()!=="signup-verify"&&t()!=="signup-webauthn"));return()=>p()&&(()=>{var c=Ve();return c.$$click=()=>t()==="sign-up"?n(e.startMode):n("sign-up"),d(c,(()=>{var C=m(()=>t()==="sign-up");return()=>C()?D.i18n("sa-back"):D.i18n("sa-signup")})()),c})()})(),null),d(i,(()=>{var p=m(()=>G().length>0&&(t()==="password"||t()==="webauthn"||t()==="sign-up"));return()=>p()&&[(()=>{var c=Hi(),C=c.firstChild;return d(C,()=>D.i18n("sa-or")),c})(),m(()=>G().map(c=>(()=>{var C=Wi();return C.$$click=()=>Fe(c.provider),d(C,(()=>{var z=m(()=>c.provider==="google");return()=>z()&&Zi()})(),null),d(C,(()=>{var z=m(()=>c.provider==="github");return()=>z()&&Yi()})(),null),d(C,(()=>{var z=m(()=>c.provider==="apple");return()=>z()&&Xi()})(),null),d(C,(()=>{var z=m(()=>c.provider==="oidc");return()=>z()&&Qi()})(),null),d(C,(()=>{var z=m(()=>c.provider==="google");return()=>z()?D.i18n("sa-social-google"):m(()=>c.provider==="github")()?D.i18n("sa-social-github"):m(()=>c.provider==="apple")()?D.i18n("sa-social-apple"):D.i18n("sa-social-oidc")})(),null),x(()=>C.disabled=!!v()),C})()))]})(),null),x(p=>{var c=D.i18n("sa-username"),C=t()==="otp"||t()==="otp-pick"||t()==="reset-code"||t()==="signup-verify"||t()==="signup-webauthn";return c!==p.e&&oe(f,"placeholder",p.e=c),C!==p.t&&(f.disabled=p.t=C),p},{e:void 0,t:void 0}),x(()=>f.value=r()),i})()}),Ze(["input","click"]);var ea=y(`<div class=container><style>.container {
|
|
112
|
+
</style><style></style><h1></h1><input type=text>`),qi=E("<span class=error-message>"),ut=E("<span>"),Pt=E("<input type=password>"),it=E("<p>"),Ui=E("<select>"),Ji=E("<option> (<!>)"),Vi=E("<input type=text>"),zt=E("<input type=text autocomplete=one-time-code>"),Ki=E("<input type=password autocomplete=new-password>"),Gi=E("<span class=checkbox-wrapper><input type=checkbox><span> "),Hi=E("<button type=submit>"),Wi=E("<button type=button>"),Ve=E("<a class=centered-text href=#>"),Zi=E("<div class=social-divider><span>"),Yi=E("<button type=button class=social-btn>"),Xi=E('<svg width=18 height=18 viewBox="0 0 18 18"xmlns=http://www.w3.org/2000/svg><path d="M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"fill=#4285F4></path><path d="M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18z"fill=#34A853></path><path d="M3.964 10.707c-.18-.54-.282-1.117-.282-1.707s.102-1.167.282-1.707V4.961H.957C.347 6.175 0 7.548 0 9s.348 2.825.957 4.039l3.007-2.332z"fill=#FBBC05></path><path d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.961L3.964 7.293C4.672 5.166 6.656 3.58 9 3.58z"fill=#EA4335>'),Qi=E('<svg width=18 height=18 viewBox="0 0 16 16"xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"fill=currentColor>'),ea=E('<svg width=18 height=18 viewBox="20 16 16 19"xmlns=http://www.w3.org/2000/svg><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"fill=currentColor fill-rule=nonzero>'),ta=E('<svg width=18 height=18 viewBox="0 0 24 24"xmlns=http://www.w3.org/2000/svg><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 4a3 3 0 110 6 3 3 0 010-6zm0 14c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08s5.97 1.09 6 3.08c-1.29 1.94-3.5 3.22-6 3.22z"fill=currentColor>');tt("spartan-login",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",startMode:"password",styles:"",locale:"en",redirect:""},e=>{const[t,n]=F((e.startMode||"password").toLowerCase()),[r,s]=F(""),[u,o]=F(""),[l,v]=F(""),[B,D]=F(""),[x]=F(e.redirect),[ne,ie]=F(!1),[me,z]=F(!1),[W,Z]=F(!1),[re,K]=F(""),[Q,J]=F(""),[he,be]=F([]),[De,k]=F(""),[Y,Ce]=F([]),[le,ce]=F(""),[b,pe]=F(!1),[Te,de]=F(!1),[Be,Oe]=F(""),[Ie,Fe]=F(""),h=nt(e.locale);let ve,we;try{we=e.styles}catch{we=""}console.log(we),Ze(async()=>{const a=new URLSearchParams(window.location.search);if(a.get("error")){history.replaceState({},"",window.location.pathname);const A=a.get("error_description");D(A||h.i18n("sa-social-error")),fe(),ke();return}const d=a.get("code");if(d){history.replaceState({},"",window.location.pathname);try{const A=await fetch(`${e.domain}/api/v1/oauth/exchange`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:d})});if(!A.ok)throw new Error(h.i18n("sa-social-error"));const q=await A.json();localStorage.setItem("spartan-token",q.token),ve.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:q.token}})),e.redirect!==""&&(window.location.href=e.redirect)}catch(A){D(A.message||h.i18n("sa-social-error"))}return}if(It()&&e.redirect!==""&&window.location.pathname!==e.redirect){window.location.href=e.redirect;return}fe(),ke()});function fe(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`,{method:"GET",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}}).then(a=>{if(a.ok)return a.json();throw new Error("Network response was not ok.")}).then(a=>{console.log(a),ie(a.SelfSignUpAllowed),de(a.MFARequired||!1)}).catch(a=>{console.log(a),D(a.message)})}function ke(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`,{method:"GET",mode:"cors",cache:"no-cache"}).then(a=>{if(a.ok)return a.json();throw new Error("Failed to load social providers")}).then(a=>{const i=(a.providers||[]).filter(d=>d.enabled);Ce(i)}).catch(()=>{})}function Pe(a){if(le())return;ce(a),D("");const i=window.location.origin+window.location.pathname;fetch(`${e.domain}/api/v1/oauth/${a}/initiate`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,redirectURI:i})}).then(d=>{if(d.ok)return d.json();throw new Error(h.i18n("sa-social-error"))}).then(d=>{window.location.href=d.authURL}).catch(d=>{ce(""),D(d.message)})}function w(a,i){return D(""),Fe(i),fetch(`${e.domain}/api/v1/signup/mfa/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a,sectorID:e.sector,transactionId:i})}).then(d=>{if(!d.ok)throw new Error(h.i18n("sa-signup-verify-error"))}).then(()=>{n("signup-verify")}).catch(d=>{D(d.message)})}function C(){return D(""),fetch(`${e.domain}/api/v1/signup/mfa/verify`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),code:l().toUpperCase().trim(),sectorID:e.sector,transactionId:Ie()})}).then(a=>{if(a.ok)return a.json();throw a.status===400?new Error(h.i18n("sa-signup-verify-error")):new Error(h.i18n("sa-signup-verify-error"))}).then(a=>{Oe(a.token),localStorage.setItem("spartan-token",a.token),ve.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:a.token}})),v(""),n("signup-webauthn")}).catch(a=>{D(a.message)})}function _(){b()||(pe(!0),D(""),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${Be()}`},body:JSON.stringify({keyName:"Default",sectorID:e.sector})}).then(a=>{if(!a.ok)throw new Error(h.i18n("sa-signup-webauthn-error"));return a.json()}).then(a=>{const i=_t(a.Options);return Tt(i).then(d=>{let y=JSON.parse(JSON.stringify(d));return y.transactionID=a.TransactionID,y})}).then(a=>fetch(`${e.domain}/api/v1/webauthn/registration/finish`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${Be()}`},body:JSON.stringify(a)})).then(a=>{if(!a.ok)throw new Error(h.i18n("sa-signup-webauthn-error"));N()}).catch(a=>{D((a==null?void 0:a.message)||String(a))}).finally(()=>{pe(!1)}))}function N(){n(e.startMode),e.redirect!==""&&(window.location.href=e.redirect)}function R(){return console.log("login"),D(""),t()==="password"?L():t()==="webauthn"?M():t()==="otp-pick"?V(De()):t()==="otp"?j():t()==="reset-email"?G():t()==="reset-code"?se():Promise.resolve()}function P(){return console.log("signup"),D(""),z(!1),fetch(`${e.domain}/api/v1/users`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:u(),sectorID:e.sector})}).then(a=>{if(a.ok)return a.json();throw new Error(h.i18n("sa-error-creating-user"))}).then(a=>{if(console.log(a),Te())return w(r(),a.enrollmentTransactionId||"");z(!0),n(e.startMode)}).catch(a=>{z(!1),D(a.message),console.log(a)})}function M(){return console.log("webauthnLogin"),fetch(`${e.domain}/api/v1/login/webauthn/begin`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),sectorID:e.sector})}).then(a=>{if(a.ok)return a.json();throw a.status===401?(n("password"),D(h.i18n("webauthn-not-enrolled")),new Error(h.i18n("webauthn-not-enrolled"))):new Error(`${a.status} ${a.statusText}: Network response was not ok.`)}).then(a=>{console.log(a);const i=Ii(a.CredentialAssertion);return console.log("Parsed WebAuthn request options:",i),zi(i).then(d=>{const y=JSON.stringify(d);let A=JSON.parse(y);return A.transactionID=a.TransactionID,A})}).then(a=>fetch(`${e.domain}/api/v1/login/webauthn/finish`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(a)})).then(O).catch(a=>{D(a.message),console.log(a)})}function L(){return console.log("password login"),fetch(e.domain+"/api/v1/login/password",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:u(),sectorID:e.sector})}).then(O)}function O(a){return Promise.resolve(a).then(i=>{if(i.ok)return i.json();throw i}).then(i=>{if(console.log(i),localStorage.setItem("spartan-txid",i.transactionID),!i.token){if(i.challengeType==="email_enrollment")return w(r(),i.transactionID||"");if(i.challengeType.indexOf("otp")!==-1)return X();i.challengeType.indexOf("webauthn")!==-1?(n("webauthn"),D(h.i18n("sa-webauthn-required"))):D(h.i18n("sa-unknown-challenge"));return}localStorage.setItem("spartan-token",i.token);const d=new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:i.token,transactionID:i.transactionID}});ve.getRootNode().host.dispatchEvent(d),x()!==""&&(window.location.href=x())}).catch(i=>i.json().then(d=>{console.log(d.message),D(d.message)}).catch(d=>{console.log(d)}))}function X(){const a=localStorage.getItem("spartan-txid")||"";return fetch(e.domain+`/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(a)}§orID=${encodeURIComponent(e.sector)}`,{method:"get",mode:"cors",cache:"no-cache"}).then(i=>{if(i.ok)return i.json();throw new Error(h.i18n("error-otp-list"))}).then(i=>{const d=i.registrations||[];if(d.length===0){D(h.i18n("sa-otp-no-registrations"));return}if(d.length===1)return V(d[0].ID||"");be(d),k(d[0].ID||""),n("otp-pick"),D("")}).catch(i=>{D(i.message),console.log(i)})}function V(a){return console.log("begin OTP, registrationID:",a),fetch(e.domain+"/api/v1/login/otp/begin",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),transactionID:localStorage.getItem("spartan-txid"),registrationID:a,sectorID:e.sector})}).then(i=>{if(i.ok)return i.json();throw new Error(`${i.status} ${i.statusText}`)}).then(i=>{console.log(i),i.transactionID&&localStorage.setItem("spartan-txid",i.transactionID),v(""),D(""),n("otp")}).catch(i=>{D(i.message),console.log(i)})}function j(){return console.log("OTP login submit"),fetch(e.domain+"/api/v1/login/otp",{method:"post",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:l(),transactionID:localStorage.getItem("spartan-txid"),sectorID:e.sector})}).then(O)}function G(){return console.log("begin password reset"),D(""),Z(!1),fetch(`${e.domain}/api/v1/password/reset/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),sectorID:e.sector})}).then(a=>{if(a.ok)return a.json();throw new Error(h.i18n("sa-reset-error"))}).then(a=>{console.log(a),D(h.i18n("sa-reset-email-sent")),K(""),J(""),n("reset-code")}).catch(a=>{D(a.message),console.log(a)})}function se(){return console.log("complete password reset"),D(""),fetch(`${e.domain}/api/v1/password/reset/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r(),code:re().toUpperCase().trim(),newPassword:Q(),sectorID:e.sector})}).then(a=>{if(a.ok)return a.json();throw a.status===400?new Error(h.i18n("sa-reset-error-code")):new Error(h.i18n("sa-reset-error"))}).then(a=>{console.log(a),Z(!0),K(""),J(""),o(""),n(e.startMode)}).catch(a=>{D(a.message),console.log(a)})}return(()=>{var a=Li(),i=a.firstChild,d=i.nextSibling,y=d.nextSibling,A=y.nextSibling,q=ve;return typeof q=="function"?pt(q,a):ve=a,a.addEventListener("submit",m=>{if(m.preventDefault(),b())return;pe(!0),(t()==="sign-up"?P():t()==="signup-verify"?C():R()).finally(()=>pe(!1))}),f(d,we),f(y,(()=>{var m=p(()=>t()==="reset-email"||t()==="reset-code");return()=>m()?h.i18n("sa-reset-password"):p(()=>t()==="signup-verify"||t()==="signup-webauthn")()?h.i18n("sa-signup-mfa-title"):h.i18n("sa-login")})()),f(a,B&&(()=>{var m=qi();return f(m,B),m})(),A),f(a,(()=>{var m=p(()=>!!me());return()=>m()&&(()=>{var c=ut();return f(c,()=>h.i18n("sa-signup-complete")),c})()})(),A),f(a,(()=>{var m=p(()=>!!W());return()=>m()&&(()=>{var c=ut();return f(c,()=>h.i18n("sa-reset-success")),c})()})(),A),A.$$input=m=>s(m.currentTarget.value),f(a,(()=>{var m=p(()=>t()!=="sign-up"&&t()!=="signup-verify"&&t()!=="signup-webauthn");return()=>m()&&[p(()=>p(()=>t()==="password")()&&(()=>{var c=Pt();return c.$$input=g=>o(g.currentTarget.value),$(()=>ae(c,"placeholder",h.i18n("sa-password"))),$(()=>c.value=u()),c})()),p(()=>p(()=>t()==="webauthn")()&&ut()),p(()=>p(()=>t()==="otp-pick")()&&[(()=>{var c=it();return f(c,()=>h.i18n("sa-otp-choose")),c})(),(()=>{var c=Ui();return c.addEventListener("change",g=>k(g.currentTarget.value)),f(c,()=>he().map(g=>(()=>{var I=Ji(),Ke=I.firstChild,Ge=Ke.nextSibling;return Ge.nextSibling,f(I,()=>g.DisplayName||g.ID,Ke),f(I,()=>g.Type,Ge),$(()=>I.value=g.ID),I})())),$(()=>c.value=De()),c})()]),p(()=>p(()=>t()==="otp")()&&(()=>{var c=Vi();return c.$$input=g=>v(g.currentTarget.value),$(()=>ae(c,"placeholder",h.i18n("sa-code"))),$(()=>c.value=l()),c})()),p(()=>p(()=>t()==="reset-code")()&&[(()=>{var c=zt();return c.$$input=g=>K(g.currentTarget.value),$(()=>ae(c,"placeholder",h.i18n("sa-reset-code"))),$(()=>c.value=re()),c})(),(()=>{var c=Ki();return c.$$input=g=>J(g.currentTarget.value),$(()=>ae(c,"placeholder",h.i18n("sa-new-password"))),$(()=>c.value=Q()),c})()]),p(()=>p(()=>t()==="password"||t()==="webauthn")()&&(()=>{var c=Gi(),g=c.firstChild,I=g.nextSibling;return I.firstChild,c.$$click=()=>n(t()==="password"?"webauthn":"password"),f(I,()=>h.i18n("sa-use-password"),null),$(()=>g.checked=t()==="password"),c})())]})(),null),f(a,(()=>{var m=p(()=>t()==="sign-up");return()=>m()&&(()=>{var c=Pt();return c.$$input=g=>o(g.currentTarget.value),$(()=>ae(c,"placeholder",h.i18n("sa-password"))),$(()=>c.value=u()),c})()})(),null),f(a,(()=>{var m=p(()=>t()==="signup-verify");return()=>m()&&[(()=>{var c=it();return f(c,()=>h.i18n("sa-signup-verify-prompt")),c})(),(()=>{var c=zt();return c.$$input=g=>v(g.currentTarget.value),$(()=>ae(c,"placeholder",h.i18n("sa-code"))),$(()=>c.value=l()),c})()]})(),null),f(a,(()=>{var m=p(()=>t()==="signup-webauthn");return()=>m()&&(()=>{var c=it();return f(c,()=>h.i18n("sa-signup-webauthn-prompt")),c})()})(),null),f(a,(()=>{var m=p(()=>t()!=="signup-webauthn");return()=>m()&&(()=>{var c=Hi();return f(c,(()=>{var g=p(()=>!!b());return()=>g()?h.i18n("sa-loading"):p(()=>t()==="sign-up")()?h.i18n("sa-signup"):p(()=>t()==="otp-pick")()?h.i18n("sa-otp-send-code"):p(()=>t()==="otp")()?h.i18n("sa-otp-verify"):p(()=>t()==="reset-email")()?h.i18n("sa-otp-send-code"):p(()=>t()==="reset-code")()?h.i18n("sa-reset-submit"):p(()=>t()==="signup-verify")()?h.i18n("sa-otp-verify"):h.i18n("sa-login")})()),$(()=>c.disabled=b()),c})()})(),null),f(a,(()=>{var m=p(()=>t()==="signup-webauthn");return()=>m()&&[(()=>{var c=Wi();return c.$$click=()=>_(),f(c,(()=>{var g=p(()=>!!b());return()=>g()?h.i18n("sa-loading"):h.i18n("sa-signup-webauthn-setup")})()),$(()=>c.disabled=b()),c})(),(()=>{var c=Ve();return c.$$click=()=>N(),f(c,()=>h.i18n("sa-signup-webauthn-done")),c})()]})(),null),f(a,(()=>{var m=p(()=>t()==="password");return()=>m()&&(()=>{var c=Ve();return c.$$click=()=>{D(""),Z(!1),n("reset-email")},f(c,()=>h.i18n("sa-forgot-password")),c})()})(),null),f(a,(()=>{var m=p(()=>t()==="reset-email"||t()==="reset-code");return()=>m()&&(()=>{var c=Ve();return c.$$click=()=>{D(""),K(""),J(""),n(e.startMode)},f(c,()=>h.i18n("sa-back")),c})()})(),null),f(a,(()=>{var m=p(()=>!!(ne()&&t()!=="reset-email"&&t()!=="reset-code"&&t()!=="signup-verify"&&t()!=="signup-webauthn"));return()=>m()&&(()=>{var c=Ve();return c.$$click=()=>t()==="sign-up"?n(e.startMode):n("sign-up"),f(c,(()=>{var g=p(()=>t()==="sign-up");return()=>g()?h.i18n("sa-back"):h.i18n("sa-signup")})()),c})()})(),null),f(a,(()=>{var m=p(()=>Y().length>0&&(t()==="password"||t()==="webauthn"||t()==="sign-up"));return()=>m()&&[(()=>{var c=Zi(),g=c.firstChild;return f(g,()=>h.i18n("sa-or")),c})(),p(()=>Y().map(c=>(()=>{var g=Yi();return g.$$click=()=>Pe(c.provider),f(g,(()=>{var I=p(()=>c.provider==="google");return()=>I()&&Xi()})(),null),f(g,(()=>{var I=p(()=>c.provider==="github");return()=>I()&&Qi()})(),null),f(g,(()=>{var I=p(()=>c.provider==="apple");return()=>I()&&ea()})(),null),f(g,(()=>{var I=p(()=>c.provider==="oidc");return()=>I()&&ta()})(),null),f(g,(()=>{var I=p(()=>c.provider==="google");return()=>I()?h.i18n("sa-social-google"):p(()=>c.provider==="github")()?h.i18n("sa-social-github"):p(()=>c.provider==="apple")()?h.i18n("sa-social-apple"):h.i18n("sa-social-oidc")})(),null),$(()=>g.disabled=!!le()),g})()))]})(),null),$(m=>{var c=h.i18n("sa-username"),g=t()==="otp"||t()==="otp-pick"||t()==="reset-code"||t()==="signup-verify"||t()==="signup-webauthn";return c!==m.e&&ae(A,"placeholder",m.e=c),g!==m.t&&(A.disabled=m.t=g),m},{e:void 0,t:void 0}),$(()=>A.value=r()),a})()}),Xe(["input","click"]);var na=E(`<div class=container><style>.container {
|
|
108
113
|
background-color: #ffffff;
|
|
109
114
|
border-radius: 10px;
|
|
110
115
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
@@ -172,6 +177,11 @@
|
|
|
172
177
|
cursor: pointer;
|
|
173
178
|
}
|
|
174
179
|
|
|
180
|
+
.btn:disabled {
|
|
181
|
+
opacity: 0.6;
|
|
182
|
+
cursor: not-allowed;
|
|
183
|
+
}
|
|
184
|
+
|
|
175
185
|
.btn.add {
|
|
176
186
|
background-color: #007bff;
|
|
177
187
|
color: #ffffff;
|
|
@@ -277,7 +287,7 @@
|
|
|
277
287
|
.modal-content .btn.verify:hover {
|
|
278
288
|
background-color: #0056b3;
|
|
279
289
|
}
|
|
280
|
-
</style><style></style><h1 class=header>`),
|
|
290
|
+
</style><style></style><h1 class=header>`),Nt=E("<span class=error-message>"),ra=E("<div class=section><h2></h2><div class=security-keys>"),sa=E('<div class=key-item><span></span><button class="btn remove">'),Mt=E("<span>"),ua=E("<div class=section><div class=security-keys>"),ia=E('<button class="btn add">+ '),aa=E('<div class=add-key-form><div class=add-key-item><label for=keyName style=display:none;></label><input id=keyName type=text><button class="btn remove"></button><button class="btn add">'),oa=E("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"),la=E('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'),ca=E('<span> <button class="btn validate">'),da=E('<div class=section><div class=mfa-manage><button class="btn add">+ '),fa=E('<div class=section><h2></h2><div class=mfa-manage><div class=mfa-item><label for=email></label><input id=email type=text><button class="btn add"></button></div><div class=mfa-item><label for=phone></label><input id=phone type=text><button class="btn add"></button></div><div class=mfa-item><button class="btn remove">'),ha=E('<div class=modal id=mfaModal><div class=modal-content><span class=close id=closeModal>×</span><h2>MFA Verification</h2><p>Please enter the verification code sent to your email or phone:</p><input type=text id=mfaCode placeholder="Enter verification code"><button class="btn verify"id=verifyMfa>Verify');tt("spartan-account-settings",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",styles:"",locale:"en",showWebAuthn:!0,redirect:"/",redirectOnUnauthenticated:!0},e=>{F(""),F("");const[t,n]=F(""),[r,s]=F(""),[u,o]=F(""),[l]=F(e.showWebAuthn),[v,B]=F(!1),[D,x]=F(!1),[ne,ie]=F(!1),[me,z]=F(!1),[W,Z]=F(!1),[re,K]=F([]),[Q,J]=F([]),[he,be]=F(""),[De,k]=F(""),[Y,Ce]=F(""),[le,ce]=F(""),b=nt(e.locale);let pe;try{pe=e.styles}catch{pe=""}Ze(async()=>{if(It())x(!0),s("");else{if(e.redirectOnUnauthenticated){window.location.href=e.redirect;return}x(!1),s(b.i18n("not-authenticated"))}Te().then(C=>{console.log(C)}),await Fe(),fe().then(C=>{J(C.registrations)})});async function Te(){return await(await fetch(`${e.domain}/api/v1/users/self`,de("get"))).json()}function de(w="get"){return{method:w,mode:"cors",cache:"no-cache",headers:{"Content-Type":"application",Authorization:`bearer ${ji()}`}}}function Be(){if(W())return;Z(!0);let w=de("post");w.body=JSON.stringify({keyName:t(),sectorID:e.sector}),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,w).then(C=>{if(C.status===200)return C.json();throw C}).then(C=>(console.log(C),Oe(C))).catch(C=>{C.json?C.json().then(_=>{s(_.message)}):s(C)}).finally(()=>{Z(!1)})}async function Oe(w){try{const C=_t(w.Options);console.log("Parsed WebAuthn creation options:",C);const _=await Tt(C),N=JSON.stringify(_);let R=JSON.parse(N);R.transactionID=w.TransactionID;let P=de("post");P.body=JSON.stringify(R);const M=await fetch(`${e.domain}/api/v1/webauthn/registration/finish`,P);if(M.status!==200){const L=await M.json();s(L.message);return}B(!1),n(""),Fe()}catch(C){console.error("WebAuthn registration error:",C),s((C==null?void 0:C.message)||String(C))}}async function Ie(w){let C=de("delete");C.body=JSON.stringify({ID:w});try{if((await fetch(`${e.domain}/api/v1/webauthn/${w}`,C)).status!==200){s(b.i18n("error-webauthn-remove"));return}Fe()}catch(_){console.error(_),s(b.i18n("error-webauthn-remove"));return}}async function Fe(){let w=de("get");try{const _=await(await fetch(`${e.domain}/api/v1/webauthn/registration/list`,w)).json();K(_.registrations||[])}catch(C){console.error(C),K([])}}function h(w,C){W()||(Z(!0),ve(w,C).then(_=>{if(_)return fe().then(N=>{J(N.registrations),be(_.transactionID),z(!0)})}).finally(()=>{Z(!1)}))}function ve(w,C){let _=de("post");return _.body=JSON.stringify({destination:w,OTPType:Pe(C),sectorID:e.sector}),fetch(`${e.domain}/api/v1/otp/begin`,_).then(N=>{if(N.status!==200){s(b.i18n("error-otp-verification"));return}return N.json()}).catch(N=>{console.error(N),s(b.i18n("error-otp-registration"))})}function we(w,C){if(W())return;Z(!0);let _=de("post");_.body=JSON.stringify({transactionID:w,password:C}),fetch(`${e.domain}/api/v1/otp/finish`,_).then(N=>{if(N.status!==200){o(b.i18n("error-otp-verification"));return}return z(!1),k(""),ie(!1),ce(""),Ce(""),fe().then(R=>{J(R.registrations)}),N.json()}).catch(N=>{console.error(N),o(b.i18n("error-otp-registration"))}).finally(()=>{Z(!1)})}async function fe(){let w=de("get");try{return await(await fetch(`${e.domain}/api/v1/otp/list`,w)).json()}catch(C){console.error(C),s(b.i18n("error-otp-list"));return}}async function ke(w){let C=de("delete");C.body=JSON.stringify({ID:w});try{if((await fetch(`${e.domain}/api/v1/otp/${w}`,C)).status!==200){s(b.i18n("error-otp-remove"));return}fe().then(N=>{J(N.registrations)})}catch(_){console.error(_),s(b.i18n("error-otp-remove"));return}}function Pe(w){return w==="EMAIL"?2:1}return(()=>{var w=na(),C=w.firstChild,_=C.nextSibling,N=_.nextSibling;return f(_,pe),f(N,()=>b.i18n("sa-account-settings")),f(w,r&&(()=>{var R=Nt();return f(R,r),R})(),null),f(w,(()=>{var R=p(()=>!!(l()&&re().length));return()=>R()&&(()=>{var P=ra(),M=P.firstChild,L=M.nextSibling;return f(M,()=>b.i18n("sa-webauthn-security-keys")),f(L,()=>re().map(O=>(()=>{var X=sa(),V=X.firstChild,j=V.nextSibling;return f(V,()=>O.keyName),j.$$click=()=>{confirm(b.i18n("sa-confirm-delete-key"))&&Ie(O.keyName)},f(j,()=>b.i18n("sa-remove")),X})()),null),f(L,(()=>{var O=p(()=>re().length<=0);return()=>O()&&(()=>{var X=Mt();return f(X,()=>b.i18n("sa-no-security-keys")),X})()})(),null),P})()})(),null),f(w,(()=>{var R=p(()=>!!l());return()=>R()&&(()=>{var P=ua(),M=P.firstChild;return f(M,(()=>{var L=p(()=>!v());return()=>L()&&(()=>{var O=ia();return O.firstChild,O.$$click=()=>B(!0),f(O,()=>b.i18n("sa-add-security-key"),null),O})()})(),null),f(M,(()=>{var L=p(()=>!!v());return()=>L()&&(()=>{var O=aa(),X=O.firstChild,V=X.firstChild,j=V.nextSibling,G=j.nextSibling,se=G.nextSibling;return f(V,()=>b.i18n("sa-webauthn-key-name")),j.$$input=a=>n(a.currentTarget.value),G.$$click=()=>B(!1),f(G,()=>b.i18n("sa-cancel")),se.$$click=()=>t()!==""&&Be(),f(se,()=>b.i18n("sa-register")),$(a=>{var i=b.i18n("sa-webauthn-key-name"),d=t()===""||W();return i!==a.e&&ae(j,"placeholder",a.e=i),d!==a.t&&(se.disabled=a.t=d),a},{e:void 0,t:void 0}),$(()=>j.value=t()),O})()})(),null),P})()})(),null),f(w,(()=>{var R=p(()=>Q().length>0);return()=>R()&&(()=>{var P=oa(),M=P.firstChild,L=M.nextSibling,O=L.firstChild,X=O.firstChild,V=X.firstChild,j=V.nextSibling,G=j.nextSibling,se=O.nextSibling;return f(M,()=>b.i18n("sa-mfa")),f(V,()=>b.i18n("sa-mfa-destination")),f(j,()=>b.i18n("sa-mfa-validated")),f(G,()=>b.i18n("sa-mfa-action")),f(se,()=>Q().map(a=>(()=>{var i=la(),d=i.firstChild,y=d.nextSibling,A=y.nextSibling,q=A.firstChild;return f(d,()=>a.DisplayName),f(y,(()=>{var m=p(()=>!!a.Validated);return()=>m()?(()=>{var c=Mt();return f(c,()=>b.i18n("sa-yes")),c})():(()=>{var c=ca(),g=c.firstChild,I=g.nextSibling;return f(c,()=>b.i18n("sa-no"),g),I.$$click=()=>{h(a.DisplayName,a.Type==="email"?"EMAIL":"SMS")},f(I,()=>b.i18n("sa-validate")),$(()=>I.disabled=W()),c})()})()),q.$$click=()=>{confirm(b.i18n("sa-confirm-delete-key"))&&ke(a.ID)},f(q,()=>b.i18n("sa-remove")),$(()=>ae(d,"title",a.DisplayName)),i})())),P})()})(),null),f(w,(()=>{var R=p(()=>!ne());return()=>R()&&(()=>{var P=da(),M=P.firstChild,L=M.firstChild;return L.firstChild,L.$$click=()=>ie(!0),f(L,()=>b.i18n("sa-register-mfa"),null),P})()})(),null),f(w,(()=>{var R=p(()=>!!ne());return()=>R()&&(()=>{var P=fa(),M=P.firstChild,L=M.nextSibling,O=L.firstChild,X=O.firstChild,V=X.nextSibling,j=V.nextSibling,G=O.nextSibling,se=G.firstChild,a=se.nextSibling,i=a.nextSibling,d=G.nextSibling,y=d.firstChild;return f(M,()=>b.i18n("sa-add-mfa")),f(X,()=>b.i18n("sa-email")),V.$$input=A=>Ce(A.currentTarget.value),j.$$click=()=>h(Y(),"EMAIL"),f(j,()=>b.i18n("sa-add-email")),f(se,()=>b.i18n("sa-phone")),a.$$input=A=>ce(A.currentTarget.value),i.$$click=()=>h(le(),"SMS"),f(i,()=>b.i18n("sa-add-sms")),y.$$click=()=>ie(!1),f(y,()=>b.i18n("sa-cancel")),$(A=>{var q=b.i18n("sa-email"),m=W(),c=b.i18n("sa-phone"),g=W();return q!==A.e&&ae(V,"placeholder",A.e=q),m!==A.t&&(j.disabled=A.t=m),c!==A.a&&ae(a,"placeholder",A.a=c),g!==A.o&&(i.disabled=A.o=g),A},{e:void 0,t:void 0,a:void 0,o:void 0}),$(()=>V.value=Y()),$(()=>a.value=le()),P})()})(),null),f(w,(()=>{var R=p(()=>!!me());return()=>R()&&(()=>{var P=ha(),M=P.firstChild,L=M.firstChild,O=L.nextSibling,X=O.nextSibling,V=X.nextSibling,j=V.nextSibling;return P.$$click=()=>z(!1),M.$$click=G=>G.stopPropagation(),L.$$click=()=>z(!1),f(M,(()=>{var G=p(()=>!!u());return()=>G()&&(()=>{var se=Nt();return f(se,u),se})()})(),X),V.$$input=G=>k(G.currentTarget.value),j.$$click=()=>we(he(),De()),$(()=>j.disabled=W()),$(()=>V.value=De()),P})()})(),null),w})()}),Xe(["click","input"]);var Da=E(`<form class=invite-frame><style>.invite-frame {
|
|
281
291
|
display: flex;
|
|
282
292
|
flex-direction: column;
|
|
283
293
|
justify-content: center;
|
|
@@ -337,4 +347,4 @@
|
|
|
337
347
|
margin-bottom: 10px;
|
|
338
348
|
display: block;
|
|
339
349
|
}
|
|
340
|
-
</style><style></style><h1></h1><input type=text autocomplete=one-time-code required><span class=hint></span><input type=password autocomplete=new-password required minlength=8><span class=hint></span><button type=submit>`),
|
|
350
|
+
</style><style></style><h1></h1><input type=text autocomplete=one-time-code required><span class=hint></span><input type=password autocomplete=new-password required minlength=8><span class=hint></span><button type=submit>`),pa=E("<span class=info-message>"),ga=E("<span class=error-message>"),ma=E("<span class=success-message>");tt("spartan-invite",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",sub:"",email:"",styles:"",locale:"en",redirect:""},e=>{const[t,n]=F(""),[r,s]=F(""),[u,o]=F(""),[l,v]=F(""),[B,D]=F(!1),x=nt(e.locale);let ne,ie;try{ie=e.styles}catch{ie=""}Ze(async()=>{e.sub||new URLSearchParams(window.location.search).get("sub")||o("Missing invitation information. Please use the link from your invite email.");const W=new URLSearchParams(window.location.hash.replace("#","")).get("otp");W&&n(W)});async function me(z){var re,K;if(z.preventDefault(),o(""),v(""),D(!0),!t()||t().trim().length===0){o("Please enter your verification code"),D(!1);return}if(!r()||r().length<8){o("Password must be at least 8 characters"),D(!1);return}const W=new URLSearchParams(window.location.search),Z=e.sub||W.get("sub")||"";if(!Z){o("Missing invitation information"),D(!1);return}try{const Q=await fetch(`${e.domain}/api/v1/users/invite/complete`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sub:Z,otp:t().toUpperCase().trim(),password:r(),sectorID:e.sector})});if(Q.ok){const J=await Q.json();v(x.i18n("sa-invite-success"));const he=new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:Z,success:!0}});ne&&ne.getRootNode().host.dispatchEvent(he),setTimeout(()=>{e.redirect&&e.redirect!==""&&(window.location.href=e.redirect)},2e3)}else{const J=await Q.json().catch(()=>({}));Q.status===400||(re=J.message)!=null&&re.includes("invalid OTP")?o(x.i18n("sa-invite-error-otp")):Q.status===504||(K=J.message)!=null&&K.includes("expired")?o(x.i18n("sa-invite-error-expired")):o(J.message||x.i18n("sa-invite-error-generic")),D(!1)}}catch(Q){console.error("Error completing invite:",Q),o(x.i18n("sa-invite-error-generic")),D(!1)}}return(()=>{var z=Da(),W=z.firstChild,Z=W.nextSibling,re=Z.nextSibling,K=re.nextSibling,Q=K.nextSibling,J=Q.nextSibling,he=J.nextSibling,be=he.nextSibling,De=ne;return typeof De=="function"?pt(De,z):ne=z,z.addEventListener("submit",me),f(Z,ie),f(re,()=>x.i18n("sa-complete-invite")),f(z,(()=>{var k=p(()=>!!e.email);return()=>k()&&(()=>{var Y=pa();return f(Y,()=>e.email),Y})()})(),K),f(z,(()=>{var k=p(()=>!!u());return()=>k()&&(()=>{var Y=ga();return f(Y,u),Y})()})(),K),f(z,(()=>{var k=p(()=>!!l());return()=>k()&&(()=>{var Y=ma();return f(Y,l),Y})()})(),K),K.$$input=k=>n(k.currentTarget.value),f(Q,()=>x.i18n("sa-invite-otp-hint")),J.$$input=k=>s(k.currentTarget.value),f(he,()=>x.i18n("sa-invite-password-hint")),f(be,(()=>{var k=p(()=>!!B());return()=>k()?x.i18n("sa-invite-completing"):x.i18n("sa-invite-submit")})()),$(k=>{var Y=x.i18n("sa-invite-otp"),Ce=B()||l()!=="",le=x.i18n("sa-invite-password"),ce=B()||l()!=="",b=B()||l()!=="";return Y!==k.e&&ae(K,"placeholder",k.e=Y),Ce!==k.t&&(K.disabled=k.t=Ce),le!==k.a&&ae(J,"placeholder",k.a=le),ce!==k.o&&(J.disabled=k.o=ce),b!==k.i&&(be.disabled=k.i=b),k},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),$(()=>K.value=t()),$(()=>J.value=r()),z})()}),Xe(["input"])});
|