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