@masonitestudios/spartanauth-widgets 1.0.2 → 1.1.0
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 +927 -884
- package/dist/sa-widgets.umd.js +21 -4
- package/package.json +7 -3
package/dist/sa-widgets.umd.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
(function(nt){typeof define=="function"&&define.amd?define(nt):nt()})(function(){"use strict";const Ke={equals:(e,t)=>e===t};let gt=Ct;const xe=1,Ge=2,mt={owned:null,cleanups:null,context:null,owner:null};var ae=null;let rt=null,Xt=null,W=null,ne=null,Ee=null,He=0;function Qt(e,t){const n=W,r=ae,s=e.length===0,i=t===void 0?r:t,u=s?mt:{owned:null,cleanups:null,context:i?i.context:null,owner:i},l=s?e:()=>e(()=>We(()=>qe(u)));ae=u,W=null;try{return Le(l,!0)}finally{W=n,ae=r}}function C(e,t){t=t?Object.assign({},Ke,t):Ke;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),vt(n,s));return[bt.bind(n),r]}function y(e,t,n){const r=it(e,t,!1,xe);Re(r)}function en(e,t,n){gt=rn;const r=it(e,t,!1,xe);r.user=!0,Ee?Ee.push(r):Re(r)}function h(e,t,n){n=n?Object.assign({},Ke,n):Ke;const r=it(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Re(r),bt.bind(r)}function We(e){if(W===null)return e();const t=W;W=null;try{return e()}finally{W=t}}function st(e){en(()=>We(e))}function bt(){if(this.sources&&this.state)if(this.state===xe)Re(this);else{const e=ne;ne=null,Le(()=>Ye(this),!1),ne=e}if(W){const e=this.observers?this.observers.length:0;W.sources?(W.sources.push(this),W.sourceSlots.push(e)):(W.sources=[this],W.sourceSlots=[e]),this.observers?(this.observers.push(W),this.observerSlots.push(W.sources.length-1)):(this.observers=[W],this.observerSlots=[W.sources.length-1])}return this.value}function vt(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Le(()=>{for(let s=0;s<e.observers.length;s+=1){const i=e.observers[s],u=rt&&rt.running;u&&rt.disposed.has(i),(u?!i.tState:!i.state)&&(i.pure?ne.push(i):Ee.push(i),i.observers&&wt(i)),u||(i.state=xe)}if(ne.length>1e6)throw ne=[],new Error},!1)),t}function Re(e){if(!e.fn)return;qe(e);const t=He;tn(e,e.value,t)}function tn(e,t,n){let r;const s=ae,i=W;W=ae=e;try{r=e.fn(t)}catch(u){return e.pure&&(e.state=xe,e.owned&&e.owned.forEach(qe),e.owned=null),e.updatedAt=n+1,At(u)}finally{W=i,ae=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?vt(e,r):e.value=r,e.updatedAt=n)}function it(e,t,n,r=xe,s){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:ae,context:ae?ae.context:null,pure:n};return ae===null||ae!==mt&&(ae.owned?ae.owned.push(i):ae.owned=[i]),i}function Ze(e){if(e.state===0)return;if(e.state===Ge)return Ye(e);if(e.suspense&&We(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<He);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===xe)Re(e);else if(e.state===Ge){const r=ne;ne=null,Le(()=>Ye(e,t[0]),!1),ne=r}}function Le(e,t){if(ne)return e();let n=!1;t||(ne=[]),Ee?n=!0:Ee=[],He++;try{const r=e();return nn(n),r}catch(r){n||(Ee=null),ne=null,At(r)}}function nn(e){if(ne&&(Ct(ne),ne=null),e)return;const t=Ee;Ee=null,t.length&&Le(()=>gt(t),!1)}function Ct(e){for(let t=0;t<e.length;t++)Ze(e[t])}function rn(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ze(r)}for(t=0;t<n;t++)Ze(e[t])}function Ye(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===xe?r!==t&&(!r.updatedAt||r.updatedAt<He)&&Ze(r):s===Ge&&Ye(r,t)}}}function wt(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Ge,n.pure?ne.push(n):Ee.push(n),n.observers&&wt(n))}}function qe(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 i=s.pop(),u=n.observerSlots.pop();r<s.length&&(i.sourceSlots[u]=r,s[r]=i,n.observerSlots[r]=u)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)qe(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)qe(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 sn(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function At(e,t=ae){throw sn(e)}function an(e,t,n){let r=n.length,s=t.length,i=r,u=0,l=0,w=t[s-1].nextSibling,$=null;for(;u<s||l<i;){if(t[u]===n[l]){u++,l++;continue}for(;t[s-1]===n[i-1];)s--,i--;if(s===u){const D=i<r?l?n[l-1].nextSibling:n[i-l]:w;for(;l<i;)e.insertBefore(n[l++],D)}else if(i===l)for(;u<s;)(!$||!$.has(t[u]))&&t[u].remove(),u++;else if(t[u]===n[i-1]&&n[l]===t[s-1]){const D=t[--s].nextSibling;e.insertBefore(n[l++],t[u++].nextSibling),e.insertBefore(n[--i],D),t[s]=n[i]}else{if(!$){$=new Map;let B=l;for(;B<i;)$.set(n[B],B++)}const D=$.get(t[u]);if(D!=null)if(l<D&&D<i){let B=u,oe=1,fe;for(;++B<s&&B<i&&!((fe=$.get(t[B]))==null||fe!==D+oe);)oe++;if(oe>D-l){const Fe=t[u];for(;l<D;)e.insertBefore(n[l++],Fe)}else e.replaceChild(n[l++],t[u++])}else u++;else t[u++].remove()}}}const Et="_$DX_DELEGATE";function F(e,t,n,r){let s;const i=()=>{const l=document.createElement("template");return l.innerHTML=e,l.content.firstChild},u=()=>(s||(s=i())).cloneNode(!0);return u.cloneNode=u,u}function at(e,t=window.document){const n=t[Et]||(t[Et]=new Set);for(let r=0,s=e.length;r<s;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,un))}}function ue(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function Ft(e,t,n){return We(()=>e(t,n))}function f(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Xe(e,t,r,n);y(s=>Xe(e,t(),s,n),r)}function un(e){let t=e.target;const n=`$$${e.type}`,r=e.target,s=e.currentTarget,i=w=>Object.defineProperty(e,"target",{configurable:!0,value:w}),u=()=>{const w=t[n];if(w&&!t.disabled){const $=t[`${n}Data`];if($!==void 0?w.call(t,$,e):w.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},l=()=>{for(;u()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const w=e.composedPath();i(w[0]);for(let $=0;$<w.length-2&&(t=w[$],!!u());$++){if(t._$host){t=t._$host,l();break}if(t.parentNode===s)break}}else l();i(r)}function Xe(e,t,n,r,s){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,u=r!==void 0;if(e=u&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(t=t.toString(),t===n))return n;if(u){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Pe(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean")n=Pe(e,n,r);else{if(i==="function")return y(()=>{let l=t();for(;typeof l=="function";)l=l();n=Xe(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],w=n&&Array.isArray(n);if(ut(l,t,n,s))return y(()=>n=Xe(e,l,n,r,!0)),()=>n;if(l.length===0){if(n=Pe(e,n,r),u)return n}else w?n.length===0?yt(e,l,r):an(e,n,l):(n&&Pe(e),yt(e,l));n=l}else if(t.nodeType){if(Array.isArray(n)){if(u)return n=Pe(e,n,r,t);Pe(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function ut(e,t,n,r){let s=!1;for(let i=0,u=t.length;i<u;i++){let l=t[i],w=n&&n[e.length],$;if(!(l==null||l===!0||l===!1))if(($=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))s=ut(e,l,w)||s;else if($==="function")if(r){for(;typeof l=="function";)l=l();s=ut(e,Array.isArray(l)?l:[l],Array.isArray(w)?w:[w])||s}else e.push(l),s=!0;else{const D=String(l);w&&w.nodeType===3&&w.data===D?e.push(w):e.push(document.createTextNode(D))}}return s}function yt(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function Pe(e,t,n,r){if(n===void 0)return e.textContent="";const s=r||document.createTextNode("");if(t.length){let i=!1;for(let u=t.length-1;u>=0;u--){const l=t[u];if(s!==l){const w=l.parentNode===e;!i&&!u?w?e.replaceChild(s,l):e.insertBefore(s,n):w&&l.remove()}else i=!0}}else e.insertBefore(s,n);return[s]}function on(e){return Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=Object.assign({},s),kt(s.value)&&!hn(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 ln(e){return e?Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=kt(s)&&"value"in s?s:{value:s},n[r].attribute||(n[r].attribute=fn(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function cn(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function dn(e,t){const n=on(t);return Object.keys(t).forEach(s=>{const i=n[s],u=e.getAttribute(i.attribute),l=e[s];u!=null&&(i.value=i.parse?$t(u):u),l!=null&&(i.value=Array.isArray(l)?l.slice(0):l),i.reflect&&Bt(e,i.attribute,i.value,!!i.parse),Object.defineProperty(e,s,{get(){return i.value},set(w){const $=i.value;i.value=w,i.reflect&&Bt(this,i.attribute,i.value,!!i.parse);for(let D=0,B=this.__propertyChangedCallbacks.length;D<B;D++)this.__propertyChangedCallbacks[D](s,w,$)},enumerable:!0,configurable:!0})}),n}function $t(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 fn(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function kt(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function hn(e){return Object.prototype.toString.call(e)==="[object Function]"}function pn(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let ot;function Dn(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=dn(this,t);const s=cn(this.props),i=this.Component,u=ot;try{ot=this,this.__initialized=!0,pn(i)?new i(s,{element:this}):i(s,{element:this})}finally{ot=u}}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,i,u){if(this.__initialized&&!this.__updating[s]&&(s=this.lookupProp(s),s in t)){if(u==null&&!this[s])return;this[s]=t[s].parse?$t(u):u}}lookupProp(s){if(t)return n.find(i=>s===i||s===t[i].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(s){this.__releaseCallbacks.push(s)}addPropertyChangedCallback(s){this.__propertyChangedCallbacks.push(s)}}}function gn(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:s,customElements:i=window.customElements}=n;return u=>{if(!e)throw new Error("tag is required to register a Component");let l=i.get(e);return l?(l.prototype.Component=u,l):(l=Dn(r,ln(t)),l.prototype.Component=u,l.prototype.registeredTag=e,i.define(e,l,s),l)}}function mn(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[s,i]=C(e[t[r]]);Object.defineProperty(n,t[r],{get:s,set(u){i(()=>u)}})}return n}function bn(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 vn(e){return(t,n)=>{const{element:r}=n;return Qt(s=>{const i=mn(t);r.addPropertyChangedCallback((l,w)=>i[l]=w),r.addReleaseCallback(()=>{r.renderRoot.textContent="",s()});const u=e(i,n);return f(r.renderRoot,u)},bn(r))}}function lt(e,t,n){return arguments.length===2&&(n=t,t={}),gn(e,t)(vn(n))}var Cn="٠١٢٣٤٥٦٧٨٩",wn="۰۱۲۳۴۵۶۷۸۹",An="൦൧൨൩൪൫൬൭൮൯",En="೦೧೨೩೪೫೬೭೮೯",Fn="໐໑໒໓໔໕໖໗໘໙",yn="୦୧୨୩୪୫୬୭୮୯",$n="០១២៣៤៥៦៧៨៩",Bn="߀߁߂߃߄߅߆߇߈߉",kn="੦੧੨੩੪੫੬੭੮੯",xn="૦૧૨૩૪૫૬૭૮૯",Sn="०१२३४५६७८९",_n="၀၁၂၃၄၅၆၇၈၉",Tn="௦௧௨௩௪௫௬௭௮௯",On="౦౧౨౩౪౫౬౭౮౯",In="๐๑๒๓๔๕๖๗๘๙",Pn="༠༡༢༣༤༥༦༧༨༩",xt={ar:Cn,fa:wn,ml:An,kn:En,lo:Fn,or:yn,kh:$n,nqo:Bn,pa:kn,gu:xn,hi:Sn,my:_n,ta:Tn,te:On,th:In,bo:Pn},zn=["ru"],Nn=["id"],Mn=["id"],jn=["ady-cyrl"],Rn=["aeb-arab"],Ln=["sq"],qn=["ru"],Un=["zh-hant"],Jn=["es"],Vn=["hi"],Kn=["es"],Gn=["ar"],Hn=["ar"],Wn=["ar"],Zn=["es"],Yn=["fr"],Xn=["ru"],Qn=["fr","es","ru"],er=["hi"],tr=["es"],nr=["fa"],rr=["ru"],sr=["id"],ir=["de"],ar=["bbc-latn"],ur=["fa"],or=["fa"],lr=["bho"],cr=["en"],dr=["id"],fr=["fr"],hr=["bn"],pr=["fa"],Dr=["fr"],gr=["id"],mr=["id"],br=["ru"],vr=["oc"],Cr=["nan","zh-hant"],wr=["ru"],Ar=["it"],Er=["crh-latn"],Fr=["sk"],yr=["pl"],$r=["ru"],Br=["hsb","de"],kr=["ms"],xr=["ne"],Sr=["it"],_r=["it"],Tr=["es"],Or=["fr"],Ir=["fi"],Pr=["fr"],zr=["fr"],Nr=["de"],Mr=["it"],jr=["tr"],Rr=["gan-hant","zh-hant","zh-hans"],Lr=["fr"],qr=["pt"],Ur=["fa"],Jr=["es"],Vr=["gom-deva"],Kr=["id"],Gr=["de"],Hr=["es"],Wr=["zh-hant"],Zr=["hif-latn"],Yr=["de"],Xr=["dsb","de"],Qr=["fr"],es=["hy"],ts=["zh-cn","zh-hans"],ns=["ru"],rs=["eo"],ss=["ike-cans"],is=["en"],as=["da"],us=["id"],os=["kk-latn","kk-cyrl"],ls=["fr"],cs=["kbd-cyrl"],ds=["fr"],fs=["ur"],hs=["tr"],ps=["my"],Ds=["kk-cyrl"],gs=["da"],ms=["ru"],bs=["ru"],vs=["fi"],Cs=["ks-arab"],ws=["de"],As=["ku-latn"],Es=["ru"],Fs=["ru"],ys=["es"],$s=["de"],Bs=["ru"],ks=["ru","az"],xs=["nl"],Ss=["it"],_s=["et"],Ts=["fa"],Os=["it","rm","fur"],Is=["pms","eml","lij","vec","it"],Ps=["fr"],zs=["fa"],Ns=["lv"],Ms=["fa"],js=["zh-hant"],Rs=["tr"],Ls=["id"],qs=["hi"],Us=["myv","ru"],Js=["fr"],Vs=["mrj","ru"],Ks=["id"],Gs=["my"],Hs=["ro"],Ws=["mhr","ru"],Zs=["pt"],Ys=["mdf","ru"],Xs=["fa"],Qs=["es"],ei=["cdo","zh-hant"],ti=["it"],ni=["nn"],ri=["de"],si=["id"],ii=["nb"],ai=["fr"],ui=["ca","fr"],oi=["fi"],li=["ru"],ci=["fr"],di=["de"],fi=["de"],hi=["de"],pi=["en"],Di=["it"],gi=["el"],mi=["pt-br"],bi=["qug","es"],vi=["qu","es"],Ci=["it"],wi=["ro"],Ai=["uk","ru"],Ei=["ro"],Fi=["ruq-latn","ro"],yi=["hi"],$i=["ru"],Bi=["it"],ki=["en"],xi=["it"],Si=["cbk","fa"],_i=["fr"],Ti=["fr"],Oi=["lt"],Ii=["bs","sr-el","hr"],Pi=["fr"],zi=["shy-latn"],Ni=["cs"],Mi=["skr-arab"],ji=["de"],Ri=["fi"],Li=["sr-ec"],qi=["nl"],Ui=["de"],Ji=["ru"],Vi=["id"],Ki=["pl"],Gi=["zh-tw","zh-hant","zh-hans"],Hi=["zh-tw","zh-hant","zh-hans"],Wi=["kn"],Zi=["pt"],Yi=["tg-cyrl"],Xi=["zh-tw","zh-hant","zh-hans"],Qi=["tt-cyrl","ru"],ea=["fr"],ta=["ru"],na=["ru"],ra=["ug-arab"],sa=["it"],ia=["et"],aa=["nl"],ua=["de"],oa=["fi"],la=["et"],ca=["fr"],da=["fr"],fa=["zh-hans"],ha=["ru"],pa=["ka"],Da=["he"],ga=["zh-hans"],ma=["nl"],ba=["kab"],va=["zh-hans"],St={ab:zn,abs:Nn,ace:Mn,ady:jn,aeb:Rn,"aeb-arab":["ar"],aln:Ln,alt:qn,ami:Un,an:Jn,anp:Vn,arn:Kn,arq:Gn,ary:Hn,arz:Wn,ast:Zn,atj:Yn,av:Xn,avk:Qn,awa:er,ay:tr,azb:nr,ba:rr,ban:sr,"ban-bali":["ban"],bar:ir,bbc:ar,"bbc-latn":["id"],bcc:ur,"be-tarask":["be"],bgn:or,bh:lr,bi:cr,bjn:dr,bm:fr,bpy:hr,bqi:pr,br:Dr,btm:gr,bug:mr,bxr:br,ca:vr,"cbk-zam":["es"],cdo:Cr,ce:wr,co:Ar,crh:Er,"crh-cyrl":["ru"],cs:Fr,csb:yr,cv:$r,"de-at":["de"],"de-ch":["de"],"de-formal":["de"],dsb:Br,dtp:kr,dty:xr,egl:Sr,eml:_r,"en-ca":["en"],"en-gb":["en"],"es-419":["es"],"es-formal":["es"],ext:Tr,ff:Or,fit:Ir,frc:Pr,frp:zr,frr:Nr,fur:Mr,gag:jr,gan:Rr,"gan-hans":["zh-hans"],"gan-hant":["zh-hant","zh-hans"],gcr:Lr,gl:qr,glk:Ur,gn:Jr,gom:Vr,"gom-deva":["hi"],gor:Kr,gsw:Gr,guc:Hr,hak:Wr,hif:Zr,hrx:Yr,hsb:Xr,ht:Qr,"hu-formal":["hu"],hyw:es,ii:ts,inh:ns,io:rs,iu:ss,jam:is,jut:as,jv:us,kaa:os,kab:ls,kbd:cs,kbp:ds,khw:fs,kiu:hs,kjp:ps,kk:Ds,"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:gs,"ko-kp":["ko"],koi:ms,krc:bs,krl:vs,ks:Cs,ksh:ws,ku:As,"ku-arab":["ckb"],kum:Es,kv:Fs,lad:ys,lb:$s,lbe:Bs,lez:ks,li:xs,lij:Ss,liv:_s,lki:Ts,lld:Os,lmo:Is,ln:Ps,lrc:zs,ltg:Ns,luz:Ms,lzh:js,lzz:Rs,mad:Ls,mai:qs,"map-bms":["jv","id"],mdf:Us,mg:Js,mhr:Vs,min:Ks,mnw:Gs,mo:Hs,mrj:Ws,"ms-arab":["ms"],mwl:Zs,myv:Ys,mzn:Xs,nah:Qs,nan:ei,nap:ti,nb:ni,nds:ri,"nds-nl":["nl"],nia:si,"nl-informal":["nl"],nn:ii,nrm:ai,oc:ui,olo:oi,os:li,pcd:ci,pdc:di,pdt:fi,pfl:hi,pih:pi,pms:Di,pnt:gi,pt:mi,"pt-br":["pt"],qu:bi,qug:vi,rgn:Ci,rmy:wi,"roa-tara":["it"],rue:Ai,rup:Ei,ruq:Fi,"ruq-cyrl":["mk"],"ruq-latn":["ro"],sa:yi,sah:$i,scn:Bi,sco:ki,sdc:xi,sdh:Si,ses:_i,sg:Ti,sgs:Oi,sh:Ii,shi:Pi,shy:zi,"shy-latn":["fr"],sk:Ni,skr:Mi,"skr-arab":["ur","pnb"],sli:ji,smn:Ri,sr:Li,srn:qi,stq:Ui,sty:Ji,su:Vi,szl:Ki,szy:Gi,tay:Hi,tcy:Wi,tet:Zi,tg:Yi,trv:Xi,tt:Qi,"tt-cyrl":["ru"],ty:ea,tyv:ta,udm:na,ug:ra,vec:sa,vep:ia,vls:aa,vmf:ua,vot:oa,vro:la,wa:ca,wo:da,wuu:fa,xal:ha,xmf:pa,yi:Da,za:ga,zea:ma,zgh:ba,zh:va,"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 de=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 i=t[s];if(n.test(i)){if(parseInt(i.slice(0,i.indexOf("=")),10)===e)return i.slice(i.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,i=r.select(e);return n.filter(u=>s.includes(u)).indexOf(i)}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 u in n)s[n[u]]=u;n=s;const i=String(e);for(let u=0;u<i.length;u++)r+=n[i[u]]||i[u];return parseFloat(r,10)}if(Intl.NumberFormat){let s;const i=[...St[this.locale]||[],"en"];return Intl.NumberFormat.supportedLocalesOf(this.locale).length?s=[this.locale]:s=i,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 xt[e]?xt[e].split(""):!1}},Ca=class extends de{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}},wa=class extends de{convertGrammar(t,n){switch(n){case"instrumental":t="s "+t;break;case"lokativ":t="o "+t;break}return t}},Aa=class extends de{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},Ea=class extends de{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},Fa=class extends de{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}},ya=class extends de{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 $a extends de{convertGrammar(t,n){switch(n){case"mestnik":t="o "+t;break;case"orodnik":t="z "+t;break}return t}}let Ba=class extends de{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 ka extends de{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 xa=class extends de{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}},Sa=class extends de{convertGrammar(e,t){switch(t){case"rol":e+="ról";break;case"ba":e+="ba";break;case"k":e+="k";break}return e}},_a=class extends de{convertGrammar(e,t){let n,r,s,i;switch(n="мæ",r="",s="",i="",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":i=s+r+"ы";break;case"dative":i=s+r+"æн";break;case"allative":i=s+n;break;case"ablative":r==="й"?i=s+r+"æ":i=s+r+"æй";break;case"superessive":i=s+r+"ыл";break;case"equative":i=s+r+"ау";break;case"comitative":i=s+"имæ";break}return e+i}};class Ta extends de{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 _t={bs:wa,default:de,dsb:Aa,fi:Fa,ga:xa,he:Ca,hsb:Ea,hu:Sa,hy:ka,la:Ba,os:_a,ru:ya,sl:$a,uk:Ta};const Oa=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 Tt=class{constructor(e){this.locale=ze(e),this.language=new(_t[this.locale]||_t.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(i=>this.emit(i,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=Ia(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 u in n)s+=` ${u}="${n[u]}"`;Array.isArray(r)||(r=[r]);const i=r.join("");return`<${t}${s}>${i}</${t}>`}};function ze(e){return typeof e=="string"?e.toLowerCase():e}function Ia(e){const t=e.match(Oa);return t?t[2]===void 0?"ltr":"rtl":null}function Pa(e,{wikilinks:t=!1}={}){let n=0;function r(c){return()=>{for(let m=0;m<c.length;m++){const I=c[m]();if(I!==null)return I}return null}}function s(c){const m=n,I=[];for(let x=0;x<c.length;x++){const ee=c[x]();if(ee===null)return n=m,null;I.push(ee)}return I}function i(c,m){return()=>{const I=n,x=[];let ee=m();for(;ee!==null;)x.push(ee),ee=m();return x.length<c?(n=I,null):x}}function u(c){const m=c.length;return()=>{let I=null;return e.slice(n,n+m)===c&&(I=c,n+=m),I}}function l(c){return()=>{const m=e.slice(n).match(c);return m===null?null:(n+=m[0].length,m[0])}}const w=l(/^\s+/),$=u("|"),D=u(":"),B=u("\\"),oe=l(/^./),fe=u("$"),Fe=l(/^\d+/),L=u('"'),Z=u("'"),Y=l(t?/^[^{}[\]$<\\]/:/^[^{}$<\\]/),le=l(t?/^[^{}[\]$\\|]/:/^[^{}$\\|]/),G=l(t?/^[^{}[\]$\s]/:/^[^{}$\s]/);function te(c,m){return()=>{const I=c();return I===null?null:m(I)}}function V(){const c=i(1,X)();return c===null?null:c.join("")}function we(){const c=i(1,$e)();return c===null?null:c.join("")}const ye=r([k,G]);function Ae(){const c=i(1,ye)();return c===null?null:c.join("")}function k(){const c=s([B,oe]);return c===null?null:c[1]}const X=r([k,le]),$e=r([k,Y]);function De(){const c=s([fe,Fe]);return c===null?null:["REPLACE",parseInt(c[1],10)-1]}const ge=te(l(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/),function(c){return c.toString()});function b(){const c=s([$,i(0,H)]);if(c===null)return null;const m=c[1];return m.length>1?["CONCAT"].concat(m):m[0]}function me(){const c=s([ge,D,De]);return c===null?null:[c[0],c[2]]}function Ue(){const c=s([ge,D,H]);return c===null?null:[c[0],c[2]]}function be(){const c=s([ge,D]);return c===null?null:[c[0],""]}const Me=r([function(){const c=s([r([me,Ue,be]),i(0,b)]);return c===null?null:c[0].concat(c[1])},function(){const c=s([ge,i(0,b)]);return c===null?null:[c[0]].concat(c[1])}]),Je=u("{{"),Ve=u("}}"),Te=u("[["),Oe=u("]]"),Ie=u("["),je=u("]");function ve(){const c=s([Je,Me,Ve]);return c===null?null:c[1]}function Se(){const c=s([i(1,H),$,i(1,q)]);return c===null?null:[["CONCAT"].concat(c[0]),["CONCAT"].concat(c[2])]}function _e(){const c=s([i(1,H)]);return c===null?null:[["CONCAT"].concat(c[0])]}const A=r([Se,_e]);function v(){let c=null;const m=s([Te,A,Oe]);if(m!==null){const I=m[1];c=["WIKILINK"].concat(I)}return c}function S(){let c=null;const m=s([Ie,i(1,K),w,i(1,q),je]);return m!==null&&(c=["EXTLINK",m[1].length===1?m[1][0]:["CONCAT"].concat(m[1]),["CONCAT"].concat(m[3])]),c}const R=l(/^[A-Za-z]+/);function d(c,m,I,x={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(c=c.toLowerCase(),m=m.toLowerCase(),c!==m||x.allowedHtmlElements.indexOf(c)===-1)return!1;const ee=/[\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 se=0,ie=I.length;se<ie;se+=2){const he=I[se];if(x.allowedHtmlCommonAttributes.indexOf(he)===-1&&(x.allowedHtmlAttributesByElement[c]||[]).indexOf(he)===-1||he==="style"&&I[se+1].search(ee)!==-1)return!1}return!0}function _(){const c=l(/^[^"]*/),m=s([L,c,L]);return m===null?null:m[1]}function z(){const c=l(/^[^']*/),m=s([Z,c,Z]);return m===null?null:m[1]}function P(){const c=l(/^\s*=\s*/),m=s([w,R,c,r([_,z])]);return m===null?null:[m[1],m[3]]}function O(){const c=i(0,P)();return Array.prototype.concat.apply(["HTMLATTRIBUTES"],c)}function Q(){let c=null;const m=n,I=u("<"),x=l(/^\/?/),ee=l(/^\s*>/),se=s([I,R,O,x,ee]);if(se===null)return null;const ie=n,he=se[1],Be=i(0,q)(),Dt=n,o=u("</"),g=s([o,R,ee]);if(g===null)return["CONCAT",e.slice(m,ie)].concat(Be);const E=n,ce=g[1],ke=se[2],j=ke.slice(1);if(d(he,ce,j))c=["HTMLELEMENT",he,ke].concat(Be);else{const a=p=>p.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");c=["CONCAT",a(e.slice(m,ie))].concat(Be,a(e.slice(Dt,E)))}return c}const K=r([ve,De,v,S,Ae]),q=r([ve,De,v,S,Q,we]),H=r([ve,De,V]);function re(){const c=i(0,q)();return c===null?null:["CONCAT"].concat(c)}const U=re();if(U===null||n!==e.length)throw new Error("Parse error at position "+n.toString()+" in input: "+e);return U}class Ot{constructor(t,{wikilinks:n=!1}={}){this.locale=ze(t),this.wikilinks=n,this.emitter=new Tt(this.locale)}parse(t,n){if(t.includes("{{")||t.includes("<")||this.wikilinks&&t.includes("[")){const r=Pa(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 i=parseInt(s,10)-1;return n[i]!==void 0?n[i]:"$"+s})}}class za{constructor(){this.sourceMap=new Map}load(t,n){if(typeof t!="object")throw new Error("Invalid message source. Must be an object");if(n=ze(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(ze(n));return r?r[t]:null}hasLocale(t){return this.sourceMap.has(t)}}class Na{constructor(t,{finalFallback:n="en",messages:r=void 0,wikilinks:s=!1}={}){this.locale=ze(t),this.parser=new Ot(this.locale,{wikilinks:s}),this.messageStore=new za,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=ze(t),this.parser=new Ot(this.locale,{wikilinks:this.wikilinks})}getFallbackLocales(){return[...St[this.locale]||[],this.finalFallback]}getMessage(t){let n=this.locale,r=0;const s=this.getFallbackLocales(this.locale);for(;n;){const i=n.split("-");let u=i.length;do{const l=i.slice(0,u).join("-"),w=this.messageStore.getMessage(t,l);if(typeof w=="string")return w;u--}while(u);n=s[r],r++}return t}registerParserPlugin(t,n){Tt.prototype[t]=n}}const It={"@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-complete-invite":"Complete Your Invitation","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."},Ma={en:It,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 ct(e){const t=new Na("en",{messages:It});return e!=="en"&&(t.load(Ma[e],e),t.setLocale(e)),t}function Pt(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),i=new Uint8Array(s);for(let u=0;u<r.length;u++)i[u]=r.charCodeAt(u);return s}function zt(e){const t=new Uint8Array(e);let n="";for(const i of t)n+=String.fromCharCode(i);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var T="copy",pe="convert";function Ne(e,t,n){if(t===T)return n;if(t===pe)return e(n);if(t instanceof Array)return n.map(r=>Ne(e,t[0],r));if(t instanceof Object){const r={};for(const[s,i]of Object.entries(t)){if(i.derive){const u=i.derive(n);u!==void 0&&(n[s]=u)}if(!(s in n)){if(i.required)throw new Error(`Missing key: ${s}`);continue}if(n[s]==null){r[s]=null;continue}r[s]=Ne(e,i.schema,n[s])}return r}}function dt(e,t){return{required:!0,schema:e,derive:t}}function M(e){return{required:!0,schema:e}}function J(e){return{required:!1,schema:e}}var Nt={type:M(T),id:M(pe),transports:J(T)},Mt={appid:J(T),appidExclude:J(T),credProps:J(T)},jt={appid:J(T),appidExclude:J(T),credProps:J(T)},ja={publicKey:M({rp:M(T),user:M({id:M(pe),name:M(T),displayName:M(T)}),challenge:M(pe),pubKeyCredParams:M(T),timeout:J(T),excludeCredentials:J([Nt]),authenticatorSelection:J(T),attestation:J(T),extensions:J(Mt)}),signal:J(T)},Ra={type:M(T),id:M(T),rawId:M(pe),authenticatorAttachment:J(T),response:M({clientDataJSON:M(pe),attestationObject:M(pe),transports:dt(T,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:dt(jt,e=>e.getClientExtensionResults())},La={mediation:J(T),publicKey:M({challenge:M(pe),timeout:J(T),rpId:J(T),allowCredentials:J([Nt]),userVerification:J(T),extensions:J(Mt)}),signal:J(T)},qa={type:M(T),id:M(T),rawId:M(pe),authenticatorAttachment:J(T),response:M({clientDataJSON:M(pe),authenticatorData:M(pe),signature:M(pe),userHandle:M(pe)}),clientExtensionResults:dt(jt,e=>e.getClientExtensionResults())};function Rt(e){return Ne(Pt,ja,e)}function Ua(e){return Ne(zt,Ra,e)}function Ja(e){return Ne(Pt,La,e)}function Va(e){return Ne(zt,qa,e)}async function Lt(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>Ua(t),t}async function Ka(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>Va(t),t}function ft(e){this.message=e}ft.prototype=new Error,ft.prototype.name="InvalidCharacterError";var qt=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new ft("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,s=0,i=0,u="";r=t.charAt(i++);~r&&(n=s%4?64*n+r:r,s++%4)?u+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return u};function Ga(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(qt(n).replace(/(.)/g,function(r,s){var i=s.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}(t)}catch{return qt(t)}}function Qe(e){this.message=e}function Ha(e,t){if(typeof e!="string")throw new Qe("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(Ga(e.split(".")[n]))}catch(r){throw new Qe("Invalid token specified: "+r.message)}}Qe.prototype=new Error,Qe.prototype.name="InvalidTokenError";const et="spartan-token";function Ut(){const e=localStorage.getItem(et);let t=null;if(e)try{if(t=Ha(e),t.exp>Za())return t;localStorage.removeItem(et)}catch(n){console.error("Error decoding token",n),localStorage.removeItem(et)}return null}function Wa(){const e=localStorage.getItem(et);return e||null}function Za(){return Math.round(new Date().getTime()/1e3)}var Ya=F(`<form class=login-frame><style>.login-frame {
|
|
1
|
+
(function(st){typeof define=="function"&&define.amd?define(st):st()})(function(){"use strict";const Ge={equals:(e,t)=>e===t};let vt=Et;const xe=1,He=2,Ct={owned:null,cleanups:null,context:null,owner:null};var Z=null;let it=null,en=null,Y=null,se=null,Fe=null,We=0;function tn(e,t){const n=Y,r=Z,s=e.length===0,i=t===void 0?r:t,u=s?Ct:{owned:null,cleanups:null,context:i?i.context:null,owner:i},o=s?e:()=>e(()=>Ze(()=>Ue(u)));Z=u,Y=null;try{return qe(o,!0)}finally{Y=n,Z=r}}function C(e,t){t=t?Object.assign({},Ge,t):Ge;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),At(n,s));return[wt.bind(n),r]}function y(e,t,n){const r=ut(e,t,!1,xe);Le(r)}function nn(e,t,n){vt=on;const r=ut(e,t,!1,xe);r.user=!0,Fe?Fe.push(r):Le(r)}function h(e,t,n){n=n?Object.assign({},Ge,n):Ge;const r=ut(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Le(r),wt.bind(r)}function Ze(e){if(Y===null)return e();const t=Y;Y=null;try{return e()}finally{Y=t}}function at(e){nn(()=>Ze(e))}function rn(e){return Z===null||(Z.cleanups===null?Z.cleanups=[e]:Z.cleanups.push(e)),e}function sn(){return Z}function wt(){if(this.sources&&this.state)if(this.state===xe)Le(this);else{const e=se;se=null,qe(()=>Xe(this),!1),se=e}if(Y){const e=this.observers?this.observers.length:0;Y.sources?(Y.sources.push(this),Y.sourceSlots.push(e)):(Y.sources=[this],Y.sourceSlots=[e]),this.observers?(this.observers.push(Y),this.observerSlots.push(Y.sources.length-1)):(this.observers=[Y],this.observerSlots=[Y.sources.length-1])}return this.value}function At(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&qe(()=>{for(let s=0;s<e.observers.length;s+=1){const i=e.observers[s],u=it&&it.running;u&&it.disposed.has(i),(u?!i.tState:!i.state)&&(i.pure?se.push(i):Fe.push(i),i.observers&&Ft(i)),u||(i.state=xe)}if(se.length>1e6)throw se=[],new Error},!1)),t}function Le(e){if(!e.fn)return;Ue(e);const t=We;an(e,e.value,t)}function an(e,t,n){let r;const s=Z,i=Y;Y=Z=e;try{r=e.fn(t)}catch(u){return e.pure&&(e.state=xe,e.owned&&e.owned.forEach(Ue),e.owned=null),e.updatedAt=n+1,yt(u)}finally{Y=i,Z=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?At(e,r):e.value=r,e.updatedAt=n)}function ut(e,t,n,r=xe,s){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Z,context:Z?Z.context:null,pure:n};return Z===null||Z!==Ct&&(Z.owned?Z.owned.push(i):Z.owned=[i]),i}function Ye(e){if(e.state===0)return;if(e.state===He)return Xe(e);if(e.suspense&&Ze(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<We);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===xe)Le(e);else if(e.state===He){const r=se;se=null,qe(()=>Xe(e,t[0]),!1),se=r}}function qe(e,t){if(se)return e();let n=!1;t||(se=[]),Fe?n=!0:Fe=[],We++;try{const r=e();return un(n),r}catch(r){n||(Fe=null),se=null,yt(r)}}function un(e){if(se&&(Et(se),se=null),e)return;const t=Fe;Fe=null,t.length&&qe(()=>vt(t),!1)}function Et(e){for(let t=0;t<e.length;t++)Ye(e[t])}function on(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ye(r)}for(t=0;t<n;t++)Ye(e[t])}function Xe(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===xe?r!==t&&(!r.updatedAt||r.updatedAt<We)&&Ye(r):s===He&&Xe(r,t)}}}function Ft(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=He,n.pure?se.push(n):Fe.push(n),n.observers&&Ft(n))}}function Ue(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 i=s.pop(),u=n.observerSlots.pop();r<s.length&&(i.sourceSlots[u]=r,s[r]=i,n.observerSlots[r]=u)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Ue(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ue(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 ln(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function yt(e,t=Z){throw ln(e)}function cn(e,t,n){let r=n.length,s=t.length,i=r,u=0,o=0,w=t[s-1].nextSibling,$=null;for(;u<s||o<i;){if(t[u]===n[o]){u++,o++;continue}for(;t[s-1]===n[i-1];)s--,i--;if(s===u){const D=i<r?o?n[o-1].nextSibling:n[i-o]:w;for(;o<i;)e.insertBefore(n[o++],D)}else if(i===o)for(;u<s;)(!$||!$.has(t[u]))&&t[u].remove(),u++;else if(t[u]===n[i-1]&&n[o]===t[s-1]){const D=t[--s].nextSibling;e.insertBefore(n[o++],t[u++].nextSibling),e.insertBefore(n[--i],D),t[s]=n[i]}else{if(!$){$=new Map;let k=o;for(;k<i;)$.set(n[k],k++)}const D=$.get(t[u]);if(D!=null)if(o<D&&D<i){let k=u,oe=1,he;for(;++k<s&&k<i&&!((he=$.get(t[k]))==null||he!==D+oe);)oe++;if(oe>D-o){const ye=t[u];for(;o<D;)e.insertBefore(n[o++],ye)}else e.replaceChild(n[o++],t[u++])}else u++;else t[u++].remove()}}}const $t="_$DX_DELEGATE";function A(e,t,n,r){let s;const i=()=>{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},u=()=>(s||(s=i())).cloneNode(!0);return u.cloneNode=u,u}function ot(e,t=window.document){const n=t[$t]||(t[$t]=new Set);for(let r=0,s=e.length;r<s;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,dn))}}function ue(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function kt(e,t,n){return Ze(()=>e(t,n))}function f(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Qe(e,t,r,n);y(s=>Qe(e,t(),s,n),r)}function dn(e){let t=e.target;const n=`$$${e.type}`,r=e.target,s=e.currentTarget,i=w=>Object.defineProperty(e,"target",{configurable:!0,value:w}),u=()=>{const w=t[n];if(w&&!t.disabled){const $=t[`${n}Data`];if($!==void 0?w.call(t,$,e):w.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},o=()=>{for(;u()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const w=e.composedPath();i(w[0]);for(let $=0;$<w.length-2&&(t=w[$],!!u());$++){if(t._$host){t=t._$host,o();break}if(t.parentNode===s)break}}else o();i(r)}function Qe(e,t,n,r,s){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,u=r!==void 0;if(e=u&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(t=t.toString(),t===n))return n;if(u){let o=n[0];o&&o.nodeType===3?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=ze(e,n,r,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean")n=ze(e,n,r);else{if(i==="function")return y(()=>{let o=t();for(;typeof o=="function";)o=o();n=Qe(e,o,n,r)}),()=>n;if(Array.isArray(t)){const o=[],w=n&&Array.isArray(n);if(lt(o,t,n,s))return y(()=>n=Qe(e,o,n,r,!0)),()=>n;if(o.length===0){if(n=ze(e,n,r),u)return n}else w?n.length===0?Bt(e,o,r):cn(e,n,o):(n&&ze(e),Bt(e,o));n=o}else if(t.nodeType){if(Array.isArray(n)){if(u)return n=ze(e,n,r,t);ze(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function lt(e,t,n,r){let s=!1;for(let i=0,u=t.length;i<u;i++){let o=t[i],w=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=lt(e,o,w)||s;else if($==="function")if(r){for(;typeof o=="function";)o=o();s=lt(e,Array.isArray(o)?o:[o],Array.isArray(w)?w:[w])||s}else e.push(o),s=!0;else{const D=String(o);w&&w.nodeType===3&&w.data===D?e.push(w):e.push(document.createTextNode(D))}}return s}function Bt(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function ze(e,t,n,r){if(n===void 0)return e.textContent="";const s=r||document.createTextNode("");if(t.length){let i=!1;for(let u=t.length-1;u>=0;u--){const o=t[u];if(s!==o){const w=o.parentNode===e;!i&&!u?w?e.replaceChild(s,o):e.insertBefore(s,n):w&&o.remove()}else i=!0}}else e.insertBefore(s,n);return[s]}function fn(e){return Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=Object.assign({},s),_t(s.value)&&!mn(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 hn(e){return e?Object.keys(e).reduce((n,r)=>{const s=e[r];return n[r]=_t(s)&&"value"in s?s:{value:s},n[r].attribute||(n[r].attribute=gn(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function pn(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function Dn(e,t){const n=fn(t);return Object.keys(t).forEach(s=>{const i=n[s],u=e.getAttribute(i.attribute),o=e[s];u!=null&&(i.value=i.parse?xt(u):u),o!=null&&(i.value=Array.isArray(o)?o.slice(0):o),i.reflect&&St(e,i.attribute,i.value,!!i.parse),Object.defineProperty(e,s,{get(){return i.value},set(w){const $=i.value;i.value=w,i.reflect&&St(this,i.attribute,i.value,!!i.parse);for(let D=0,k=this.__propertyChangedCallbacks.length;D<k;D++)this.__propertyChangedCallbacks[D](s,w,$)},enumerable:!0,configurable:!0})}),n}function xt(e){if(e)try{return JSON.parse(e)}catch{return e}}function St(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 gn(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function _t(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function mn(e){return Object.prototype.toString.call(e)==="[object Function]"}function bn(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let ct;function vn(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=Dn(this,t);const s=pn(this.props),i=this.Component,u=ct;try{ct=this,this.__initialized=!0,bn(i)?new i(s,{element:this}):i(s,{element:this})}finally{ct=u}}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,i,u){if(this.__initialized&&!this.__updating[s]&&(s=this.lookupProp(s),s in t)){if(u==null&&!this[s])return;this[s]=t[s].parse?xt(u):u}}lookupProp(s){if(t)return n.find(i=>s===i||s===t[i].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(s){this.__releaseCallbacks.push(s)}addPropertyChangedCallback(s){this.__propertyChangedCallbacks.push(s)}}}function Cn(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:s,customElements:i=window.customElements}=n;return u=>{if(!e)throw new Error("tag is required to register a Component");let o=i.get(e);return o?(o.prototype.Component=u,o):(o=vn(r,hn(t)),o.prototype.Component=u,o.prototype.registeredTag=e,i.define(e,o,s),o)}}function wn(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[s,i]=C(e[t[r]]);Object.defineProperty(n,t[r],{get:s,set(u){i(()=>u)}})}return n}function An(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 En(e){return(t,n)=>{const{element:r}=n;return tn(s=>{const i=wn(t);r.addPropertyChangedCallback((o,w)=>i[o]=w),r.addReleaseCallback(()=>{r.renderRoot.textContent="",s()});const u=e(i,n);return f(r.renderRoot,u)},An(r))}}function dt(e,t,n){return arguments.length===2&&(n=t,t={}),Cn(e,t)(En(n))}var Fn="٠١٢٣٤٥٦٧٨٩",yn="۰۱۲۳۴۵۶۷۸۹",$n="൦൧൨൩൪൫൬൭൮൯",kn="೦೧೨೩೪೫೬೭೮೯",Bn="໐໑໒໓໔໕໖໗໘໙",xn="୦୧୨୩୪୫୬୭୮୯",Sn="០១២៣៤៥៦៧៨៩",_n="߀߁߂߃߄߅߆߇߈߉",Tn="੦੧੨੩੪੫੬੭੮੯",On="૦૧૨૩૪૫૬૭૮૯",In="०१२३४५६७८९",Pn="၀၁၂၃၄၅၆၇၈၉",zn="௦௧௨௩௪௫௬௭௮௯",Nn="౦౧౨౩౪౫౬౭౮౯",Mn="๐๑๒๓๔๕๖๗๘๙",jn="༠༡༢༣༤༥༦༧༨༩",Tt={ar:Fn,fa:yn,ml:$n,kn,lo:Bn,or:xn,kh:Sn,nqo:_n,pa:Tn,gu:On,hi:In,my:Pn,ta:zn,te:Nn,th:Mn,bo:jn},Rn=["ru"],Ln=["id"],qn=["id"],Un=["ady-cyrl"],Jn=["aeb-arab"],Vn=["sq"],Kn=["ru"],Gn=["zh-hant"],Hn=["es"],Wn=["hi"],Zn=["es"],Yn=["ar"],Xn=["ar"],Qn=["ar"],er=["es"],tr=["fr"],nr=["ru"],rr=["fr","es","ru"],sr=["hi"],ir=["es"],ar=["fa"],ur=["ru"],or=["id"],lr=["de"],cr=["bbc-latn"],dr=["fa"],fr=["fa"],hr=["bho"],pr=["en"],Dr=["id"],gr=["fr"],mr=["bn"],br=["fa"],vr=["fr"],Cr=["id"],wr=["id"],Ar=["ru"],Er=["oc"],Fr=["nan","zh-hant"],yr=["ru"],$r=["it"],kr=["crh-latn"],Br=["sk"],xr=["pl"],Sr=["ru"],_r=["hsb","de"],Tr=["ms"],Or=["ne"],Ir=["it"],Pr=["it"],zr=["es"],Nr=["fr"],Mr=["fi"],jr=["fr"],Rr=["fr"],Lr=["de"],qr=["it"],Ur=["tr"],Jr=["gan-hant","zh-hant","zh-hans"],Vr=["fr"],Kr=["pt"],Gr=["fa"],Hr=["es"],Wr=["gom-deva"],Zr=["id"],Yr=["de"],Xr=["es"],Qr=["zh-hant"],es=["hif-latn"],ts=["de"],ns=["dsb","de"],rs=["fr"],ss=["hy"],is=["zh-cn","zh-hans"],as=["ru"],us=["eo"],os=["ike-cans"],ls=["en"],cs=["da"],ds=["id"],fs=["kk-latn","kk-cyrl"],hs=["fr"],ps=["kbd-cyrl"],Ds=["fr"],gs=["ur"],ms=["tr"],bs=["my"],vs=["kk-cyrl"],Cs=["da"],ws=["ru"],As=["ru"],Es=["fi"],Fs=["ks-arab"],ys=["de"],$s=["ku-latn"],ks=["ru"],Bs=["ru"],xs=["es"],Ss=["de"],_s=["ru"],Ts=["ru","az"],Os=["nl"],Is=["it"],Ps=["et"],zs=["fa"],Ns=["it","rm","fur"],Ms=["pms","eml","lij","vec","it"],js=["fr"],Rs=["fa"],Ls=["lv"],qs=["fa"],Us=["zh-hant"],Js=["tr"],Vs=["id"],Ks=["hi"],Gs=["myv","ru"],Hs=["fr"],Ws=["mrj","ru"],Zs=["id"],Ys=["my"],Xs=["ro"],Qs=["mhr","ru"],ei=["pt"],ti=["mdf","ru"],ni=["fa"],ri=["es"],si=["cdo","zh-hant"],ii=["it"],ai=["nn"],ui=["de"],oi=["id"],li=["nb"],ci=["fr"],di=["ca","fr"],fi=["fi"],hi=["ru"],pi=["fr"],Di=["de"],gi=["de"],mi=["de"],bi=["en"],vi=["it"],Ci=["el"],wi=["pt-br"],Ai=["qug","es"],Ei=["qu","es"],Fi=["it"],yi=["ro"],$i=["uk","ru"],ki=["ro"],Bi=["ruq-latn","ro"],xi=["hi"],Si=["ru"],_i=["it"],Ti=["en"],Oi=["it"],Ii=["cbk","fa"],Pi=["fr"],zi=["fr"],Ni=["lt"],Mi=["bs","sr-el","hr"],ji=["fr"],Ri=["shy-latn"],Li=["cs"],qi=["skr-arab"],Ui=["de"],Ji=["fi"],Vi=["sr-ec"],Ki=["nl"],Gi=["de"],Hi=["ru"],Wi=["id"],Zi=["pl"],Yi=["zh-tw","zh-hant","zh-hans"],Xi=["zh-tw","zh-hant","zh-hans"],Qi=["kn"],ea=["pt"],ta=["tg-cyrl"],na=["zh-tw","zh-hant","zh-hans"],ra=["tt-cyrl","ru"],sa=["fr"],ia=["ru"],aa=["ru"],ua=["ug-arab"],oa=["it"],la=["et"],ca=["nl"],da=["de"],fa=["fi"],ha=["et"],pa=["fr"],Da=["fr"],ga=["zh-hans"],ma=["ru"],ba=["ka"],va=["he"],Ca=["zh-hans"],wa=["nl"],Aa=["kab"],Ea=["zh-hans"],Ot={ab:Rn,abs:Ln,ace:qn,ady:Un,aeb:Jn,"aeb-arab":["ar"],aln:Vn,alt:Kn,ami:Gn,an:Hn,anp:Wn,arn:Zn,arq:Yn,ary:Xn,arz:Qn,ast:er,atj:tr,av:nr,avk:rr,awa:sr,ay:ir,azb:ar,ba:ur,ban:or,"ban-bali":["ban"],bar:lr,bbc:cr,"bbc-latn":["id"],bcc:dr,"be-tarask":["be"],bgn:fr,bh:hr,bi:pr,bjn:Dr,bm:gr,bpy:mr,bqi:br,br:vr,btm:Cr,bug:wr,bxr:Ar,ca:Er,"cbk-zam":["es"],cdo:Fr,ce:yr,co:$r,crh:kr,"crh-cyrl":["ru"],cs:Br,csb:xr,cv:Sr,"de-at":["de"],"de-ch":["de"],"de-formal":["de"],dsb:_r,dtp:Tr,dty:Or,egl:Ir,eml:Pr,"en-ca":["en"],"en-gb":["en"],"es-419":["es"],"es-formal":["es"],ext:zr,ff:Nr,fit:Mr,frc:jr,frp:Rr,frr:Lr,fur:qr,gag:Ur,gan:Jr,"gan-hans":["zh-hans"],"gan-hant":["zh-hant","zh-hans"],gcr:Vr,gl:Kr,glk:Gr,gn:Hr,gom:Wr,"gom-deva":["hi"],gor:Zr,gsw:Yr,guc:Xr,hak:Qr,hif:es,hrx:ts,hsb:ns,ht:rs,"hu-formal":["hu"],hyw:ss,ii:is,inh:as,io:us,iu:os,jam:ls,jut:cs,jv:ds,kaa:fs,kab:hs,kbd:ps,kbp:Ds,khw:gs,kiu:ms,kjp:bs,kk:vs,"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:Cs,"ko-kp":["ko"],koi:ws,krc:As,krl:Es,ks:Fs,ksh:ys,ku:$s,"ku-arab":["ckb"],kum:ks,kv:Bs,lad:xs,lb:Ss,lbe:_s,lez:Ts,li:Os,lij:Is,liv:Ps,lki:zs,lld:Ns,lmo:Ms,ln:js,lrc:Rs,ltg:Ls,luz:qs,lzh:Us,lzz:Js,mad:Vs,mai:Ks,"map-bms":["jv","id"],mdf:Gs,mg:Hs,mhr:Ws,min:Zs,mnw:Ys,mo:Xs,mrj:Qs,"ms-arab":["ms"],mwl:ei,myv:ti,mzn:ni,nah:ri,nan:si,nap:ii,nb:ai,nds:ui,"nds-nl":["nl"],nia:oi,"nl-informal":["nl"],nn:li,nrm:ci,oc:di,olo:fi,os:hi,pcd:pi,pdc:Di,pdt:gi,pfl:mi,pih:bi,pms:vi,pnt:Ci,pt:wi,"pt-br":["pt"],qu:Ai,qug:Ei,rgn:Fi,rmy:yi,"roa-tara":["it"],rue:$i,rup:ki,ruq:Bi,"ruq-cyrl":["mk"],"ruq-latn":["ro"],sa:xi,sah:Si,scn:_i,sco:Ti,sdc:Oi,sdh:Ii,ses:Pi,sg:zi,sgs:Ni,sh:Mi,shi:ji,shy:Ri,"shy-latn":["fr"],sk:Li,skr:qi,"skr-arab":["ur","pnb"],sli:Ui,smn:Ji,sr:Vi,srn:Ki,stq:Gi,sty:Hi,su:Wi,szl:Zi,szy:Yi,tay:Xi,tcy:Qi,tet:ea,tg:ta,trv:na,tt:ra,"tt-cyrl":["ru"],ty:sa,tyv:ia,udm:aa,ug:ua,vec:oa,vep:la,vls:ca,vmf:da,vot:fa,vro:ha,wa:pa,wo:Da,wuu:ga,xal:ma,xmf:ba,yi:va,za:Ca,zea:wa,zgh:Aa,zh:Ea,"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 fe=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 i=t[s];if(n.test(i)){if(parseInt(i.slice(0,i.indexOf("=")),10)===e)return i.slice(i.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,i=r.select(e);return n.filter(u=>s.includes(u)).indexOf(i)}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 u in n)s[n[u]]=u;n=s;const i=String(e);for(let u=0;u<i.length;u++)r+=n[i[u]]||i[u];return parseFloat(r,10)}if(Intl.NumberFormat){let s;const i=[...Ot[this.locale]||[],"en"];return Intl.NumberFormat.supportedLocalesOf(this.locale).length?s=[this.locale]:s=i,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 Tt[e]?Tt[e].split(""):!1}},Fa=class extends fe{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}},ya=class extends fe{convertGrammar(t,n){switch(n){case"instrumental":t="s "+t;break;case"lokativ":t="o "+t;break}return t}},$a=class extends fe{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},ka=class extends fe{convertGrammar(e,t){switch(t){case"instrumental":e="z "+e;break;case"lokatiw":e="wo "+e;break}return e}},Ba=class extends fe{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}},xa=class extends fe{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 Sa extends fe{convertGrammar(t,n){switch(n){case"mestnik":t="o "+t;break;case"orodnik":t="z "+t;break}return t}}let _a=class extends fe{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 Ta extends fe{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 Oa=class extends fe{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}},Ia=class extends fe{convertGrammar(e,t){switch(t){case"rol":e+="ról";break;case"ba":e+="ba";break;case"k":e+="k";break}return e}},Pa=class extends fe{convertGrammar(e,t){let n,r,s,i;switch(n="мæ",r="",s="",i="",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":i=s+r+"ы";break;case"dative":i=s+r+"æн";break;case"allative":i=s+n;break;case"ablative":r==="й"?i=s+r+"æ":i=s+r+"æй";break;case"superessive":i=s+r+"ыл";break;case"equative":i=s+r+"ау";break;case"comitative":i=s+"имæ";break}return e+i}};class za extends fe{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 It={bs:ya,default:fe,dsb:$a,fi:Ba,ga:Oa,he:Fa,hsb:ka,hu:Ia,hy:Ta,la:_a,os:Pa,ru:xa,sl:Sa,uk:za};const Na=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 Pt=class{constructor(e){this.locale=Ne(e),this.language=new(It[this.locale]||It.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(i=>this.emit(i,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=Ma(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 u in n)s+=` ${u}="${n[u]}"`;Array.isArray(r)||(r=[r]);const i=r.join("");return`<${t}${s}>${i}</${t}>`}};function Ne(e){return typeof e=="string"?e.toLowerCase():e}function Ma(e){const t=e.match(Na);return t?t[2]===void 0?"ltr":"rtl":null}function ja(e,{wikilinks:t=!1}={}){let n=0;function r(c){return()=>{for(let m=0;m<c.length;m++){const O=c[m]();if(O!==null)return O}return null}}function s(c){const m=n,O=[];for(let S=0;S<c.length;S++){const te=c[S]();if(te===null)return n=m,null;O.push(te)}return O}function i(c,m){return()=>{const O=n,S=[];let te=m();for(;te!==null;)S.push(te),te=m();return S.length<c?(n=O,null):S}}function u(c){const m=c.length;return()=>{let O=null;return e.slice(n,n+m)===c&&(O=c,n+=m),O}}function o(c){return()=>{const m=e.slice(n).match(c);return m===null?null:(n+=m[0].length,m[0])}}const w=o(/^\s+/),$=u("|"),D=u(":"),k=u("\\"),oe=o(/^./),he=u("$"),ye=o(/^\d+/),R=u('"'),X=u("'"),Q=o(t?/^[^{}[\]$<\\]/:/^[^{}$<\\]/),le=o(t?/^[^{}[\]$\\|]/:/^[^{}$\\|]/),H=o(t?/^[^{}[\]$\s]/:/^[^{}$\s]/);function ne(c,m){return()=>{const O=c();return O===null?null:m(O)}}function K(){const c=i(1,ee)();return c===null?null:c.join("")}function Ae(){const c=i(1,ke)();return c===null?null:c.join("")}const $e=r([B,H]);function Ee(){const c=i(1,$e)();return c===null?null:c.join("")}function B(){const c=s([k,oe]);return c===null?null:c[1]}const ee=r([B,le]),ke=r([B,Q]);function pe(){const c=s([he,ye]);return c===null?null:["REPLACE",parseInt(c[1],10)-1]}const me=ne(o(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/),function(c){return c.toString()});function b(){const c=s([$,i(0,G)]);if(c===null)return null;const m=c[1];return m.length>1?["CONCAT"].concat(m):m[0]}function be(){const c=s([me,D,pe]);return c===null?null:[c[0],c[2]]}function Je(){const c=s([me,D,G]);return c===null?null:[c[0],c[2]]}function ve(){const c=s([me,D]);return c===null?null:[c[0],""]}const je=r([function(){const c=s([r([be,Je,ve]),i(0,b)]);return c===null?null:c[0].concat(c[1])},function(){const c=s([me,i(0,b)]);return c===null?null:[c[0]].concat(c[1])}]),Ve=u("{{"),Ke=u("}}"),Oe=u("[["),Ie=u("]]"),Pe=u("["),Re=u("]");function Ce(){const c=s([Ve,je,Ke]);return c===null?null:c[1]}function Se(){const c=s([i(1,G),$,i(1,U)]);return c===null?null:[["CONCAT"].concat(c[0]),["CONCAT"].concat(c[2])]}function _e(){const c=s([i(1,G)]);return c===null?null:[["CONCAT"].concat(c[0])]}const E=r([Se,_e]);function v(){let c=null;const m=s([Oe,E,Ie]);if(m!==null){const O=m[1];c=["WIKILINK"].concat(O)}return c}function x(){let c=null;const m=s([Pe,i(1,M),w,i(1,U),Re]);return m!==null&&(c=["EXTLINK",m[1].length===1?m[1][0]:["CONCAT"].concat(m[1]),["CONCAT"].concat(m[3])]),c}const j=o(/^[A-Za-z]+/);function d(c,m,O,S={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(c=c.toLowerCase(),m=m.toLowerCase(),c!==m||S.allowedHtmlElements.indexOf(c)===-1)return!1;const te=/[\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 re=0,ie=O.length;re<ie;re+=2){const de=O[re];if(S.allowedHtmlCommonAttributes.indexOf(de)===-1&&(S.allowedHtmlAttributesByElement[c]||[]).indexOf(de)===-1||de==="style"&&O[re+1].search(te)!==-1)return!1}return!0}function _(){const c=o(/^[^"]*/),m=s([R,c,R]);return m===null?null:m[1]}function I(){const c=o(/^[^']*/),m=s([X,c,X]);return m===null?null:m[1]}function N(){const c=o(/^\s*=\s*/),m=s([w,j,c,r([_,I])]);return m===null?null:[m[1],m[3]]}function L(){const c=i(0,N)();return Array.prototype.concat.apply(["HTMLATTRIBUTES"],c)}function q(){let c=null;const m=n,O=u("<"),S=o(/^\/?/),te=o(/^\s*>/),re=s([O,j,L,S,te]);if(re===null)return null;const ie=n,de=re[1],Be=i(0,U)(),mt=n,bt=u("</"),rt=s([bt,j,te]);if(rt===null)return["CONCAT",e.slice(m,ie)].concat(Be);const l=n,g=rt[1],F=re[2],ae=F.slice(1);if(d(de,g,ae))c=["HTMLELEMENT",de,F].concat(Be);else{const Te=De=>De.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");c=["CONCAT",Te(e.slice(m,ie))].concat(Be,Te(e.slice(mt,l)))}return c}const M=r([Ce,pe,v,x,Ee]),U=r([Ce,pe,v,x,q,Ae]),G=r([Ce,pe,K]);function ce(){const c=i(0,U)();return c===null?null:["CONCAT"].concat(c)}const J=ce();if(J===null||n!==e.length)throw new Error("Parse error at position "+n.toString()+" in input: "+e);return J}class zt{constructor(t,{wikilinks:n=!1}={}){this.locale=Ne(t),this.wikilinks=n,this.emitter=new Pt(this.locale)}parse(t,n){if(t.includes("{{")||t.includes("<")||this.wikilinks&&t.includes("[")){const r=ja(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 i=parseInt(s,10)-1;return n[i]!==void 0?n[i]:"$"+s})}}class Ra{constructor(){this.sourceMap=new Map}load(t,n){if(typeof t!="object")throw new Error("Invalid message source. Must be an object");if(n=Ne(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(Ne(n));return r?r[t]:null}hasLocale(t){return this.sourceMap.has(t)}}class La{constructor(t,{finalFallback:n="en",messages:r=void 0,wikilinks:s=!1}={}){this.locale=Ne(t),this.parser=new zt(this.locale,{wikilinks:s}),this.messageStore=new Ra,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=Ne(t),this.parser=new zt(this.locale,{wikilinks:this.wikilinks})}getFallbackLocales(){return[...Ot[this.locale]||[],this.finalFallback]}getMessage(t){let n=this.locale,r=0;const s=this.getFallbackLocales(this.locale);for(;n;){const i=n.split("-");let u=i.length;do{const o=i.slice(0,u).join("-"),w=this.messageStore.getMessage(t,o);if(typeof w=="string")return w;u--}while(u);n=s[r],r++}return t}registerParserPlugin(t,n){Pt.prototype[t]=n}}const Nt={"@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-complete-invite":"Complete Your Invitation","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."},qa={en:Nt,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 ft(e){const t=new La("en",{messages:Nt});return e!=="en"&&(t.load(qa[e],e),t.setLocale(e)),t}function Mt(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),i=new Uint8Array(s);for(let u=0;u<r.length;u++)i[u]=r.charCodeAt(u);return s}function jt(e){const t=new Uint8Array(e);let n="";for(const i of t)n+=String.fromCharCode(i);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var T="copy",ge="convert";function Me(e,t,n){if(t===T)return n;if(t===ge)return e(n);if(t instanceof Array)return n.map(r=>Me(e,t[0],r));if(t instanceof Object){const r={};for(const[s,i]of Object.entries(t)){if(i.derive){const u=i.derive(n);u!==void 0&&(n[s]=u)}if(!(s in n)){if(i.required)throw new Error(`Missing key: ${s}`);continue}if(n[s]==null){r[s]=null;continue}r[s]=Me(e,i.schema,n[s])}return r}}function ht(e,t){return{required:!0,schema:e,derive:t}}function z(e){return{required:!0,schema:e}}function V(e){return{required:!1,schema:e}}var Rt={type:z(T),id:z(ge),transports:V(T)},Lt={appid:V(T),appidExclude:V(T),credProps:V(T)},qt={appid:V(T),appidExclude:V(T),credProps:V(T)},Ua={publicKey:z({rp:z(T),user:z({id:z(ge),name:z(T),displayName:z(T)}),challenge:z(ge),pubKeyCredParams:z(T),timeout:V(T),excludeCredentials:V([Rt]),authenticatorSelection:V(T),attestation:V(T),extensions:V(Lt)}),signal:V(T)},Ja={type:z(T),id:z(T),rawId:z(ge),authenticatorAttachment:V(T),response:z({clientDataJSON:z(ge),attestationObject:z(ge),transports:ht(T,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:ht(qt,e=>e.getClientExtensionResults())},Va={mediation:V(T),publicKey:z({challenge:z(ge),timeout:V(T),rpId:V(T),allowCredentials:V([Rt]),userVerification:V(T),extensions:V(Lt)}),signal:V(T)},Ka={type:z(T),id:z(T),rawId:z(ge),authenticatorAttachment:V(T),response:z({clientDataJSON:z(ge),authenticatorData:z(ge),signature:z(ge),userHandle:z(ge)}),clientExtensionResults:ht(qt,e=>e.getClientExtensionResults())};function Ut(e){return Me(Mt,Ua,e)}function Ga(e){return Me(jt,Ja,e)}function Ha(e){return Me(Mt,Va,e)}function Wa(e){return Me(jt,Ka,e)}async function Jt(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>Ga(t),t}async function Za(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>Wa(t),t}function pt(e){this.message=e}pt.prototype=new Error,pt.prototype.name="InvalidCharacterError";var Vt=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new pt("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,s=0,i=0,u="";r=t.charAt(i++);~r&&(n=s%4?64*n+r:r,s++%4)?u+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return u};function Ya(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(Vt(n).replace(/(.)/g,function(r,s){var i=s.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}(t)}catch{return Vt(t)}}function et(e){this.message=e}function Xa(e,t){if(typeof e!="string")throw new et("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(Ya(e.split(".")[n]))}catch(r){throw new et("Invalid token specified: "+r.message)}}et.prototype=new Error,et.prototype.name="InvalidTokenError";const tt="spartan-token";function Kt(){const e=localStorage.getItem(tt);let t=null;if(e)try{if(t=Xa(e),t.exp>eu())return t;localStorage.removeItem(tt)}catch(n){console.error("Error decoding token",n),localStorage.removeItem(tt)}return null}function Qa(){const e=localStorage.getItem(tt);return e||null}function eu(){return Math.round(new Date().getTime()/1e3)}var tu=A(`<div class=widget-root><form class=login-frame><style>.widget-root {
|
|
2
|
+
display: block;
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.login-frame {
|
|
2
7
|
display: flex;
|
|
3
8
|
flex-direction: column;
|
|
4
9
|
justify-content: center;
|
|
@@ -10,6 +15,18 @@
|
|
|
10
15
|
background-color: rgba(255,255,255,0.9);
|
|
11
16
|
}
|
|
12
17
|
|
|
18
|
+
.loading-overlay {
|
|
19
|
+
position: absolute;
|
|
20
|
+
inset: 0;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
background-color: rgba(255, 255, 255, 0.72);
|
|
25
|
+
backdrop-filter: blur(8px);
|
|
26
|
+
-webkit-backdrop-filter: blur(8px);
|
|
27
|
+
z-index: 10;
|
|
28
|
+
}
|
|
29
|
+
|
|
13
30
|
|
|
14
31
|
.login-frame h1 {
|
|
15
32
|
margin: 0;
|
|
@@ -127,7 +144,7 @@
|
|
|
127
144
|
margin-bottom: 0;
|
|
128
145
|
display: block;
|
|
129
146
|
}
|
|
130
|
-
</style><style></style><h1>`),Xa=F("<span class=error-message>"),ht=F("<span>"),Qa=F("<input type=text autocomplete=one-time-code required>"),Jt=F("<span class=hint>"),eu=F("<input type=password autocomplete=new-password required>"),Vt=F("<button type=submit>"),tu=F("<span class=info-message>"),nu=F("<span class=success-message>"),Kt=F("<input type=text>"),Gt=F("<input type=password>"),pt=F("<p>"),ru=F("<select>"),su=F("<option> (<!>)"),Ht=F("<input type=text autocomplete=one-time-code>"),iu=F("<input type=password autocomplete=new-password>"),au=F("<span class=checkbox-wrapper><input type=checkbox><span> "),uu=F("<button type=button>"),tt=F("<a class=centered-text href=#>"),ou=F("<div class=social-divider><span>"),lu=F("<button type=button class=social-btn>"),cu=F('<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>'),du=F('<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>'),fu=F('<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>'),hu=F('<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>');lt("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]=C((e.startMode||"password").toLowerCase()),[r,s]=C(""),[i,u]=C(""),[l,w]=C(""),[$,D]=C(""),[B]=C(e.redirect),[oe,fe]=C(!1),[Fe,L]=C(!1),[Z,Y]=C(!1),[le,G]=C(""),[te,V]=C(""),[we,ye]=C([]),[Ae,k]=C(""),[X,$e]=C([]),[De,ge]=C(""),[b,me]=C(!1),[Ue,be]=C(!1),[Me,Je]=C(""),[Ve,Te]=C(""),[Oe,Ie]=C(""),[je,ve]=C(""),[Se,_e]=C(""),[A,v]=C(""),[S,R]=C(!1),d=ct(e.locale);let _,z;try{z=e.styles}catch{z=""}console.log(z),st(async()=>{const o=new URLSearchParams(window.location.search);if(o.get("error")){history.replaceState({},"",window.location.pathname);const j=o.get("error_description");D(j||d.i18n("sa-social-error")),P(),O();return}const E=o.get("code");if(E){history.replaceState({},"",window.location.pathname),me(!0);try{const j=await fetch(`${e.domain}/api/v1/oauth/exchange`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:E})});if(!j.ok)throw new Error(d.i18n("sa-social-error"));const a=await j.json();localStorage.setItem("spartan-token",a.token),_.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:a.token}})),e.redirect!==""?window.location.href=e.redirect:(me(!1),P(),O())}catch(j){D(j.message||d.i18n("sa-social-error")),me(!1),P(),O()}return}const ce=o.get("sub");if(ce){Ie(ce);const j=o.get("email");j&&ve(j);const p=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("otp");p&&_e(p),n("invite");return}if(Ut()&&e.redirect!==""&&window.location.pathname!==e.redirect){window.location.href=e.redirect;return}P(),O()});function P(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`,{method:"GET",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}}).then(o=>{if(o.ok)return o.json();throw new Error("Network response was not ok.")}).then(o=>{console.log(o),fe(o.SelfSignUpAllowed),be(o.MFARequired||!1)}).catch(o=>{console.log(o),D(o.message)})}function O(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`,{method:"GET",mode:"cors",cache:"no-cache"}).then(o=>{if(o.ok)return o.json();throw new Error("Failed to load social providers")}).then(o=>{const g=(o.providers||[]).filter(E=>E.enabled);$e(g)}).catch(()=>{})}function Q(o){if(De())return;ge(o),D("");const g=window.location.origin+window.location.pathname;fetch(`${e.domain}/api/v1/oauth/${o}/initiate`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,redirectURI:g})}).then(E=>{if(E.ok)return E.json();throw new Error(d.i18n("sa-social-error"))}).then(E=>{window.location.href=E.authURL}).catch(E=>{ge(""),D(E.message)})}function K(o,g){return D(""),Te(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:o,sectorID:e.sector,transactionId:g})}).then(E=>{if(!E.ok)throw new Error(d.i18n("sa-signup-verify-error"))}).then(()=>{n("signup-verify")}).catch(E=>{D(E.message)})}function q(){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:Ve()})}).then(o=>{if(o.ok)return o.json();throw o.status===400?new Error(d.i18n("sa-signup-verify-error")):new Error(d.i18n("sa-signup-verify-error"))}).then(o=>{Je(o.token),localStorage.setItem("spartan-token",o.token),_.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:o.token}})),w(""),n("signup-webauthn")}).catch(o=>{D(o.message)})}function H(){b()||(me(!0),D(""),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${Me()}`},body:JSON.stringify({keyName:"Default",sectorID:e.sector})}).then(o=>{if(!o.ok)throw new Error(d.i18n("sa-signup-webauthn-error"));return o.json()}).then(o=>{const g=Rt(o.Options);return Lt(g).then(E=>{let ce=JSON.parse(JSON.stringify(E));return ce.transactionID=o.TransactionID,ce})}).then(o=>fetch(`${e.domain}/api/v1/webauthn/registration/finish`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${Me()}`},body:JSON.stringify(o)})).then(o=>{if(!o.ok)throw new Error(d.i18n("sa-signup-webauthn-error"));re()}).catch(o=>{D((o==null?void 0:o.message)||String(o))}).finally(()=>{me(!1)}))}function re(){n(e.startMode),e.redirect!==""&&(window.location.href=e.redirect)}function U(){return console.log("login"),D(""),t()==="password"?I():t()==="webauthn"?m():t()==="otp-pick"?se(Ae()):t()==="otp"?ie():t()==="reset-email"?he():t()==="reset-code"?Be():Promise.resolve()}function c(){return console.log("signup"),D(""),L(!1),fetch(`${e.domain}/api/v1/users`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:i(),sectorID:e.sector})}).then(o=>{if(o.ok)return o.json();throw new Error(d.i18n("sa-error-creating-user"))}).then(o=>{if(console.log(o),Ue())return K(r(),o.enrollmentTransactionId||"");L(!0),n(e.startMode)}).catch(o=>{L(!1),D(o.message),console.log(o)})}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(o=>{if(o.ok)return o.json();throw o.status===401?(n("password"),D(d.i18n("webauthn-not-enrolled")),new Error(d.i18n("webauthn-not-enrolled"))):new Error(`${o.status} ${o.statusText}: Network response was not ok.`)}).then(o=>{console.log(o);const g=Ja(o.CredentialAssertion);return console.log("Parsed WebAuthn request options:",g),Ka(g).then(E=>{const ce=JSON.stringify(E);let ke=JSON.parse(ce);return ke.transactionID=o.TransactionID,ke})}).then(o=>fetch(`${e.domain}/api/v1/login/webauthn/finish`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(o)})).then(x).catch(o=>{D(o.message),console.log(o)})}function I(){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:i(),sectorID:e.sector})}).then(x)}function x(o){return Promise.resolve(o).then(g=>{if(g.ok)return g.json();throw g}).then(g=>{if(console.log(g),localStorage.setItem("spartan-txid",g.transactionID),!g.token){if(g.challengeType==="email_enrollment")return K(r(),g.transactionID||"");if(g.challengeType.indexOf("otp")!==-1)return ee();g.challengeType.indexOf("webauthn")!==-1?(n("webauthn"),D(d.i18n("sa-webauthn-required"))):D(d.i18n("sa-unknown-challenge"));return}localStorage.setItem("spartan-token",g.token);const E=new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:g.token,transactionID:g.transactionID}});_.getRootNode().host.dispatchEvent(E),B()!==""&&(window.location.href=B())}).catch(g=>g.json().then(E=>{console.log(E.message),D(E.message)}).catch(E=>{console.log(E)}))}function ee(){const o=localStorage.getItem("spartan-txid")||"";return fetch(e.domain+`/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(o)}§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 E=g.registrations||[];if(E.length===0){D(d.i18n("sa-otp-no-registrations"));return}if(E.length===1)return se(E[0].ID||"");ye(E),k(E[0].ID||""),n("otp-pick"),D("")}).catch(g=>{D(g.message),console.log(g)})}function se(o){return console.log("begin OTP, registrationID:",o),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:o,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),w(""),D(""),n("otp")}).catch(g=>{D(g.message),console.log(g)})}function ie(){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(x)}function he(){return console.log("begin password reset"),D(""),Y(!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(o=>{if(o.ok)return o.json();throw new Error(d.i18n("sa-reset-error"))}).then(o=>{console.log(o),D(d.i18n("sa-reset-email-sent")),G(""),V(""),n("reset-code")}).catch(o=>{D(o.message),console.log(o)})}function Be(){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:le().toUpperCase().trim(),newPassword:te(),sectorID:e.sector})}).then(o=>{if(o.ok)return o.json();throw o.status===400?new Error(d.i18n("sa-reset-error-code")):new Error(d.i18n("sa-reset-error"))}).then(o=>{console.log(o),Y(!0),G(""),V(""),u(""),n(e.startMode)}).catch(o=>{D(o.message),console.log(o)})}async function Dt(){if(D(""),!Se()||Se().trim().length===0){D(d.i18n("sa-invite-error-otp"));return}if(!A()||A().length<8){D("Password must be at least 8 characters");return}const o=Oe();if(!o){D("Missing invitation information");return}const g=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:o,otp:Se().toUpperCase().trim(),password:A(),sectorID:e.sector})}).catch(()=>null);if(!g){D(d.i18n("sa-invite-error-generic"));return}if(g.ok){history.replaceState({},"",window.location.pathname);const E=await g.json().catch(()=>({})),ce=_.getRootNode().host;E.token?(localStorage.setItem("spartan-token",E.token),ce.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:E.token}})),B()!==""?window.location.href=B():e.redirect!==""?window.location.href=e.redirect:(R(!1),Ie(""),ve(""),_e(""),v(""),n(e.startMode),P(),O())):(R(!0),ce.dispatchEvent(new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:o,success:!0}})),setTimeout(()=>{B()!==""?window.location.href=B():e.redirect!==""?window.location.href=e.redirect:(R(!1),Ie(""),ve(""),_e(""),v(""),n(e.startMode),P(),O())},2e3))}else{const E=await g.json().catch(()=>({}));g.status===400||String(E.message).includes("invalid OTP")?D(d.i18n("sa-invite-error-otp")):g.status===504||String(E.message).includes("expired")?D(d.i18n("sa-invite-error-expired")):D(E.message||d.i18n("sa-invite-error-generic"))}}return(()=>{var o=Ya(),g=o.firstChild,E=g.nextSibling,ce=E.nextSibling,ke=_;return typeof ke=="function"?Ft(ke,o):_=o,o.addEventListener("submit",j=>{if(j.preventDefault(),b())return;me(!0),(t()==="sign-up"?c():t()==="signup-verify"?q():t()==="invite"?Promise.resolve(Dt()):U()).finally(()=>me(!1))}),f(E,z),f(ce,(()=>{var j=h(()=>t()==="reset-email"||t()==="reset-code");return()=>j()?d.i18n("sa-reset-password"):h(()=>t()==="signup-verify"||t()==="signup-webauthn")()?d.i18n("sa-signup-mfa-title"):h(()=>t()==="invite")()?d.i18n("sa-complete-invite"):d.i18n("sa-login")})()),f(o,$&&(()=>{var j=Xa();return f(j,$),j})(),null),f(o,(()=>{var j=h(()=>!!Fe());return()=>j()&&(()=>{var a=ht();return f(a,()=>d.i18n("sa-signup-complete")),a})()})(),null),f(o,(()=>{var j=h(()=>!!Z());return()=>j()&&(()=>{var a=ht();return f(a,()=>d.i18n("sa-reset-success")),a})()})(),null),f(o,(()=>{var j=h(()=>t()==="invite");return()=>j()&&[h(()=>h(()=>!!je())()&&(()=>{var a=tu();return f(a,je),a})()),h(()=>h(()=>!!S())()&&(()=>{var a=nu();return f(a,()=>d.i18n("sa-invite-success")),a})()),(()=>{var a=Qa();return a.$$input=p=>_e(p.currentTarget.value),y(p=>{var N=d.i18n("sa-invite-otp"),Ce=b()||S();return N!==p.e&&ue(a,"placeholder",p.e=N),Ce!==p.t&&(a.disabled=p.t=Ce),p},{e:void 0,t:void 0}),y(()=>a.value=Se()),a})(),(()=>{var a=Jt();return f(a,()=>d.i18n("sa-invite-otp-hint")),a})(),(()=>{var a=eu();return a.$$input=p=>v(p.currentTarget.value),y(p=>{var N=d.i18n("sa-invite-password"),Ce=b()||S();return N!==p.e&&ue(a,"placeholder",p.e=N),Ce!==p.t&&(a.disabled=p.t=Ce),p},{e:void 0,t:void 0}),y(()=>a.value=A()),a})(),(()=>{var a=Jt();return f(a,()=>d.i18n("sa-invite-password-hint")),a})(),(()=>{var a=Vt();return f(a,(()=>{var p=h(()=>!!b());return()=>p()?d.i18n("sa-invite-completing"):d.i18n("sa-invite-submit")})()),y(()=>a.disabled=b()||S()),a})()]})(),null),f(o,(()=>{var j=h(()=>t()!=="invite");return()=>j()&&[(()=>{var a=Kt();return a.$$input=p=>s(p.currentTarget.value),y(p=>{var N=d.i18n("sa-username"),Ce=t()==="otp"||t()==="otp-pick"||t()==="reset-code"||t()==="signup-verify"||t()==="signup-webauthn";return N!==p.e&&ue(a,"placeholder",p.e=N),Ce!==p.t&&(a.disabled=p.t=Ce),p},{e:void 0,t:void 0}),y(()=>a.value=r()),a})(),h(()=>h(()=>t()!=="sign-up"&&t()!=="signup-verify"&&t()!=="signup-webauthn")()&&[h(()=>h(()=>t()==="password")()&&(()=>{var a=Gt();return a.$$input=p=>u(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-password"))),y(()=>a.value=i()),a})()),h(()=>h(()=>t()==="webauthn")()&&ht()),h(()=>h(()=>t()==="otp-pick")()&&[(()=>{var a=pt();return f(a,()=>d.i18n("sa-otp-choose")),a})(),(()=>{var a=ru();return a.addEventListener("change",p=>k(p.currentTarget.value)),f(a,()=>we().map(p=>(()=>{var N=su(),Ce=N.firstChild,Yt=Ce.nextSibling;return Yt.nextSibling,f(N,()=>p.DisplayName||p.ID,Ce),f(N,()=>p.Type,Yt),y(()=>N.value=p.ID),N})())),y(()=>a.value=Ae()),a})()]),h(()=>h(()=>t()==="otp")()&&(()=>{var a=Kt();return a.$$input=p=>w(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-code"))),y(()=>a.value=l()),a})()),h(()=>h(()=>t()==="reset-code")()&&[(()=>{var a=Ht();return a.$$input=p=>G(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-reset-code"))),y(()=>a.value=le()),a})(),(()=>{var a=iu();return a.$$input=p=>V(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-new-password"))),y(()=>a.value=te()),a})()]),h(()=>h(()=>t()==="password"||t()==="webauthn")()&&(()=>{var a=au(),p=a.firstChild,N=p.nextSibling;return N.firstChild,a.$$click=()=>n(t()==="password"?"webauthn":"password"),f(N,()=>d.i18n("sa-use-password"),null),y(()=>p.checked=t()==="password"),a})())]),h(()=>h(()=>t()==="sign-up")()&&(()=>{var a=Gt();return a.$$input=p=>u(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-password"))),y(()=>a.value=i()),a})()),h(()=>h(()=>t()==="signup-verify")()&&[(()=>{var a=pt();return f(a,()=>d.i18n("sa-signup-verify-prompt")),a})(),(()=>{var a=Ht();return a.$$input=p=>w(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-code"))),y(()=>a.value=l()),a})()]),h(()=>h(()=>t()==="signup-webauthn")()&&(()=>{var a=pt();return f(a,()=>d.i18n("sa-signup-webauthn-prompt")),a})()),h(()=>h(()=>t()!=="signup-webauthn")()&&(()=>{var a=Vt();return f(a,(()=>{var p=h(()=>!!b());return()=>p()?d.i18n("sa-loading"):h(()=>t()==="sign-up")()?d.i18n("sa-signup"):h(()=>t()==="otp-pick")()?d.i18n("sa-otp-send-code"):h(()=>t()==="otp")()?d.i18n("sa-otp-verify"):h(()=>t()==="reset-email")()?d.i18n("sa-otp-send-code"):h(()=>t()==="reset-code")()?d.i18n("sa-reset-submit"):h(()=>t()==="signup-verify")()?d.i18n("sa-otp-verify"):d.i18n("sa-login")})()),y(()=>a.disabled=b()),a})()),h(()=>h(()=>t()==="signup-webauthn")()&&[(()=>{var a=uu();return a.$$click=()=>H(),f(a,(()=>{var p=h(()=>!!b());return()=>p()?d.i18n("sa-loading"):d.i18n("sa-signup-webauthn-setup")})()),y(()=>a.disabled=b()),a})(),(()=>{var a=tt();return a.$$click=()=>re(),f(a,()=>d.i18n("sa-signup-webauthn-done")),a})()]),h(()=>h(()=>t()==="password")()&&(()=>{var a=tt();return a.$$click=()=>{D(""),Y(!1),n("reset-email")},f(a,()=>d.i18n("sa-forgot-password")),a})()),h(()=>h(()=>t()==="reset-email"||t()==="reset-code")()&&(()=>{var a=tt();return a.$$click=()=>{D(""),G(""),V(""),n(e.startMode)},f(a,()=>d.i18n("sa-back")),a})()),h(()=>h(()=>!!(oe()&&t()!=="reset-email"&&t()!=="reset-code"&&t()!=="signup-verify"&&t()!=="signup-webauthn"))()&&(()=>{var a=tt();return a.$$click=()=>t()==="sign-up"?n(e.startMode):n("sign-up"),f(a,(()=>{var p=h(()=>t()==="sign-up");return()=>p()?d.i18n("sa-back"):d.i18n("sa-signup")})()),a})()),h(()=>h(()=>X().length>0&&(t()==="password"||t()==="webauthn"||t()==="sign-up"))()&&[(()=>{var a=ou(),p=a.firstChild;return f(p,()=>d.i18n("sa-or")),a})(),h(()=>X().map(a=>(()=>{var p=lu();return p.$$click=()=>Q(a.provider),f(p,(()=>{var N=h(()=>a.provider==="google");return()=>N()&&cu()})(),null),f(p,(()=>{var N=h(()=>a.provider==="github");return()=>N()&&du()})(),null),f(p,(()=>{var N=h(()=>a.provider==="apple");return()=>N()&&fu()})(),null),f(p,(()=>{var N=h(()=>a.provider==="oidc");return()=>N()&&hu()})(),null),f(p,(()=>{var N=h(()=>a.provider==="google");return()=>N()?d.i18n("sa-social-google"):h(()=>a.provider==="github")()?d.i18n("sa-social-github"):h(()=>a.provider==="apple")()?d.i18n("sa-social-apple"):d.i18n("sa-social-oidc")})(),null),y(()=>p.disabled=!!De()||b()),p})()))])]})(),null),o})()}),at(["input","click"]);var pu=F(`<div class=container><style>.container {
|
|
147
|
+
</style><style></style><h1>`),nu=A("<span class=error-message>"),Dt=A("<span>"),ru=A("<input type=text autocomplete=one-time-code required>"),Gt=A("<span class=hint>"),su=A("<input type=password autocomplete=new-password required>"),Ht=A("<button type=submit>"),iu=A("<span class=info-message>"),au=A("<span class=success-message>"),uu=A("<input type=text autocomplete=username>"),ou=A("<input type=password autocomplete=current-password>"),gt=A("<p>"),lu=A("<select>"),cu=A("<option> (<!>)"),du=A("<input type=text>"),Wt=A("<input type=text autocomplete=one-time-code>"),Zt=A("<input type=password autocomplete=new-password>"),fu=A("<span class=checkbox-wrapper><input type=checkbox><span> "),hu=A("<button type=button>"),nt=A("<a class=centered-text href=#>"),pu=A("<div class=social-divider><span>"),Du=A("<button type=button class=social-btn>"),gu=A('<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>'),mu=A('<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>'),bu=A('<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>'),vu=A('<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>'),Cu=A("<div class=loading-overlay part=loading-overlay><slot name=loading>");dt("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]=C((e.startMode||"password").toLowerCase()),[r,s]=C(""),[i,u]=C(""),[o,w]=C(""),[$,D]=C(""),[k]=C(e.redirect),[oe,he]=C(!1),[ye,R]=C(!1),[X,Q]=C(!1),[le,H]=C(""),[ne,K]=C(""),[Ae,$e]=C([]),[Ee,B]=C(""),[ee,ke]=C([]),[pe,me]=C(""),[b,be]=C(!1),[Je,ve]=C(!1),[je,Ve]=C(""),[Ke,Oe]=C(""),[Ie,Pe]=C(""),[Re,Ce]=C(""),[Se,_e]=C(""),[E,v]=C(""),[x,j]=C(!1),d=ft(e.locale);let _,I=null,N;const L=()=>b()||!!pe();rn(()=>{I&&clearTimeout(I)});try{N=e.styles}catch{N=""}console.log(N),at(async()=>{const l=new URLSearchParams(window.location.search);if(l.get("error")){history.replaceState({},"",window.location.pathname);const De=l.get("error_description");D(De||d.i18n("sa-social-error")),q(),M();return}const F=l.get("code");if(F){history.replaceState({},"",window.location.pathname),be(!0);try{const De=await fetch(`${e.domain}/api/v1/oauth/exchange`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:F})});if(!De.ok)throw new Error(d.i18n("sa-social-error"));const W=await De.json();localStorage.setItem("spartan-token",W.token);const a=_.getRootNode().host;e.redirect!==""?(a.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:W.token}})),window.location.href=e.redirect):(I=setTimeout(()=>{I=null,be(!1),q(),M()},5e3),a.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:W.token}})))}catch(De){D(De.message||d.i18n("sa-social-error")),be(!1),q(),M()}return}const ae=l.get("sub");if(ae){Pe(ae);const De=l.get("email");De&&Ce(De);const a=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("otp");a&&_e(a),n("invite");return}if(Kt()&&e.redirect!==""&&window.location.pathname!==e.redirect){window.location.href=e.redirect;return}q(),M()});function q(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`,{method:"GET",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}}).then(l=>{if(l.ok)return l.json();throw new Error("Network response was not ok.")}).then(l=>{console.log(l),he(l.SelfSignUpAllowed),ve(l.MFARequired||!1)}).catch(l=>{console.log(l),D(l.message)})}function M(){fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`,{method:"GET",mode:"cors",cache:"no-cache"}).then(l=>{if(l.ok)return l.json();throw new Error("Failed to load social providers")}).then(l=>{const g=(l.providers||[]).filter(F=>F.enabled);ke(g)}).catch(()=>{})}function U(l){if(pe())return;me(l),D("");const g=window.location.origin+window.location.pathname;fetch(`${e.domain}/api/v1/oauth/${l}/initiate`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorID:e.sector,redirectURI:g})}).then(F=>{if(F.ok)return F.json();throw new Error(d.i18n("sa-social-error"))}).then(F=>{window.location.href=F.authURL}).catch(F=>{me(""),D(F.message)})}function G(l,g){return D(""),Oe(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:l,sectorID:e.sector,transactionId:g})}).then(F=>{if(!F.ok)throw new Error(d.i18n("sa-signup-verify-error"))}).then(()=>{n("signup-verify")}).catch(F=>{D(F.message)})}function ce(){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:o().toUpperCase().trim(),sectorID:e.sector,transactionId:Ke()})}).then(l=>{if(l.ok)return l.json();throw l.status===400?new Error(d.i18n("sa-signup-verify-error")):new Error(d.i18n("sa-signup-verify-error"))}).then(l=>{Ve(l.token),localStorage.setItem("spartan-token",l.token),_.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:l.token}})),w(""),n("signup-webauthn")}).catch(l=>{D(l.message)})}function J(){b()||(be(!0),D(""),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${je()}`},body:JSON.stringify({keyName:"Default",sectorID:e.sector})}).then(l=>{if(!l.ok)throw new Error(d.i18n("sa-signup-webauthn-error"));return l.json()}).then(l=>{const g=Ut(l.Options);return Jt(g).then(F=>{let ae=JSON.parse(JSON.stringify(F));return ae.transactionID=l.TransactionID,ae})}).then(l=>fetch(`${e.domain}/api/v1/webauthn/registration/finish`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:`bearer ${je()}`},body:JSON.stringify(l)})).then(l=>{if(!l.ok)throw new Error(d.i18n("sa-signup-webauthn-error"));c()}).catch(l=>{D((l==null?void 0:l.message)||String(l))}).finally(()=>{be(!1)}))}function c(){n(e.startMode),e.redirect!==""&&(window.location.href=e.redirect)}function m(){return console.log("login"),D(""),t()==="password"?te():t()==="webauthn"?S():t()==="otp-pick"?de(Ee()):t()==="otp"?Be():t()==="reset-email"?mt():t()==="reset-code"?bt():Promise.resolve()}function O(){return console.log("signup"),D(""),R(!1),fetch(`${e.domain}/api/v1/users`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify({username:r(),password:i(),sectorID:e.sector})}).then(l=>{if(l.ok)return l.json();throw new Error(d.i18n("sa-error-creating-user"))}).then(l=>{if(console.log(l),Je())return G(r(),l.enrollmentTransactionId||"");R(!0),n(e.startMode)}).catch(l=>{R(!1),D(l.message),console.log(l)})}function S(){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(l=>{if(l.ok)return l.json();throw l.status===401?(n("password"),D(d.i18n("webauthn-not-enrolled")),new Error(d.i18n("webauthn-not-enrolled"))):new Error(`${l.status} ${l.statusText}: Network response was not ok.`)}).then(l=>{console.log(l);const g=Ha(l.CredentialAssertion);return console.log("Parsed WebAuthn request options:",g),Za(g).then(F=>{const ae=JSON.stringify(F);let Te=JSON.parse(ae);return Te.transactionID=l.TransactionID,Te})}).then(l=>fetch(`${e.domain}/api/v1/login/webauthn/finish`,{method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(l)})).then(re).catch(l=>{D(l.message),console.log(l)})}function te(){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:i(),sectorID:e.sector})}).then(re)}function re(l){return Promise.resolve(l).then(g=>{if(g.ok)return g.json();throw g}).then(g=>{if(console.log(g),localStorage.setItem("spartan-txid",g.transactionID),!g.token){if(g.challengeType==="email_enrollment")return G(r(),g.transactionID||"");if(g.challengeType.indexOf("otp")!==-1)return ie();g.challengeType.indexOf("webauthn")!==-1?(n("webauthn"),D(d.i18n("sa-webauthn-required"))):D(d.i18n("sa-unknown-challenge"));return}localStorage.setItem("spartan-token",g.token);const F=new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:g.token,transactionID:g.transactionID}});_.getRootNode().host.dispatchEvent(F),k()!==""&&(window.location.href=k())}).catch(g=>g.json().then(F=>{console.log(F.message),D(F.message)}).catch(F=>{console.log(F)}))}function ie(){const l=localStorage.getItem("spartan-txid")||"";return fetch(e.domain+`/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(l)}§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 F=g.registrations||[];if(F.length===0){D(d.i18n("sa-otp-no-registrations"));return}if(F.length===1)return de(F[0].ID||"");$e(F),B(F[0].ID||""),n("otp-pick"),D("")}).catch(g=>{D(g.message),console.log(g)})}function de(l){return console.log("begin OTP, registrationID:",l),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:l,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),w(""),D(""),n("otp")}).catch(g=>{D(g.message),console.log(g)})}function Be(){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:o(),transactionID:localStorage.getItem("spartan-txid"),sectorID:e.sector})}).then(re)}function mt(){return console.log("begin password reset"),D(""),Q(!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(l=>{if(l.ok)return l.json();throw new Error(d.i18n("sa-reset-error"))}).then(l=>{console.log(l),D(d.i18n("sa-reset-email-sent")),H(""),K(""),n("reset-code")}).catch(l=>{D(l.message),console.log(l)})}function bt(){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:le().toUpperCase().trim(),newPassword:ne(),sectorID:e.sector})}).then(l=>{if(l.ok)return l.json();throw l.status===400?new Error(d.i18n("sa-reset-error-code")):new Error(d.i18n("sa-reset-error"))}).then(l=>{console.log(l),Q(!0),H(""),K(""),u(""),n(e.startMode)}).catch(l=>{D(l.message),console.log(l)})}async function rt(){if(D(""),!Se()||Se().trim().length===0){D(d.i18n("sa-invite-error-otp"));return}if(!E()||E().length<8){D("Password must be at least 8 characters");return}const l=Ie();if(!l){D("Missing invitation information");return}const g=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:l,otp:Se().toUpperCase().trim(),password:E(),sectorID:e.sector})}).catch(()=>null);if(!g){D(d.i18n("sa-invite-error-generic"));return}if(g.ok){history.replaceState({},"",window.location.pathname);const F=await g.json().catch(()=>({})),ae=_.getRootNode().host;F.token?(localStorage.setItem("spartan-token",F.token),ae.dispatchEvent(new CustomEvent("spartan-login",{bubbles:!0,cancelable:!0,detail:{token:F.token}})),k()!==""?window.location.href=k():e.redirect!==""?window.location.href=e.redirect:(j(!1),Pe(""),Ce(""),_e(""),v(""),n(e.startMode),q(),M())):(j(!0),ae.dispatchEvent(new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:l,success:!0}})),setTimeout(()=>{k()!==""?window.location.href=k():e.redirect!==""?window.location.href=e.redirect:(j(!1),Pe(""),Ce(""),_e(""),v(""),n(e.startMode),q(),M())},2e3))}else{const F=await g.json().catch(()=>({}));g.status===400||String(F.message).includes("invalid OTP")?D(d.i18n("sa-invite-error-otp")):g.status===504||String(F.message).includes("expired")?D(d.i18n("sa-invite-error-expired")):D(F.message||d.i18n("sa-invite-error-generic"))}}return(()=>{var l=tu(),g=l.firstChild,F=g.firstChild,ae=F.nextSibling,Te=ae.nextSibling,De=_;return typeof De=="function"?kt(De,g):_=g,g.addEventListener("submit",W=>{if(W.preventDefault(),b())return;be(!0),(t()==="sign-up"?O():t()==="signup-verify"?ce():t()==="invite"?Promise.resolve(rt()):m()).finally(()=>be(!1))}),f(ae,N),f(Te,(()=>{var W=h(()=>t()==="reset-email"||t()==="reset-code");return()=>W()?d.i18n("sa-reset-password"):h(()=>t()==="signup-verify"||t()==="signup-webauthn")()?d.i18n("sa-signup-mfa-title"):h(()=>t()==="invite")()?d.i18n("sa-complete-invite"):d.i18n("sa-login")})()),f(g,$&&(()=>{var W=nu();return f(W,$),W})(),null),f(g,(()=>{var W=h(()=>!!ye());return()=>W()&&(()=>{var a=Dt();return f(a,()=>d.i18n("sa-signup-complete")),a})()})(),null),f(g,(()=>{var W=h(()=>!!X());return()=>W()&&(()=>{var a=Dt();return f(a,()=>d.i18n("sa-reset-success")),a})()})(),null),f(g,(()=>{var W=h(()=>t()==="invite");return()=>W()&&[h(()=>h(()=>!!Re())()&&(()=>{var a=iu();return f(a,Re),a})()),h(()=>h(()=>!!x())()&&(()=>{var a=au();return f(a,()=>d.i18n("sa-invite-success")),a})()),(()=>{var a=ru();return a.$$input=p=>_e(p.currentTarget.value),y(p=>{var P=d.i18n("sa-invite-otp"),we=b()||x();return P!==p.e&&ue(a,"placeholder",p.e=P),we!==p.t&&(a.disabled=p.t=we),p},{e:void 0,t:void 0}),y(()=>a.value=Se()),a})(),(()=>{var a=Gt();return f(a,()=>d.i18n("sa-invite-otp-hint")),a})(),(()=>{var a=su();return a.$$input=p=>v(p.currentTarget.value),y(p=>{var P=d.i18n("sa-invite-password"),we=b()||x();return P!==p.e&&ue(a,"placeholder",p.e=P),we!==p.t&&(a.disabled=p.t=we),p},{e:void 0,t:void 0}),y(()=>a.value=E()),a})(),(()=>{var a=Gt();return f(a,()=>d.i18n("sa-invite-password-hint")),a})(),(()=>{var a=Ht();return f(a,(()=>{var p=h(()=>!!b());return()=>p()?d.i18n("sa-invite-completing"):d.i18n("sa-invite-submit")})()),y(()=>a.disabled=b()||x()),a})()]})(),null),f(g,(()=>{var W=h(()=>t()!=="invite");return()=>W()&&[(()=>{var a=uu();return a.addEventListener("change",p=>s(p.currentTarget.value)),a.$$input=p=>s(p.currentTarget.value),y(p=>{var P=d.i18n("sa-username"),we=t()==="otp"||t()==="otp-pick"||t()==="reset-code"||t()==="signup-verify"||t()==="signup-webauthn";return P!==p.e&&ue(a,"placeholder",p.e=P),we!==p.t&&(a.disabled=p.t=we),p},{e:void 0,t:void 0}),y(()=>a.value=r()),a})(),h(()=>h(()=>t()!=="sign-up"&&t()!=="signup-verify"&&t()!=="signup-webauthn")()&&[h(()=>h(()=>t()==="password")()&&(()=>{var a=ou();return a.addEventListener("change",p=>u(p.currentTarget.value)),a.$$input=p=>u(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-password"))),y(()=>a.value=i()),a})()),h(()=>h(()=>t()==="webauthn")()&&Dt()),h(()=>h(()=>t()==="otp-pick")()&&[(()=>{var a=gt();return f(a,()=>d.i18n("sa-otp-choose")),a})(),(()=>{var a=lu();return a.addEventListener("change",p=>B(p.currentTarget.value)),f(a,()=>Ae().map(p=>(()=>{var P=cu(),we=P.firstChild,Qt=we.nextSibling;return Qt.nextSibling,f(P,()=>p.DisplayName||p.ID,we),f(P,()=>p.Type,Qt),y(()=>P.value=p.ID),P})())),y(()=>a.value=Ee()),a})()]),h(()=>h(()=>t()==="otp")()&&(()=>{var a=du();return a.$$input=p=>w(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-code"))),y(()=>a.value=o()),a})()),h(()=>h(()=>t()==="reset-code")()&&[(()=>{var a=Wt();return a.$$input=p=>H(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-reset-code"))),y(()=>a.value=le()),a})(),(()=>{var a=Zt();return a.$$input=p=>K(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-new-password"))),y(()=>a.value=ne()),a})()]),h(()=>h(()=>t()==="password"||t()==="webauthn")()&&(()=>{var a=fu(),p=a.firstChild,P=p.nextSibling;return P.firstChild,a.$$click=()=>n(t()==="password"?"webauthn":"password"),f(P,()=>d.i18n("sa-use-password"),null),y(()=>p.checked=t()==="password"),a})())]),h(()=>h(()=>t()==="sign-up")()&&(()=>{var a=Zt();return a.addEventListener("change",p=>u(p.currentTarget.value)),a.$$input=p=>u(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-password"))),y(()=>a.value=i()),a})()),h(()=>h(()=>t()==="signup-verify")()&&[(()=>{var a=gt();return f(a,()=>d.i18n("sa-signup-verify-prompt")),a})(),(()=>{var a=Wt();return a.$$input=p=>w(p.currentTarget.value),y(()=>ue(a,"placeholder",d.i18n("sa-code"))),y(()=>a.value=o()),a})()]),h(()=>h(()=>t()==="signup-webauthn")()&&(()=>{var a=gt();return f(a,()=>d.i18n("sa-signup-webauthn-prompt")),a})()),h(()=>h(()=>t()!=="signup-webauthn")()&&(()=>{var a=Ht();return f(a,(()=>{var p=h(()=>!!b());return()=>p()?d.i18n("sa-loading"):h(()=>t()==="sign-up")()?d.i18n("sa-signup"):h(()=>t()==="otp-pick")()?d.i18n("sa-otp-send-code"):h(()=>t()==="otp")()?d.i18n("sa-otp-verify"):h(()=>t()==="reset-email")()?d.i18n("sa-otp-send-code"):h(()=>t()==="reset-code")()?d.i18n("sa-reset-submit"):h(()=>t()==="signup-verify")()?d.i18n("sa-otp-verify"):d.i18n("sa-login")})()),y(()=>a.disabled=b()),a})()),h(()=>h(()=>t()==="signup-webauthn")()&&[(()=>{var a=hu();return a.$$click=()=>J(),f(a,(()=>{var p=h(()=>!!b());return()=>p()?d.i18n("sa-loading"):d.i18n("sa-signup-webauthn-setup")})()),y(()=>a.disabled=b()),a})(),(()=>{var a=nt();return a.$$click=()=>c(),f(a,()=>d.i18n("sa-signup-webauthn-done")),a})()]),h(()=>h(()=>t()==="password")()&&(()=>{var a=nt();return a.$$click=()=>{D(""),Q(!1),n("reset-email")},f(a,()=>d.i18n("sa-forgot-password")),a})()),h(()=>h(()=>t()==="reset-email"||t()==="reset-code")()&&(()=>{var a=nt();return a.$$click=()=>{D(""),H(""),K(""),n(e.startMode)},f(a,()=>d.i18n("sa-back")),a})()),h(()=>h(()=>!!(oe()&&t()!=="reset-email"&&t()!=="reset-code"&&t()!=="signup-verify"&&t()!=="signup-webauthn"))()&&(()=>{var a=nt();return a.$$click=()=>t()==="sign-up"?n(e.startMode):n("sign-up"),f(a,(()=>{var p=h(()=>t()==="sign-up");return()=>p()?d.i18n("sa-back"):d.i18n("sa-signup")})()),a})()),h(()=>h(()=>ee().length>0&&(t()==="password"||t()==="webauthn"||t()==="sign-up"))()&&[(()=>{var a=pu(),p=a.firstChild;return f(p,()=>d.i18n("sa-or")),a})(),h(()=>ee().map(a=>(()=>{var p=Du();return p.$$click=()=>U(a.provider),f(p,(()=>{var P=h(()=>a.provider==="google");return()=>P()&&gu()})(),null),f(p,(()=>{var P=h(()=>a.provider==="github");return()=>P()&&mu()})(),null),f(p,(()=>{var P=h(()=>a.provider==="apple");return()=>P()&&bu()})(),null),f(p,(()=>{var P=h(()=>a.provider==="oidc");return()=>P()&&vu()})(),null),f(p,(()=>{var P=h(()=>a.provider==="google");return()=>P()?d.i18n("sa-social-google"):h(()=>a.provider==="github")()?d.i18n("sa-social-github"):h(()=>a.provider==="apple")()?d.i18n("sa-social-apple"):d.i18n("sa-social-oidc")})(),null),y(()=>p.disabled=!!pe()||b()),p})()))])]})(),null),f(l,(()=>{var W=h(()=>!!L());return()=>W()&&(()=>{var a=Cu(),p=a.firstChild;return p._$owner=sn(),f(p,()=>d.i18n("sa-loading")),a})()})(),null),l})()}),ot(["input","click"]);var wu=A(`<div class=container><style>.container {
|
|
131
148
|
background-color: #ffffff;
|
|
132
149
|
border-radius: 10px;
|
|
133
150
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
@@ -305,7 +322,7 @@
|
|
|
305
322
|
.modal-content .btn.verify:hover {
|
|
306
323
|
background-color: #0056b3;
|
|
307
324
|
}
|
|
308
|
-
</style><style></style><h1 class=header>`),
|
|
325
|
+
</style><style></style><h1 class=header>`),Yt=A("<span class=error-message>"),Au=A("<div class=section><h2></h2><div class=security-keys>"),Eu=A('<div class=key-item><span></span><button class="btn remove">'),Xt=A("<span>"),Fu=A("<div class=section><div class=security-keys>"),yu=A('<button class="btn add">+ '),$u=A('<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">'),ku=A("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"),Bu=A('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'),xu=A('<span> <button class="btn validate">'),Su=A('<div class=section><div class=mfa-manage><button class="btn add">+ '),_u=A('<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">'),Tu=A('<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');dt("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=>{C(""),C("");const[t,n]=C(""),[r,s]=C(""),[i,u]=C(""),[o]=C(e.showWebAuthn),[w,$]=C(!1),[D,k]=C(!1),[oe,he]=C(!1),[ye,R]=C(!1),[X,Q]=C(!1),[le,H]=C([]),[ne,K]=C([]),[Ae,$e]=C(""),[Ee,B]=C(""),[ee,ke]=C(""),[pe,me]=C(""),b=ft(e.locale);let be;try{be=e.styles}catch{be=""}at(async()=>{if(Kt())k(!0),s("");else{if(e.redirectOnUnauthenticated){window.location.href=e.redirect;return}k(!1),s(b.i18n("not-authenticated"))}Je().then(v=>{console.log(v)}),await Oe(),Ce().then(v=>{K(v.registrations)})});async function Je(){return await(await fetch(`${e.domain}/api/v1/users/self`,ve("get"))).json()}function ve(E="get"){return{method:E,mode:"cors",cache:"no-cache",headers:{"Content-Type":"application",Authorization:`bearer ${Qa()}`}}}function je(){if(X())return;Q(!0);let E=ve("post");E.body=JSON.stringify({keyName:t(),sectorID:e.sector}),fetch(`${e.domain}/api/v1/webauthn/registration/begin`,E).then(v=>{if(v.status===200)return v.json();throw v}).then(v=>(console.log(v),Ve(v))).catch(v=>{v.json?v.json().then(x=>{s(x.message)}):s(v)}).finally(()=>{Q(!1)})}async function Ve(E){try{const v=Ut(E.Options);console.log("Parsed WebAuthn creation options:",v);const x=await Jt(v),j=JSON.stringify(x);let d=JSON.parse(j);d.transactionID=E.TransactionID;let _=ve("post");_.body=JSON.stringify(d);const I=await fetch(`${e.domain}/api/v1/webauthn/registration/finish`,_);if(I.status!==200){const N=await I.json();s(N.message);return}$(!1),n(""),Oe()}catch(v){console.error("WebAuthn registration error:",v),s((v==null?void 0:v.message)||String(v))}}async function Ke(E){let v=ve("delete");v.body=JSON.stringify({ID:E});try{if((await fetch(`${e.domain}/api/v1/webauthn/${E}`,v)).status!==200){s(b.i18n("error-webauthn-remove"));return}Oe()}catch(x){console.error(x),s(b.i18n("error-webauthn-remove"));return}}async function Oe(){let E=ve("get");try{const x=await(await fetch(`${e.domain}/api/v1/webauthn/registration/list`,E)).json();H(x.registrations||[])}catch(v){console.error(v),H([])}}function Ie(E,v){X()||(Q(!0),Pe(E,v).then(x=>{if(x)return Ce().then(j=>{K(j.registrations),$e(x.transactionID),R(!0)})}).finally(()=>{Q(!1)}))}function Pe(E,v){let x=ve("post");return x.body=JSON.stringify({destination:E,OTPType:_e(v),sectorID:e.sector}),fetch(`${e.domain}/api/v1/otp/begin`,x).then(j=>{if(j.status!==200){s(b.i18n("error-otp-verification"));return}return j.json()}).catch(j=>{console.error(j),s(b.i18n("error-otp-registration"))})}function Re(E,v){if(X())return;Q(!0);let x=ve("post");x.body=JSON.stringify({transactionID:E,password:v}),fetch(`${e.domain}/api/v1/otp/finish`,x).then(j=>{if(j.status!==200){u(b.i18n("error-otp-verification"));return}return R(!1),B(""),he(!1),me(""),ke(""),Ce().then(d=>{K(d.registrations)}),j.json()}).catch(j=>{console.error(j),u(b.i18n("error-otp-registration"))}).finally(()=>{Q(!1)})}async function Ce(){let E=ve("get");try{return await(await fetch(`${e.domain}/api/v1/otp/list`,E)).json()}catch(v){console.error(v),s(b.i18n("error-otp-list"));return}}async function Se(E){let v=ve("delete");v.body=JSON.stringify({ID:E});try{if((await fetch(`${e.domain}/api/v1/otp/${E}`,v)).status!==200){s(b.i18n("error-otp-remove"));return}Ce().then(j=>{K(j.registrations)})}catch(x){console.error(x),s(b.i18n("error-otp-remove"));return}}function _e(E){return E==="EMAIL"?2:1}return(()=>{var E=wu(),v=E.firstChild,x=v.nextSibling,j=x.nextSibling;return f(x,be),f(j,()=>b.i18n("sa-account-settings")),f(E,r&&(()=>{var d=Yt();return f(d,r),d})(),null),f(E,(()=>{var d=h(()=>!!(o()&&le().length));return()=>d()&&(()=>{var _=Au(),I=_.firstChild,N=I.nextSibling;return f(I,()=>b.i18n("sa-webauthn-security-keys")),f(N,()=>le().map(L=>(()=>{var q=Eu(),M=q.firstChild,U=M.nextSibling;return f(M,()=>L.keyName),U.$$click=()=>{confirm(b.i18n("sa-confirm-delete-key"))&&Ke(L.keyName)},f(U,()=>b.i18n("sa-remove")),q})()),null),f(N,(()=>{var L=h(()=>le().length<=0);return()=>L()&&(()=>{var q=Xt();return f(q,()=>b.i18n("sa-no-security-keys")),q})()})(),null),_})()})(),null),f(E,(()=>{var d=h(()=>!!o());return()=>d()&&(()=>{var _=Fu(),I=_.firstChild;return f(I,(()=>{var N=h(()=>!w());return()=>N()&&(()=>{var L=yu();return L.firstChild,L.$$click=()=>$(!0),f(L,()=>b.i18n("sa-add-security-key"),null),L})()})(),null),f(I,(()=>{var N=h(()=>!!w());return()=>N()&&(()=>{var L=$u(),q=L.firstChild,M=q.firstChild,U=M.nextSibling,G=U.nextSibling,ce=G.nextSibling;return f(M,()=>b.i18n("sa-webauthn-key-name")),U.$$input=J=>n(J.currentTarget.value),G.$$click=()=>$(!1),f(G,()=>b.i18n("sa-cancel")),ce.$$click=()=>t()!==""&&je(),f(ce,()=>b.i18n("sa-register")),y(J=>{var c=b.i18n("sa-webauthn-key-name"),m=t()===""||X();return c!==J.e&&ue(U,"placeholder",J.e=c),m!==J.t&&(ce.disabled=J.t=m),J},{e:void 0,t:void 0}),y(()=>U.value=t()),L})()})(),null),_})()})(),null),f(E,(()=>{var d=h(()=>ne().length>0);return()=>d()&&(()=>{var _=ku(),I=_.firstChild,N=I.nextSibling,L=N.firstChild,q=L.firstChild,M=q.firstChild,U=M.nextSibling,G=U.nextSibling,ce=L.nextSibling;return f(I,()=>b.i18n("sa-mfa")),f(M,()=>b.i18n("sa-mfa-destination")),f(U,()=>b.i18n("sa-mfa-validated")),f(G,()=>b.i18n("sa-mfa-action")),f(ce,()=>ne().map(J=>(()=>{var c=Bu(),m=c.firstChild,O=m.nextSibling,S=O.nextSibling,te=S.firstChild;return f(m,()=>J.DisplayName),f(O,(()=>{var re=h(()=>!!J.Validated);return()=>re()?(()=>{var ie=Xt();return f(ie,()=>b.i18n("sa-yes")),ie})():(()=>{var ie=xu(),de=ie.firstChild,Be=de.nextSibling;return f(ie,()=>b.i18n("sa-no"),de),Be.$$click=()=>{Ie(J.DisplayName,J.Type==="email"?"EMAIL":"SMS")},f(Be,()=>b.i18n("sa-validate")),y(()=>Be.disabled=X()),ie})()})()),te.$$click=()=>{confirm(b.i18n("sa-confirm-delete-key"))&&Se(J.ID)},f(te,()=>b.i18n("sa-remove")),y(()=>ue(m,"title",J.DisplayName)),c})())),_})()})(),null),f(E,(()=>{var d=h(()=>!oe());return()=>d()&&(()=>{var _=Su(),I=_.firstChild,N=I.firstChild;return N.firstChild,N.$$click=()=>he(!0),f(N,()=>b.i18n("sa-register-mfa"),null),_})()})(),null),f(E,(()=>{var d=h(()=>!!oe());return()=>d()&&(()=>{var _=_u(),I=_.firstChild,N=I.nextSibling,L=N.firstChild,q=L.firstChild,M=q.nextSibling,U=M.nextSibling,G=L.nextSibling,ce=G.firstChild,J=ce.nextSibling,c=J.nextSibling,m=G.nextSibling,O=m.firstChild;return f(I,()=>b.i18n("sa-add-mfa")),f(q,()=>b.i18n("sa-email")),M.$$input=S=>ke(S.currentTarget.value),U.$$click=()=>Ie(ee(),"EMAIL"),f(U,()=>b.i18n("sa-add-email")),f(ce,()=>b.i18n("sa-phone")),J.$$input=S=>me(S.currentTarget.value),c.$$click=()=>Ie(pe(),"SMS"),f(c,()=>b.i18n("sa-add-sms")),O.$$click=()=>he(!1),f(O,()=>b.i18n("sa-cancel")),y(S=>{var te=b.i18n("sa-email"),re=X(),ie=b.i18n("sa-phone"),de=X();return te!==S.e&&ue(M,"placeholder",S.e=te),re!==S.t&&(U.disabled=S.t=re),ie!==S.a&&ue(J,"placeholder",S.a=ie),de!==S.o&&(c.disabled=S.o=de),S},{e:void 0,t:void 0,a:void 0,o:void 0}),y(()=>M.value=ee()),y(()=>J.value=pe()),_})()})(),null),f(E,(()=>{var d=h(()=>!!ye());return()=>d()&&(()=>{var _=Tu(),I=_.firstChild,N=I.firstChild,L=N.nextSibling,q=L.nextSibling,M=q.nextSibling,U=M.nextSibling;return _.$$click=()=>R(!1),I.$$click=G=>G.stopPropagation(),N.$$click=()=>R(!1),f(I,(()=>{var G=h(()=>!!i());return()=>G()&&(()=>{var ce=Yt();return f(ce,i),ce})()})(),q),M.$$input=G=>B(G.currentTarget.value),U.$$click=()=>Re(Ae(),Ee()),y(()=>U.disabled=X()),y(()=>M.value=Ee()),_})()})(),null),E})()}),ot(["click","input"]);var Ou=A(`<form class=invite-frame><style>.invite-frame {
|
|
309
326
|
display: flex;
|
|
310
327
|
flex-direction: column;
|
|
311
328
|
justify-content: center;
|
|
@@ -365,4 +382,4 @@
|
|
|
365
382
|
margin-bottom: 10px;
|
|
366
383
|
display: block;
|
|
367
384
|
}
|
|
368
|
-
</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>`),
|
|
385
|
+
</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>`),Iu=A("<span class=info-message>"),Pu=A("<span class=error-message>"),zu=A("<span class=success-message>");dt("spartan-invite",{domain:"http://127.0.0.1:11000",sector:"0ad5c3e5-0186-4557-8b32-4b36f247bf09",sub:"",email:"",styles:"",locale:"en",redirect:""},e=>{console.warn("[spartan-invite] <spartan-invite> is deprecated. Use <spartan-login> instead — it now handles invite links by detecting ?sub= URL params automatically.");const[t,n]=C(""),[r,s]=C(""),[i,u]=C(""),[o,w]=C(""),[$,D]=C(!1),k=ft(e.locale);let oe,he;try{he=e.styles}catch{he=""}at(async()=>{e.sub||new URLSearchParams(window.location.search).get("sub")||u("Missing invitation information. Please use the link from your invite email.");const X=new URLSearchParams(window.location.hash.replace("#","")).get("otp");X&&n(X)});async function ye(R){var le,H;if(R.preventDefault(),u(""),w(""),D(!0),!t()||t().trim().length===0){u("Please enter your verification code"),D(!1);return}if(!r()||r().length<8){u("Password must be at least 8 characters"),D(!1);return}const X=new URLSearchParams(window.location.search),Q=e.sub||X.get("sub")||"";if(!Q){u("Missing invitation information"),D(!1);return}try{const ne=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:Q,otp:t().toUpperCase().trim(),password:r(),sectorID:e.sector})});if(ne.ok){const K=await ne.json();w(k.i18n("sa-invite-success"));const Ae=new CustomEvent("spartan-invite-complete",{bubbles:!0,cancelable:!0,detail:{sub:Q,success:!0}});oe&&oe.getRootNode().host.dispatchEvent(Ae),setTimeout(()=>{e.redirect&&e.redirect!==""&&(window.location.href=e.redirect)},2e3)}else{const K=await ne.json().catch(()=>({}));ne.status===400||(le=K.message)!=null&&le.includes("invalid OTP")?u(k.i18n("sa-invite-error-otp")):ne.status===504||(H=K.message)!=null&&H.includes("expired")?u(k.i18n("sa-invite-error-expired")):u(K.message||k.i18n("sa-invite-error-generic")),D(!1)}}catch(ne){console.error("Error completing invite:",ne),u(k.i18n("sa-invite-error-generic")),D(!1)}}return(()=>{var R=Ou(),X=R.firstChild,Q=X.nextSibling,le=Q.nextSibling,H=le.nextSibling,ne=H.nextSibling,K=ne.nextSibling,Ae=K.nextSibling,$e=Ae.nextSibling,Ee=oe;return typeof Ee=="function"?kt(Ee,R):oe=R,R.addEventListener("submit",ye),f(Q,he),f(le,()=>k.i18n("sa-complete-invite")),f(R,(()=>{var B=h(()=>!!e.email);return()=>B()&&(()=>{var ee=Iu();return f(ee,()=>e.email),ee})()})(),H),f(R,(()=>{var B=h(()=>!!i());return()=>B()&&(()=>{var ee=Pu();return f(ee,i),ee})()})(),H),f(R,(()=>{var B=h(()=>!!o());return()=>B()&&(()=>{var ee=zu();return f(ee,o),ee})()})(),H),H.$$input=B=>n(B.currentTarget.value),f(ne,()=>k.i18n("sa-invite-otp-hint")),K.$$input=B=>s(B.currentTarget.value),f(Ae,()=>k.i18n("sa-invite-password-hint")),f($e,(()=>{var B=h(()=>!!$());return()=>B()?k.i18n("sa-invite-completing"):k.i18n("sa-invite-submit")})()),y(B=>{var ee=k.i18n("sa-invite-otp"),ke=$()||o()!=="",pe=k.i18n("sa-invite-password"),me=$()||o()!=="",b=$()||o()!=="";return ee!==B.e&&ue(H,"placeholder",B.e=ee),ke!==B.t&&(H.disabled=B.t=ke),pe!==B.a&&ue(K,"placeholder",B.a=pe),me!==B.o&&(K.disabled=B.o=me),b!==B.i&&($e.disabled=B.i=b),B},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),y(()=>H.value=t()),y(()=>K.value=r()),R})()}),ot(["input"])});
|