@slashid/jump-page 0.0.23-self-host.1 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_astro/{app.78b7abea.js → app.f09aeacd.js} +6 -6
- package/dist/_astro/sdk.4a24bf90.css +1 -0
- package/dist/_astro/sdk.4d0f721e.css +1 -0
- package/dist/sdk.html +1 -1
- package/package/dist/_astro/app.f09aeacd.d.ts +2 -0
- package/package/main.js +1651 -12365
- package/package/main.js.map +1 -1
- package/package/src/components/app/app.component.d.ts +0 -5
- package/package/src/main.d.ts +0 -2
- package/package/style.css +1 -1
- package/package.json +3 -3
- package/dist/_astro/sdk.af0af458.css +0 -1
- package/dist/_astro/sdk.ebaca456.css +0 -1
- package/package/dist/_astro/app.78b7abea.d.ts +0 -2
|
@@ -6,7 +6,7 @@ import{r as d,U as V,a as un}from"./index.fdea1a5e.js";/* empty css
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Dd=d,Ad=Symbol.for("react.element"),Td=Symbol.for("react.fragment"),zd=Object.prototype.hasOwnProperty,Ld=Dd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Pd={key:!0,ref:!0,__self:!0,__source:!0};function As(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)zd.call(t,r)&&!Pd.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Ad,type:e,key:i,ref:a,props:o,_owner:Ld.current}}$r.Fragment=Td;$r.jsx=As;$r.jsxs=As;Ds.exports=$r;var x=Ds.exports;function ve(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{},oo={},Bn={},Jt=Ts.parcelRequire91fc;Jt==null&&(Jt=function(e){if(e in oo)return oo[e].exports;if(e in Bn){var t=Bn[e];delete Bn[e];var n={id:e,exports:{}};return oo[e]=n,t.call(n.exports,n,n.exports),n.exports}var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r},Jt.register=function(t,n){Bn[t]=n},Ts.parcelRequire91fc=Jt);var Od=Jt.register;Od("lDZ5d",function(e,t){(function(n,r){var o="1.0.37",i="",a="?",s="function",c="undefined",l="object",u="string",m="major",h="model",p="name",g="type",f="vendor",w="version",y="architecture",v="console",_="mobile",C="tablet",S="smarttv",I="wearable",R="embedded",D=500,P="Amazon",G="Apple",H="ASUS",j="BlackBerry",J="Browser",N="Chrome",Y="Edge",M="Firefox",X="Google",ge="Huawei",E="LG",k="Microsoft",$="Motorola",O="Opera",z="Samsung",F="Sharp",ne="Sony",ce="Xiaomi",L="Zebra",K="Facebook",le="Chromium OS",W="Mac OS",ee=function(Q,oe){var B={};for(var he in Q)oe[he]&&oe[he].length%2===0?B[he]=oe[he].concat(Q[he]):B[he]=Q[he];return B},fe=function(Q){for(var oe={},B=0;B<Q.length;B++)oe[Q[B].toUpperCase()]=Q[B];return oe},Re=function(Q,oe){return typeof Q===u?Se(oe).indexOf(Se(Q))!==-1:!1},Se=function(Q){return Q.toLowerCase()},qt=function(Q){return typeof Q===u?Q.replace(/[^\d\.]/g,i).split(".")[0]:r},at=function(Q,oe){if(typeof Q===u)return Q=Q.replace(/^\s\s*/,i),typeof oe===c?Q:Q.substring(0,D)},Dt=function(Q,oe){for(var B=0,he,_t,Je,re,U,Xe;B<oe.length&&!U;){var ro=oe[B],Qi=oe[B+1];for(he=_t=0;he<ro.length&&!U&&ro[he];)if(U=ro[he++].exec(Q),U)for(Je=0;Je<Qi.length;Je++)Xe=U[++_t],re=Qi[Je],typeof re===l&&re.length>0?re.length===2?typeof re[1]==s?this[re[0]]=re[1].call(this,Xe):this[re[0]]=re[1]:re.length===3?typeof re[1]===s&&!(re[1].exec&&re[1].test)?this[re[0]]=Xe?re[1].call(this,Xe,re[2]):r:this[re[0]]=Xe?Xe.replace(re[1],re[2]):r:re.length===4&&(this[re[0]]=Xe?re[3].call(this,Xe.replace(re[1],re[2])):r):this[re]=Xe||r;B+=2}},yn=function(Q,oe){for(var B in oe)if(typeof oe[B]===l&&oe[B].length>0){for(var he=0;he<oe[B].length;he++)if(Re(oe[B][he],Q))return B===a?r:B}else if(Re(oe[B],Q))return B===a?r:B;return Q},no={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},At={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Xi={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[w,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[w,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,w],[/opios[\/ ]+([\w\.]+)/i],[w,[p,O+" Mini"]],[/\bopr\/([\w\.]+)/i],[w,[p,O]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[w,[p,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,w],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[w,[p,"UC"+J]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[w,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[w,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[w,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[w,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[w,[p,"Smart Lenovo "+J]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+J],w],[/\bfocus\/([\w\.]+)/i],[w,[p,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[w,[p,O+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[w,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[w,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[w,[p,O+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[w,[p,"MIUI "+J]],[/fxios\/([-\w\.]+)/i],[w,[p,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+J]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+J],w],[/samsungbrowser\/([\w\.]+)/i],[w,[p,z+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],w],[/metasr[\/ ]?([\d\.]+)/i],[w,[p,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,"Sogou Mobile"],w],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[p,w],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,K],w],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[p,w],[/\bgsa\/([\w\.]+) .*safari\//i],[w,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[w,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[w,[p,N+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,N+" WebView"],w],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[w,[p,"Android "+J]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,w],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[w,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[w,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[w,yn,no]],[/(webkit|khtml)\/([\w\.]+)/i],[p,w],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],w],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[w,[p,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,w],[/(cobalt)\/([\w\.]+)/i],[p,[w,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[y,"amd64"]],[/(ia32(?=;))/i],[[y,Se]],[/((?:i[346]|x)86)[;\)]/i],[[y,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/windows (ce|mobile); ppc;/i],[[y,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[y,/ower/,i,Se]],[/(sun4\w)[;\)]/i],[[y,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[y,Se]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[h,[f,z],[g,C]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[h,[f,z],[g,_]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[h,[f,G],[g,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[h,[f,G],[g,C]],[/(macintosh);/i],[h,[f,G]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[h,[f,F],[g,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[h,[f,ge],[g,C]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[h,[f,ge],[g,_]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[h,/_/g," "],[f,ce],[g,_]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[h,/_/g," "],[f,ce],[g,C]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[h,[f,"OPPO"],[g,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[h,[f,"Vivo"],[g,_]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[h,[f,"Realme"],[g,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[h,[f,$],[g,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[h,[f,$],[g,C]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[h,[f,E],[g,C]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[h,[f,E],[g,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[h,[f,"Lenovo"],[g,C]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[h,/_/g," "],[f,"Nokia"],[g,_]],[/(pixel c)\b/i],[h,[f,X],[g,C]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[h,[f,X],[g,_]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[h,[f,ne],[g,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[h,"Xperia Tablet"],[f,ne],[g,C]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[h,[f,"OnePlus"],[g,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[h,[f,P],[g,C]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[h,/(.+)/g,"Fire Phone $1"],[f,P],[g,_]],[/(playbook);[-\w\),; ]+(rim)/i],[h,f,[g,C]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[h,[f,j],[g,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[h,[f,H],[g,C]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[h,[f,H],[g,_]],[/(nexus 9)/i],[h,[f,"HTC"],[g,C]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[h,/_/g," "],[g,_]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[h,[f,"Acer"],[g,C]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[h,[f,"Meizu"],[g,_]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[h,[f,"Ulefone"],[g,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,h,[g,_]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,h,[g,C]],[/(surface duo)/i],[h,[f,k],[g,C]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[h,[f,"Fairphone"],[g,_]],[/(u304aa)/i],[h,[f,"AT&T"],[g,_]],[/\bsie-(\w*)/i],[h,[f,"Siemens"],[g,_]],[/\b(rct\w+) b/i],[h,[f,"RCA"],[g,C]],[/\b(venue[\d ]{2,7}) b/i],[h,[f,"Dell"],[g,C]],[/\b(q(?:mv|ta)\w+) b/i],[h,[f,"Verizon"],[g,C]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[h,[f,"Barnes & Noble"],[g,C]],[/\b(tm\d{3}\w+) b/i],[h,[f,"NuVision"],[g,C]],[/\b(k88) b/i],[h,[f,"ZTE"],[g,C]],[/\b(nx\d{3}j) b/i],[h,[f,"ZTE"],[g,_]],[/\b(gen\d{3}) b.+49h/i],[h,[f,"Swiss"],[g,_]],[/\b(zur\d{3}) b/i],[h,[f,"Swiss"],[g,C]],[/\b((zeki)?tb.*\b) b/i],[h,[f,"Zeki"],[g,C]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],h,[g,C]],[/\b(ns-?\w{0,9}) b/i],[h,[f,"Insignia"],[g,C]],[/\b((nxa|next)-?\w{0,9}) b/i],[h,[f,"NextBook"],[g,C]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],h,[g,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],h,[g,_]],[/\b(ph-1) /i],[h,[f,"Essential"],[g,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[h,[f,"Envizen"],[g,C]],[/\b(trio[-\w\. ]+) b/i],[h,[f,"MachSpeed"],[g,C]],[/\btu_(1491) b/i],[h,[f,"Rotor"],[g,C]],[/(shield[\w ]+) b/i],[h,[f,"Nvidia"],[g,C]],[/(sprint) (\w+)/i],[f,h,[g,_]],[/(kin\.[onetw]{3})/i],[[h,/\./g," "],[f,k],[g,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[h,[f,L],[g,C]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[h,[f,L],[g,_]],[/smart-tv.+(samsung)/i],[f,[g,S]],[/hbbtv.+maple;(\d+)/i],[[h,/^/,"SmartTV"],[f,z],[g,S]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,E],[g,S]],[/(apple) ?tv/i],[f,[h,G+" TV"],[g,S]],[/crkey/i],[[h,N+"cast"],[f,X],[g,S]],[/droid.+aft(\w+)( bui|\))/i],[h,[f,P],[g,S]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[h,[f,F],[g,S]],[/(bravia[\w ]+)( bui|\))/i],[h,[f,ne],[g,S]],[/(mitv-\w{5}) bui/i],[h,[f,ce],[g,S]],[/Hbbtv.*(technisat) (.*);/i],[f,h,[g,S]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,at],[h,at],[g,S]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,S]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,h,[g,v]],[/droid.+; (shield) bui/i],[h,[f,"Nvidia"],[g,v]],[/(playstation [345portablevi]+)/i],[h,[f,ne],[g,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[h,[f,k],[g,v]],[/((pebble))app/i],[f,h,[g,I]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[h,[f,G],[g,I]],[/droid.+; (glass) \d/i],[h,[f,X],[g,I]],[/droid.+; (wt63?0{2,3})\)/i],[h,[f,L],[g,I]],[/(quest( 2| pro)?)/i],[h,[f,K],[g,I]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[g,R]],[/(aeobc)\b/i],[h,[f,P],[g,R]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[h,[g,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[h,[g,C]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,C]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,_]],[/(android[-\w\. ]{0,9});.+buil/i],[h,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[w,[p,Y+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[w,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,w],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[w,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,w],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[p,[w,yn,At]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[w,yn,At],[p,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[w,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,W],[w,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[w,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,w],[/\(bb(10);/i],[w,[p,j]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[w,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[w,[p,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[w,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[w,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[w,[p,N+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,le],w],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,w],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],w],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,w]]},Te=function(Q,oe){if(typeof Q===l&&(oe=Q,Q=r),!(this instanceof Te))return new Te(Q,oe).getResult();var B=typeof n!==c&&n.navigator?n.navigator:r,he=Q||(B&&B.userAgent?B.userAgent:i),_t=B&&B.userAgentData?B.userAgentData:r,Je=oe?ee(Xi,oe):Xi,re=B&&B.userAgent==he;return this.getBrowser=function(){var U={};return U[p]=r,U[w]=r,Dt.call(U,he,Je.browser),U[m]=qt(U[w]),re&&B&&B.brave&&typeof B.brave.isBrave==s&&(U[p]="Brave"),U},this.getCPU=function(){var U={};return U[y]=r,Dt.call(U,he,Je.cpu),U},this.getDevice=function(){var U={};return U[f]=r,U[h]=r,U[g]=r,Dt.call(U,he,Je.device),re&&!U[g]&&_t&&_t.mobile&&(U[g]=_),re&&U[h]=="Macintosh"&&B&&typeof B.standalone!==c&&B.maxTouchPoints&&B.maxTouchPoints>2&&(U[h]="iPad",U[g]=C),U},this.getEngine=function(){var U={};return U[p]=r,U[w]=r,Dt.call(U,he,Je.engine),U},this.getOS=function(){var U={};return U[p]=r,U[w]=r,Dt.call(U,he,Je.os),re&&!U[p]&&_t&&_t.platform!="Unknown"&&(U[p]=_t.platform.replace(/chrome os/i,le).replace(/macos/i,W)),U},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return he},this.setUA=function(U){return he=typeof U===u&&U.length>D?at(U,D):U,this},this.setUA(he),this};Te.VERSION=o,Te.BROWSER=fe([p,w,m]),Te.CPU=fe([y]),Te.DEVICE=fe([h,f,g,v,_,S,C,I,R]),Te.ENGINE=Te.OS=fe([p,w]),typeof t!==c?(e.exports&&(t=e.exports=Te),t.UAParser=Te):typeof define===s&&define.amd?define(function(){return Te}):typeof n!==c&&(n.UAParser=Te);var jt=typeof n!==c&&(n.jQuery||n.Zepto);if(jt&&!jt.ua){var Vn=new Te;jt.ua=Vn.getResult(),jt.ua.get=function(){return Vn.getUA()},jt.ua.set=function(Q){Vn.setUA(Q);var oe=Vn.getResult();for(var B in oe)jt.ua[B]=oe[B]}}})(typeof window=="object"?window:this)});var oi={};oi=JSON.parse(`{"name":"@slashid/slashid","private":false,"publishConfig":{"access":"public"},"version":"3.27.0","description":"Client SDK for the /id platform","homepage":"https://slashid.dev","author":"SlashID","license":"MIT","main":"./dist/bundle/slashid.js","module":"./dist/esmodule/slashid.esm.js","esmodule":"./dist/esmodule/slashid.esm.js","commonjs":"./dist/commonjs/slashid.cjs.js","bundle":"./dist/bundle/slashid.js","types":"./dist/types/slashid.d.ts","exports":{".":{"require":"./dist/commonjs/slashid.cjs.js","import":"./dist/esmodule/slashid.esm.js","default":"./dist/commonjs/slashid.cjs.js","types":"./dist/types/slashid.d.ts"}},"targets":{"esmodule":{"source":"src/targets/package.ts","context":"browser","isLibrary":true,"outputFormat":"esmodule","engines":{"browsers":["and_chr >= 73","chrome >= 73","and_ff >= 67","android >= 114","edge >= 79","samsung >= 11.2","safari >= 13","ios_saf >= 13.1","opera >= 60","firefox >= 67","unreleased and_chr versions","unreleased chrome versions","unreleased and_ff versions","unreleased android versions","unreleased edge versions","unreleased samsung versions","unreleased safari versions","unreleased ios_saf versions","unreleased opera versions","unreleased firefox versions"]}},"commonjs":{"source":"src/targets/package.ts","context":"node","isLibrary":true,"outputFormat":"commonjs","engines":{"node":">= 12"}},"bundle":{"source":"src/targets/bundle.ts","context":"browser","outputFormat":"global","engines":{"browsers":["> 0.5%","last 2 versions","not dead"]}},"page":{"source":"static/sdk.html","context":"browser","engines":{"browsers":["and_chr >= 73","chrome >= 73","and_ff >= 67","android >= 114","edge >= 79","samsung >= 11.2","safari >= 13","ios_saf >= 13.1","opera >= 60","firefox >= 67","unreleased and_chr versions","unreleased chrome versions","unreleased and_ff versions","unreleased android versions","unreleased edge versions","unreleased samsung versions","unreleased safari versions","unreleased ios_saf versions","unreleased opera versions","unreleased firefox versions"]}},"types":{"source":"src/targets/package.ts"}},"files":["dist/*"],"keywords":["slashid","SlashID","auth","openid","authentication","jwt","browser"],"scripts":{"clean":"rm -rf dist docs","lint":"eslint ./src --ext .ts","format":"prettier --config .prettierrc.json 'src/**/*.ts' --write","test:ts":"tsc --project tsconfig.json --noEmit","test:unit":"jest","test:unit:watch":"jest --watch","test:unit:ci":"jest --ci","test:integration":"playwright test","build":"rm -rf dist && parcel build --no-cache && cp compat/esmodule/package.json dist/esmodule","docs":"rm -rf docs && typedoc","dist":"npm run lint && npm run build","all":"npm run dist && npm run docs","serve:all":"parcel serve 'static/*.html' --port 8080 --no-cache","serve:example":"parcel serve static/index.html --port 8080 --no-cache","serve:jump":"parcel serve static/sdk.html --port 8080 --no-cache","serve:docs":"parcel serve docs/index.html --port 8081 --no-cache","push:docs":"aws s3 sync docs s3://slashiddoc/sdk/v$(node tools/version.js --major) && (aws cloudfront create-invalidation --distribution-id ETLBNGAAF97EN --paths \\"/*\\")","changeset":"changeset","prepublishOnly":"npm run all","publish:ci":"npm run build && changeset publish"},"devDependencies":{"@parcel/core":"2.12.0","@parcel/packager-ts":"2.12.0","@parcel/resolver-default":"^2.12.0","@parcel/transformer-babel":"2.12.0","@parcel/transformer-js":"2.12.0","@parcel/transformer-json":"2.12.0","@parcel/transformer-react-refresh-wrap":"2.12.0","@parcel/transformer-typescript-types":"2.12.0","@playwright/test":"1.42.1","@types/jest":"^28.1.7","@types/node":"~15.0.2","@types/qrcode":"^1.5.0","@types/ua-parser-js":"^0.7.39","@typescript-eslint/eslint-plugin":"^4.15.1","@typescript-eslint/parser":"^4.15.1","danger":"^11.2.6","eslint":"^7.20.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","isomorphic-fetch":"^3.0.0","jest":"^28.1.3","jest-environment-jsdom":"^28.1.3","jest-fetch-mock":"^3.0.3","parcel":"2.12.0","prettier":"^2.7.1","ts-jest":"^28.0.8","typedoc":"^0.23.00","typedoc-plugin-mdn-links":"^2.0.0","typedoc-plugin-missing-exports":"^1.0.0","typescript":"~4.7.0"},"dependencies":{"@changesets/cli":"^2.27.5","@types/uuid":"8.3.4","compare-versions":"^6.1.0","docdash":"^1.2.0","jwt-decode":"^3.1.2","qrcode":"^1.5.1","querystring-es3":"^0.2.1","regenerator-runtime":"^0.13.9","ua-parser-js":"^1.0.37","url":"^0.11.0","uuid":"8.3.2"}}`);const[Md,Nd,Ud]=oi.version.split("."),$e={major:Md,minor:Nd,patch:Ud,raw:oi.version},Fd="https://api.slashid.com".replace(/\/+$/,"");class nt{set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Fd}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||zs}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:async()=>t}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}constructor(t={}){this.configuration=t}}const rt=new nt;class gt{withMiddleware(...t){const n=this.clone();return n.middleware=n.middleware.concat(...t),n}withPreMiddleware(...t){const n=t.map(r=>({pre:r}));return this.withMiddleware(...n)}withPostMiddleware(...t){const n=t.map(r=>({post:r}));return this.withMiddleware(...n)}isJsonMime(t){return t?gt.jsonRegex.test(t):!1}async request(t,n){const{url:r,init:o}=await this.createFetchParams(t,n),i=await this.fetchApi(r,o);if(i&&i.status>=200&&i.status<300)return i;throw new Hd(i,"Response returned an error code")}async createFetchParams(t,n){let r=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(r+="?"+this.configuration.queryParamsStringify(t.query));const o=Object.assign({},this.configuration.headers,t.headers);Object.keys(o).forEach(l=>o[l]===void 0?delete o[l]:{});const i=typeof n=="function"?n:async()=>n,a={method:t.method,headers:o,body:t.body,credentials:this.configuration.credentials},s={...a,...await i({init:a,context:t})},c={...s,body:Bd(s.body)||s.body instanceof URLSearchParams||Vd(s.body)?s.body:JSON.stringify(s.body)};return{url:r,init:c}}clone(){const t=this.constructor,n=new t(this.configuration);return n.middleware=this.middleware.slice(),n}constructor(t=rt){this.configuration=t,this.fetchApi=async(n,r)=>{let o={url:n,init:r};for(const a of this.middleware)a.pre&&(o=await a.pre({fetch:this.fetchApi,...o})||o);let i;try{i=await(this.configuration.fetchApi||fetch)(o.url,o.init)}catch(a){for(const s of this.middleware)s.onError&&(i=await s.onError({fetch:this.fetchApi,url:o.url,init:o.init,error:a,response:i?i.clone():void 0})||i);if(i===void 0)throw a instanceof Error?new jd(a,"The request failed and the interceptors did not return an alternative response"):a}for(const a of this.middleware)a.post&&(i=await a.post({fetch:this.fetchApi,url:o.url,init:o.init,response:i.clone()})||i);return i},this.middleware=t.middleware}}gt.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function Vd(e){return typeof Blob<"u"&&e instanceof Blob}function Bd(e){return typeof FormData<"u"&&e instanceof FormData}class Hd extends Error{constructor(t,n){super(n),this.response=t,this.name="ResponseError"}}class jd extends Error{constructor(t,n){super(n),this.cause=t,this.name="FetchError"}}class ie extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}const io={csv:",",ssv:" ",tsv:" ",pipes:"|"};function A(e,t){const n=e[t];return n!=null}function zs(e,t=""){return Object.keys(e).map(n=>Ls(n,e[n],t)).filter(n=>n.length>0).join("&")}function Ls(e,t,n=""){const r=n+(n.length?`[${e}]`:e);if(t instanceof Array){const o=t.map(i=>encodeURIComponent(String(i))).join(`&${encodeURIComponent(r)}=`);return`${encodeURIComponent(r)}=${o}`}if(t instanceof Set){const o=Array.from(t);return Ls(e,o,n)}return t instanceof Date?`${encodeURIComponent(r)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?zs(t,r):`${encodeURIComponent(r)}=${encodeURIComponent(String(t))}`}class me{async value(){return this.transformer(await this.raw.json())}constructor(t,n=r=>r){this.raw=t,this.transformer=n}}class ur{async value(){}constructor(t){this.raw=t}}function Gd(e){return Wd(e)}function Wd(e,t){return e==null?e:{limit:e.limit,offset:e.offset,total_count:e.total_count}}function qe(e){return Kd(e)}function Kd(e,t){return e==null?e:{pagination:A(e,"pagination")?Gd(e.pagination):void 0}}function De(e){return Zd(e)}function Zd(e,t){return e==null?e:{httpcode:A(e,"httpcode")?e.httpcode:void 0,message:A(e,"message")?e.message:void 0}}function xn(e){return Yd(e)}function Yd(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0}}function Jd(e){return Xd(e)}function Xd(e,t){return e}function Qd(e){if(e!==void 0)return e===null?null:{region:e.region}}const ye={UiCustomization:"ui_customization",Proxy:"proxy",WebauthnCreate:"webauthn_create",WebauthnGet:"webauthn_get",Nonce:"nonce",Otp:"otp",Oidc:"oidc",Saml:"saml",PasswordSet:"password_set",PasswordVerify:"password_verify",PasswordReset:"password_reset",TotpRegister:"totp_register",TotpVerify:"totp_verify"};function Oe(e){return eu(e)}function eu(e,t){return e}function tu(e){if(e!==void 0)return e===null?null:{challenge:e.challenge}}function nu(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:tu(e.data)}}function ru(e){if(e!==void 0)return e===null?null:{otp:e.otp}}function ou(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:ru(e.data)}}function iu(e){if(e!==void 0)return e===null?null:{password:e.password}}function au(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:iu(e.data)}}function su(e){if(e!==void 0)return e===null?null:{password:e.password}}function cu(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:su(e.data)}}function lu(e){if(e!==void 0)return e===null?null:{password:e.password}}function du(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:lu(e.data)}}function uu(e){if(e!==void 0)return e===null?null:{otp:e.otp}}function fu(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:uu(e.data)}}function hu(e){if(e!==void 0)return e===null?null:{otp:e.otp}}function pu(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:hu(e.data)}}function mu(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:e.data}}function gu(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:e.data}}function ao(e){if(e!==void 0){if(e===null)return null;switch(e.challenge_type){case"nonce":return nu(e);case"otp":return ou(e);case"password_reset":return au(e);case"password_set":return cu(e);case"password_verify":return du(e);case"totp_register":return fu(e);case"totp_verify":return pu(e);case"webauthn_create":return mu(e);case"webauthn_get":return gu(e);default:throw new Error(`No variant of Attestation exists with 'challenge_type=${e.challenge_type}'`)}}}const we={Webauthn:"webauthn",EmailLink:"email_link",SmsLink:"sms_link",OtpViaSms:"otp_via_sms",OtpViaEmail:"otp_via_email",Totp:"totp",Oidc:"oidc",Saml:"saml",Api:"api",DirectId:"direct_id",Password:"password",Impersonate:"impersonate",Anonymous:"anonymous"};function Me(e){return bu(e)}function bu(e,t){return e}function Ps(e){return e}const kt={EmailAddress:"email_address",PhoneNumber:"phone_number",Username:"username"};function wu(e){return vu(e)}function vu(e,t){return e}function Os(e){return _u(e)}function _u(e,t){return e==null?e:{type:wu(e.type),value:e.value}}function Ir(e){if(e!==void 0)return e===null?null:{type:e.type,value:e.value}}function yu(e){return xu(e)}function xu(e,t){return e}function Cu(e){return ku(e)}function ku(e,t){return e==null?e:{challenge:A(e,"challenge")?e.challenge:void 0}}function Su(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:A(e,"options")?Cu(e.options):void 0}}function Eu(e){return $u(e)}function $u(e,t){return e==null?e:{auth_code_url:e.auth_code_url}}function Iu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:Eu(e.options)}}function Ru(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method)}}function qu(e){return Du(e)}function Du(e,t){return e}function Au(e){return Tu(e)}function Tu(e,t){return e}function zu(e){return Lu(e)}function Lu(e,t){return e==null?e:{name:yu(e.name),pattern:e.pattern,match_type:qu(e.match_type),pattern_qualifiers:A(e,"pattern_qualifiers")?e.pattern_qualifiers.map(Au):void 0}}function Ms(e){return Pu(e)}function Pu(e,t){return e==null?e:{regular_expressions:A(e,"regular_expressions")?e.regular_expressions.map(zu):void 0}}function Ou(e){return Mu(e)}function Mu(e,t){return e==null?e:{validation_rules:Ms(e.validation_rules)}}function Nu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:Ou(e.options)}}function Uu(e){return Fu(e)}function Fu(e,t){return e==null?e:{validation_rules:Ms(e.validation_rules)}}function Vu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:Uu(e.options)}}function Bu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method)}}function Hu(e){return ju(e)}function ju(e,t){return e==null?e:{challenge_id:A(e,"challenge_id")?e.challenge_id:void 0}}function Gu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:A(e,"options")?Hu(e.options):void 0}}function Wu(e){return Ku(e)}function Ku(e,t){return e==null?e:{start_authentication_url:e.start_authentication_url}}function Zu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:Wu(e.options)}}function Yu(e){return Ju(e)}function Ju(e,t){return e==null?e:{key_uri:e.key_uri,qr_code_data_b64:e.qr_code_data_b64,recovery_codes:e.recovery_codes}}function Xu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:A(e,"options")?Yu(e.options):void 0}}function Qu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method)}}function ef(e){return tf(e)}function tf(e,t){return e==null?e:{authn_redirect_page_ui_config:A(e,"authn_redirect_page_ui_config")?e.authn_redirect_page_ui_config:void 0}}function nf(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:A(e,"options")?ef(e.options):void 0}}function rf(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:A(e,"options")?e.options:void 0}}function of(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:A(e,"options")?e.options:void 0}}function af(e){return sf(e)}function sf(e,t){if(e==null)return e;switch(e.type){case"nonce":return{...Su(e,!0),type:"nonce"};case"oidc":return{...Iu(e,!0),type:"oidc"};case"otp":return{...Ru(e,!0),type:"otp"};case"password_reset":return{...Nu(e,!0),type:"password_reset"};case"password_set":return{...Vu(e,!0),type:"password_set"};case"password_verify":return{...Bu(e,!0),type:"password_verify"};case"proxy":return{...Gu(e,!0),type:"proxy"};case"saml":return{...Zu(e,!0),type:"saml"};case"totp_register":return{...Xu(e,!0),type:"totp_register"};case"totp_verify":return{...Qu(e,!0),type:"totp_verify"};case"ui_customization":return{...nf(e,!0),type:"ui_customization"};case"webauthn_create":return{...rf(e,!0),type:"webauthn_create"};case"webauthn_get":return{...of(e,!0),type:"webauthn_get"};default:throw new Error(`No variant of ChallengeListInner exists with 'type=${e.type}'`)}}function ii(e){return cf(e)}function cf(e,t){return e}function lf(e){if(e!==void 0)return e===null?null:{method:e.method,redirect_target:e.redirect_target}}const Xt={AuthenticationSucceededV1:"AuthenticationSucceeded_v1",AuthenticationFailedV1:"AuthenticationFailed_v1",PersonCreatedV1:"PersonCreated_v1",AnonymousPersonCreatedV1:"AnonymousPersonCreated_v1",PersonDeletedV1:"PersonDeleted_v1",VirtualPageLoadedV1:"VirtualPageLoaded_v1",SlashIdsdkLoadedV1:"SlashIDSDKLoaded_v1",PersonIdentifiedV1:"PersonIdentified_v1",PersonLoggedOutV1:"PersonLoggedOut_v1",TokenMintedV1:"TokenMinted_v1",AnonymousTokenMintedV1:"AnonymousTokenMinted_v1",PasswordChangedV1:"PasswordChanged_v1",GdprConsentsChangedV1:"GdprConsentsChanged_v1",GateServerStartedV1:"GateServerStarted_v1",GateRequestHandledV1:"GateRequestHandled_v1",GateRequestCredentialFoundV1:"GateRequestCredentialFound_v1",PermissionCreatedInRegionV1:"PermissionCreated_InRegion_v1",PermissionCreatedV1:"PermissionCreated_v1",PermissionDeletedInRegionV1:"PermissionDeleted_InRegion_v1",PermissionDeletedV1:"PermissionDeleted_v1",RoleCreatedInRegionV1:"RoleCreated_InRegion_v1",RoleCreatedV1:"RoleCreated_v1",RoleDeletedInRegionV1:"RoleDeleted_InRegion_v1",RoleDeletedV1:"RoleDeleted_v1",RoleUpdatedInRegionV1:"RoleUpdated_InRegion_v1",RoleUpdatedV1:"RoleUpdated_v1",RolesSetToPersonInRegionV1:"RolesSetToPerson_InRegion_v1",RolesSetToPersonV1:"RolesSetToPerson_v1",PermissionsSetToPersonInRegionV1:"PermissionsSetToPerson_InRegion_v1",PermissionsSetToPersonV1:"PermissionsSetToPerson_v1",MitmAttackDetectedV1:"MitmAttackDetected_v1",PermissionUpdatedInRegionV1:"PermissionUpdated_InRegion_v1",PermissionUpdatedV1:"PermissionUpdated_v1"};function df(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id,authenticated_methods:e.authenticated_methods===void 0?void 0:e.authenticated_methods.map(Ps),failed_authn_method:e.failed_authn_method,failure_reason:e.failure_reason,failure_detail:e.failure_detail,handle:Ir(e.handle),challenge_id:e.challenge_id}}function uf(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id,success_authn_method:e.success_authn_method,authenticated_methods:e.authenticated_methods.map(Ps),handle:Ir(e.handle)}}function ff(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id}}function hf(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id}}function pf(e){if(e!==void 0)return e===null?null:{event_name:e.event_name}}function mf(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id}}function gf(e){if(e!==void 0){if(e===null)return null;switch(e.event_name){case"AuthenticationFailed_v1":return df(e);case"AuthenticationSucceeded_v1":return uf(e);case"PersonIdentified_v1":return ff(e);case"PersonLoggedOut_v1":return hf(e);case"SlashIDSDKLoaded_v1":return pf(e);case"VirtualPageLoaded_v1":return mf(e);default:throw new Error(`No variant of EventPostRequestEventData exists with 'event_name=${e.event_name}'`)}}}function ea(e){if(e!==void 0)return e===null?null:{organization_id:e.organization_id,analytics_correlation_id:e.analytics_correlation_id,window_location:e.window_location,user_agent:e.user_agent,event_data:gf(e.event_data)}}function bf(e){return wf(e)}function wf(e,t){return e==null?e:{password_hash:e.password_hash}}function vf(e,t){return e==null?e:{id:e.id,last_used:A(e,"last_used")?new Date(e.last_used):void 0,type:ii(e.type),params:bf(e.params),label:A(e,"label")?e.label:void 0}}function _f(e){return yf(e)}function yf(e,t){return e==null?e:{aaguid:e.aaguid,sign_count:A(e,"sign_count")?e.sign_count:void 0,clone_warning:A(e,"clone_warning")?e.clone_warning:void 0}}function xf(e){return Cf(e)}function Cf(e,t){return e==null?e:{webauthn_credential_id:e.webauthn_credential_id,public_key:e.public_key,attestation_type:e.attestation_type,authenticator:_f(e.authenticator)}}function kf(e,t){return e==null?e:{id:e.id,last_used:A(e,"last_used")?new Date(e.last_used):void 0,type:ii(e.type),params:xf(e.params),label:A(e,"label")?e.label:void 0}}function Sf(e){return Ef(e)}function Ef(e,t){return e==null?e:{recovery_codes_total:e.recovery_codes_total,recovery_codes_unused:e.recovery_codes_unused}}function $f(e,t){return e==null?e:{id:e.id,last_used:A(e,"last_used")?new Date(e.last_used):void 0,type:ii(e.type),params:Sf(e.params),label:A(e,"label")?e.label:void 0}}function If(e){return Rf(e)}function Rf(e,t){if(e==null)return e;switch(e.type){case"password":return{...vf(e,!0),type:"password"};case"public-key":return{...kf(e,!0),type:"public-key"};case"totp":return{...$f(e,!0),type:"totp"};default:throw new Error(`No variant of ExportedCredential exists with 'type=${e.type}'`)}}const Qt={Popup:"popup",Redirect:"redirect"};function qf(e){if(e!==void 0)return e===null?null:{method:e.method,client_id:e.client_id,provider:e.provider,ux_mode:e.ux_mode,redirect_target:e.redirect_target,requires_groups:e.requires_groups,pkce_code_challenge:e.pkce_code_challenge,csrf_token:e.csrf_token}}function Df(e){if(e!==void 0)return e===null?null:{method:e.method}}function Af(e){if(e!==void 0)return e===null?null:{method:e.method}}function Tf(e){if(e!==void 0)return e===null?null:{method:e.method}}const $n={Popup:"popup",Redirect:"redirect"};function zf(e){if(e!==void 0)return e===null?null:{method:e.method,provider_credentials_id:e.provider_credentials_id,ux_mode:e.ux_mode,redirect_target:e.redirect_target,pkce_code_challenge:e.pkce_code_challenge,csrf_token:e.csrf_token}}function Lf(e){if(e!==void 0)return e===null?null:{method:e.method,redirect_target:e.redirect_target}}function Pf(e){if(e!==void 0)return e===null?null:{method:e.method}}const Of={None:"none",Indirect:"indirect",Direct:"direct"};const ta={Any:"any",Platform:"platform",CrossPlatform:"cross_platform"};const Mf={Discouraged:"discouraged",Preferred:"preferred",Required:"required"};const Nf={Discouraged:"discouraged",Preferred:"preferred",Required:"required"};function Uf(e){if(e!==void 0)return e===null?null:{method:e.method,scope:e.scope,available_credential_ids:e.available_credential_ids,attachment:e.attachment,user_verification:e.user_verification,resident_key:e.resident_key,attestation:e.attestation}}function Ff(e){if(e!==void 0){if(e===null)return null;switch(e.method){case"email_link":return lf(e);case"oidc":return qf(e);case"otp_via_email":return Df(e);case"otp_via_sms":return Af(e);case"password":return Tf(e);case"saml":return zf(e);case"sms_link":return Lf(e);case"totp":return Pf(e);case"webauthn":return Uf(e);default:throw new Error(`No variant of FactorOptions exists with 'method=${e.method}'`)}}}function Vf(e){if(e!==void 0)return e===null?null:{method:e.method,options:Ff(e.options)}}function Bf(e){return Hf(e)}function Hf(e,t){return e}function jf(e){return e}function Gf(e){return Wf(e)}function Wf(e,t){return e==null?e:{consent_level:Bf(e.consent_level),created_at:new Date(e.created_at)}}function na(e){if(e!==void 0)return e===null?null:{consent_levels:e.consent_levels.map(jf)}}function Ns(e){return Kf(e)}function Kf(e,t){return e==null?e:{consents:e.consents.map(Gf)}}function Zf(e){return Yf(e)}function Yf(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?e.result:void 0}}function Jf(e){return Xf(e)}function Xf(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?e.result:void 0}}function ra(e){return Qf(e)}function Qf(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?e.result:void 0}}function so(e){return eh(e)}function eh(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?e.result:void 0}}function th(e){return nh(e)}function nh(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?Ns(e.result):void 0}}function rh(e){return oh(e)}function oh(e,t){return e==null?e:{id:e.id,parent_id:A(e,"parent_id")?e.parent_id:void 0,org_name:e.org_name,tenant_name:e.tenant_name}}function ih(e){return ah(e)}function ah(e,t){return e==null?e:{id:e.id,parent_id:A(e,"parent_id")?e.parent_id:void 0,org_name:e.org_name,tenant_name:e.tenant_name,managed_organizations:A(e,"managed_organizations")?e.managed_organizations.map(rh):void 0}}function sh(e){return ch(e)}function ch(e,t){return e}function lh(e){return dh(e)}function dh(e,t){return e==null?e:{active:e.active,person_id:e.person_id,person_type:sh(e.person_type),region:Jd(e.region),handles:A(e,"handles")?e.handles.map(Os):void 0,groups:A(e,"groups")?e.groups:void 0,attributes:A(e,"attributes")?e.attributes:void 0}}function uh(e){return fh(e)}function fh(e,t){return e==null?e:{person:lh(e.person),organizations:e.organizations.map(ih),handles:e.handles.map(Os),credentials:e.credentials.map(If)}}function hh(e){return ph(e)}function ph(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:uh(e.result)}}function mh(e){return gh(e)}function gh(e,t){return e==null?e:{id:e.id,parent_id:A(e,"parent_id")?e.parent_id:void 0,name:A(e,"name")?e.name:void 0,tenant_name:A(e,"tenant_name")?e.tenant_name:void 0,children_ids:A(e,"children_ids")?e.children_ids:void 0,person_pool_orgs_ids:A(e,"person_pool_orgs_ids")?e.person_pool_orgs_ids:void 0,group_pool_orgs_ids:A(e,"group_pool_orgs_ids")?e.group_pool_orgs_ids:void 0,manager_org_id:A(e,"manager_org_id")?e.manager_org_id:void 0,person_in_manager_org:e.person_in_manager_org,inherits_rbac_pools:e.inherits_rbac_pools}}function bh(e){return wh(e)}function wh(e,t){return e==null?e:{org_hierarchy:e.org_hierarchy.map(mh)}}function vh(e){return _h(e)}function _h(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:bh(e.result)}}function yh(e){if(e!==void 0)return e===null?null:{handle:Ir(e.handle),factor:Vf(e.factor)}}function xh(e){return Ch(e)}function Ch(e,t){return e==null?e:{token:A(e,"token")?e.token:void 0}}function kh(e){return Sh(e)}function Sh(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?xh(e.result):void 0}}function Eh(e){return $h(e)}function $h(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?e.result:void 0}}function co(e){return Ih(e)}function Ih(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?e.result.map(af):void 0}}function Rh(e){return qh(e)}function qh(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:e.result}}function Dh(e){return Ah(e)}function Ah(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:e.result}}function Th(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,code:e.code,pkce_code_verifier:e.pkce_code_verifier}}function zh(e){return Lh(e)}function Lh(e,t){return e==null?e:{valid:e.valid,invalidity_reason:A(e,"invalidity_reason")?e.invalidity_reason:void 0,expires_in_seconds:A(e,"expires_in_seconds")?e.expires_in_seconds:void 0,expires_at:A(e,"expires_at")?new Date(e.expires_at):void 0}}function Ph(e){return Oh(e)}function Oh(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?zh(e.result):void 0}}function oa(e){return Mh(e)}function Mh(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:Ns(e.result)}}function Nh(e){if(e!==void 0)return e===null?null:{method:e.method}}function Uh(e){if(e!==void 0)return e===null?null:{handle:Ir(e.handle),factor:Nh(e.factor)}}function Fh(e){if(e!==void 0)return e===null?null:{token:e.token}}class Vh extends gt{async deleteAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new ie("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling deleteAttributesBucketName.");const r={};t.attributes&&(r.attributes=t.attributes.join(io.csv));const o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"DELETE",headers:o,query:r},n);return new me(i,a=>xn(a))}async deleteAttributesBucketName(t,n){return await(await this.deleteAttributesBucketNameRaw(t,n)).value()}async getAttributesRaw(t,n){const r={};t.buckets&&(r.buckets=t.buckets.join(io.csv));const o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes",method:"GET",headers:o,query:r},n);return new me(i,a=>Zf(a))}async getAttributes(t={},n){return await(await this.getAttributesRaw(t,n)).value()}async getAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new ie("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling getAttributesBucketName.");const r={};t.attributes&&(r.attributes=t.attributes.join(io.csv));const o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"GET",headers:o,query:r},n);return new me(i,a=>Jf(a))}async getAttributesBucketName(t,n){return await(await this.getAttributesBucketNameRaw(t,n)).value()}async patchAttributesRaw(t,n){if(t.body===null||t.body===void 0)throw new ie("body","Required parameter requestParameters.body was null or undefined when calling patchAttributes.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes",method:"PATCH",headers:o,query:r,body:t.body},n);return new me(i,a=>xn(a))}async patchAttributes(t,n){return await(await this.patchAttributesRaw(t,n)).value()}async patchAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new ie("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling patchAttributesBucketName.");if(t.body===null||t.body===void 0)throw new ie("body","Required parameter requestParameters.body was null or undefined when calling patchAttributesBucketName.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"PATCH",headers:o,query:r,body:t.body},n);return new me(i,a=>xn(a))}async patchAttributesBucketName(t,n){return await(await this.patchAttributesBucketNameRaw(t,n)).value()}async putAttributesRaw(t,n){if(t.body===null||t.body===void 0)throw new ie("body","Required parameter requestParameters.body was null or undefined when calling putAttributes.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes",method:"PUT",headers:o,query:r,body:t.body},n);return new me(i,a=>xn(a))}async putAttributes(t,n){return await(await this.putAttributesRaw(t,n)).value()}async putAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new ie("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling putAttributesBucketName.");if(t.body===null||t.body===void 0)throw new ie("body","Required parameter requestParameters.body was null or undefined when calling putAttributesBucketName.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"PUT",headers:o,query:r,body:t.body},n);return new me(i,a=>xn(a))}async putAttributesBucketName(t,n){return await(await this.putAttributesBucketNameRaw(t,n)).value()}}class an extends gt{async getChallengeChallengeIdRaw(t,n){if(t.challengeId===null||t.challengeId===void 0)throw new ie("challengeId","Required parameter requestParameters.challengeId was null or undefined when calling getChallengeChallengeId.");const r={},o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/challenge/{challenge_id}".replace("{challenge_id}",encodeURIComponent(String(t.challengeId))),method:"GET",headers:o,query:r},n);return new me(i,a=>ra(a))}async getChallengeChallengeId(t,n){return await(await this.getChallengeChallengeIdRaw(t,n)).value()}async getChallengeChallengeIdV2Raw(t,n){if(t.challengeId===null||t.challengeId===void 0)throw new ie("challengeId","Required parameter requestParameters.challengeId was null or undefined when calling getChallengeChallengeIdV2.");const r={},o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/challenge/{challenge_id}/v2".replace("{challenge_id}",encodeURIComponent(String(t.challengeId))),method:"GET",headers:o,query:r},n);return new me(i,a=>so(a))}async getChallengeChallengeIdV2(t,n){return await(await this.getChallengeChallengeIdV2Raw(t,n)).value()}async getChallengePackChallengePackIdRaw(t,n){if(t.challengePackId===null||t.challengePackId===void 0)throw new ie("challengePackId","Required parameter requestParameters.challengePackId was null or undefined when calling getChallengePackChallengePackId.");const r={},o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/challenge_pack/{challenge_pack_id}".replace("{challenge_pack_id}",encodeURIComponent(String(t.challengePackId))),method:"GET",headers:o,query:r},n);return new me(i,a=>co(a))}async getChallengePackChallengePackId(t,n){return await(await this.getChallengePackChallengePackIdRaw(t,n)).value()}async getMeRaw(t){const n={},r={};if(this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(r.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/me",method:"GET",headers:r,query:n},t);return new me(o,i=>hh(i))}async getMe(t){return await(await this.getMeRaw(t)).value()}async getMeOrgsRaw(t){const n={},r={};if(this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(r.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/me/orgs",method:"GET",headers:r,query:n},t);return new me(o,i=>vh(i))}async getMeOrgs(t){return await(await this.getMeOrgsRaw(t)).value()}async getTokenRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new ie("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling getToken.");const r={},o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(o["SlashID-OrgID"]=String(t.slashIDOrgID)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/token",method:"GET",headers:o,query:r},n);return new me(i,a=>so(a))}async getToken(t,n){return await(await this.getTokenRaw(t,n)).value()}async postAttestationRaw(t,n){if(t.attestation===null||t.attestation===void 0)throw new ie("attestation","Required parameter requestParameters.attestation was null or undefined when calling postAttestation.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attestation",method:"POST",headers:o,query:r,body:ao(t.attestation)},n);return new me(i,a=>ra(a))}async postAttestation(t,n){return await(await this.postAttestationRaw(t,n)).value()}async postAttestationV2Raw(t,n){if(t.attestation===null||t.attestation===void 0)throw new ie("attestation","Required parameter requestParameters.attestation was null or undefined when calling postAttestationV2.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attestation/v2",method:"POST",headers:o,query:r,body:ao(t.attestation)},n);return new me(i,a=>so(a))}async postAttestationV2(t,n){return await(await this.postAttestationV2Raw(t,n)).value()}async postAttestationV3Raw(t,n){if(t.attestation===null||t.attestation===void 0)throw new ie("attestation","Required parameter requestParameters.attestation was null or undefined when calling postAttestationV3.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attestation/v3",method:"POST",headers:o,query:r,body:ao(t.attestation)},n);return new me(i,a=>kh(a))}async postAttestationV3(t,n){return await(await this.postAttestationV3Raw(t,n)).value()}async postDirectIdRaw(t,n){const r={},o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/direct-id",method:"POST",headers:o,query:r},n);return new me(i,a=>Eh(a))}async postDirectId(t={},n){return await(await this.postDirectIdRaw(t,n)).value()}async postIdRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new ie("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postId.");if(t.iDRequest===null||t.iDRequest===void 0)throw new ie("iDRequest","Required parameter requestParameters.iDRequest was null or undefined when calling postId.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(o["SlashID-OrgID"]=String(t.slashIDOrgID)),t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/id",method:"POST",headers:o,query:r,body:yh(t.iDRequest)},n);return new me(i,a=>co(a))}async postId(t,n){return await(await this.postIdRaw(t,n)).value()}async postRecoverRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new ie("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postRecover.");if(t.recoverRequest===null||t.recoverRequest===void 0)throw new ie("recoverRequest","Required parameter requestParameters.recoverRequest was null or undefined when calling postRecover.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(o["SlashID-OrgID"]=String(t.slashIDOrgID)),t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/recover",method:"POST",headers:o,query:r,body:Uh(t.recoverRequest)},n);return new me(i,a=>co(a))}async postRecover(t,n){return await(await this.postRecoverRaw(t,n)).value()}async postSsoResolveRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new ie("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postSsoResolve.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(o["SlashID-OrgID"]=String(t.slashIDOrgID)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/sso/resolve",method:"POST",headers:o,query:r,body:Th(t.postSsoResolveRequest)},n);return new ur(i)}async postSsoResolve(t,n){await this.postSsoResolveRaw(t,n)}}class Bh extends gt{async postActionsSdkRaw(t,n){if(t.eventPostRequest===null||t.eventPostRequest===void 0)throw new ie("eventPostRequest","Required parameter requestParameters.eventPostRequest was null or undefined when calling postActionsSdk.");const r={},o={};if(o["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/actions/sdk",method:"POST",headers:o,query:r,body:ea(t.eventPostRequest)},n);return new ur(i)}async postActionsSdk(t,n){await this.postActionsSdkRaw(t,n)}async postEventsRaw(t,n){if(t.eventPostRequest===null||t.eventPostRequest===void 0)throw new ie("eventPostRequest","Required parameter requestParameters.eventPostRequest was null or undefined when calling postEvents.");const r={},o={};if(o["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/events",method:"POST",headers:o,query:r,body:ea(t.eventPostRequest)},n);return new ur(i)}async postEvents(t,n){await this.postEventsRaw(t,n)}}class Hh extends gt{async deleteConsentGdprRaw(t,n){const r={};t.consentLevels&&(r.consent_levels=t.consentLevels),t.deleteAll!==void 0&&(r.deleteAll=t.deleteAll);const o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/consent/gdpr",method:"DELETE",headers:o,query:r},n);return new ur(i)}async deleteConsentGdpr(t={},n){await this.deleteConsentGdprRaw(t,n)}async getConsentGdprRaw(t,n){const r={},o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/consent/gdpr",method:"GET",headers:o,query:r},n);return new me(i,a=>th(a))}async getConsentGdpr(t={},n){return await(await this.getConsentGdprRaw(t,n)).value()}async postConsentGdprRaw(t,n){if(t.gDPRConsentRequest===null||t.gDPRConsentRequest===void 0)throw new ie("gDPRConsentRequest","Required parameter requestParameters.gDPRConsentRequest was null or undefined when calling postConsentGdpr.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/consent/gdpr",method:"POST",headers:o,query:r,body:na(t.gDPRConsentRequest)},n);return new me(i,a=>oa(a))}async postConsentGdpr(t,n){return await(await this.postConsentGdprRaw(t,n)).value()}async putConsentGdprRaw(t,n){if(t.gDPRConsentRequest===null||t.gDPRConsentRequest===void 0)throw new ie("gDPRConsentRequest","Required parameter requestParameters.gDPRConsentRequest was null or undefined when calling putConsentGdpr.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/consent/gdpr",method:"PUT",headers:o,query:r,body:na(t.gDPRConsentRequest)},n);return new me(i,a=>oa(a))}async putConsentGdpr(t,n){return await(await this.putConsentGdprRaw(t,n)).value()}}class Us extends gt{async postPersonsAnonymousRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new ie("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postPersonsAnonymous.");if(t.anonymousPersonCreateReq===null||t.anonymousPersonCreateReq===void 0)throw new ie("anonymousPersonCreateReq","Required parameter requestParameters.anonymousPersonCreateReq was null or undefined when calling postPersonsAnonymous.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(o["SlashID-OrgID"]=String(t.slashIDOrgID)),t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/persons/anonymous",method:"POST",headers:o,query:r,body:Qd(t.anonymousPersonCreateReq)},n);return new me(i,a=>Rh(a))}async postPersonsAnonymous(t,n){return await(await this.postPersonsAnonymousRaw(t,n)).value()}async postPersonsPersonIdImpersonateRaw(t,n){if(t.personId===null||t.personId===void 0)throw new ie("personId","Required parameter requestParameters.personId was null or undefined when calling postPersonsPersonIdImpersonate.");if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new ie("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postPersonsPersonIdImpersonate.");const r={},o={};if(t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(o["SlashID-OrgID"]=String(t.slashIDOrgID)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/persons/{person_id}/impersonate".replace("{person_id}",encodeURIComponent(String(t.personId))),method:"POST",headers:o,query:r},n);return new me(i,a=>Dh(a))}async postPersonsPersonIdImpersonate(t,n){return await(await this.postPersonsPersonIdImpersonateRaw(t,n)).value()}}class jh extends gt{async postTokenValidateRaw(t,n){if(t.validateTokenReq===null||t.validateTokenReq===void 0)throw new ie("validateTokenReq","Required parameter requestParameters.validateTokenReq was null or undefined when calling postTokenValidate.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/token/validate",method:"POST",headers:o,query:r,body:Fh(t.validateTokenReq)},n);return new me(i,a=>Ph(a))}async postTokenValidate(t,n){return await(await this.postTokenValidateRaw(t,n)).value()}}function Gh(){const n=window.screenX+(window.innerWidth-400)/2;return`width=400,height=600,top=${window.screenY+(window.innerHeight-600)/2},left=${n},resizable,scrollbars=yes,status=1`}function Fs(){const e=Gh(),t=window.open(window.location.href,"/id:popup",e);if(!t)throw new Error("SlashId: Popup blocked, please consider redirect instead");const n='<div style="position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);">You will be redirected in a moment...</div>';try{var r;t==null||(r=t.document)===null||r===void 0||r.write(n)}catch(i){console.error(i),t.document&&t.document.body&&(t.document.body.innerHTML=n)}finally{t.blur()}return[t,i=>(t&&(t.location=i,t.focus()),t)]}function Wh(e,t){return e.origin+e.pathname===t.origin+t.pathname}function Vs(e){let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"}const Kh="challenges",Zh="sidcp",fr="@SLASHID/CSRF_TOKEN",hr="@SLASHID/PKCE_CODE_VERIFIER",ai="@SLASHID/OIDC_CLIENT_ID",si="@SLASHID/OIDC_REDIRECT_URI";var pr;(function(e){e[e.StorageGetItem=0]="StorageGetItem",e[e.StorageSetItem=1]="StorageSetItem",e[e.Ping=2]="Ping",e[e.ChallengeWebauthnCreate=3]="ChallengeWebauthnCreate",e[e.ChallengeWebauthnGet=4]="ChallengeWebauthnGet",e[e.SSOChallenge=5]="SSOChallenge"})(pr||(pr={}));class Yh{constructor(){this.id=zn(),this.type=2}}class ia{constructor(t,n){this.id=t,this.error=n}}class Jh{constructor(t,n){this.type=3,this.id=zn(),this.slashIDOptions=t,this.challenge=n}}class aa{constructor(t,n,r){this.id=t,this.attestation=n,this.error=r}}class Xh{constructor(t,n){this.type=4,this.id=zn(),this.slashIDOptions=t,this.challenge=n}}class sa{constructor(t,n,r){this.id=t,this.attestation=n,this.error=r}}class Qh{constructor(t){this.type=0,this.id=zn(),this.key=t}}class ca{constructor(t,n,r){this.id=t,this.value=n,this.error=r}}class ep{constructor(t,n){this.id=zn(),this.type=1,this.key=t,this.value=n}}class la{constructor(t,n){this.id=t,this.error=n}}function zn(){const e=new Uint32Array(1);return window.crypto.getRandomValues(e),e[0]}function da(e){const t=new URLSearchParams(e),n=t.get("sso_challenge_id"),r=t.get("sso_code"),o=t.get("csrf_token");return!n||!r||!o?null:{ssoChallengeID:n,ssoCode:r,csrfToken:o}}function tp(e){return e.type===3}function np(e){return e.type===4}function rp(e){return e&&e.type===5}function op(e){return e.type===2}function ip(e){return typeof e=="object"&&!!e.baseURL&&!!e.sdkURL}function ap(e){return e==="email_address"||e==="phone_number"}var Hn,sp=new Uint8Array(16);function cp(){if(!Hn&&(Hn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Hn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Hn(sp)}var lp=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function dp(e){return typeof e=="string"&&lp.test(e)}var up=dp,Ee=[];for(var lo=0;lo<256;++lo)Ee.push((lo+256).toString(16).substr(1));function fp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Ee[e[t+0]]+Ee[e[t+1]]+Ee[e[t+2]]+Ee[e[t+3]]+"-"+Ee[e[t+4]]+Ee[e[t+5]]+"-"+Ee[e[t+6]]+Ee[e[t+7]]+"-"+Ee[e[t+8]]+Ee[e[t+9]]+"-"+Ee[e[t+10]]+Ee[e[t+11]]+Ee[e[t+12]]+Ee[e[t+13]]+Ee[e[t+14]]+Ee[e[t+15]]).toLowerCase();if(!up(n))throw TypeError("Stringified UUID is invalid");return n}var hp=fp;function pp(e,t,n){e=e||{};var r=e.random||(e.rng||cp)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return hp(r)}var en=pp;function Zt(e){const t=e.replace(/_/g,"/").replace(/-/g,"+"),n=atob(t);return Uint8Array.from(n,r=>r.charCodeAt(0))}function st(e,t=!0){const n=String.fromCharCode(...e),r=btoa(n);return t?r.replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,""):r}function mp(e){window.sessionStorage.setItem(ai,e.clientId),window.sessionStorage.setItem(si,e.redirectUri)}function gp(){const e=window.sessionStorage.getItem(ai),t=window.sessionStorage.getItem(si);if(!e||!t)throw new Error("Client ID or redirect URI not found in session storage");return{clientId:e,redirectUri:t}}function bp(){window.sessionStorage.removeItem(ai),window.sessionStorage.removeItem(si)}async function ci(){const e=en(),t=en()+en(),n=new TextEncoder().encode(t),r=await window.crypto.subtle.digest("SHA-256",n),o=st(new Uint8Array(r));return window.localStorage.setItem(fr,e),window.localStorage.setItem(hr,t),{csrf_token:e,pkce_code_challenge:o}}function wp(e){const t=new URLSearchParams(e),n=t.get("code"),r=t.get("state");return!n||!r?null:{ssoCode:n,csrfToken:r}}async function vp(e){const t=window.localStorage.getItem(fr),n=window.localStorage.getItem(hr);if(!t||!n)throw new Error("CSRF token or PKCE code verifier not found");if(t!==e.csrfToken)throw new Error("CSRF token mismatch");const r=new URLSearchParams;r.set("client_id",e.clientId),r.set("code",e.ssoCode),r.set("code_verifier",n),r.set("grant_type","authorization_code"),r.set("redirect_uri",e.redirectUri);const o=await fetch(`${e.apiBaseURL}/oauth2/tokens`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});if(!o.ok)throw new Error("Failed to obtain access token");return await o.json()}var be={};ve(be,"ERROR_NAMES",function(){return T});ve(be,"isFlowCancelledError",function(){return Zs});ve(be,"isHandlePatternNotAllowedError",function(){return Ip});ve(be,"isSignUpAwaitingApprovalError",function(){return Rp});ve(be,"isSignInAwaitingApprovalError",function(){return qp});ve(be,"isSelfRegistrationNotAllowedError",function(){return Dp});ve(be,"isNoPasswordSetError",function(){return Ap});ve(be,"isNonReachableHandleTypeError",function(){return Tp});ve(be,"isTimeoutError",function(){return zp});ve(be,"isRateLimitError",function(){return Lp});ve(be,"isBadPasskeyScopeError",function(){return Pp});ve(be,"isPasskeyPromptError",function(){return Op});ve(be,"isAPIResponseError",function(){return Mp});ve(be,"isInvalidSlashIDConfigurationError",function(){return Np});ve(be,"isInvalidURLParamsError",function(){return Up});ve(be,"isInvalidAuthenticationMethodError",function(){return Fp});ve(be,"isInvalidActionError",function(){return Vp});ve(be,"isPersonExistsError",function(){return Bp});ve(be,"isUnexpectedError",function(){return Hp});ve(be,"createSlashIDError",function(){return jp});ve(be,"isSlashIDError",function(){return Gp});ve(be,"isClientGeneratedErrorSlug",function(){return Wp});const Ze=async e=>{var t,n,r;if(Ae(e))return(r=(n=(await e.response.clone().json()).errors)===null||n===void 0||(t=n[0])===null||t===void 0?void 0:t.message)!==null&&r!==void 0?r:e.message;if(Ln(e)){var o;if(!(!((o=e.context.response)===null||o===void 0)&&o.body))return e.message;try{var i,a,s;const l=JSON.parse((i=e.context.response)===null||i===void 0?void 0:i.body);var c;return(c=(s=l.errors)===null||s===void 0||(a=s[0])===null||a===void 0?void 0:a.message)!==null&&c!==void 0?c:e.message}catch{return e.message}}return e instanceof Error?e.message:""},bt=e=>{var t,n;return Ae(e)?e.response.status:Ln(e)?(t=e.context.response)===null||t===void 0?void 0:t.status:(n=e.response)===null||n===void 0?void 0:n.status};function Ae(e){return e.name==="ResponseError"&&e.response instanceof Response}const _p={SlashIDCorrelationID:"slashid-correlation-id"},Bs=async e=>({status:e.response.status,statusText:e.response.statusText,url:e.response.url,type:e.response.type,ok:e.response.ok,redirected:e.response.redirected,headers:Object.fromEntries(e.response.headers),body:JSON.stringify(await e.response.clone().json(),null,2)});async function yp(e){const t=bt(e),n=await Ze(e);return t===403&&n==="no password set"}async function ua(e){const t=bt(e),n=await Ze(e);return t===403&&n==="self-registration not allowed for this organization"}async function fa(e){const t=bt(e),n=await Ze(e);return t===403&&n==="person cannot be registered"}async function ha(e){const t=bt(e),n=await Ze(e);return t===403&&n==="person is not active"}async function xp(e){const t=bt(e),n=await Ze(e);return t===403&&n.includes("Person")&&n.includes("is inactive")}function li(e){return bt(e)===429}async function Hs(e){const t=bt(e),n=await Ze(e);return(t===401||t===403)&&n==="authentication has expired"}async function Cp(e){const t=bt(e),n=await Ze(e);return t===409&&n==="person exists"}async function qo(e){const t=/selected scope '(.*?)' is not equal to or a registrable domain suffix of origin '(.*?)'/,n=bt(e),r=await Ze(e);return n===400&&t.test(r)}async function js(e){const t=/The operation either timed out or was not allowed. See: https:\/\/www.w3.org\/TR\/webauthn-2\/#sctn-privacy-considerations-client./,n=/This request has been cancelled by the user./,r=/The operation was aborted./,o=/Operation failed./,i=/The WebAuthn API is not available in the current environment/,a=/An unknown error occurred while talking to the credential manager./,s=await Ze(e);return e instanceof Error&&(t.test(s)||n.test(s)||r.test(s)||o.test(s)||i.test(s)||a.test(s))}function mr(e){return typeof e=="object"&&Array.isArray(e.errors)&&e.errors.every(t=>typeof t.httpcode=="number"&&typeof t.message=="string")}function Gs(e){return e.errors.some(t=>t.message==="authentication has expired")}function Ws(e){return e.errors.some(t=>t.httpcode===429)}async function kp(e){const t=/Popup blocked, please consider redirect instead/,n=await Ze(e);return e instanceof DOMException&&t.test(n)}function Sp(e,t){return e instanceof TypeError&&!t}const Ep=["incorrect_otp_code_via_email","incorrect_otp_code_via_sms","incorrect_otp_code","invalid_password","incorrect_password","recovery_failed","passkey_bad_scope","passkey_prompt_failed","oidc_popup_blocked","rate_limit_exceeded","timeout","client_side_error","unspecified"];class q extends Error{constructor({name:t="SlashIDError",message:n="An error occured in @slashid/slashid",context:r={},cause:o}){super(n,{cause:o}),this.name=t,this.context=r}}function Ln(e){return e instanceof q}async function Qe(e){if(e instanceof q)return e;if(e instanceof Error){if(await js(e))return new q({name:T.passkeyPromptError,message:"Passkey prompt was dismissed",cause:e});if(Ae(e)){if(await qo(e))return new q({name:T.badPasskeyScopeError,message:"Passkey scope is invalid",cause:e});if(li(e))return new q({name:T.rateLimitError,message:"Rate limit exceeded",cause:e});if(await Hs(e))return new q({name:T.timeoutError,message:"Authentication has expired",cause:e});if(await qo(e))return new q({name:T.badPasskeyScopeError,message:"Passkey scope is invalid",cause:e});if(await Cp(e))return new q({name:T.personExistsError,message:"Person with the given handle already exists",cause:e});const r=await Bs(e);return new q({name:T.apiResponseError,message:"An error occured in @slashid/slashid while processing the response",context:{response:r,correlationId:r.headers[_p.SlashIDCorrelationID]},cause:e})}return new q({name:T.unknown,message:`Unknown error: ${e.message}`,cause:e})}if(mr(e))return Gs(e)?new q({name:T.timeoutError,message:"Authentication has expired",context:{thrownResponse:e}}):Ws(e)?new q({message:"Rate limit exceeded",context:{thrownResponse:e},name:T.rateLimitError}):new q({message:"An error occured in @slashid/slashid",context:{thrownResponse:e},name:T.apiResponseError});let t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch{}const n=new Error(`Non-Error thrown: ${t}`);return new q({name:T.unknown,message:n.message,cause:n})}async function Ks(e){return(Ln(e)?e:await Qe(e)).message}async function $p(e,{authenticationFactor:t,handle:n,previousToken:r,challengeId:o}){const i=await(async()=>{if(await js(e))return"passkey_prompt_failed";if(await kp(e))return"oidc_popup_blocked";if(!Ln(e)&&!Ae(e)&&!mr(e))return null;if(li(e))return"rate_limit_exceeded";if(await Hs(e))return"timeout";if(await qo(e))return"passkey_bad_scope";if(mr(e)){if(Gs(e))return"timeout";if(Ws(e))return"rate_limit_exceeded"}return"unspecified"})();return{authenticationFactor:t,handle:n,errorText:i||"client_side_error",previousToken:r,challengeId:o,failureDetail:await Ks(e)}}const T={noPasswordSet:"noPasswordSet",unknown:"UnexpectedError",flowCancelled:"FlowCancelledError",handlePatternNotAllowed:"HandlePatternNotAllowedError",signUpAwaitingApproval:"SignUpAwaitingApprovalError",signInAwaitingApproval:"SignInAwaitingApprovalError",selfRegistrationNotAllowed:"SelfRegistrationNotAllowed",recoverNonReachableHandleType:"recoverNonReachableHandleType",timeoutError:"TimeoutError",rateLimitError:"RateLimitError",badPasskeyScopeError:"BadPasskeyScopeError",passkeyPromptError:"PasskeyPromptError",apiResponseError:"APIResponseError",invalidSlashIDConfigurationError:"InvalidSlashIDConfigurationError",invalidSlashIDURLParamsError:"InvalidSlashIDURLParamsError",invalidAuthenticationMethodError:"InvalidAuthenticationMethodError",invalidActionError:"InvalidActionError",personExistsError:"PersonExistsError"};function Zs(e){return e instanceof q&&e.name===T.flowCancelled}function Ip(e){return e instanceof q&&e.name===T.handlePatternNotAllowed}function Rp(e){return e instanceof q&&e.name===T.signUpAwaitingApproval}function qp(e){return e instanceof q&&e.name===T.signInAwaitingApproval}function Dp(e){return e instanceof q&&e.name===T.selfRegistrationNotAllowed}function Ap(e){return e instanceof q&&e.name===T.noPasswordSet}function Tp(e){return e instanceof q&&e.name===T.recoverNonReachableHandleType}function zp(e){return e instanceof q&&e.name===T.timeoutError}function Lp(e){return e instanceof q&&e.name===T.rateLimitError}function Pp(e){return e instanceof q&&e.name===T.badPasskeyScopeError}function Op(e){return e instanceof q&&e.name===T.passkeyPromptError}function Mp(e){return e instanceof q&&e.name===T.apiResponseError}function Np(e){return e instanceof q&&e.name===T.invalidSlashIDConfigurationError}function Up(e){return e instanceof q&&e.name===T.invalidSlashIDURLParamsError}function Fp(e){return e instanceof q&&e.name===T.invalidAuthenticationMethodError}function Vp(e){return e instanceof q&&e.name===T.invalidActionError}function Bp(e){return e instanceof q&&e.name===T.personExistsError}function Hp(e){return e instanceof q&&e.name===T.unknown}function jp({message:e,name:t,cause:n,context:r}){return new q({message:e,name:t,cause:n,context:r})}function Gp(e){return Ln(e)}const Wp=e=>Ep.includes(e),Kp=["http:","https:"];function di(e){if(!e)throw new q({message:"options cannot be null",name:T.invalidSlashIDConfigurationError,context:{options:e}});if(e.environment){if(typeof e.environment=="string"&&e.environment!=="production"&&e.environment!=="sandbox")throw new q({message:"If 'environment' is set as a string, it must be either 'production' or 'sandbox'",name:T.invalidSlashIDConfigurationError,context:{options:e}});if(typeof e.environment=="object"){if(typeof e.environment.baseURL!="string")throw new q({message:"'environment.baseURL' must be a string",name:T.invalidSlashIDConfigurationError,context:{options:e}});if(typeof e.environment.sdkURL!="string")throw new q({message:"'environment.sdkURL' must be a string",name:T.invalidSlashIDConfigurationError,context:{options:e}})}}if(e.environment&&(e.baseURL||e.sdkURL))throw new q({message:"If 'environment' is set, 'baseURL' and 'sdkURL' cannot be set at the same time. Use a custom environment instead.",name:T.invalidSlashIDConfigurationError,context:{options:e}});if(e.baseURL){if(typeof e.baseURL!="string")throw new q({message:"'baseURL' must be a string",name:T.invalidSlashIDConfigurationError,context:{options:e}});let o;try{o=new URL(e.baseURL)}catch{throw new q({message:"'baseURL' must be a valid URL",name:T.invalidSlashIDConfigurationError,context:{options:e}})}if(Kp.indexOf(o.protocol)===-1)throw new q({message:"'baseURL' must be either an http or https URL",name:T.invalidSlashIDConfigurationError,context:{options:e}})}if(e.sdkURL){if(typeof e.sdkURL!="string")throw new q({message:"'sdkURL' must be a string",name:T.invalidSlashIDConfigurationError,context:{options:e}});try{new URL(e.sdkURL)}catch{throw new q({message:"'sdkURL' must be a valid URL",name:T.invalidSlashIDConfigurationError,context:{options:e}})}}const{analyticsEnabled:t=!0,oid:n,identityProviderInitiatedSSOEnabled:r=!1}=e;if(t&&!n)throw new q({message:"Analytics require the 'oid' parameter to be set when instantiating SlashID()",name:T.invalidSlashIDConfigurationError,context:{options:e}});if(r&&!n)throw new q({message:"Identity provider initiated SSO requires the 'oid' parameter to be set when instantiating SlashID()",name:T.invalidSlashIDConfigurationError,context:{options:e}})}function Zp(e){return e.environment?Yp(e.environment):{baseURL:e.baseURL||Do.production.baseURL,sdkURL:e.sdkURL||Do.production.sdkURL}}const Do={production:{baseURL:"https://api.slashid.com",sdkURL:"https://cdn.slashid.com/sdk.html"},sandbox:{baseURL:"https://api.sandbox.slashid.com",sdkURL:"https://cdn.sandbox.slashid.com/sdk.html"}};function Yp(e){if(typeof e=="string")return Do[e];if(ip(e))return{baseURL:e.baseURL,sdkURL:e.sdkURL};throw new TypeError("'environment' must be either a string or an object")}function fn(e){const t=Zp(e);var n,r;return{oid:e.oid,analyticsEnabled:(n=e.analyticsEnabled)!==null&&n!==void 0?n:!0,identityProviderInitiatedSSOEnabled:(r=e.identityProviderInitiatedSSOEnabled)!==null&&r!==void 0?r:!1,...t}}class Ys{constructor(t){this.getOTP=t?.getOTP}}async function Js(e){if(e.method!=="oidc")throw new Error(`Can't create OIDC extras for method: ${e.method}`);let t={};const{client_id:n,provider:r}=e.options;let{ux_mode:o,redirect_target:i}=e.options;if(o||(o=Qt.Popup),i||(i=window.location.href),o===Qt.Redirect&&!Vs(i))throw new Error(`If OIDC ux_mode was set to "redirect" a "redirect_target" is required, got ${i}`);if(o===Qt.Popup){const[c,l]=Fs();t={...t,popup:c,setPopupUrl:l}}const{csrf_token:a,pkce_code_challenge:s}=await ci();return{...e,options:{...e.options,client_id:n,provider:r,ux_mode:o,redirect_target:i,csrf_token:a,pkce_code_challenge:s},extras:t}}async function Jp(e){if(e.method!=="saml")throw new Error(`Can't create SAML extras for method: ${e.method}`);let t={},{ux_mode:n,redirect_target:r}=e.options;if(n||(n=$n.Popup),r||(r=window.location.href),n===$n.Redirect&&!Vs(r))throw new Error(`If SAML ux_mode was set to "redirect" a "redirect_target" is required, got ${r}`);if(n===$n.Popup){const[a,s]=Fs();t={...t,popup:a,setPopupUrl:s}}const{csrf_token:o,pkce_code_challenge:i}=await ci();return{...e,options:{...e.options,ux_mode:n,redirect_target:r,csrf_token:o,pkce_code_challenge:i},extras:t}}const Xs="iss";function Xp(e){const t=e.split(":");return t.length===3&&t[0]==="social"}function Qp(e){const n=new URLSearchParams(e).get(Xs);return!n||!Xp(n)?null:{iss:n}}function e1(e){const t=new URL(e.href);return t.searchParams.delete(Xs),t.toString()}async function t1(e){const[t,n,r]=e.iss.split(":");return Js({method:"oidc",options:{provider:n,client_id:r,ux_mode:Qt.Redirect,redirect_target:e1(window.location)}})}function Ao(e){this.message=e}Ao.prototype=new Error,Ao.prototype.name="InvalidCharacterError";var pa=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Ao("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,o=0,i=0,a="";r=t.charAt(i++);~r&&(n=o%4?64*n+r:r,o++%4)&&(a+=String.fromCharCode(255&n>>(-2*o&6))))r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function n1(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(pa(n).replace(/(.)/g,function(r,o){var i=o.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}(t)}catch{return pa(t)}}function gr(e){this.message=e}function r1(e,t){if(typeof e!="string")throw new gr("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(n1(e.split(".")[n]))}catch(r){throw new gr("Invalid token specified: "+r.message)}}gr.prototype=new Error,gr.prototype.name="InvalidTokenError";var uo=r1;const o1={end_user_read_write:"end_user_read_write",end_user_read_only:"end_user_read_only",end_user_no_access:"end_user_no_access","person_pool-end_user_read_write":"person_pool-end_user_read_write","person_pool-end_user_read_only":"person_pool-end_user_read_only","person_pool-end_user_no_access":"person_pool-end_user_no_access"};class i1{async get(t){const n=await this.user.getAttributesClient().getAttributesBucketName({bucketName:this.bucketName,attributes:t,slashIDSdkVersion:$e.raw},{cache:"no-cache"}),r=n.errors;if(r)throw r;return n.result}async set(t){const r=(await this.user.getAttributesClient().putAttributesBucketName({bucketName:this.bucketName,body:t,slashIDSdkVersion:$e.raw},{cache:"no-cache"})).errors;if(r)throw r}async delete(t){const r=(await this.user.getAttributesClient().deleteAttributesBucketName({bucketName:this.bucketName,slashIDSdkVersion:$e.raw,attributes:t},{cache:"no-cache"})).errors;if(r)throw r}constructor({user:t,bucketName:n}){this.user=t,this.bucketName=n}}function tn(e){return new Promise(t=>setTimeout(t,e))}const Qs="SlashID-SdkRetryCount";function a1(e){if(!e.headers)return 0;const n=new Headers(e.headers).get(Qs);return n?parseInt(n):0}function Lt({baseDelayMs:e,maxRetries:t}){return{onError:async({error:n,response:r,url:o,init:i,fetch:a})=>{if(Sp(n,r)){const s=a1(i);return s>=t?r:(await tn(Math.pow(2,s)*e),await a(o,{...i,headers:{...i.headers,[Qs]:`${s+1}`}}))}return r}}}const ec=async({environment:e,oid:t})=>{const{baseURL:n}=fn({environment:e}),r=new Us(new nt({...rt,basePath:n,middleware:[Lt({maxRetries:5,baseDelayMs:500})]}));try{const{result:o}=await r.postPersonsAnonymous({slashIDOrgID:t,anonymousPersonCreateReq:{}});return o}catch(o){throw o instanceof Error?Qe(o):o}};function s1(e){if(typeof e.oid!="string")throw new TypeError("'oid' must be of type string")}const tc=e=>{di(e);const t=fn(e);s1(t);const{baseURL:n,sdkURL:r,oid:o}=t;return{environment:{baseURL:n,sdkURL:r},oid:o}};function c1(e){return e?typeof e.user_token=="string":!1}class hn{static async createAnonymousUser(t){const n=tc(t),r=await ec(n);return new hn(r,t)}initialize(t,n){try{t=JSON.parse(t)}catch{}if(typeof t!="string")throw new q({name:T.invalidActionError,message:"token must be a string",context:{token:t}});try{const r=uo(t);c1(r)?(this._token=r.user_token,this._tokenContainer=t):this._token=t}catch(r){throw new q({name:T.unknown,message:`error when decoding token: ${r.toString()}`,cause:r,context:{token:t}})}this._clientOptions=fn(n??{}),this.initializeClients()}updateToken(t){this.initialize(t,this._clientOptions)}get decoded(){if(!this._token)throw new q({name:T.invalidActionError,message:"Cannot call methods on unauthenticated user"});try{return uo(this._token)}catch(t){throw new q({name:T.unknown,message:`error when decoding token: ${t.toString()}`,cause:t,context:{token:this._token}})}}get tokenClaims(){return this.decoded}get decodedTokenContainer(){if(this._tokenContainer)try{return uo(this._tokenContainer)}catch(t){throw new q({name:T.unknown,message:`error when decoding token container: ${t.toString()}`,cause:t,context:{tokenContainer:this._tokenContainer}})}}get tokenContainerClaims(){return this.decodedTokenContainer}updateClient(t){this._token=t,this.initializeClients()}initializeClients(){var t;const n=new nt({...rt,...((t=this._clientOptions)===null||t===void 0?void 0:t.baseURL)&&{basePath:this._clientOptions.baseURL},accessToken:this._token});this._apiClient=new an(n),this._attrsClient=new Vh(n),this._tokenClient=new jh(n),this._personConsentsApi=new Hh(n)}get ID(){return this.decoded.person_id}get token(){var t;return(t=this._token)!==null&&t!==void 0?t:""}get tokenContainer(){return this._tokenContainer||""}get oid(){return this.decoded.oid}get firstLogin(){return this.decoded.first_token}get authentication(){return this.decoded.authenticated_methods||[]}get authentications(){return this.decoded.authentications||[]}get anonymous(){return this.decoded.person_type==="anonymous"}async isAuthenticated(){const{valid:t}=await this.validateToken();return t&&this.decoded.person_type!=="anonymous"}async createDirectID(){const{result:t}=await this._apiClient.postDirectId({slashIDSdkVersion:$e.raw});return t}async logout(){this.updateClient(void 0),this._tokenContainer=void 0}async validateToken(){var t;const n=await((t=this._tokenClient)===null||t===void 0?void 0:t.postTokenValidate({validateTokenReq:{token:this.token},slashIDSdkVersion:$e.raw},{cache:"no-cache"})),r=n.errors;if(r)throw r;return n.result}getGroups(){const t=this.decoded.groups_claim_name||"groups";return this.decoded[t]}getAttributesClient(){return this._attrsClient}getBucket(t=o1.end_user_read_write){return new i1({user:this,bucketName:t})}async get(t){return this.getBucket().get(t)}async set(t){return this.getBucket().set(t)}async delete(t){return this.getBucket().delete(t)}async getGDPRConsent(){const t=await this._personConsentsApi.getConsentGdpr({slashIDSdkVersion:$e.raw}),n=t.errors;if(n)throw n;return t.result}async setGDPRConsent({consentLevels:t}){const n=await this._personConsentsApi.putConsentGdpr({gDPRConsentRequest:{consent_levels:t},slashIDSdkVersion:$e.raw}),r=n.errors;if(r)throw r;return n.result}async addGDPRConsent({consentLevels:t}){const n=await this._personConsentsApi.postConsentGdpr({gDPRConsentRequest:{consent_levels:t},slashIDSdkVersion:$e.raw}),r=n.errors;if(r)throw r;return n.result}async removeGDPRConsent({consentLevels:t}){return this._personConsentsApi.deleteConsentGdpr({slashIDSdkVersion:$e.raw,consentLevels:t})}async removeGDPRConsentAll(){return this._personConsentsApi.deleteConsentGdpr({slashIDSdkVersion:$e.raw,deleteAll:!0})}async getOrganizations(){const t=await this._apiClient.getMe(),n=t.errors;if(n)throw n;return t.result.organizations}async getHandles(){const{errors:t,result:n}=await this._apiClient.getMe();if(t)throw t;return n.handles}async getTokenForOrganization(t){const n=await this._apiClient.getToken({slashIDOrgID:t,slashIDSdkVersion:$e.raw}),r=n.errors;if(r)throw r;return n.result}toString(){var t,n;return(n=(t=this._tokenContainer)!==null&&t!==void 0?t:this._token)!==null&&n!==void 0?n:""}toJSON(){var t,n;return`${(n=(t=this._tokenContainer)!==null&&t!==void 0?t:this._token)!==null&&n!==void 0?n:""}`}constructor(t,n){this.initialize(t,n)}}async function ma(){const e=document.hasFocus();for(;!e&&!document.hasFocus();)await tn(50);return e}const ga={PopupBlocked:"Popup blocked",BadOAuthURL:"Bad OAuth sign in URL"},ba={PopupBlocked:"Popup blocked",BadAuthURL:"Bad authentication URL"};function l1(e){return e.errorText==="client_side_error"}const d1=["otpSmsSent","otpCodeSent","totpKeyGenerated","totpCodeRequested","otpIncorrectCodeSubmitted","passwordSetReady","passwordResetReady","passwordVerifyReady","invalidPasswordSubmitted","incorrectPasswordSubmitted","oauthFlowStarted","oauthFlowFailed","userAuthenticatedFromURL","idFlowSucceeded","idFlowStarted","idFlowFailed","recoveryFlowStarted","recoveryFlowSucceeded","recoveryFlowFailed","webAuthnChallengeProcessed","redirectUriDiscovered","uiCustomizationReceived"],u1=["otpCodeSubmitted","passwordSubmitted","flowCancelled"],f1=["clientSideError"];function wa(e){return d1.includes(e)}function h1(e){return u1.includes(e)}function fo(e){return f1.includes(e)}function p1(){const e=new Map;function t(r){function o(i){r(i.payload)}return e.set(r,o),o}function n(r){if(e.has(r))return e.get(r)}return{decorate:t,getDecorator:n}}async function To(e){return new Promise(async(n,r)=>{const o=new Yh;let i=!1;const a=s=>{const c=s.data;c.id===o.id&&(window.removeEventListener("message",a),c.error?r(c.error):(i=!0,n(e)))};for(window.addEventListener("message",a);!i;)e.postMessage(o,"*"),await tn(50)})}class m1{async getRemoteWindow(){var t;const n=(t=this.remote)===null||t===void 0?void 0:t.contentWindow;if(!n)throw new Error("this context has no remote");return this.remoteReady||(await To(n),this.remoteReady=!0),n}async processEvent(t){let n=null;if(window.parent&&t.source===window.parent&&(n=window.parent),!!n)switch(t.data.type){case pr.StorageGetItem:{const r=t.data;try{const o=await this.localGetItem(r.key);n.postMessage(new ca(t.data.id,o),"*")}catch(o){n.postMessage(new ca(t.data.id,null,o),"*")}}break;case pr.StorageSetItem:{const r=t.data;try{await this.localSetItem(r.key,r.value),n.postMessage(new la(t.data.id),"*")}catch(o){n.postMessage(new la(t.data.id,o),"*")}}break}}async localGetItem(t){return window.localStorage.getItem(t)}async remoteGetItem(t){let n=null;return this.remote&&(n=await new Promise((r,o)=>{const i=new Qh(t),a=s=>{const c=s.data;c.id===i.id&&(window.removeEventListener("message",a),c.error?o(c.error):r(c.value))};window.addEventListener("message",a),this.getRemoteWindow().then(s=>{s.postMessage(i,"*")})})),n}async localSetItem(t,n){return window.localStorage.setItem(t,n)}async remoteSetItem(t,n){this.remote&&await new Promise((r,o)=>{const i=new ep(t,n),a=s=>{const c=s.data;c.id===i.id&&(window.removeEventListener("message",a),c.error?o(c.error):r())};window.addEventListener("message",a),this.getRemoteWindow().then(s=>{s.postMessage(i,"*")})})}constructor(t,n){this.remoteReady=!1,this.remote=t,this.remoteOrigin=n,this.remote||window.addEventListener("message",this.processEvent.bind(this))}}class nc{constructor(t){this.store=t}}class et extends nc{stringify(t){return JSON.stringify(t)}parse(t){return t?JSON.parse(t):[]}async getAll(){const t=this.parse(await this.store.localGetItem(et.LOCAL_STORAGE_IDENTIFIERS_KEY)),n=this.parse(await this.store.remoteGetItem(et.LOCAL_STORAGE_IDENTIFIERS_KEY));return et.merge(t,n)}async add(t){const n=await this.getAll(),r=this.stringify(et.merge(n,[t]));await this.store.localSetItem(et.LOCAL_STORAGE_IDENTIFIERS_KEY,r),await this.store.remoteSetItem(et.LOCAL_STORAGE_IDENTIFIERS_KEY,r)}static identifiersEqual(t,n){return t.type===n.type&&t.value===n.value}static merge(t,n){return t.concat(...n).reduce((r,o)=>{for(const i of r)if(et.identifiersEqual(i,o))return r;return r.push(o),r},[])}}et.LOCAL_STORAGE_IDENTIFIERS_KEY="SLASHID_IDENTIFIERS";class Rr extends nc{static identifiersEqual(t,n){return t===n}static merge(t,n){return t.concat(...n).reduce((r,o)=>{for(const i of r)if(Rr.identifiersEqual(i,o))return r;return r.push(o),r},[])}}class dt extends Rr{stringify(t){return JSON.stringify(t)}parse(t){if(!t)return[];let n=null;try{n=JSON.parse(t)}catch{return[t]}return Array.isArray(n)?n.filter(o=>typeof o=="string"):[]}async getAll(){const t=this.parse(await this.store.localGetItem(dt.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY)),n=this.parse(await this.store.remoteGetItem(dt.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY));return dt.merge(t,n)}async add(t){const n=await this.getAll(),r=this.stringify(dt.merge(n,[t]));await this.store.localSetItem(dt.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY,r),await this.store.remoteSetItem(dt.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY,r)}}dt.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY="SLASHID_WEBAUTHN_CREDENTIAL_ID";class Rn extends Rr{stringify(t){return JSON.stringify(t)}parse(t){if(!t)return{};let n=null;try{n=JSON.parse(t)}catch{return{}}if(typeof n!="object")return{};const r={};for(const o of Object.keys(n)){if(typeof o!="string"||!Array.isArray(n[o]))continue;const i=n[o].filter(a=>typeof a=="string");r[o]=i}return r}async getAll(){return this.parse(await this.store.localGetItem(Rn.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY_V2))}async get(t){return!this.store.remoteOrigin||this.store.remoteOrigin.endsWith(t)?this.v1Storage.getAll():(await this.getAll())[t]||[]}async add(t,n){if(!this.store.remoteOrigin||this.store.remoteOrigin.endsWith(t)){this.v1Storage.add(n);return}const r=await this.getAll(),o=r[t]||[];for(const a of o)if(a===n){console.warn(`Attempted to add already present credential ID: scope=${t} credId=${n}`);return}o.push(n),r[t]=o;const i=this.stringify(r);await this.store.localSetItem(Rn.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY_V2,i)}constructor(t){super(t),this.v1Storage=new dt(t)}}Rn.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY_V2="SLASHID_WEBAUTHN_CREDENTIAL_ID_V2";class g1 extends hn{async mfa(t,n){let r;if(!t)throw new Error("at least one of PersonHandle or Factor is required");t.type&&t.value&&(r=t),t.method&&(n=t);const o=await this._slashid._id(this.decoded.oid,r,n,this._token);this.updateToken(o.toString())}constructor(t,n){super(t,n),this._slashid=n instanceof br?n:new br(n)}}const b1=/firefox|fxios|deno/i,w1=(e,t)=>({sendEvent:async n=>{try{await e(`${t.baseURL}/actions/sdk`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch(r){console.error("@slashid/slashid-sdk: failed to send event",{error:r,event:n})}}}),v1=(e,t)=>({sendEvent:async n=>{const r=b1.test(navigator.userAgent);try{await e(`${t.baseURL}/actions/sdk`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!r})}catch(o){console.error("@slashid/slashid-sdk: failed to send event",{error:o,event:n})}}});class _1{createCorrelationID(){return en()}createEventMetadata({location:t,userAgent:n}={location:"/",userAgent:""}){var r,o,i;return{organization_id:(i=(o=this.config.oid)!==null&&o!==void 0?o:(r=this.user)===null||r===void 0?void 0:r.oid)!==null&&i!==void 0?i:"",analytics_correlation_id:this.correlationId,window_location:t,user_agent:n}}sendEvent(t){this.transport.sendEvent(t)}trackPersonIdentified({user:t}){const n={event_name:Xt.PersonIdentifiedV1,person_id:t.ID},r={...this.createEventMetadata(),event_data:n};this.sendEvent(r)}trackPersonLoggedOut(t){const n=new hn(t.token,this.config),r={event_name:Xt.PersonLoggedOutV1,person_id:n.ID},o={...this.createEventMetadata(),event_data:r};this.sendEvent(o)}identify(t){this.user=t,this.trackPersonIdentified({user:t})}logout(){const t=this.user;t&&(this.trackPersonLoggedOut({token:t.token}),this.user=void 0)}trackVirtualPageView(t){const{url:n=""}=t,r={event_name:Xt.VirtualPageLoadedV1,...this.user&&{person_id:this.user.ID}};var o;const i={...this.createEventMetadata({location:n,userAgent:(o=t.userAgent)!==null&&o!==void 0?o:""}),event_data:r};this.sendEvent(i)}constructor({options:t,user:n,transport:r}){t&&di(t),this.config=fn(t??{}),this.transport=r??w1(fetch,this.config),this.eventsAPI=new Bh(new nt({...rt,basePath:this.config.baseURL})),this.user=n,this.correlationId=this.createCorrelationID()}}class y1 extends _1{createCorrelationID(){const t="@slashid/EVENTS_CORRELATION_ID";try{const r=sessionStorage.getItem(t);if(r)return r}catch{}const n=en();try{sessionStorage.setItem(t,n)}catch{}return n}createEventMetadata({location:t,userAgent:n}={location:window.location.href,userAgent:navigator.userAgent}){return super.createEventMetadata({location:t,userAgent:n})}subscribeToDomainEvents(){this.sdk.subscribe("idFlowSucceeded",n=>this.trackAuthenticationSuccess(n)),this.sdk.subscribe("idFlowFailed",n=>this.trackAuthenticationFailure(n)),this.sdk.subscribe("invalidPasswordSubmitted",n=>this.trackAuthenticationFailure({...n,errorText:"invalid_password"})),this.sdk.subscribe("incorrectPasswordSubmitted",n=>this.trackAuthenticationFailure({...n,errorText:"incorrect_password"})),this.sdk.subscribe("otpIncorrectCodeSubmitted",n=>{var r;const o=(()=>{var i,a;return((i=n.factor)===null||i===void 0?void 0:i.method)==="otp_via_email"?"incorrect_otp_code_via_email":((a=n.factor)===null||a===void 0?void 0:a.method)==="otp_via_sms"?"incorrect_otp_code_via_sms":"incorrect_otp_code"})();this.trackAuthenticationFailure({errorText:o,authenticationFactor:{method:(r=n.factor)===null||r===void 0?void 0:r.method},challengeId:n.challengeId})}),ac(this.sdk).subscribe("clientSideError",n=>{this.trackAuthenticationFailure({...n,errorText:"client_side_error"})})}trackAuthenticationSuccess(t){var n;const r=this.sdk.getUser(t.token);this.identify(r);const o={event_name:Xt.AuthenticationSucceededV1,person_id:r.ID,success_authn_method:(n=t.authenticationFactor)===null||n===void 0?void 0:n.method,authenticated_methods:r.authentication,...t.handle&&{handle:t.handle}},i={...this.createEventMetadata(),event_data:o};this.sendEvent(i)}trackAuthenticationFailure(t){var n;const r=t.previousToken?this.sdk.getUser(t.previousToken):this.user,o={event_name:Xt.AuthenticationFailedV1,failed_authn_method:(n=t.authenticationFactor)===null||n===void 0?void 0:n.method,authenticated_methods:r?.authentication,failure_reason:t.errorText,...t.handle&&{handle:t.handle},...t.challengeId&&{challenge_id:t.challengeId},...t.failureDetail&&{failure_detail:t.failureDetail},...r&&{person_id:r.ID}},i={...this.createEventMetadata(),event_data:o};this.sendEvent(i)}trackSdkLoaded(){const t={...this.createEventMetadata(),event_data:{event_name:Xt.SlashIdsdkLoadedV1}};this.sendEvent(t)}trackVirtualPageView(t){const{url:n=window.location.href,userAgent:r=navigator.userAgent}=t;super.trackVirtualPageView({url:n,userAgent:r})}constructor({sdk:t,user:n}){const r={oid:t.oid,baseURL:t.baseURL,sdkURL:t.sdkURL,analyticsEnabled:!0},o=fn(r);super({options:r,user:n,transport:v1(fetch,o)}),this.sdk=t,this.subscribeToDomainEvents(),this.trackSdkLoaded()}}function x1(e){var t;const n=(t=e.pattern_qualifiers)===null||t===void 0?void 0:t.reduce((o,i)=>i==="case_insensitive"?o+"i":o,"");return new RegExp(e.pattern,n)}function va(e){const t=e.options.validation_rules.regular_expressions;return t?t.map(r=>{const o=x1(r);return{type:"regex",name:r.name,regexp:o,matchType:r.match_type}}):[]}function _a({password:e,rules:t}){const n=[];return t.forEach(r=>{const o=r.regexp.test(e);(o&&r.matchType==="must_not_match"||!o&&r.matchType==="must_match")&&n.push(r)}),n.length===0?{valid:!0,failedRules:[]}:{valid:!1,failedRules:n}}const C1=new Set([ye.Otp,ye.TotpRegister,ye.TotpVerify]);function k1(e){return C1.has(e)}class In{listenForEvents(){this.emitter.on("flowCancelled",()=>{this.flowCancelled=!0})}updateClient(t){this.authnClient=new an(new nt({...rt,basePath:this.slashID.baseURL,middleware:[Lt({maxRetries:5,baseDelayMs:500})],...t&&{accessToken:t}}))}async processChallenges({challenges:t,authnFactor:n,previousToken:r}){this.updateClient(r);let o;for(const i of t)o=await this.process(i,n);if(!o)throw new Error("no user token in attestation response");return o}async process(t,n){let r;switch(t.type){case ye.Proxy:return this.processProxyChallenge(t);case ye.Nonce:r=await this.processNonceChallenge(t);break;case ye.Otp:{const l=new Ys(n?.options);r=await this.processOTPChallenge(t,l);break}case ye.TotpRegister:r=await this.processTOTPRegisterChallenge(t);break;case ye.TotpVerify:r=await this.processTOTPVerifyChallenge(t);break;case ye.WebauthnGet:r=await this.processWebAuthnGetChallenge(t);break;case ye.WebauthnCreate:r=await this.processWebAuthnCreateChallenge(t);break;case ye.Oidc:return this.processOIDCChallenge(t,n);case ye.Saml:return this.processSAMLChallenge(t,n);case ye.PasswordSet:r=await this.processPasswordSetChallenge(t);break;case ye.PasswordVerify:r=await this.processPasswordVerifyChallenge(t);break;case ye.PasswordReset:r=await this.processPasswordResetChallenge(t);break;case ye.UiCustomization:return this.processUiCustomizationChallenge(t);default:throw new Error("unhandled challenge type: "+JSON.stringify(t))}let o,i,a;try{const l=await this.authnClient.postAttestationV3Raw({attestation:r,slashIDSdkVersion:$e.raw},{cache:"no-cache"});o=await l.value(),i=l.raw.headers}catch(l){if(Ae(l))o=await l.response.clone().json(),i=l.response.headers,a=l;else throw l}if(i.has("location")){const l=i.get("location");typeof l=="string"&&l&&this.emitter.emit({name:"redirectUriDiscovered",payload:{redirectUri:l},meta:{access:"public"}})}if(mr(o)&&o.errors.length){if(o.errors[0].httpcode===400&&t.type===ye.PasswordSet)return this.notifySlashID("invalidPasswordSubmitted",{failedRules:[],authenticationFactor:n,challengeId:t.id,failureDetail:o.errors[0].message}),this.process(t,n);if(o.errors[0].httpcode===401&&t.type===ye.PasswordVerify)return this.notifySlashID("incorrectPasswordSubmitted",{authenticationFactor:n,challengeId:t.id,failureDetail:o.errors[0].message}),this.process(t,n);if(o.errors[0].httpcode===401&&k1(t.type))return this.notifySlashID("otpIncorrectCodeSubmitted",{factor:n,challengeId:t.id}),this.process(t,n);throw await Qe(a)}const c=o.result.token;if(!c)throw new Error("no user token in attestation response");if(t.type===ye.WebauthnCreate){const l=t.options;this.slashID.credentialStorage.add(l.rp.id,r.data.rawId)}return c}async processProxyChallenge(t){let n;for(;!n;){if(this.flowCancelled)throw new q({name:T.flowCancelled,message:"The flow has been cancelled!",context:{challenge:t}});await tn(1e3);const r=await this.authnClient.getChallengeChallengeIdV2({challengeId:t.options.challenge_id,slashIDSdkVersion:$e.raw},{cache:"no-cache"});if(r.errors&&(r.errors.length!==1||r.errors[0].httpcode!==202))throw r;n=r.result}return n}async processNonceChallenge(t){var n;return{challenge_id:t.id,challenge_type:t.type,data:{challenge:(n=t.options)===null||n===void 0?void 0:n.challenge}}}shouldProcessEvent(t){var n,r,o,i;return!t.meta||!t.meta.authFlowId&&!t.meta.recoveryFlowId?!0:!(!((n=this.flowMeta)===null||n===void 0)&&n.authFlowId&&((r=t.meta)===null||r===void 0?void 0:r.authFlowId)!==this.flowMeta.authFlowId||!((o=this.flowMeta)===null||o===void 0)&&o.recoveryFlowId&&((i=t.meta)===null||i===void 0?void 0:i.recoveryFlowId)!==this.flowMeta.recoveryFlowId)}async processOTPChallenge(t,n){this.notifySlashID("otpSmsSent"),this.notifySlashID("otpCodeSent");const r=new Promise(a=>{const s=c=>{this.shouldProcessEvent(c)&&(this.emitter.off("otpCodeSubmitted",s),a(c.payload))};this.emitter.on("otpCodeSubmitted",s)});typeof n.getOTP=="function"&&n.getOTP().then(a=>this.notifySlashID("otpCodeSubmitted",a));const o=await r;if(!o)throw new Error("no OTP code provided");return{challenge_id:t.id,challenge_type:t.type,data:{otp:o}}}async processTOTPRegisterChallenge(t){var n,r,o;this.notifySlashID("totpKeyGenerated",{uri:(n=t.options)===null||n===void 0?void 0:n.key_uri,qrCode:(r=t.options)===null||r===void 0?void 0:r.qr_code_data_b64,recoveryCodes:(o=t.options)===null||o===void 0?void 0:o.recovery_codes});const a=await new Promise(c=>{const l=u=>{this.shouldProcessEvent(u)&&(this.emitter.off("otpCodeSubmitted",l),c(u.payload))};this.emitter.on("otpCodeSubmitted",l)});if(!a)throw new q({name:"SlashIDError",message:"no TOTP code provided",context:{challengeId:t.id}});return{challenge_id:t.id,challenge_type:t.type,data:{otp:a}}}async processTOTPVerifyChallenge(t){this.notifySlashID("totpCodeRequested");const r=await new Promise(i=>{const a=s=>{this.shouldProcessEvent(s)&&(this.emitter.off("otpCodeSubmitted",a),i(s.payload))};this.emitter.on("otpCodeSubmitted",a)});if(!r)throw new q({name:"SlashIDError",message:"no TOTP code provided",context:{challengeId:t.id}});return{challenge_id:t.id,challenge_type:t.type,data:{otp:r}}}async processWebAuthnGetChallenge(t){const n=await ma(),r=t.options;if(this.slashID.isLocalScope(r.rpId)){const o={challenge:Zt(r.challenge),extensions:r.extensions,rpId:r.rpId,timeout:r.timeout,userVerification:r.userVerification},i=r.allowCredentials;if(i){o.allowCredentials=new Array(i.length);for(let m=0;m<i.length;m++){const h=i[m];o.allowCredentials[m]={id:Zt(h.id),type:h.type,transports:h.transports}}}const a=await navigator.credentials.get({publicKey:o});if(!a)throw new Error("could not create assert credential");const s=a.response,c=st(new Uint8Array(a.rawId)),l={id:a.id,rawId:c,type:a.type,clientExtensionResults:a.getClientExtensionResults(),response:{clientDataJSON:st(new Uint8Array(s.clientDataJSON)),authenticatorData:st(new Uint8Array(s.authenticatorData)),signature:st(new Uint8Array(s.signature)),userHandle:s.userHandle?st(new Uint8Array(s.userHandle)):null}},u={challenge_id:t.id,challenge_type:t.type,data:l};return this.notifySlashID("webAuthnChallengeProcessed",{credentialId:c}),u}else{const o=this.slashID.getSDKUrl();let i;if(await br.canGetPublicKeyCredentialsInIFrame()){if(i=this.slashID.iframe.contentWindow,!i)throw new Error("cannot get global id iframe")}else if(n||await tn(200),i=window.open(o.toString()),!i)throw new Error("cannot open global id window");return new Promise((s,c)=>{const l=new Xh({baseURL:this.slashID.baseURL,sdkURL:this.slashID.sdkURL},t),u=m=>{const h=m.data;h.id===l.id&&(i.close(),window.removeEventListener("message",u),h.error?c(h.error):s(h.attestation))};window.addEventListener("message",u),To(i).then(m=>{m.postMessage(l,o.origin)})})}}async processWebAuthnCreateChallenge(t){const n=await ma(),r=t.options;if(this.slashID.isLocalScope(r.rp.id)){const o={challenge:Zt(r.challenge),rp:r.rp,user:{id:Zt(r.user.id),name:r.user.name,displayName:r.user.displayName},pubKeyCredParams:r.pubKeyCredParams,authenticatorSelection:r.authenticatorSelection,timeout:r.timeout,extensions:r.extensions,attestation:r.attestation},i=r.excludeCredentials;if(i){o.excludeCredentials=new Array(i.length);for(let m=0;m<i.length;m++){const h=i[m];o.excludeCredentials[m]={id:Zt(h.id),type:h.type,transports:h.transports}}}const a=await navigator.credentials.create({publicKey:o});if(!a)throw new Error("cannot create credential");const s=a.response,c=st(new Uint8Array(a.rawId)),l={id:a.id,rawId:c,type:a.type,clientExtensionResults:a.getClientExtensionResults(),response:{attestationObject:st(new Uint8Array(s.attestationObject)),clientDataJSON:st(new Uint8Array(s.clientDataJSON))}},u={challenge_id:t.id,challenge_type:t.type,data:l};return this.notifySlashID("webAuthnChallengeProcessed",{credentialId:c}),u}else return n||await tn(200),new Promise((i,a)=>{const s=this.slashID.getSDKUrl(),c=window.open(s.toString());if(!c){a(new Error("cannot open global id window"));return}const l=new Jh({baseURL:this.slashID.baseURL,sdkURL:this.slashID.sdkURL},t),u=m=>{const h=m.data;h.id===l.id&&(c.close(),window.removeEventListener("message",u),h.error?a(h.error):i(h.attestation))};window.addEventListener("message",u),To(c).then(m=>{m.postMessage(l,s.origin)})})}async processOIDCChallenge(t,n){if(n.options.ux_mode===Qt.Popup){var r;const i=n.extras.setPopupUrl(t.options.auth_code_url);if(!(!(t==null||(r=t.options)===null||r===void 0)&&r.auth_code_url)){var o;throw this.notifySlashID("oauthFlowFailed",{...n.options,reason:ga.BadOAuthURL}),new Error(`Bad OAuth URL - got ${t==null||(o=t.options)===null||o===void 0?void 0:o.auth_code_url}`)}if(!i)throw this.notifySlashID("oauthFlowFailed",{...n.options,reason:ga.PopupBlocked}),new Error("OIDC flow unsuccesful!")}else if(n.options.ux_mode===Qt.Redirect)window.location.assign(t.options.auth_code_url);else throw new Error(`Unsupported OAuth ux_mode - got ${n.options.ux_mode}`);return this.notifySlashID("oauthFlowStarted",n.options),""}async processSAMLChallenge(t,n){if(n.options.ux_mode===$n.Popup){var r;const i=n.extras.setPopupUrl(t.options.start_authentication_url);if(!(!(t==null||(r=t.options)===null||r===void 0)&&r.start_authentication_url)){var o;throw this.notifySlashID("popupFailed",{reason:ba.BadAuthURL}),new Error(`Bad authentication URL - got ${t==null||(o=t.options)===null||o===void 0?void 0:o.start_authentication_url}`)}if(!i)throw this.notifySlashID("popupFailed",{reason:ba.PopupBlocked}),new Error("SAML flow unsuccesful!")}else if(n.options.ux_mode===$n.Redirect)window.location.assign(t.options.start_authentication_url);else throw new Error(`Unsupported SAML ux_mode - got ${n.options.ux_mode}`);return""}async processPasswordSetChallenge(t){this.notifySlashID("passwordSetReady");const r=await new Promise(a=>{const s=c=>{this.shouldProcessEvent(c)&&(this.emitter.off("passwordSubmitted",s),a(c.payload))};this.emitter.on("passwordSubmitted",s)}),o=_a({password:r,rules:va(t)});return o.valid?{challenge_id:t.id,challenge_type:t.type,data:{password:r}}:(this.notifySlashID("invalidPasswordSubmitted",{failedRules:o.failedRules,challengeId:t.id,authenticationFactor:{method:we.Password},failureDetail:`invalid_password: ${o.failedRules.map(a=>a.name).join(",")}`}),await this.processPasswordSetChallenge(t))}processPasswordVerifyChallenge(t){return this.notifySlashID("passwordVerifyReady"),new Promise(r=>{const o=i=>{this.shouldProcessEvent(i)&&(this.emitter.off("passwordSubmitted",o),r(i.payload))};this.emitter.on("passwordSubmitted",o)}).then(r=>{if(!r)throw new Error("No password provided");return{challenge_id:t.id,challenge_type:t.type,data:{password:r}}})}async processPasswordResetChallenge(t){this.notifySlashID("passwordResetReady");const r=await new Promise(a=>{const s=c=>{this.shouldProcessEvent(c)&&(this.emitter.off("passwordSubmitted",s),a(c.payload))};this.emitter.on("passwordSubmitted",s)}),o=_a({password:r,rules:va(t)});return o.valid?{challenge_id:t.id,challenge_type:t.type,data:{password:r}}:(this.notifySlashID("invalidPasswordSubmitted",{authenticationFactor:{method:we.Password},failedRules:o.failedRules,challengeId:t.id,failureDetail:`invalid_password: ${o.failedRules.map(a=>a.name).join(",")}`}),await this.processPasswordSetChallenge(t))}async processUiCustomizationChallenge(t){var n;const r=(n=t.options)===null||n===void 0?void 0:n.authn_redirect_page_ui_config;if(!r)throw new Error("No customization properties provided!");return this.notifySlashID("uiCustomizationReceived",{customizationProperties:r}),""}constructor(t,n,r){this.flowCancelled=!1,this.notifySlashID=(o,i)=>{this.emitter.emit({name:o,payload:i,meta:{access:"public",...this.flowMeta}})},this.slashID=t,this.authnClient=new an(new nt({...rt,basePath:this.slashID.baseURL,middleware:[Lt({maxRetries:5,baseDelayMs:500})]})),this.emitter=n,this.flowMeta=r,this.listenForEvents()}}class ya{shouldProcessEvent(t){var n;return!(this.flowId&&((n=t.meta)===null||n===void 0?void 0:n.authFlowId)!==this.flowId)}async id(t,n,r){return this._id(t,n,r)}async _id(t,n,r,o){if(r)switch(r.method){case we.Webauthn.toString():{if(!(navigator&&window.PublicKeyCredential))throw new q({name:T.invalidAuthenticationMethodError,message:"The WebAuthn API is not available in the current environment",context:{method:we.Webauthn,handle:n,authenticationFactor:r}});let m=r.options;m||(m={}),m.scope||(m.scope=window.location.hostname);const h=await this.slashID.credentialStorage.get(m.scope);if(h&&(m.available_credential_ids=h),m.attachment||(m.attachment=ta.Any),m.user_verification||(m.user_verification=Nf.Preferred),m.resident_key||(m.resident_key=Mf.Preferred),m.attestation||(m.attestation=Of.None),m.attachment===ta.Platform&&!await window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable())throw new q({name:T.invalidAuthenticationMethodError,message:"This device has no platform authenticator available",context:{method:we.Webauthn,handle:n,authenticationFactor:r}});r.options=m}break;case we.EmailLink.toString():case we.OtpViaEmail.toString():if(n&&n.type!==kt.EmailAddress)throw new q({name:T.invalidAuthenticationMethodError,message:`A handle of type '${kt.EmailAddress}' is required, got '${n.type}' instead`,context:{method:we.EmailLink,handle:n,authenticationFactor:r}});break;case we.SmsLink.toString():case we.OtpViaSms.toString():if(n&&n.type!==kt.PhoneNumber)throw new q({name:T.invalidAuthenticationMethodError,message:`A handle of type '${kt.PhoneNumber}' is required, got '${n.type}' instead`,context:{method:we.SmsLink,handle:n,authenticationFactor:r}});r.options=new Ys(r.options);break;case we.Oidc.toString():{if(n)throw new q({name:T.invalidAuthenticationMethodError,message:"OIDC should not be used with handles",context:{method:we.Oidc,handle:n,authenticationFactor:r}});r=await Js(r);const m=h=>{var p,g;if(!this.shouldProcessEvent(h))return;const f=r;!(f==null||(p=f.extras)===null||p===void 0)&&p.popup&&(f==null||(g=f.extras)===null||g===void 0||g.popup.close()),this.emitter.off("oauthFlowFailed",m)};this.emitter.on("oauthFlowFailed",m)}break;case we.Saml.toString():{if(n)throw new q({name:T.invalidAuthenticationMethodError,message:"SAML should not be used with handles",context:{method:we.Saml,handle:n,authenticationFactor:r}});r=await Jp(r);const m=h=>{var p,g;if(!this.shouldProcessEvent(h))return;const f=r;!(f==null||(p=f.extras)===null||p===void 0)&&p.popup&&(f==null||(g=f.extras)===null||g===void 0||g.popup.close()),this.emitter.off("popupFailed",m)};this.emitter.on("popupFailed",m)}break}const i={method:r?.method,options:r?.options};i.method!==void 0&&(i.options={...i.options,method:i.method}),this.emitter.emit({name:"idFlowStarted",payload:{authenticationFactor:r},meta:{authFlowId:this.flowId,access:"public"}});const s=await new an(new nt({...rt,basePath:this.slashID.baseURL,middleware:[Lt({maxRetries:5,baseDelayMs:500})],...o&&{accessToken:o}})).postId({slashIDOrgID:t,slashIDSdkVersion:$e.raw,iDRequest:{handle:n,factor:i}},{cache:"no-cache"});if(s.errors)throw s;const c=s.result;if(!c)throw new Error("no challenges in ID response");const u=await new In(this.slashID,this.emitter,{authFlowId:this.flowId}).processChallenges({challenges:c,authnFactor:r,previousToken:o});if(n)try{this.slashID.identifiersStorage.add(n)}catch(m){console.warn(m)}return this.emitter.emit({name:"idFlowSucceeded",payload:{token:`${u}`,authenticationFactor:r,handle:n},meta:{authFlowId:this.flowId,access:"public"}}),this.slashID.getUser(u)}async recover({handle:t,factor:n}){const r=new an(new nt({...rt,basePath:this.slashID.baseURL,middleware:[Lt({maxRetries:5,baseDelayMs:500})]})),{result:o}=await r.postRecover({recoverRequest:{handle:t,factor:n},slashIDSdkVersion:$e.raw,slashIDOrgID:this.slashID.oid});if(!o)throw new Error("no result in recover response");await new In(this.slashID,this.emitter,{recoveryFlowId:this.flowId}).processChallenges({challenges:o,authnFactor:n})}constructor(t,n){this.slashID=t,this.flowId=en(),this.emitter=n}}function S1(){const e={},t=new Set;function n(a,s){e[a]||(e[a]=new Set),e[a].add(s)}function r(a,s){const c=e[a];c&&c.delete(s)}function o(a){const s=e[a.name];if(!s||!s.size)return;let c=!1;const l=t.size>0?[...t].reduce((u,m)=>c?u:m(u,()=>{c=!0})||u,a):a;c||s.forEach(u=>u(l))}function i(a){t.add(a)}return{on:n,off:r,emit:o,use:i}}class E1 extends hn{async id(t,n){return this._slashid._id(this.decoded.oid,t,n,this.token)}constructor(t,n){if(super(t,n),this.decoded.person_type!=="anonymous")throw new Error("Token must have person_type 'anonymous'");this._slashid=n}}const xa="__SlashID_iframe",rc=Symbol(),oc=Symbol(),ic=Symbol(),ac=e=>({publish:(t,n)=>e[rc](t,n),subscribe:(t,n)=>e[oc](t,n),unsubscribe:(t,n)=>e[ic](t,n)});class br{getAnalytics(){if(!this.analytics)throw new q({name:T.invalidSlashIDConfigurationError,message:"Analytics has to be enabled to use this method"});return this.analytics}static async canGetPublicKeyCredentialsInIFrame(){const t=window;return!!t.chrome&&(!!t.chrome.webstore||!!t.chrome.runtime)}async startHostedLoginFlow(t){mp(t);const{csrf_token:n,pkce_code_challenge:r}=await ci(),o=new URL("/oauth2/authorize",this.baseURL);o.searchParams.set("redirect_uri",t.redirectUri),o.searchParams.set("client_id",t.clientId),o.searchParams.set("response_type","code"),o.searchParams.set("state",n),o.searchParams.set("scope","openid"),o.searchParams.set("code_challenge",r),o.searchParams.set("code_challenge_method","S256"),window.location.assign(o)}async resolveHostedLoginFlow(){const t=wp(window.location.search);if(t){const{clientId:n,redirectUri:r}=gp();try{const{id_token:o}=await vp({...t,clientId:n,redirectUri:r,apiBaseURL:this.baseURL}),i=this.getUser(o);return this.analytics&&this.getAnalytics().identify(i),bp(),i}catch(o){throw await this.processError(o,{}),await Qe(o)}}}createFlowScopeMiddleware(){const t=this;return function(r,o){var i,a,s,c;return r.meta&&r.meta.authFlowId&&(!((i=t.authFlow)===null||i===void 0)&&i.flowId)&&((a=t.authFlow)===null||a===void 0?void 0:a.flowId)!==r.meta.authFlowId||r.meta&&r.meta.recoveryFlowId&&(!((s=t.recoveryFlow)===null||s===void 0)&&s.flowId)&&((c=t.recoveryFlow)===null||c===void 0?void 0:c.flowId)!==r.meta.recoveryFlowId?o():r}}publish(t,n){var r,o;if(!h1(t))throw new q({name:T.unknown,message:`Trying to publish an unsupported event: ${t}`,context:{type:t,event:n}});this.emitter.emit({name:t,payload:n,meta:{access:"public",authFlowId:(r=this.authFlow)===null||r===void 0?void 0:r.flowId,recoveryFlowId:(o=this.recoveryFlow)===null||o===void 0?void 0:o.flowId}})}[rc](t,n){var r,o;if(!fo(t))throw new q({name:T.unknown,message:`Trying to publish an unsupported event: ${t}`,context:{type:t,event:n}});this.emitter.emit({name:t,payload:n,meta:{access:"private",authFlowId:(r=this.authFlow)===null||r===void 0?void 0:r.flowId,recoveryFlowId:(o=this.recoveryFlow)===null||o===void 0?void 0:o.flowId}})}subscribe(t,n){if(!wa(t))throw new q({name:T.unknown,message:`Trying to subscribe to unsupported event: ${t}`,context:{type:t}});const r=this.emitterDecoratorFactory.decorate(n);this.emitter.on(t,r)}[oc](t,n){if(!fo(t))throw new q({name:T.unknown,message:`Trying to subscribe to unsupported event: ${t}`,context:{type:t}});const r=this.emitterDecoratorFactory.decorate(n);this.emitter.on(t,r)}unsubscribe(t,n){if(!wa(t))throw new q({name:T.unknown,message:`Trying to unsubscribe from an unsupported event: ${t}`,context:{type:t}});const r=this.emitterDecoratorFactory.getDecorator(n);r&&this.emitter.off(t,r)}[ic](t,n){if(!fo(t))throw new q({name:T.unknown,message:`Trying to unsubscribe from an unsupported event: ${t}`,context:{type:t}});const r=this.emitterDecoratorFactory.getDecorator(n);r&&this.emitter.off(t,r)}async getChallengesFromURL(){const t=window.location.search,n=new URLSearchParams(t);let r;const o=n.get(Zh),i=n.get(Kh);if(o&&i)throw new q({name:T.invalidSlashIDURLParamsError,message:"found both 'challenges' and 'sidcp' URL query parameters",context:{challengePackId:o,encodedChallenges:i,queryString:t}});if(o)try{const a=await this.authnClient.getChallengePackChallengePackId({challengePackId:o,slashIDSdkVersion:$e.raw},{cache:"no-cache"});if(a.errors)throw new q({name:T.apiResponseError,message:"error fetching challenges",context:{errors:a.errors}});r=a.result}catch(a){throw await Qe(a)}else if(i){const a=Zt(i),s=new TextDecoder("utf-8").decode(a);r=JSON.parse(s)}return r}async getUserFromURL(){if(!this.userFromURL){if(this.config.identityProviderInitiatedSSOEnabled&&this.oid){const r=Qp(window.location.search);if(r)try{const o=await t1(r);this._id(this.oid,void 0,o)}catch(o){throw await this.processError(o,{}),await Qe(o)}}let n;try{n=await this.getChallengesFromURL()}catch(r){throw await this.processError(r,{}),await Qe(r)}if(n){var t;const r=da(window.location.search);r&&this.resolveSSOChallenge(r);let o;try{o=await new In(this,this.emitter).processChallenges({challenges:n})}catch(i){throw await this.processError(i,{}),Ae(i)&&await fa(i)?new q({name:T.handlePatternNotAllowed,message:i.message,cause:i}):Ae(i)&&await ha(i)?new q({name:T.signUpAwaitingApproval,message:i.message,cause:i}):await Qe(i)}if(this.userFromURL=new hn(o,{baseURL:this.baseURL,sdkURL:this.sdkURL}),!((t=this.userFromURL.authentications)===null||t===void 0)&&t.length){const i=this.userFromURL.authentications[this.userFromURL.authentications.length-1];this.emitter.emit({name:"idFlowSucceeded",payload:{token:o,authenticationFactor:{method:i.method},handle:i.handle},meta:{access:"public"}})}}}return this.userFromURL&&this.emitter.emit({name:"userAuthenticatedFromURL",payload:{token:this.userFromURL.token},meta:{access:"public"}}),this.userFromURL}async resolveSSOChallenge({ssoChallengeID:t,ssoCode:n,csrfToken:r}){if(!(!t||!n||!r))try{const o=window.localStorage.getItem(fr);if(!o)throw new Error("no CSRF token stored");if(r!==o)throw new Error("CSRF token mismatch");const i=window.localStorage.getItem(hr);if(!i)throw new Error("no PKCE code verifier stored");await this.authnClient.postSsoResolve({slashIDOrgID:this.oid,postSsoResolveRequest:{challenge_id:t,code:n,pkce_code_verifier:i}})}catch(o){this.processError(o,{})}finally{window.localStorage.removeItem(fr),window.localStorage.removeItem(hr)}}async processEvent(t){if(rp(t.data)){if(t.origin!==this.baseURL)return;const r=da(t.data.urlParams);r&&await this.resolveSSOChallenge(r);return}let n=null;if(window.opener&&t.source===window.opener&&(n=window.opener),window.parent&&t.source===window.parent&&(n=window.parent),!!n){if(op(t.data)){const r=t.data;try{n.postMessage(new ia(r.id),"*")}catch(o){n.postMessage(new ia(r.id,o.toString()),"*")}}if(tp(t.data)){const r=t.data;try{const i=await new In(this,this.emitter).processWebAuthnCreateChallenge(r.challenge);n.postMessage(new aa(r.id,i),"*")}catch(o){n.postMessage(new aa(r.id,null,o.toString()),"*")}}if(np(t.data)){const r=t.data;try{const i=await new In(this,this.emitter).processWebAuthnGetChallenge(r.challenge);n.postMessage(new sa(r.id,i),"*")}catch(o){n.postMessage(new sa(r.id,null,o.toString()),"*")}}}}async listenForEvents(){window.addEventListener("message",this.processEvent.bind(this))}setupIFrame(){const t=this.getSDKUrl().toString();if(Wh(new URL(window.location.href),new URL(this.sdkURL)))return null;let n=document.getElementById(xa);return n&&n.src!==t&&(n.remove(),n=null),n||(n=document.createElement("iframe"),n.id=xa,n.allow="publickey-credentials-get *",n.src=t,n.style.display="none",document.body.appendChild(n)),n}async getAvailableAuthenticationMethods(t){const n=[we.Password,we.Totp];switch(t){case kt.EmailAddress:n.push(we.EmailLink,we.OtpViaEmail);break;case kt.PhoneNumber:n.push(we.SmsLink,we.OtpViaSms);break;case kt.Username:break;default:throw new q({name:T.unknown,message:`unhandled handle type: ${t}`})}return navigator&&window.PublicKeyCredential&&ap(t)&&n.unshift(we.Webauthn),n}getUser(t){return new g1(t,this)}async id(t,n,r){return this._id(t,n,r)}createAuthFlow(){const t=new ya(this,this.emitter);return this.authFlow=t,t}clearAuthFlow(t){this.authFlow===t&&(this.authFlow=null)}createRecoveryFlow(){const t=new ya(this,this.emitter);return this.recoveryFlow=t,t}clearRecoveryFlow(t){this.recoveryFlow===t&&(this.recoveryFlow=null)}async _id(t,n,r,o){const i=this.createAuthFlow();try{return await i._id(t,n,r,o)}catch(a){if(await this.processError(a,{authenticationFactor:r,handle:n,previousToken:o}),Ae(a)&&li(a)){const p=await Ze(a),g=await Bs(a);throw new q({name:T.rateLimitError,message:p,cause:a,context:{response:g,authenticationFactor:r,handle:n,oid:t}})}throw Ae(a)&&await yp(a)?new q({name:T.noPasswordSet,message:a.message,context:{handle:n,authenticationFactor:r,oid:t}}):Ae(a)&&await ua(a)?new q({name:T.selfRegistrationNotAllowed,message:a.message,cause:a,context:{handle:n,authenticationFactor:r,oid:t}}):Ae(a)&&await fa(a)?new q({name:T.handlePatternNotAllowed,message:a.message,cause:a,context:{handle:n,authenticationFactor:r,oid:t}}):Ae(a)&&await ha(a)?new q({name:T.signUpAwaitingApproval,message:a.message,cause:a,context:{handle:n,authenticationFactor:r,oid:t}}):Ae(a)&&await xp(a)?new q({name:T.signInAwaitingApproval,message:a.message,cause:a,context:{handle:n,authenticationFactor:r,oid:t}}):Ae(a)&&await ua(a)?new q({name:T.selfRegistrationNotAllowed,message:a.message,context:{handle:n,authenticationFactor:r,oid:t}}):await Qe(a)}finally{this.clearAuthFlow(i)}}async getAvailableIdentifiers(){try{return this.identifiersStorage.getAll()}catch(t){return console.warn(t),[]}}async recover({handle:t,factor:n}){if(!this.oid)throw new q({name:T.invalidSlashIDConfigurationError,message:"oid is required - please initialize the SDK with an organization ID"});if(t.type===kt.Username)throw new q({name:T.recoverNonReachableHandleType,message:"Username is not a reachable handle type"});const r=this.createRecoveryFlow();this.emitter.emit({name:"recoveryFlowStarted",payload:{handle:t,authenticationFactor:n},meta:{access:"public",recoveryFlowId:r.flowId}});try{await r.recover({handle:t,factor:n}),this.recoveryFlow=null,this.emitter.emit({name:"recoveryFlowSucceeded",payload:{handle:t,authenticationFactor:n},meta:{access:"public",recoveryFlowId:r.flowId}})}catch(o){const i=await Ks(o),a={errorText:"recovery_failed",authenticationFactor:n,handle:t,failureDetail:i};throw this.emitter.emit({name:"recoveryFlowFailed",payload:a,meta:{access:"public",recoveryFlowId:r.flowId}}),await Qe(o)}finally{this.clearRecoveryFlow(r)}}getSDKUrl(){const t=new URL(this.sdkURL);return t.searchParams.append("v",$e.raw),t}isLocalScope(t){return window.location.hostname.endsWith(t)}async processError(t,{authenticationFactor:n,handle:r,previousToken:o,challengeId:i}){var a,s;if(Zs(t))return;const c=await $p(t,{authenticationFactor:n,handle:r,previousToken:o,challengeId:i});l1(c)?ac(this).publish("clientSideError",c):this.emitter.emit({name:"idFlowFailed",payload:c,meta:{access:"public",authFlowId:(a=this.authFlow)===null||a===void 0?void 0:a.flowId,recoveryFlowId:(s=this.recoveryFlow)===null||s===void 0?void 0:s.flowId}})}async createAnonymousUser(){const t=tc(this),n=await ec(t);return new E1(n,this)}constructor(t){t&&di(t),this.config=fn(t??{});const{baseURL:n,sdkURL:r,oid:o,analyticsEnabled:i=!0}=this.config;this.baseURL=n,this.sdkURL=r,this.oid=o,this.authFlow=null,this.recoveryFlow=null,this.authnClient=new an(new nt({...rt,basePath:this.baseURL,middleware:[Lt({maxRetries:5,baseDelayMs:500})]})),this.personsClient=new Us(new nt({...rt,basePath:this.baseURL,middleware:[Lt({maxRetries:5,baseDelayMs:500})]})),this.iframe=this.setupIFrame();const a=new m1(this.iframe,this.getSDKUrl().origin);this.identifiersStorage=new et(a),this.credentialStorage=new Rn(a),this.userFromURL=null,this.emitter=S1(),this.emitter.use(this.createFlowScopeMiddleware()),this.emitterDecoratorFactory=p1(),this.analytics=i?new y1({sdk:this}):void 0,this.listenForEvents()}}Jt("lDZ5d");const $1={...be},Ve={...$1},sc=Object.prototype.toString;function ui(e){switch(sc.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Pt(e,Error)}}function pn(e,t){return sc.call(e)===`[object ${t}]`}function fi(e){return pn(e,"ErrorEvent")}function Ca(e){return pn(e,"DOMError")}function I1(e){return pn(e,"DOMException")}function ft(e){return pn(e,"String")}function cc(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function lc(e){return e===null||cc(e)||typeof e!="object"&&typeof e!="function"}function qr(e){return pn(e,"Object")}function Dr(e){return typeof Event<"u"&&Pt(e,Event)}function R1(e){return typeof Element<"u"&&Pt(e,Element)}function q1(e){return pn(e,"RegExp")}function hi(e){return!!(e&&e.then&&typeof e.then=="function")}function D1(e){return qr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function A1(e){return typeof e=="number"&&e!==e}function Pt(e,t){try{return e instanceof t}catch{return!1}}function dc(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function zo(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ka(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const o=e[r];try{dc(o)?n.push("[VueViewModel]"):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function T1(e,t,n=!1){return ft(e)?q1(t)?t.test(e):ft(t)?n?e===t:e.includes(t):!1:!1}function Ar(e,t=[],n=!1){return t.some(r=>T1(e,r,n))}function z1(e,t,n=250,r,o,i,a){if(!i.exception||!i.exception.values||!a||!Pt(a.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=L1(Lo(e,t,o,a.originalException,r,i.exception.values,s,0),n))}function Lo(e,t,n,r,o,i,a,s){if(i.length>=n+1)return i;let c=[...i];if(Pt(r[o],Error)){Sa(a,s);const l=e(t,r[o]),u=c.length;Ea(l,o,u,s),c=Lo(e,t,n,r[o],o,[l,...c],l,u)}return Array.isArray(r.errors)&&r.errors.forEach((l,u)=>{if(Pt(l,Error)){Sa(a,s);const m=e(t,l),h=c.length;Ea(m,`errors[${u}]`,h,s),c=Lo(e,t,n,l,o,[m,...c],m,h)}}),c}function Sa(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Ea(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function L1(e,t){return e.map(n=>(n.value&&(n.value=zo(n.value,t)),n))}function jn(e){return e&&e.Math==Math?e:void 0}const ue=typeof globalThis=="object"&&jn(globalThis)||typeof window=="object"&&jn(window)||typeof self=="object"&&jn(self)||typeof global=="object"&&jn(global)||function(){return this}()||{};function pi(){return ue}function uc(e,t,n){const r=n||ue,o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}const mi=pi(),P1=80;function fc(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let i=0,a=0;const s=" > ",c=s.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,m=!Array.isArray(t)&&t.maxStringLength||P1;for(;n&&i++<r&&(l=O1(n,u),!(l==="html"||i>1&&a+o.length*c+l.length>=m));)o.push(l),a+=l.length,n=n.parentNode;return o.reverse().join(s)}catch{return"<unknown>"}}function O1(e,t){const n=e,r=[];let o,i,a,s,c;if(!n||!n.tagName)return"";if(mi.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const l=t&&t.length?t.filter(m=>n.getAttribute(m)).map(m=>[m,n.getAttribute(m)]):null;if(l&&l.length)l.forEach(m=>{r.push(`[${m[0]}="${m[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),o=n.className,o&&ft(o))for(i=o.split(/\s+/),c=0;c<i.length;c++)r.push(`.${i[c]}`);const u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)a=u[c],s=n.getAttribute(a),s&&r.push(`[${a}="${s}"]`);return r.join("")}function M1(){try{return mi.document.location.href}catch{return""}}function N1(e){if(!mi.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const Pn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,U1="Sentry Logger ",Po=["debug","info","warn","error","log","assert","trace"],wr={};function gi(e){if(!("console"in ue))return e();const t=ue.console,n={},r=Object.keys(wr);r.forEach(o=>{const i=wr[o];n[o]=t[o],t[o]=i});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function F1(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Pn?Po.forEach(n=>{t[n]=(...r)=>{e&&gi(()=>{ue.console[n](`${U1}[${n}]:`,...r)})}}):Po.forEach(n=>{t[n]=()=>{}}),t}const ae=F1(),V1=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function B1(e){return e==="http"||e==="https"}function H1(e,t=!1){const{host:n,path:r,pass:o,port:i,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${a}`}function j1(e){const t=V1.exec(e);if(!t){gi(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,o="",i,a="",s]=t.slice(1);let c="",l=s;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const m=l.match(/^\d+/);m&&(l=m[0])}return hc({host:i,pass:o,path:c,projectId:l,port:a,protocol:n,publicKey:r})}function hc(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function G1(e){if(!Pn)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(a=>e[a]?!1:(ae.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:n.match(/^\d+$/)?B1(r)?t&&isNaN(parseInt(t,10))?(ae.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(ae.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(ae.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function W1(e){const t=typeof e=="string"?j1(e):hc(e);if(!(!t||!G1(t)))return t}function Ie(e,t,n){if(!(t in e))return;const r=e[t],o=n(r);typeof o=="function"&&pc(o,r),e[t]=o}function vr(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Pn&&ae.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function pc(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,vr(e,"__sentry_original__",t)}catch{}}function bi(e){return e.__sentry_original__}function mc(e){if(ui(e))return{message:e.message,name:e.name,stack:e.stack,...Ia(e)};if(Dr(e)){const t={type:e.type,target:$a(e.target),currentTarget:$a(e.currentTarget),...Ia(e)};return typeof CustomEvent<"u"&&Pt(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function $a(e){try{return R1(e)?fc(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Ia(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function K1(e,t=40){const n=Object.keys(mc(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return zo(n[0],t);for(let r=n.length;r>0;r--){const o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length?o:zo(o,t)}return""}function Tt(e){return Oo(e,new Map)}function Oo(e,t){if(Z1(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const o of Object.keys(e))typeof e[o]<"u"&&(r[o]=Oo(e[o],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(o=>{r.push(Oo(o,t))}),r}return e}function Z1(e){if(!qr(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const ho="<anonymous>";function St(e){try{return!e||typeof e!="function"?ho:e.name||ho}catch{return ho}}const sr={},Ra={};function Ut(e,t){sr[e]=sr[e]||[],sr[e].push(t)}function Ft(e,t){Ra[e]||(t(),Ra[e]=!0)}function We(e,t){const n=e&&sr[e];if(n)for(const r of n)try{r(t)}catch(o){Pn&&ae.error(`Error while triggering instrumentation handler.
|
|
9
|
+
*/var Dd=d,Ad=Symbol.for("react.element"),Td=Symbol.for("react.fragment"),zd=Object.prototype.hasOwnProperty,Ld=Dd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Pd={key:!0,ref:!0,__self:!0,__source:!0};function As(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)zd.call(t,r)&&!Pd.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Ad,type:e,key:i,ref:a,props:o,_owner:Ld.current}}$r.Fragment=Td;$r.jsx=As;$r.jsxs=As;Ds.exports=$r;var C=Ds.exports;function ve(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{},oo={},Bn={},Jt=Ts.parcelRequire91fc;Jt==null&&(Jt=function(e){if(e in oo)return oo[e].exports;if(e in Bn){var t=Bn[e];delete Bn[e];var n={id:e,exports:{}};return oo[e]=n,t.call(n.exports,n,n.exports),n.exports}var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r},Jt.register=function(t,n){Bn[t]=n},Ts.parcelRequire91fc=Jt);var Od=Jt.register;Od("lDZ5d",function(e,t){(function(n,r){var o="1.0.37",i="",a="?",s="function",c="undefined",l="object",u="string",m="major",h="model",p="name",g="type",f="vendor",w="version",y="architecture",v="console",_="mobile",x="tablet",S="smarttv",I="wearable",R="embedded",D=500,P="Amazon",G="Apple",H="ASUS",j="BlackBerry",J="Browser",N="Chrome",Y="Edge",M="Firefox",X="Google",ge="Huawei",E="LG",k="Microsoft",$="Motorola",O="Opera",z="Samsung",F="Sharp",ne="Sony",ce="Xiaomi",L="Zebra",K="Facebook",le="Chromium OS",W="Mac OS",ee=function(Q,oe){var B={};for(var he in Q)oe[he]&&oe[he].length%2===0?B[he]=oe[he].concat(Q[he]):B[he]=Q[he];return B},fe=function(Q){for(var oe={},B=0;B<Q.length;B++)oe[Q[B].toUpperCase()]=Q[B];return oe},Re=function(Q,oe){return typeof Q===u?Se(oe).indexOf(Se(Q))!==-1:!1},Se=function(Q){return Q.toLowerCase()},qt=function(Q){return typeof Q===u?Q.replace(/[^\d\.]/g,i).split(".")[0]:r},at=function(Q,oe){if(typeof Q===u)return Q=Q.replace(/^\s\s*/,i),typeof oe===c?Q:Q.substring(0,D)},Dt=function(Q,oe){for(var B=0,he,_t,Je,re,U,Xe;B<oe.length&&!U;){var ro=oe[B],Qi=oe[B+1];for(he=_t=0;he<ro.length&&!U&&ro[he];)if(U=ro[he++].exec(Q),U)for(Je=0;Je<Qi.length;Je++)Xe=U[++_t],re=Qi[Je],typeof re===l&&re.length>0?re.length===2?typeof re[1]==s?this[re[0]]=re[1].call(this,Xe):this[re[0]]=re[1]:re.length===3?typeof re[1]===s&&!(re[1].exec&&re[1].test)?this[re[0]]=Xe?re[1].call(this,Xe,re[2]):r:this[re[0]]=Xe?Xe.replace(re[1],re[2]):r:re.length===4&&(this[re[0]]=Xe?re[3].call(this,Xe.replace(re[1],re[2])):r):this[re]=Xe||r;B+=2}},yn=function(Q,oe){for(var B in oe)if(typeof oe[B]===l&&oe[B].length>0){for(var he=0;he<oe[B].length;he++)if(Re(oe[B][he],Q))return B===a?r:B}else if(Re(oe[B],Q))return B===a?r:B;return Q},no={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},At={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Xi={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[w,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[w,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,w],[/opios[\/ ]+([\w\.]+)/i],[w,[p,O+" Mini"]],[/\bopr\/([\w\.]+)/i],[w,[p,O]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[w,[p,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,w],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[w,[p,"UC"+J]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[w,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[w,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[w,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[w,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[w,[p,"Smart Lenovo "+J]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+J],w],[/\bfocus\/([\w\.]+)/i],[w,[p,M+" Focus"]],[/\bopt\/([\w\.]+)/i],[w,[p,O+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[w,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[w,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[w,[p,O+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[w,[p,"MIUI "+J]],[/fxios\/([-\w\.]+)/i],[w,[p,M]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+J]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+J],w],[/samsungbrowser\/([\w\.]+)/i],[w,[p,z+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],w],[/metasr[\/ ]?([\d\.]+)/i],[w,[p,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,"Sogou Mobile"],w],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[p,w],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,K],w],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[p,w],[/\bgsa\/([\w\.]+) .*safari\//i],[w,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[w,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[w,[p,N+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,N+" WebView"],w],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[w,[p,"Android "+J]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,w],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[w,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[w,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[w,yn,no]],[/(webkit|khtml)\/([\w\.]+)/i],[p,w],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],w],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[w,[p,M+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,w],[/(cobalt)\/([\w\.]+)/i],[p,[w,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[y,"amd64"]],[/(ia32(?=;))/i],[[y,Se]],[/((?:i[346]|x)86)[;\)]/i],[[y,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/windows (ce|mobile); ppc;/i],[[y,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[y,/ower/,i,Se]],[/(sun4\w)[;\)]/i],[[y,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[y,Se]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[h,[f,z],[g,x]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[h,[f,z],[g,_]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[h,[f,G],[g,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[h,[f,G],[g,x]],[/(macintosh);/i],[h,[f,G]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[h,[f,F],[g,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[h,[f,ge],[g,x]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[h,[f,ge],[g,_]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[h,/_/g," "],[f,ce],[g,_]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[h,/_/g," "],[f,ce],[g,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[h,[f,"OPPO"],[g,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[h,[f,"Vivo"],[g,_]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[h,[f,"Realme"],[g,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[h,[f,$],[g,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[h,[f,$],[g,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[h,[f,E],[g,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[h,[f,E],[g,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[h,[f,"Lenovo"],[g,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[h,/_/g," "],[f,"Nokia"],[g,_]],[/(pixel c)\b/i],[h,[f,X],[g,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[h,[f,X],[g,_]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[h,[f,ne],[g,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[h,"Xperia Tablet"],[f,ne],[g,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[h,[f,"OnePlus"],[g,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[h,[f,P],[g,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[h,/(.+)/g,"Fire Phone $1"],[f,P],[g,_]],[/(playbook);[-\w\),; ]+(rim)/i],[h,f,[g,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[h,[f,j],[g,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[h,[f,H],[g,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[h,[f,H],[g,_]],[/(nexus 9)/i],[h,[f,"HTC"],[g,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[h,/_/g," "],[g,_]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[h,[f,"Acer"],[g,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[h,[f,"Meizu"],[g,_]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[h,[f,"Ulefone"],[g,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,h,[g,_]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,h,[g,x]],[/(surface duo)/i],[h,[f,k],[g,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[h,[f,"Fairphone"],[g,_]],[/(u304aa)/i],[h,[f,"AT&T"],[g,_]],[/\bsie-(\w*)/i],[h,[f,"Siemens"],[g,_]],[/\b(rct\w+) b/i],[h,[f,"RCA"],[g,x]],[/\b(venue[\d ]{2,7}) b/i],[h,[f,"Dell"],[g,x]],[/\b(q(?:mv|ta)\w+) b/i],[h,[f,"Verizon"],[g,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[h,[f,"Barnes & Noble"],[g,x]],[/\b(tm\d{3}\w+) b/i],[h,[f,"NuVision"],[g,x]],[/\b(k88) b/i],[h,[f,"ZTE"],[g,x]],[/\b(nx\d{3}j) b/i],[h,[f,"ZTE"],[g,_]],[/\b(gen\d{3}) b.+49h/i],[h,[f,"Swiss"],[g,_]],[/\b(zur\d{3}) b/i],[h,[f,"Swiss"],[g,x]],[/\b((zeki)?tb.*\b) b/i],[h,[f,"Zeki"],[g,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],h,[g,x]],[/\b(ns-?\w{0,9}) b/i],[h,[f,"Insignia"],[g,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[h,[f,"NextBook"],[g,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],h,[g,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],h,[g,_]],[/\b(ph-1) /i],[h,[f,"Essential"],[g,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[h,[f,"Envizen"],[g,x]],[/\b(trio[-\w\. ]+) b/i],[h,[f,"MachSpeed"],[g,x]],[/\btu_(1491) b/i],[h,[f,"Rotor"],[g,x]],[/(shield[\w ]+) b/i],[h,[f,"Nvidia"],[g,x]],[/(sprint) (\w+)/i],[f,h,[g,_]],[/(kin\.[onetw]{3})/i],[[h,/\./g," "],[f,k],[g,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[h,[f,L],[g,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[h,[f,L],[g,_]],[/smart-tv.+(samsung)/i],[f,[g,S]],[/hbbtv.+maple;(\d+)/i],[[h,/^/,"SmartTV"],[f,z],[g,S]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,E],[g,S]],[/(apple) ?tv/i],[f,[h,G+" TV"],[g,S]],[/crkey/i],[[h,N+"cast"],[f,X],[g,S]],[/droid.+aft(\w+)( bui|\))/i],[h,[f,P],[g,S]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[h,[f,F],[g,S]],[/(bravia[\w ]+)( bui|\))/i],[h,[f,ne],[g,S]],[/(mitv-\w{5}) bui/i],[h,[f,ce],[g,S]],[/Hbbtv.*(technisat) (.*);/i],[f,h,[g,S]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,at],[h,at],[g,S]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,S]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,h,[g,v]],[/droid.+; (shield) bui/i],[h,[f,"Nvidia"],[g,v]],[/(playstation [345portablevi]+)/i],[h,[f,ne],[g,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[h,[f,k],[g,v]],[/((pebble))app/i],[f,h,[g,I]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[h,[f,G],[g,I]],[/droid.+; (glass) \d/i],[h,[f,X],[g,I]],[/droid.+; (wt63?0{2,3})\)/i],[h,[f,L],[g,I]],[/(quest( 2| pro)?)/i],[h,[f,K],[g,I]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[g,R]],[/(aeobc)\b/i],[h,[f,P],[g,R]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[h,[g,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[h,[g,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,_]],[/(android[-\w\. ]{0,9});.+buil/i],[h,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[w,[p,Y+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[w,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,w],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[w,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,w],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[p,[w,yn,At]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[w,yn,At],[p,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[w,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,W],[w,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[w,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,w],[/\(bb(10);/i],[w,[p,j]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[w,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[w,[p,M+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[w,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[w,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[w,[p,N+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,le],w],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,w],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],w],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,w]]},Te=function(Q,oe){if(typeof Q===l&&(oe=Q,Q=r),!(this instanceof Te))return new Te(Q,oe).getResult();var B=typeof n!==c&&n.navigator?n.navigator:r,he=Q||(B&&B.userAgent?B.userAgent:i),_t=B&&B.userAgentData?B.userAgentData:r,Je=oe?ee(Xi,oe):Xi,re=B&&B.userAgent==he;return this.getBrowser=function(){var U={};return U[p]=r,U[w]=r,Dt.call(U,he,Je.browser),U[m]=qt(U[w]),re&&B&&B.brave&&typeof B.brave.isBrave==s&&(U[p]="Brave"),U},this.getCPU=function(){var U={};return U[y]=r,Dt.call(U,he,Je.cpu),U},this.getDevice=function(){var U={};return U[f]=r,U[h]=r,U[g]=r,Dt.call(U,he,Je.device),re&&!U[g]&&_t&&_t.mobile&&(U[g]=_),re&&U[h]=="Macintosh"&&B&&typeof B.standalone!==c&&B.maxTouchPoints&&B.maxTouchPoints>2&&(U[h]="iPad",U[g]=x),U},this.getEngine=function(){var U={};return U[p]=r,U[w]=r,Dt.call(U,he,Je.engine),U},this.getOS=function(){var U={};return U[p]=r,U[w]=r,Dt.call(U,he,Je.os),re&&!U[p]&&_t&&_t.platform!="Unknown"&&(U[p]=_t.platform.replace(/chrome os/i,le).replace(/macos/i,W)),U},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return he},this.setUA=function(U){return he=typeof U===u&&U.length>D?at(U,D):U,this},this.setUA(he),this};Te.VERSION=o,Te.BROWSER=fe([p,w,m]),Te.CPU=fe([y]),Te.DEVICE=fe([h,f,g,v,_,S,x,I,R]),Te.ENGINE=Te.OS=fe([p,w]),typeof t!==c?(e.exports&&(t=e.exports=Te),t.UAParser=Te):typeof define===s&&define.amd?define(function(){return Te}):typeof n!==c&&(n.UAParser=Te);var jt=typeof n!==c&&(n.jQuery||n.Zepto);if(jt&&!jt.ua){var Vn=new Te;jt.ua=Vn.getResult(),jt.ua.get=function(){return Vn.getUA()},jt.ua.set=function(Q){Vn.setUA(Q);var oe=Vn.getResult();for(var B in oe)jt.ua[B]=oe[B]}}})(typeof window=="object"?window:this)});var oi={};oi=JSON.parse(`{"name":"@slashid/slashid","private":false,"publishConfig":{"access":"public"},"version":"3.27.0","description":"Client SDK for the /id platform","homepage":"https://slashid.dev","author":"SlashID","license":"MIT","main":"./dist/bundle/slashid.js","module":"./dist/esmodule/slashid.esm.js","esmodule":"./dist/esmodule/slashid.esm.js","commonjs":"./dist/commonjs/slashid.cjs.js","bundle":"./dist/bundle/slashid.js","types":"./dist/types/slashid.d.ts","exports":{".":{"require":"./dist/commonjs/slashid.cjs.js","import":"./dist/esmodule/slashid.esm.js","default":"./dist/commonjs/slashid.cjs.js","types":"./dist/types/slashid.d.ts"}},"targets":{"esmodule":{"source":"src/targets/package.ts","context":"browser","isLibrary":true,"outputFormat":"esmodule","engines":{"browsers":["and_chr >= 73","chrome >= 73","and_ff >= 67","android >= 114","edge >= 79","samsung >= 11.2","safari >= 13","ios_saf >= 13.1","opera >= 60","firefox >= 67","unreleased and_chr versions","unreleased chrome versions","unreleased and_ff versions","unreleased android versions","unreleased edge versions","unreleased samsung versions","unreleased safari versions","unreleased ios_saf versions","unreleased opera versions","unreleased firefox versions"]}},"commonjs":{"source":"src/targets/package.ts","context":"node","isLibrary":true,"outputFormat":"commonjs","engines":{"node":">= 12"}},"bundle":{"source":"src/targets/bundle.ts","context":"browser","outputFormat":"global","engines":{"browsers":["> 0.5%","last 2 versions","not dead"]}},"page":{"source":"static/sdk.html","context":"browser","engines":{"browsers":["and_chr >= 73","chrome >= 73","and_ff >= 67","android >= 114","edge >= 79","samsung >= 11.2","safari >= 13","ios_saf >= 13.1","opera >= 60","firefox >= 67","unreleased and_chr versions","unreleased chrome versions","unreleased and_ff versions","unreleased android versions","unreleased edge versions","unreleased samsung versions","unreleased safari versions","unreleased ios_saf versions","unreleased opera versions","unreleased firefox versions"]}},"types":{"source":"src/targets/package.ts"}},"files":["dist/*"],"keywords":["slashid","SlashID","auth","openid","authentication","jwt","browser"],"scripts":{"clean":"rm -rf dist docs","lint":"eslint ./src --ext .ts","format":"prettier --config .prettierrc.json 'src/**/*.ts' --write","test:ts":"tsc --project tsconfig.json --noEmit","test:unit":"jest","test:unit:watch":"jest --watch","test:unit:ci":"jest --ci","test:integration":"playwright test","build":"rm -rf dist && parcel build --no-cache && cp compat/esmodule/package.json dist/esmodule","docs":"rm -rf docs && typedoc","dist":"npm run lint && npm run build","all":"npm run dist && npm run docs","serve:all":"parcel serve 'static/*.html' --port 8080 --no-cache","serve:example":"parcel serve static/index.html --port 8080 --no-cache","serve:jump":"parcel serve static/sdk.html --port 8080 --no-cache","serve:docs":"parcel serve docs/index.html --port 8081 --no-cache","push:docs":"aws s3 sync docs s3://slashiddoc/sdk/v$(node tools/version.js --major) && (aws cloudfront create-invalidation --distribution-id ETLBNGAAF97EN --paths \\"/*\\")","changeset":"changeset","prepublishOnly":"npm run all","publish:ci":"npm run build && changeset publish"},"devDependencies":{"@parcel/core":"2.12.0","@parcel/packager-ts":"2.12.0","@parcel/resolver-default":"^2.12.0","@parcel/transformer-babel":"2.12.0","@parcel/transformer-js":"2.12.0","@parcel/transformer-json":"2.12.0","@parcel/transformer-react-refresh-wrap":"2.12.0","@parcel/transformer-typescript-types":"2.12.0","@playwright/test":"1.42.1","@types/jest":"^28.1.7","@types/node":"~15.0.2","@types/qrcode":"^1.5.0","@types/ua-parser-js":"^0.7.39","@typescript-eslint/eslint-plugin":"^4.15.1","@typescript-eslint/parser":"^4.15.1","danger":"^11.2.6","eslint":"^7.20.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","isomorphic-fetch":"^3.0.0","jest":"^28.1.3","jest-environment-jsdom":"^28.1.3","jest-fetch-mock":"^3.0.3","parcel":"2.12.0","prettier":"^2.7.1","ts-jest":"^28.0.8","typedoc":"^0.23.00","typedoc-plugin-mdn-links":"^2.0.0","typedoc-plugin-missing-exports":"^1.0.0","typescript":"~4.7.0"},"dependencies":{"@changesets/cli":"^2.27.5","@types/uuid":"8.3.4","compare-versions":"^6.1.0","docdash":"^1.2.0","jwt-decode":"^3.1.2","qrcode":"^1.5.1","querystring-es3":"^0.2.1","regenerator-runtime":"^0.13.9","ua-parser-js":"^1.0.37","url":"^0.11.0","uuid":"8.3.2"}}`);const[Md,Nd,Ud]=oi.version.split("."),$e={major:Md,minor:Nd,patch:Ud,raw:oi.version},Fd="https://api.slashid.com".replace(/\/+$/,"");class nt{set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Fd}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||zs}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:async()=>t}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}constructor(t={}){this.configuration=t}}const rt=new nt;class gt{withMiddleware(...t){const n=this.clone();return n.middleware=n.middleware.concat(...t),n}withPreMiddleware(...t){const n=t.map(r=>({pre:r}));return this.withMiddleware(...n)}withPostMiddleware(...t){const n=t.map(r=>({post:r}));return this.withMiddleware(...n)}isJsonMime(t){return t?gt.jsonRegex.test(t):!1}async request(t,n){const{url:r,init:o}=await this.createFetchParams(t,n),i=await this.fetchApi(r,o);if(i&&i.status>=200&&i.status<300)return i;throw new Hd(i,"Response returned an error code")}async createFetchParams(t,n){let r=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(r+="?"+this.configuration.queryParamsStringify(t.query));const o=Object.assign({},this.configuration.headers,t.headers);Object.keys(o).forEach(l=>o[l]===void 0?delete o[l]:{});const i=typeof n=="function"?n:async()=>n,a={method:t.method,headers:o,body:t.body,credentials:this.configuration.credentials},s={...a,...await i({init:a,context:t})},c={...s,body:Bd(s.body)||s.body instanceof URLSearchParams||Vd(s.body)?s.body:JSON.stringify(s.body)};return{url:r,init:c}}clone(){const t=this.constructor,n=new t(this.configuration);return n.middleware=this.middleware.slice(),n}constructor(t=rt){this.configuration=t,this.fetchApi=async(n,r)=>{let o={url:n,init:r};for(const a of this.middleware)a.pre&&(o=await a.pre({fetch:this.fetchApi,...o})||o);let i;try{i=await(this.configuration.fetchApi||fetch)(o.url,o.init)}catch(a){for(const s of this.middleware)s.onError&&(i=await s.onError({fetch:this.fetchApi,url:o.url,init:o.init,error:a,response:i?i.clone():void 0})||i);if(i===void 0)throw a instanceof Error?new jd(a,"The request failed and the interceptors did not return an alternative response"):a}for(const a of this.middleware)a.post&&(i=await a.post({fetch:this.fetchApi,url:o.url,init:o.init,response:i.clone()})||i);return i},this.middleware=t.middleware}}gt.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function Vd(e){return typeof Blob<"u"&&e instanceof Blob}function Bd(e){return typeof FormData<"u"&&e instanceof FormData}class Hd extends Error{constructor(t,n){super(n),this.response=t,this.name="ResponseError"}}class jd extends Error{constructor(t,n){super(n),this.cause=t,this.name="FetchError"}}class ie extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}const io={csv:",",ssv:" ",tsv:" ",pipes:"|"};function A(e,t){const n=e[t];return n!=null}function zs(e,t=""){return Object.keys(e).map(n=>Ls(n,e[n],t)).filter(n=>n.length>0).join("&")}function Ls(e,t,n=""){const r=n+(n.length?`[${e}]`:e);if(t instanceof Array){const o=t.map(i=>encodeURIComponent(String(i))).join(`&${encodeURIComponent(r)}=`);return`${encodeURIComponent(r)}=${o}`}if(t instanceof Set){const o=Array.from(t);return Ls(e,o,n)}return t instanceof Date?`${encodeURIComponent(r)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?zs(t,r):`${encodeURIComponent(r)}=${encodeURIComponent(String(t))}`}class me{async value(){return this.transformer(await this.raw.json())}constructor(t,n=r=>r){this.raw=t,this.transformer=n}}class ur{async value(){}constructor(t){this.raw=t}}function Gd(e){return Wd(e)}function Wd(e,t){return e==null?e:{limit:e.limit,offset:e.offset,total_count:e.total_count}}function qe(e){return Kd(e)}function Kd(e,t){return e==null?e:{pagination:A(e,"pagination")?Gd(e.pagination):void 0}}function De(e){return Zd(e)}function Zd(e,t){return e==null?e:{httpcode:A(e,"httpcode")?e.httpcode:void 0,message:A(e,"message")?e.message:void 0}}function xn(e){return Yd(e)}function Yd(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0}}function Jd(e){return Xd(e)}function Xd(e,t){return e}function Qd(e){if(e!==void 0)return e===null?null:{region:e.region}}const ye={UiCustomization:"ui_customization",Proxy:"proxy",WebauthnCreate:"webauthn_create",WebauthnGet:"webauthn_get",Nonce:"nonce",Otp:"otp",Oidc:"oidc",Saml:"saml",PasswordSet:"password_set",PasswordVerify:"password_verify",PasswordReset:"password_reset",TotpRegister:"totp_register",TotpVerify:"totp_verify"};function Oe(e){return eu(e)}function eu(e,t){return e}function tu(e){if(e!==void 0)return e===null?null:{challenge:e.challenge}}function nu(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:tu(e.data)}}function ru(e){if(e!==void 0)return e===null?null:{otp:e.otp}}function ou(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:ru(e.data)}}function iu(e){if(e!==void 0)return e===null?null:{password:e.password}}function au(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:iu(e.data)}}function su(e){if(e!==void 0)return e===null?null:{password:e.password}}function cu(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:su(e.data)}}function lu(e){if(e!==void 0)return e===null?null:{password:e.password}}function du(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:lu(e.data)}}function uu(e){if(e!==void 0)return e===null?null:{otp:e.otp}}function fu(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:uu(e.data)}}function hu(e){if(e!==void 0)return e===null?null:{otp:e.otp}}function pu(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:hu(e.data)}}function mu(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:e.data}}function gu(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:e.data}}function ao(e){if(e!==void 0){if(e===null)return null;switch(e.challenge_type){case"nonce":return nu(e);case"otp":return ou(e);case"password_reset":return au(e);case"password_set":return cu(e);case"password_verify":return du(e);case"totp_register":return fu(e);case"totp_verify":return pu(e);case"webauthn_create":return mu(e);case"webauthn_get":return gu(e);default:throw new Error(`No variant of Attestation exists with 'challenge_type=${e.challenge_type}'`)}}}const we={Webauthn:"webauthn",EmailLink:"email_link",SmsLink:"sms_link",OtpViaSms:"otp_via_sms",OtpViaEmail:"otp_via_email",Totp:"totp",Oidc:"oidc",Saml:"saml",Api:"api",DirectId:"direct_id",Password:"password",Impersonate:"impersonate",Anonymous:"anonymous"};function Me(e){return bu(e)}function bu(e,t){return e}function Ps(e){return e}const kt={EmailAddress:"email_address",PhoneNumber:"phone_number",Username:"username"};function wu(e){return vu(e)}function vu(e,t){return e}function Os(e){return _u(e)}function _u(e,t){return e==null?e:{type:wu(e.type),value:e.value}}function Ir(e){if(e!==void 0)return e===null?null:{type:e.type,value:e.value}}function yu(e){return xu(e)}function xu(e,t){return e}function Cu(e){return ku(e)}function ku(e,t){return e==null?e:{challenge:A(e,"challenge")?e.challenge:void 0}}function Su(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:A(e,"options")?Cu(e.options):void 0}}function Eu(e){return $u(e)}function $u(e,t){return e==null?e:{auth_code_url:e.auth_code_url}}function Iu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:Eu(e.options)}}function Ru(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method)}}function qu(e){return Du(e)}function Du(e,t){return e}function Au(e){return Tu(e)}function Tu(e,t){return e}function zu(e){return Lu(e)}function Lu(e,t){return e==null?e:{name:yu(e.name),pattern:e.pattern,match_type:qu(e.match_type),pattern_qualifiers:A(e,"pattern_qualifiers")?e.pattern_qualifiers.map(Au):void 0}}function Ms(e){return Pu(e)}function Pu(e,t){return e==null?e:{regular_expressions:A(e,"regular_expressions")?e.regular_expressions.map(zu):void 0}}function Ou(e){return Mu(e)}function Mu(e,t){return e==null?e:{validation_rules:Ms(e.validation_rules)}}function Nu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:Ou(e.options)}}function Uu(e){return Fu(e)}function Fu(e,t){return e==null?e:{validation_rules:Ms(e.validation_rules)}}function Vu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:Uu(e.options)}}function Bu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method)}}function Hu(e){return ju(e)}function ju(e,t){return e==null?e:{challenge_id:A(e,"challenge_id")?e.challenge_id:void 0}}function Gu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:A(e,"options")?Hu(e.options):void 0}}function Wu(e){return Ku(e)}function Ku(e,t){return e==null?e:{start_authentication_url:e.start_authentication_url}}function Zu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:Wu(e.options)}}function Yu(e){return Ju(e)}function Ju(e,t){return e==null?e:{key_uri:e.key_uri,qr_code_data_b64:e.qr_code_data_b64,recovery_codes:e.recovery_codes}}function Xu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:A(e,"options")?Yu(e.options):void 0}}function Qu(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method)}}function ef(e){return tf(e)}function tf(e,t){return e==null?e:{authn_redirect_page_ui_config:A(e,"authn_redirect_page_ui_config")?e.authn_redirect_page_ui_config:void 0}}function nf(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:A(e,"options")?ef(e.options):void 0}}function rf(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:A(e,"options")?e.options:void 0}}function of(e,t){return e==null?e:{id:e.id,type:Oe(e.type),authentication_method:Me(e.authentication_method),options:A(e,"options")?e.options:void 0}}function af(e){return sf(e)}function sf(e,t){if(e==null)return e;switch(e.type){case"nonce":return{...Su(e,!0),type:"nonce"};case"oidc":return{...Iu(e,!0),type:"oidc"};case"otp":return{...Ru(e,!0),type:"otp"};case"password_reset":return{...Nu(e,!0),type:"password_reset"};case"password_set":return{...Vu(e,!0),type:"password_set"};case"password_verify":return{...Bu(e,!0),type:"password_verify"};case"proxy":return{...Gu(e,!0),type:"proxy"};case"saml":return{...Zu(e,!0),type:"saml"};case"totp_register":return{...Xu(e,!0),type:"totp_register"};case"totp_verify":return{...Qu(e,!0),type:"totp_verify"};case"ui_customization":return{...nf(e,!0),type:"ui_customization"};case"webauthn_create":return{...rf(e,!0),type:"webauthn_create"};case"webauthn_get":return{...of(e,!0),type:"webauthn_get"};default:throw new Error(`No variant of ChallengeListInner exists with 'type=${e.type}'`)}}function ii(e){return cf(e)}function cf(e,t){return e}function lf(e){if(e!==void 0)return e===null?null:{method:e.method,redirect_target:e.redirect_target}}const Xt={AuthenticationSucceededV1:"AuthenticationSucceeded_v1",AuthenticationFailedV1:"AuthenticationFailed_v1",PersonCreatedV1:"PersonCreated_v1",AnonymousPersonCreatedV1:"AnonymousPersonCreated_v1",PersonDeletedV1:"PersonDeleted_v1",VirtualPageLoadedV1:"VirtualPageLoaded_v1",SlashIdsdkLoadedV1:"SlashIDSDKLoaded_v1",PersonIdentifiedV1:"PersonIdentified_v1",PersonLoggedOutV1:"PersonLoggedOut_v1",TokenMintedV1:"TokenMinted_v1",AnonymousTokenMintedV1:"AnonymousTokenMinted_v1",PasswordChangedV1:"PasswordChanged_v1",GdprConsentsChangedV1:"GdprConsentsChanged_v1",GateServerStartedV1:"GateServerStarted_v1",GateRequestHandledV1:"GateRequestHandled_v1",GateRequestCredentialFoundV1:"GateRequestCredentialFound_v1",PermissionCreatedInRegionV1:"PermissionCreated_InRegion_v1",PermissionCreatedV1:"PermissionCreated_v1",PermissionDeletedInRegionV1:"PermissionDeleted_InRegion_v1",PermissionDeletedV1:"PermissionDeleted_v1",RoleCreatedInRegionV1:"RoleCreated_InRegion_v1",RoleCreatedV1:"RoleCreated_v1",RoleDeletedInRegionV1:"RoleDeleted_InRegion_v1",RoleDeletedV1:"RoleDeleted_v1",RoleUpdatedInRegionV1:"RoleUpdated_InRegion_v1",RoleUpdatedV1:"RoleUpdated_v1",RolesSetToPersonInRegionV1:"RolesSetToPerson_InRegion_v1",RolesSetToPersonV1:"RolesSetToPerson_v1",PermissionsSetToPersonInRegionV1:"PermissionsSetToPerson_InRegion_v1",PermissionsSetToPersonV1:"PermissionsSetToPerson_v1",MitmAttackDetectedV1:"MitmAttackDetected_v1",PermissionUpdatedInRegionV1:"PermissionUpdated_InRegion_v1",PermissionUpdatedV1:"PermissionUpdated_v1"};function df(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id,authenticated_methods:e.authenticated_methods===void 0?void 0:e.authenticated_methods.map(Ps),failed_authn_method:e.failed_authn_method,failure_reason:e.failure_reason,failure_detail:e.failure_detail,handle:Ir(e.handle),challenge_id:e.challenge_id}}function uf(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id,success_authn_method:e.success_authn_method,authenticated_methods:e.authenticated_methods.map(Ps),handle:Ir(e.handle)}}function ff(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id}}function hf(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id}}function pf(e){if(e!==void 0)return e===null?null:{event_name:e.event_name}}function mf(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id}}function gf(e){if(e!==void 0){if(e===null)return null;switch(e.event_name){case"AuthenticationFailed_v1":return df(e);case"AuthenticationSucceeded_v1":return uf(e);case"PersonIdentified_v1":return ff(e);case"PersonLoggedOut_v1":return hf(e);case"SlashIDSDKLoaded_v1":return pf(e);case"VirtualPageLoaded_v1":return mf(e);default:throw new Error(`No variant of EventPostRequestEventData exists with 'event_name=${e.event_name}'`)}}}function ea(e){if(e!==void 0)return e===null?null:{organization_id:e.organization_id,analytics_correlation_id:e.analytics_correlation_id,window_location:e.window_location,user_agent:e.user_agent,event_data:gf(e.event_data)}}function bf(e){return wf(e)}function wf(e,t){return e==null?e:{password_hash:e.password_hash}}function vf(e,t){return e==null?e:{id:e.id,last_used:A(e,"last_used")?new Date(e.last_used):void 0,type:ii(e.type),params:bf(e.params),label:A(e,"label")?e.label:void 0}}function _f(e){return yf(e)}function yf(e,t){return e==null?e:{aaguid:e.aaguid,sign_count:A(e,"sign_count")?e.sign_count:void 0,clone_warning:A(e,"clone_warning")?e.clone_warning:void 0}}function xf(e){return Cf(e)}function Cf(e,t){return e==null?e:{webauthn_credential_id:e.webauthn_credential_id,public_key:e.public_key,attestation_type:e.attestation_type,authenticator:_f(e.authenticator)}}function kf(e,t){return e==null?e:{id:e.id,last_used:A(e,"last_used")?new Date(e.last_used):void 0,type:ii(e.type),params:xf(e.params),label:A(e,"label")?e.label:void 0}}function Sf(e){return Ef(e)}function Ef(e,t){return e==null?e:{recovery_codes_total:e.recovery_codes_total,recovery_codes_unused:e.recovery_codes_unused}}function $f(e,t){return e==null?e:{id:e.id,last_used:A(e,"last_used")?new Date(e.last_used):void 0,type:ii(e.type),params:Sf(e.params),label:A(e,"label")?e.label:void 0}}function If(e){return Rf(e)}function Rf(e,t){if(e==null)return e;switch(e.type){case"password":return{...vf(e,!0),type:"password"};case"public-key":return{...kf(e,!0),type:"public-key"};case"totp":return{...$f(e,!0),type:"totp"};default:throw new Error(`No variant of ExportedCredential exists with 'type=${e.type}'`)}}const Qt={Popup:"popup",Redirect:"redirect"};function qf(e){if(e!==void 0)return e===null?null:{method:e.method,client_id:e.client_id,provider:e.provider,ux_mode:e.ux_mode,redirect_target:e.redirect_target,requires_groups:e.requires_groups,pkce_code_challenge:e.pkce_code_challenge,csrf_token:e.csrf_token}}function Df(e){if(e!==void 0)return e===null?null:{method:e.method}}function Af(e){if(e!==void 0)return e===null?null:{method:e.method}}function Tf(e){if(e!==void 0)return e===null?null:{method:e.method}}const $n={Popup:"popup",Redirect:"redirect"};function zf(e){if(e!==void 0)return e===null?null:{method:e.method,provider_credentials_id:e.provider_credentials_id,ux_mode:e.ux_mode,redirect_target:e.redirect_target,pkce_code_challenge:e.pkce_code_challenge,csrf_token:e.csrf_token}}function Lf(e){if(e!==void 0)return e===null?null:{method:e.method,redirect_target:e.redirect_target}}function Pf(e){if(e!==void 0)return e===null?null:{method:e.method}}const Of={None:"none",Indirect:"indirect",Direct:"direct"};const ta={Any:"any",Platform:"platform",CrossPlatform:"cross_platform"};const Mf={Discouraged:"discouraged",Preferred:"preferred",Required:"required"};const Nf={Discouraged:"discouraged",Preferred:"preferred",Required:"required"};function Uf(e){if(e!==void 0)return e===null?null:{method:e.method,scope:e.scope,available_credential_ids:e.available_credential_ids,attachment:e.attachment,user_verification:e.user_verification,resident_key:e.resident_key,attestation:e.attestation}}function Ff(e){if(e!==void 0){if(e===null)return null;switch(e.method){case"email_link":return lf(e);case"oidc":return qf(e);case"otp_via_email":return Df(e);case"otp_via_sms":return Af(e);case"password":return Tf(e);case"saml":return zf(e);case"sms_link":return Lf(e);case"totp":return Pf(e);case"webauthn":return Uf(e);default:throw new Error(`No variant of FactorOptions exists with 'method=${e.method}'`)}}}function Vf(e){if(e!==void 0)return e===null?null:{method:e.method,options:Ff(e.options)}}function Bf(e){return Hf(e)}function Hf(e,t){return e}function jf(e){return e}function Gf(e){return Wf(e)}function Wf(e,t){return e==null?e:{consent_level:Bf(e.consent_level),created_at:new Date(e.created_at)}}function na(e){if(e!==void 0)return e===null?null:{consent_levels:e.consent_levels.map(jf)}}function Ns(e){return Kf(e)}function Kf(e,t){return e==null?e:{consents:e.consents.map(Gf)}}function Zf(e){return Yf(e)}function Yf(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?e.result:void 0}}function Jf(e){return Xf(e)}function Xf(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?e.result:void 0}}function ra(e){return Qf(e)}function Qf(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?e.result:void 0}}function so(e){return eh(e)}function eh(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?e.result:void 0}}function th(e){return nh(e)}function nh(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?Ns(e.result):void 0}}function rh(e){return oh(e)}function oh(e,t){return e==null?e:{id:e.id,parent_id:A(e,"parent_id")?e.parent_id:void 0,org_name:e.org_name,tenant_name:e.tenant_name}}function ih(e){return ah(e)}function ah(e,t){return e==null?e:{id:e.id,parent_id:A(e,"parent_id")?e.parent_id:void 0,org_name:e.org_name,tenant_name:e.tenant_name,managed_organizations:A(e,"managed_organizations")?e.managed_organizations.map(rh):void 0}}function sh(e){return ch(e)}function ch(e,t){return e}function lh(e){return dh(e)}function dh(e,t){return e==null?e:{active:e.active,person_id:e.person_id,person_type:sh(e.person_type),region:Jd(e.region),handles:A(e,"handles")?e.handles.map(Os):void 0,groups:A(e,"groups")?e.groups:void 0,attributes:A(e,"attributes")?e.attributes:void 0}}function uh(e){return fh(e)}function fh(e,t){return e==null?e:{person:lh(e.person),organizations:e.organizations.map(ih),handles:e.handles.map(Os),credentials:e.credentials.map(If)}}function hh(e){return ph(e)}function ph(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:uh(e.result)}}function mh(e){return gh(e)}function gh(e,t){return e==null?e:{id:e.id,parent_id:A(e,"parent_id")?e.parent_id:void 0,name:A(e,"name")?e.name:void 0,tenant_name:A(e,"tenant_name")?e.tenant_name:void 0,children_ids:A(e,"children_ids")?e.children_ids:void 0,person_pool_orgs_ids:A(e,"person_pool_orgs_ids")?e.person_pool_orgs_ids:void 0,group_pool_orgs_ids:A(e,"group_pool_orgs_ids")?e.group_pool_orgs_ids:void 0,manager_org_id:A(e,"manager_org_id")?e.manager_org_id:void 0,person_in_manager_org:e.person_in_manager_org,inherits_rbac_pools:e.inherits_rbac_pools}}function bh(e){return wh(e)}function wh(e,t){return e==null?e:{org_hierarchy:e.org_hierarchy.map(mh)}}function vh(e){return _h(e)}function _h(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:bh(e.result)}}function yh(e){if(e!==void 0)return e===null?null:{handle:Ir(e.handle),factor:Vf(e.factor)}}function xh(e){return Ch(e)}function Ch(e,t){return e==null?e:{token:A(e,"token")?e.token:void 0}}function kh(e){return Sh(e)}function Sh(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?xh(e.result):void 0}}function Eh(e){return $h(e)}function $h(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?e.result:void 0}}function co(e){return Ih(e)}function Ih(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?e.result.map(af):void 0}}function Rh(e){return qh(e)}function qh(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:e.result}}function Dh(e){return Ah(e)}function Ah(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:e.result}}function Th(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,code:e.code,pkce_code_verifier:e.pkce_code_verifier}}function zh(e){return Lh(e)}function Lh(e,t){return e==null?e:{valid:e.valid,invalidity_reason:A(e,"invalidity_reason")?e.invalidity_reason:void 0,expires_in_seconds:A(e,"expires_in_seconds")?e.expires_in_seconds:void 0,expires_at:A(e,"expires_at")?new Date(e.expires_at):void 0}}function Ph(e){return Oh(e)}function Oh(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:A(e,"result")?zh(e.result):void 0}}function oa(e){return Mh(e)}function Mh(e,t){return e==null?e:{meta:A(e,"meta")?qe(e.meta):void 0,errors:A(e,"errors")?e.errors.map(De):void 0,result:Ns(e.result)}}function Nh(e){if(e!==void 0)return e===null?null:{method:e.method}}function Uh(e){if(e!==void 0)return e===null?null:{handle:Ir(e.handle),factor:Nh(e.factor)}}function Fh(e){if(e!==void 0)return e===null?null:{token:e.token}}class Vh extends gt{async deleteAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new ie("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling deleteAttributesBucketName.");const r={};t.attributes&&(r.attributes=t.attributes.join(io.csv));const o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"DELETE",headers:o,query:r},n);return new me(i,a=>xn(a))}async deleteAttributesBucketName(t,n){return await(await this.deleteAttributesBucketNameRaw(t,n)).value()}async getAttributesRaw(t,n){const r={};t.buckets&&(r.buckets=t.buckets.join(io.csv));const o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes",method:"GET",headers:o,query:r},n);return new me(i,a=>Zf(a))}async getAttributes(t={},n){return await(await this.getAttributesRaw(t,n)).value()}async getAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new ie("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling getAttributesBucketName.");const r={};t.attributes&&(r.attributes=t.attributes.join(io.csv));const o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"GET",headers:o,query:r},n);return new me(i,a=>Jf(a))}async getAttributesBucketName(t,n){return await(await this.getAttributesBucketNameRaw(t,n)).value()}async patchAttributesRaw(t,n){if(t.body===null||t.body===void 0)throw new ie("body","Required parameter requestParameters.body was null or undefined when calling patchAttributes.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes",method:"PATCH",headers:o,query:r,body:t.body},n);return new me(i,a=>xn(a))}async patchAttributes(t,n){return await(await this.patchAttributesRaw(t,n)).value()}async patchAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new ie("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling patchAttributesBucketName.");if(t.body===null||t.body===void 0)throw new ie("body","Required parameter requestParameters.body was null or undefined when calling patchAttributesBucketName.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"PATCH",headers:o,query:r,body:t.body},n);return new me(i,a=>xn(a))}async patchAttributesBucketName(t,n){return await(await this.patchAttributesBucketNameRaw(t,n)).value()}async putAttributesRaw(t,n){if(t.body===null||t.body===void 0)throw new ie("body","Required parameter requestParameters.body was null or undefined when calling putAttributes.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes",method:"PUT",headers:o,query:r,body:t.body},n);return new me(i,a=>xn(a))}async putAttributes(t,n){return await(await this.putAttributesRaw(t,n)).value()}async putAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new ie("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling putAttributesBucketName.");if(t.body===null||t.body===void 0)throw new ie("body","Required parameter requestParameters.body was null or undefined when calling putAttributesBucketName.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"PUT",headers:o,query:r,body:t.body},n);return new me(i,a=>xn(a))}async putAttributesBucketName(t,n){return await(await this.putAttributesBucketNameRaw(t,n)).value()}}class an extends gt{async getChallengeChallengeIdRaw(t,n){if(t.challengeId===null||t.challengeId===void 0)throw new ie("challengeId","Required parameter requestParameters.challengeId was null or undefined when calling getChallengeChallengeId.");const r={},o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/challenge/{challenge_id}".replace("{challenge_id}",encodeURIComponent(String(t.challengeId))),method:"GET",headers:o,query:r},n);return new me(i,a=>ra(a))}async getChallengeChallengeId(t,n){return await(await this.getChallengeChallengeIdRaw(t,n)).value()}async getChallengeChallengeIdV2Raw(t,n){if(t.challengeId===null||t.challengeId===void 0)throw new ie("challengeId","Required parameter requestParameters.challengeId was null or undefined when calling getChallengeChallengeIdV2.");const r={},o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/challenge/{challenge_id}/v2".replace("{challenge_id}",encodeURIComponent(String(t.challengeId))),method:"GET",headers:o,query:r},n);return new me(i,a=>so(a))}async getChallengeChallengeIdV2(t,n){return await(await this.getChallengeChallengeIdV2Raw(t,n)).value()}async getChallengePackChallengePackIdRaw(t,n){if(t.challengePackId===null||t.challengePackId===void 0)throw new ie("challengePackId","Required parameter requestParameters.challengePackId was null or undefined when calling getChallengePackChallengePackId.");const r={},o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/challenge_pack/{challenge_pack_id}".replace("{challenge_pack_id}",encodeURIComponent(String(t.challengePackId))),method:"GET",headers:o,query:r},n);return new me(i,a=>co(a))}async getChallengePackChallengePackId(t,n){return await(await this.getChallengePackChallengePackIdRaw(t,n)).value()}async getMeRaw(t){const n={},r={};if(this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(r.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/me",method:"GET",headers:r,query:n},t);return new me(o,i=>hh(i))}async getMe(t){return await(await this.getMeRaw(t)).value()}async getMeOrgsRaw(t){const n={},r={};if(this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(r.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/me/orgs",method:"GET",headers:r,query:n},t);return new me(o,i=>vh(i))}async getMeOrgs(t){return await(await this.getMeOrgsRaw(t)).value()}async getTokenRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new ie("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling getToken.");const r={},o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(o["SlashID-OrgID"]=String(t.slashIDOrgID)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/token",method:"GET",headers:o,query:r},n);return new me(i,a=>so(a))}async getToken(t,n){return await(await this.getTokenRaw(t,n)).value()}async postAttestationRaw(t,n){if(t.attestation===null||t.attestation===void 0)throw new ie("attestation","Required parameter requestParameters.attestation was null or undefined when calling postAttestation.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attestation",method:"POST",headers:o,query:r,body:ao(t.attestation)},n);return new me(i,a=>ra(a))}async postAttestation(t,n){return await(await this.postAttestationRaw(t,n)).value()}async postAttestationV2Raw(t,n){if(t.attestation===null||t.attestation===void 0)throw new ie("attestation","Required parameter requestParameters.attestation was null or undefined when calling postAttestationV2.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attestation/v2",method:"POST",headers:o,query:r,body:ao(t.attestation)},n);return new me(i,a=>so(a))}async postAttestationV2(t,n){return await(await this.postAttestationV2Raw(t,n)).value()}async postAttestationV3Raw(t,n){if(t.attestation===null||t.attestation===void 0)throw new ie("attestation","Required parameter requestParameters.attestation was null or undefined when calling postAttestationV3.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/attestation/v3",method:"POST",headers:o,query:r,body:ao(t.attestation)},n);return new me(i,a=>kh(a))}async postAttestationV3(t,n){return await(await this.postAttestationV3Raw(t,n)).value()}async postDirectIdRaw(t,n){const r={},o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/direct-id",method:"POST",headers:o,query:r},n);return new me(i,a=>Eh(a))}async postDirectId(t={},n){return await(await this.postDirectIdRaw(t,n)).value()}async postIdRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new ie("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postId.");if(t.iDRequest===null||t.iDRequest===void 0)throw new ie("iDRequest","Required parameter requestParameters.iDRequest was null or undefined when calling postId.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(o["SlashID-OrgID"]=String(t.slashIDOrgID)),t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/id",method:"POST",headers:o,query:r,body:yh(t.iDRequest)},n);return new me(i,a=>co(a))}async postId(t,n){return await(await this.postIdRaw(t,n)).value()}async postRecoverRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new ie("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postRecover.");if(t.recoverRequest===null||t.recoverRequest===void 0)throw new ie("recoverRequest","Required parameter requestParameters.recoverRequest was null or undefined when calling postRecover.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(o["SlashID-OrgID"]=String(t.slashIDOrgID)),t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/recover",method:"POST",headers:o,query:r,body:Uh(t.recoverRequest)},n);return new me(i,a=>co(a))}async postRecover(t,n){return await(await this.postRecoverRaw(t,n)).value()}async postSsoResolveRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new ie("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postSsoResolve.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(o["SlashID-OrgID"]=String(t.slashIDOrgID)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/sso/resolve",method:"POST",headers:o,query:r,body:Th(t.postSsoResolveRequest)},n);return new ur(i)}async postSsoResolve(t,n){await this.postSsoResolveRaw(t,n)}}class Bh extends gt{async postActionsSdkRaw(t,n){if(t.eventPostRequest===null||t.eventPostRequest===void 0)throw new ie("eventPostRequest","Required parameter requestParameters.eventPostRequest was null or undefined when calling postActionsSdk.");const r={},o={};if(o["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/actions/sdk",method:"POST",headers:o,query:r,body:ea(t.eventPostRequest)},n);return new ur(i)}async postActionsSdk(t,n){await this.postActionsSdkRaw(t,n)}async postEventsRaw(t,n){if(t.eventPostRequest===null||t.eventPostRequest===void 0)throw new ie("eventPostRequest","Required parameter requestParameters.eventPostRequest was null or undefined when calling postEvents.");const r={},o={};if(o["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/events",method:"POST",headers:o,query:r,body:ea(t.eventPostRequest)},n);return new ur(i)}async postEvents(t,n){await this.postEventsRaw(t,n)}}class Hh extends gt{async deleteConsentGdprRaw(t,n){const r={};t.consentLevels&&(r.consent_levels=t.consentLevels),t.deleteAll!==void 0&&(r.deleteAll=t.deleteAll);const o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/consent/gdpr",method:"DELETE",headers:o,query:r},n);return new ur(i)}async deleteConsentGdpr(t={},n){await this.deleteConsentGdprRaw(t,n)}async getConsentGdprRaw(t,n){const r={},o={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/consent/gdpr",method:"GET",headers:o,query:r},n);return new me(i,a=>th(a))}async getConsentGdpr(t={},n){return await(await this.getConsentGdprRaw(t,n)).value()}async postConsentGdprRaw(t,n){if(t.gDPRConsentRequest===null||t.gDPRConsentRequest===void 0)throw new ie("gDPRConsentRequest","Required parameter requestParameters.gDPRConsentRequest was null or undefined when calling postConsentGdpr.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/consent/gdpr",method:"POST",headers:o,query:r,body:na(t.gDPRConsentRequest)},n);return new me(i,a=>oa(a))}async postConsentGdpr(t,n){return await(await this.postConsentGdprRaw(t,n)).value()}async putConsentGdprRaw(t,n){if(t.gDPRConsentRequest===null||t.gDPRConsentRequest===void 0)throw new ie("gDPRConsentRequest","Required parameter requestParameters.gDPRConsentRequest was null or undefined when calling putConsentGdpr.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/consent/gdpr",method:"PUT",headers:o,query:r,body:na(t.gDPRConsentRequest)},n);return new me(i,a=>oa(a))}async putConsentGdpr(t,n){return await(await this.putConsentGdprRaw(t,n)).value()}}class Us extends gt{async postPersonsAnonymousRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new ie("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postPersonsAnonymous.");if(t.anonymousPersonCreateReq===null||t.anonymousPersonCreateReq===void 0)throw new ie("anonymousPersonCreateReq","Required parameter requestParameters.anonymousPersonCreateReq was null or undefined when calling postPersonsAnonymous.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(o["SlashID-OrgID"]=String(t.slashIDOrgID)),t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/persons/anonymous",method:"POST",headers:o,query:r,body:Qd(t.anonymousPersonCreateReq)},n);return new me(i,a=>Rh(a))}async postPersonsAnonymous(t,n){return await(await this.postPersonsAnonymousRaw(t,n)).value()}async postPersonsPersonIdImpersonateRaw(t,n){if(t.personId===null||t.personId===void 0)throw new ie("personId","Required parameter requestParameters.personId was null or undefined when calling postPersonsPersonIdImpersonate.");if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new ie("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postPersonsPersonIdImpersonate.");const r={},o={};if(t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(o["SlashID-OrgID"]=String(t.slashIDOrgID)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/persons/{person_id}/impersonate".replace("{person_id}",encodeURIComponent(String(t.personId))),method:"POST",headers:o,query:r},n);return new me(i,a=>Dh(a))}async postPersonsPersonIdImpersonate(t,n){return await(await this.postPersonsPersonIdImpersonateRaw(t,n)).value()}}class jh extends gt{async postTokenValidateRaw(t,n){if(t.validateTokenReq===null||t.validateTokenReq===void 0)throw new ie("validateTokenReq","Required parameter requestParameters.validateTokenReq was null or undefined when calling postTokenValidate.");const r={},o={};if(o["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(o["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const a=this.configuration.accessToken,s=await a("Bearer",[]);s&&(o.Authorization=`Bearer ${s}`)}const i=await this.request({path:"/token/validate",method:"POST",headers:o,query:r,body:Fh(t.validateTokenReq)},n);return new me(i,a=>Ph(a))}async postTokenValidate(t,n){return await(await this.postTokenValidateRaw(t,n)).value()}}function Gh(){const n=window.screenX+(window.innerWidth-400)/2;return`width=400,height=600,top=${window.screenY+(window.innerHeight-600)/2},left=${n},resizable,scrollbars=yes,status=1`}function Fs(){const e=Gh(),t=window.open(window.location.href,"/id:popup",e);if(!t)throw new Error("SlashId: Popup blocked, please consider redirect instead");const n='<div style="position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);">You will be redirected in a moment...</div>';try{var r;t==null||(r=t.document)===null||r===void 0||r.write(n)}catch(i){console.error(i),t.document&&t.document.body&&(t.document.body.innerHTML=n)}finally{t.blur()}return[t,i=>(t&&(t.location=i,t.focus()),t)]}function Wh(e,t){return e.origin+e.pathname===t.origin+t.pathname}function Vs(e){let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"}const Kh="challenges",Zh="sidcp",fr="@SLASHID/CSRF_TOKEN",hr="@SLASHID/PKCE_CODE_VERIFIER",ai="@SLASHID/OIDC_CLIENT_ID",si="@SLASHID/OIDC_REDIRECT_URI";var pr;(function(e){e[e.StorageGetItem=0]="StorageGetItem",e[e.StorageSetItem=1]="StorageSetItem",e[e.Ping=2]="Ping",e[e.ChallengeWebauthnCreate=3]="ChallengeWebauthnCreate",e[e.ChallengeWebauthnGet=4]="ChallengeWebauthnGet",e[e.SSOChallenge=5]="SSOChallenge"})(pr||(pr={}));class Yh{constructor(){this.id=zn(),this.type=2}}class ia{constructor(t,n){this.id=t,this.error=n}}class Jh{constructor(t,n){this.type=3,this.id=zn(),this.slashIDOptions=t,this.challenge=n}}class aa{constructor(t,n,r){this.id=t,this.attestation=n,this.error=r}}class Xh{constructor(t,n){this.type=4,this.id=zn(),this.slashIDOptions=t,this.challenge=n}}class sa{constructor(t,n,r){this.id=t,this.attestation=n,this.error=r}}class Qh{constructor(t){this.type=0,this.id=zn(),this.key=t}}class ca{constructor(t,n,r){this.id=t,this.value=n,this.error=r}}class ep{constructor(t,n){this.id=zn(),this.type=1,this.key=t,this.value=n}}class la{constructor(t,n){this.id=t,this.error=n}}function zn(){const e=new Uint32Array(1);return window.crypto.getRandomValues(e),e[0]}function da(e){const t=new URLSearchParams(e),n=t.get("sso_challenge_id"),r=t.get("sso_code"),o=t.get("csrf_token");return!n||!r||!o?null:{ssoChallengeID:n,ssoCode:r,csrfToken:o}}function tp(e){return e.type===3}function np(e){return e.type===4}function rp(e){return e&&e.type===5}function op(e){return e.type===2}function ip(e){return typeof e=="object"&&!!e.baseURL&&!!e.sdkURL}function ap(e){return e==="email_address"||e==="phone_number"}var Hn,sp=new Uint8Array(16);function cp(){if(!Hn&&(Hn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Hn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Hn(sp)}var lp=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function dp(e){return typeof e=="string"&&lp.test(e)}var up=dp,Ee=[];for(var lo=0;lo<256;++lo)Ee.push((lo+256).toString(16).substr(1));function fp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Ee[e[t+0]]+Ee[e[t+1]]+Ee[e[t+2]]+Ee[e[t+3]]+"-"+Ee[e[t+4]]+Ee[e[t+5]]+"-"+Ee[e[t+6]]+Ee[e[t+7]]+"-"+Ee[e[t+8]]+Ee[e[t+9]]+"-"+Ee[e[t+10]]+Ee[e[t+11]]+Ee[e[t+12]]+Ee[e[t+13]]+Ee[e[t+14]]+Ee[e[t+15]]).toLowerCase();if(!up(n))throw TypeError("Stringified UUID is invalid");return n}var hp=fp;function pp(e,t,n){e=e||{};var r=e.random||(e.rng||cp)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return hp(r)}var en=pp;function Zt(e){const t=e.replace(/_/g,"/").replace(/-/g,"+"),n=atob(t);return Uint8Array.from(n,r=>r.charCodeAt(0))}function st(e,t=!0){const n=String.fromCharCode(...e),r=btoa(n);return t?r.replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,""):r}function mp(e){window.sessionStorage.setItem(ai,e.clientId),window.sessionStorage.setItem(si,e.redirectUri)}function gp(){const e=window.sessionStorage.getItem(ai),t=window.sessionStorage.getItem(si);if(!e||!t)throw new Error("Client ID or redirect URI not found in session storage");return{clientId:e,redirectUri:t}}function bp(){window.sessionStorage.removeItem(ai),window.sessionStorage.removeItem(si)}async function ci(){const e=en(),t=en()+en(),n=new TextEncoder().encode(t),r=await window.crypto.subtle.digest("SHA-256",n),o=st(new Uint8Array(r));return window.localStorage.setItem(fr,e),window.localStorage.setItem(hr,t),{csrf_token:e,pkce_code_challenge:o}}function wp(e){const t=new URLSearchParams(e),n=t.get("code"),r=t.get("state");return!n||!r?null:{ssoCode:n,csrfToken:r}}async function vp(e){const t=window.localStorage.getItem(fr),n=window.localStorage.getItem(hr);if(!t||!n)throw new Error("CSRF token or PKCE code verifier not found");if(t!==e.csrfToken)throw new Error("CSRF token mismatch");const r=new URLSearchParams;r.set("client_id",e.clientId),r.set("code",e.ssoCode),r.set("code_verifier",n),r.set("grant_type","authorization_code"),r.set("redirect_uri",e.redirectUri);const o=await fetch(`${e.apiBaseURL}/oauth2/tokens`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});if(!o.ok)throw new Error("Failed to obtain access token");return await o.json()}var be={};ve(be,"ERROR_NAMES",function(){return T});ve(be,"isFlowCancelledError",function(){return Zs});ve(be,"isHandlePatternNotAllowedError",function(){return Ip});ve(be,"isSignUpAwaitingApprovalError",function(){return Rp});ve(be,"isSignInAwaitingApprovalError",function(){return qp});ve(be,"isSelfRegistrationNotAllowedError",function(){return Dp});ve(be,"isNoPasswordSetError",function(){return Ap});ve(be,"isNonReachableHandleTypeError",function(){return Tp});ve(be,"isTimeoutError",function(){return zp});ve(be,"isRateLimitError",function(){return Lp});ve(be,"isBadPasskeyScopeError",function(){return Pp});ve(be,"isPasskeyPromptError",function(){return Op});ve(be,"isAPIResponseError",function(){return Mp});ve(be,"isInvalidSlashIDConfigurationError",function(){return Np});ve(be,"isInvalidURLParamsError",function(){return Up});ve(be,"isInvalidAuthenticationMethodError",function(){return Fp});ve(be,"isInvalidActionError",function(){return Vp});ve(be,"isPersonExistsError",function(){return Bp});ve(be,"isUnexpectedError",function(){return Hp});ve(be,"createSlashIDError",function(){return jp});ve(be,"isSlashIDError",function(){return Gp});ve(be,"isClientGeneratedErrorSlug",function(){return Wp});const Ze=async e=>{var t,n,r;if(Ae(e))return(r=(n=(await e.response.clone().json()).errors)===null||n===void 0||(t=n[0])===null||t===void 0?void 0:t.message)!==null&&r!==void 0?r:e.message;if(Ln(e)){var o;if(!(!((o=e.context.response)===null||o===void 0)&&o.body))return e.message;try{var i,a,s;const l=JSON.parse((i=e.context.response)===null||i===void 0?void 0:i.body);var c;return(c=(s=l.errors)===null||s===void 0||(a=s[0])===null||a===void 0?void 0:a.message)!==null&&c!==void 0?c:e.message}catch{return e.message}}return e instanceof Error?e.message:""},bt=e=>{var t,n;return Ae(e)?e.response.status:Ln(e)?(t=e.context.response)===null||t===void 0?void 0:t.status:(n=e.response)===null||n===void 0?void 0:n.status};function Ae(e){return e.name==="ResponseError"&&e.response instanceof Response}const _p={SlashIDCorrelationID:"slashid-correlation-id"},Bs=async e=>({status:e.response.status,statusText:e.response.statusText,url:e.response.url,type:e.response.type,ok:e.response.ok,redirected:e.response.redirected,headers:Object.fromEntries(e.response.headers),body:JSON.stringify(await e.response.clone().json(),null,2)});async function yp(e){const t=bt(e),n=await Ze(e);return t===403&&n==="no password set"}async function ua(e){const t=bt(e),n=await Ze(e);return t===403&&n==="self-registration not allowed for this organization"}async function fa(e){const t=bt(e),n=await Ze(e);return t===403&&n==="person cannot be registered"}async function ha(e){const t=bt(e),n=await Ze(e);return t===403&&n==="person is not active"}async function xp(e){const t=bt(e),n=await Ze(e);return t===403&&n.includes("Person")&&n.includes("is inactive")}function li(e){return bt(e)===429}async function Hs(e){const t=bt(e),n=await Ze(e);return(t===401||t===403)&&n==="authentication has expired"}async function Cp(e){const t=bt(e),n=await Ze(e);return t===409&&n==="person exists"}async function qo(e){const t=/selected scope '(.*?)' is not equal to or a registrable domain suffix of origin '(.*?)'/,n=bt(e),r=await Ze(e);return n===400&&t.test(r)}async function js(e){const t=/The operation either timed out or was not allowed. See: https:\/\/www.w3.org\/TR\/webauthn-2\/#sctn-privacy-considerations-client./,n=/This request has been cancelled by the user./,r=/The operation was aborted./,o=/Operation failed./,i=/The WebAuthn API is not available in the current environment/,a=/An unknown error occurred while talking to the credential manager./,s=await Ze(e);return e instanceof Error&&(t.test(s)||n.test(s)||r.test(s)||o.test(s)||i.test(s)||a.test(s))}function mr(e){return typeof e=="object"&&Array.isArray(e.errors)&&e.errors.every(t=>typeof t.httpcode=="number"&&typeof t.message=="string")}function Gs(e){return e.errors.some(t=>t.message==="authentication has expired")}function Ws(e){return e.errors.some(t=>t.httpcode===429)}async function kp(e){const t=/Popup blocked, please consider redirect instead/,n=await Ze(e);return e instanceof DOMException&&t.test(n)}function Sp(e,t){return e instanceof TypeError&&!t}const Ep=["incorrect_otp_code_via_email","incorrect_otp_code_via_sms","incorrect_otp_code","invalid_password","incorrect_password","recovery_failed","passkey_bad_scope","passkey_prompt_failed","oidc_popup_blocked","rate_limit_exceeded","timeout","client_side_error","unspecified"];class q extends Error{constructor({name:t="SlashIDError",message:n="An error occured in @slashid/slashid",context:r={},cause:o}){super(n,{cause:o}),this.name=t,this.context=r}}function Ln(e){return e instanceof q}async function Qe(e){if(e instanceof q)return e;if(e instanceof Error){if(await js(e))return new q({name:T.passkeyPromptError,message:"Passkey prompt was dismissed",cause:e});if(Ae(e)){if(await qo(e))return new q({name:T.badPasskeyScopeError,message:"Passkey scope is invalid",cause:e});if(li(e))return new q({name:T.rateLimitError,message:"Rate limit exceeded",cause:e});if(await Hs(e))return new q({name:T.timeoutError,message:"Authentication has expired",cause:e});if(await qo(e))return new q({name:T.badPasskeyScopeError,message:"Passkey scope is invalid",cause:e});if(await Cp(e))return new q({name:T.personExistsError,message:"Person with the given handle already exists",cause:e});const r=await Bs(e);return new q({name:T.apiResponseError,message:"An error occured in @slashid/slashid while processing the response",context:{response:r,correlationId:r.headers[_p.SlashIDCorrelationID]},cause:e})}return new q({name:T.unknown,message:`Unknown error: ${e.message}`,cause:e})}if(mr(e))return Gs(e)?new q({name:T.timeoutError,message:"Authentication has expired",context:{thrownResponse:e}}):Ws(e)?new q({message:"Rate limit exceeded",context:{thrownResponse:e},name:T.rateLimitError}):new q({message:"An error occured in @slashid/slashid",context:{thrownResponse:e},name:T.apiResponseError});let t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch{}const n=new Error(`Non-Error thrown: ${t}`);return new q({name:T.unknown,message:n.message,cause:n})}async function Ks(e){return(Ln(e)?e:await Qe(e)).message}async function $p(e,{authenticationFactor:t,handle:n,previousToken:r,challengeId:o}){const i=await(async()=>{if(await js(e))return"passkey_prompt_failed";if(await kp(e))return"oidc_popup_blocked";if(!Ln(e)&&!Ae(e)&&!mr(e))return null;if(li(e))return"rate_limit_exceeded";if(await Hs(e))return"timeout";if(await qo(e))return"passkey_bad_scope";if(mr(e)){if(Gs(e))return"timeout";if(Ws(e))return"rate_limit_exceeded"}return"unspecified"})();return{authenticationFactor:t,handle:n,errorText:i||"client_side_error",previousToken:r,challengeId:o,failureDetail:await Ks(e)}}const T={noPasswordSet:"noPasswordSet",unknown:"UnexpectedError",flowCancelled:"FlowCancelledError",handlePatternNotAllowed:"HandlePatternNotAllowedError",signUpAwaitingApproval:"SignUpAwaitingApprovalError",signInAwaitingApproval:"SignInAwaitingApprovalError",selfRegistrationNotAllowed:"SelfRegistrationNotAllowed",recoverNonReachableHandleType:"recoverNonReachableHandleType",timeoutError:"TimeoutError",rateLimitError:"RateLimitError",badPasskeyScopeError:"BadPasskeyScopeError",passkeyPromptError:"PasskeyPromptError",apiResponseError:"APIResponseError",invalidSlashIDConfigurationError:"InvalidSlashIDConfigurationError",invalidSlashIDURLParamsError:"InvalidSlashIDURLParamsError",invalidAuthenticationMethodError:"InvalidAuthenticationMethodError",invalidActionError:"InvalidActionError",personExistsError:"PersonExistsError"};function Zs(e){return e instanceof q&&e.name===T.flowCancelled}function Ip(e){return e instanceof q&&e.name===T.handlePatternNotAllowed}function Rp(e){return e instanceof q&&e.name===T.signUpAwaitingApproval}function qp(e){return e instanceof q&&e.name===T.signInAwaitingApproval}function Dp(e){return e instanceof q&&e.name===T.selfRegistrationNotAllowed}function Ap(e){return e instanceof q&&e.name===T.noPasswordSet}function Tp(e){return e instanceof q&&e.name===T.recoverNonReachableHandleType}function zp(e){return e instanceof q&&e.name===T.timeoutError}function Lp(e){return e instanceof q&&e.name===T.rateLimitError}function Pp(e){return e instanceof q&&e.name===T.badPasskeyScopeError}function Op(e){return e instanceof q&&e.name===T.passkeyPromptError}function Mp(e){return e instanceof q&&e.name===T.apiResponseError}function Np(e){return e instanceof q&&e.name===T.invalidSlashIDConfigurationError}function Up(e){return e instanceof q&&e.name===T.invalidSlashIDURLParamsError}function Fp(e){return e instanceof q&&e.name===T.invalidAuthenticationMethodError}function Vp(e){return e instanceof q&&e.name===T.invalidActionError}function Bp(e){return e instanceof q&&e.name===T.personExistsError}function Hp(e){return e instanceof q&&e.name===T.unknown}function jp({message:e,name:t,cause:n,context:r}){return new q({message:e,name:t,cause:n,context:r})}function Gp(e){return Ln(e)}const Wp=e=>Ep.includes(e),Kp=["http:","https:"];function di(e){if(!e)throw new q({message:"options cannot be null",name:T.invalidSlashIDConfigurationError,context:{options:e}});if(e.environment){if(typeof e.environment=="string"&&e.environment!=="production"&&e.environment!=="sandbox")throw new q({message:"If 'environment' is set as a string, it must be either 'production' or 'sandbox'",name:T.invalidSlashIDConfigurationError,context:{options:e}});if(typeof e.environment=="object"){if(typeof e.environment.baseURL!="string")throw new q({message:"'environment.baseURL' must be a string",name:T.invalidSlashIDConfigurationError,context:{options:e}});if(typeof e.environment.sdkURL!="string")throw new q({message:"'environment.sdkURL' must be a string",name:T.invalidSlashIDConfigurationError,context:{options:e}})}}if(e.environment&&(e.baseURL||e.sdkURL))throw new q({message:"If 'environment' is set, 'baseURL' and 'sdkURL' cannot be set at the same time. Use a custom environment instead.",name:T.invalidSlashIDConfigurationError,context:{options:e}});if(e.baseURL){if(typeof e.baseURL!="string")throw new q({message:"'baseURL' must be a string",name:T.invalidSlashIDConfigurationError,context:{options:e}});let o;try{o=new URL(e.baseURL)}catch{throw new q({message:"'baseURL' must be a valid URL",name:T.invalidSlashIDConfigurationError,context:{options:e}})}if(Kp.indexOf(o.protocol)===-1)throw new q({message:"'baseURL' must be either an http or https URL",name:T.invalidSlashIDConfigurationError,context:{options:e}})}if(e.sdkURL){if(typeof e.sdkURL!="string")throw new q({message:"'sdkURL' must be a string",name:T.invalidSlashIDConfigurationError,context:{options:e}});try{new URL(e.sdkURL)}catch{throw new q({message:"'sdkURL' must be a valid URL",name:T.invalidSlashIDConfigurationError,context:{options:e}})}}const{analyticsEnabled:t=!0,oid:n,identityProviderInitiatedSSOEnabled:r=!1}=e;if(t&&!n)throw new q({message:"Analytics require the 'oid' parameter to be set when instantiating SlashID()",name:T.invalidSlashIDConfigurationError,context:{options:e}});if(r&&!n)throw new q({message:"Identity provider initiated SSO requires the 'oid' parameter to be set when instantiating SlashID()",name:T.invalidSlashIDConfigurationError,context:{options:e}})}function Zp(e){return e.environment?Yp(e.environment):{baseURL:e.baseURL||Do.production.baseURL,sdkURL:e.sdkURL||Do.production.sdkURL}}const Do={production:{baseURL:"https://api.slashid.com",sdkURL:"https://cdn.slashid.com/sdk.html"},sandbox:{baseURL:"https://api.sandbox.slashid.com",sdkURL:"https://cdn.sandbox.slashid.com/sdk.html"}};function Yp(e){if(typeof e=="string")return Do[e];if(ip(e))return{baseURL:e.baseURL,sdkURL:e.sdkURL};throw new TypeError("'environment' must be either a string or an object")}function fn(e){const t=Zp(e);var n,r;return{oid:e.oid,analyticsEnabled:(n=e.analyticsEnabled)!==null&&n!==void 0?n:!0,identityProviderInitiatedSSOEnabled:(r=e.identityProviderInitiatedSSOEnabled)!==null&&r!==void 0?r:!1,...t}}class Ys{constructor(t){this.getOTP=t?.getOTP}}async function Js(e){if(e.method!=="oidc")throw new Error(`Can't create OIDC extras for method: ${e.method}`);let t={};const{client_id:n,provider:r}=e.options;let{ux_mode:o,redirect_target:i}=e.options;if(o||(o=Qt.Popup),i||(i=window.location.href),o===Qt.Redirect&&!Vs(i))throw new Error(`If OIDC ux_mode was set to "redirect" a "redirect_target" is required, got ${i}`);if(o===Qt.Popup){const[c,l]=Fs();t={...t,popup:c,setPopupUrl:l}}const{csrf_token:a,pkce_code_challenge:s}=await ci();return{...e,options:{...e.options,client_id:n,provider:r,ux_mode:o,redirect_target:i,csrf_token:a,pkce_code_challenge:s},extras:t}}async function Jp(e){if(e.method!=="saml")throw new Error(`Can't create SAML extras for method: ${e.method}`);let t={},{ux_mode:n,redirect_target:r}=e.options;if(n||(n=$n.Popup),r||(r=window.location.href),n===$n.Redirect&&!Vs(r))throw new Error(`If SAML ux_mode was set to "redirect" a "redirect_target" is required, got ${r}`);if(n===$n.Popup){const[a,s]=Fs();t={...t,popup:a,setPopupUrl:s}}const{csrf_token:o,pkce_code_challenge:i}=await ci();return{...e,options:{...e.options,ux_mode:n,redirect_target:r,csrf_token:o,pkce_code_challenge:i},extras:t}}const Xs="iss";function Xp(e){const t=e.split(":");return t.length===3&&t[0]==="social"}function Qp(e){const n=new URLSearchParams(e).get(Xs);return!n||!Xp(n)?null:{iss:n}}function e1(e){const t=new URL(e.href);return t.searchParams.delete(Xs),t.toString()}async function t1(e){const[t,n,r]=e.iss.split(":");return Js({method:"oidc",options:{provider:n,client_id:r,ux_mode:Qt.Redirect,redirect_target:e1(window.location)}})}function Ao(e){this.message=e}Ao.prototype=new Error,Ao.prototype.name="InvalidCharacterError";var pa=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Ao("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,o=0,i=0,a="";r=t.charAt(i++);~r&&(n=o%4?64*n+r:r,o++%4)&&(a+=String.fromCharCode(255&n>>(-2*o&6))))r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function n1(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(pa(n).replace(/(.)/g,function(r,o){var i=o.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}(t)}catch{return pa(t)}}function gr(e){this.message=e}function r1(e,t){if(typeof e!="string")throw new gr("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(n1(e.split(".")[n]))}catch(r){throw new gr("Invalid token specified: "+r.message)}}gr.prototype=new Error,gr.prototype.name="InvalidTokenError";var uo=r1;const o1={end_user_read_write:"end_user_read_write",end_user_read_only:"end_user_read_only",end_user_no_access:"end_user_no_access","person_pool-end_user_read_write":"person_pool-end_user_read_write","person_pool-end_user_read_only":"person_pool-end_user_read_only","person_pool-end_user_no_access":"person_pool-end_user_no_access"};class i1{async get(t){const n=await this.user.getAttributesClient().getAttributesBucketName({bucketName:this.bucketName,attributes:t,slashIDSdkVersion:$e.raw},{cache:"no-cache"}),r=n.errors;if(r)throw r;return n.result}async set(t){const r=(await this.user.getAttributesClient().putAttributesBucketName({bucketName:this.bucketName,body:t,slashIDSdkVersion:$e.raw},{cache:"no-cache"})).errors;if(r)throw r}async delete(t){const r=(await this.user.getAttributesClient().deleteAttributesBucketName({bucketName:this.bucketName,slashIDSdkVersion:$e.raw,attributes:t},{cache:"no-cache"})).errors;if(r)throw r}constructor({user:t,bucketName:n}){this.user=t,this.bucketName=n}}function tn(e){return new Promise(t=>setTimeout(t,e))}const Qs="SlashID-SdkRetryCount";function a1(e){if(!e.headers)return 0;const n=new Headers(e.headers).get(Qs);return n?parseInt(n):0}function Lt({baseDelayMs:e,maxRetries:t}){return{onError:async({error:n,response:r,url:o,init:i,fetch:a})=>{if(Sp(n,r)){const s=a1(i);return s>=t?r:(await tn(Math.pow(2,s)*e),await a(o,{...i,headers:{...i.headers,[Qs]:`${s+1}`}}))}return r}}}const ec=async({environment:e,oid:t})=>{const{baseURL:n}=fn({environment:e}),r=new Us(new nt({...rt,basePath:n,middleware:[Lt({maxRetries:5,baseDelayMs:500})]}));try{const{result:o}=await r.postPersonsAnonymous({slashIDOrgID:t,anonymousPersonCreateReq:{}});return o}catch(o){throw o instanceof Error?Qe(o):o}};function s1(e){if(typeof e.oid!="string")throw new TypeError("'oid' must be of type string")}const tc=e=>{di(e);const t=fn(e);s1(t);const{baseURL:n,sdkURL:r,oid:o}=t;return{environment:{baseURL:n,sdkURL:r},oid:o}};function c1(e){return e?typeof e.user_token=="string":!1}class hn{static async createAnonymousUser(t){const n=tc(t),r=await ec(n);return new hn(r,t)}initialize(t,n){try{t=JSON.parse(t)}catch{}if(typeof t!="string")throw new q({name:T.invalidActionError,message:"token must be a string",context:{token:t}});try{const r=uo(t);c1(r)?(this._token=r.user_token,this._tokenContainer=t):this._token=t}catch(r){throw new q({name:T.unknown,message:`error when decoding token: ${r.toString()}`,cause:r,context:{token:t}})}this._clientOptions=fn(n??{}),this.initializeClients()}updateToken(t){this.initialize(t,this._clientOptions)}get decoded(){if(!this._token)throw new q({name:T.invalidActionError,message:"Cannot call methods on unauthenticated user"});try{return uo(this._token)}catch(t){throw new q({name:T.unknown,message:`error when decoding token: ${t.toString()}`,cause:t,context:{token:this._token}})}}get tokenClaims(){return this.decoded}get decodedTokenContainer(){if(this._tokenContainer)try{return uo(this._tokenContainer)}catch(t){throw new q({name:T.unknown,message:`error when decoding token container: ${t.toString()}`,cause:t,context:{tokenContainer:this._tokenContainer}})}}get tokenContainerClaims(){return this.decodedTokenContainer}updateClient(t){this._token=t,this.initializeClients()}initializeClients(){var t;const n=new nt({...rt,...((t=this._clientOptions)===null||t===void 0?void 0:t.baseURL)&&{basePath:this._clientOptions.baseURL},accessToken:this._token});this._apiClient=new an(n),this._attrsClient=new Vh(n),this._tokenClient=new jh(n),this._personConsentsApi=new Hh(n)}get ID(){return this.decoded.person_id}get token(){var t;return(t=this._token)!==null&&t!==void 0?t:""}get tokenContainer(){return this._tokenContainer||""}get oid(){return this.decoded.oid}get firstLogin(){return this.decoded.first_token}get authentication(){return this.decoded.authenticated_methods||[]}get authentications(){return this.decoded.authentications||[]}get anonymous(){return this.decoded.person_type==="anonymous"}async isAuthenticated(){const{valid:t}=await this.validateToken();return t&&this.decoded.person_type!=="anonymous"}async createDirectID(){const{result:t}=await this._apiClient.postDirectId({slashIDSdkVersion:$e.raw});return t}async logout(){this.updateClient(void 0),this._tokenContainer=void 0}async validateToken(){var t;const n=await((t=this._tokenClient)===null||t===void 0?void 0:t.postTokenValidate({validateTokenReq:{token:this.token},slashIDSdkVersion:$e.raw},{cache:"no-cache"})),r=n.errors;if(r)throw r;return n.result}getGroups(){const t=this.decoded.groups_claim_name||"groups";return this.decoded[t]}getAttributesClient(){return this._attrsClient}getBucket(t=o1.end_user_read_write){return new i1({user:this,bucketName:t})}async get(t){return this.getBucket().get(t)}async set(t){return this.getBucket().set(t)}async delete(t){return this.getBucket().delete(t)}async getGDPRConsent(){const t=await this._personConsentsApi.getConsentGdpr({slashIDSdkVersion:$e.raw}),n=t.errors;if(n)throw n;return t.result}async setGDPRConsent({consentLevels:t}){const n=await this._personConsentsApi.putConsentGdpr({gDPRConsentRequest:{consent_levels:t},slashIDSdkVersion:$e.raw}),r=n.errors;if(r)throw r;return n.result}async addGDPRConsent({consentLevels:t}){const n=await this._personConsentsApi.postConsentGdpr({gDPRConsentRequest:{consent_levels:t},slashIDSdkVersion:$e.raw}),r=n.errors;if(r)throw r;return n.result}async removeGDPRConsent({consentLevels:t}){return this._personConsentsApi.deleteConsentGdpr({slashIDSdkVersion:$e.raw,consentLevels:t})}async removeGDPRConsentAll(){return this._personConsentsApi.deleteConsentGdpr({slashIDSdkVersion:$e.raw,deleteAll:!0})}async getOrganizations(){const t=await this._apiClient.getMe(),n=t.errors;if(n)throw n;return t.result.organizations}async getHandles(){const{errors:t,result:n}=await this._apiClient.getMe();if(t)throw t;return n.handles}async getTokenForOrganization(t){const n=await this._apiClient.getToken({slashIDOrgID:t,slashIDSdkVersion:$e.raw}),r=n.errors;if(r)throw r;return n.result}toString(){var t,n;return(n=(t=this._tokenContainer)!==null&&t!==void 0?t:this._token)!==null&&n!==void 0?n:""}toJSON(){var t,n;return`${(n=(t=this._tokenContainer)!==null&&t!==void 0?t:this._token)!==null&&n!==void 0?n:""}`}constructor(t,n){this.initialize(t,n)}}async function ma(){const e=document.hasFocus();for(;!e&&!document.hasFocus();)await tn(50);return e}const ga={PopupBlocked:"Popup blocked",BadOAuthURL:"Bad OAuth sign in URL"},ba={PopupBlocked:"Popup blocked",BadAuthURL:"Bad authentication URL"};function l1(e){return e.errorText==="client_side_error"}const d1=["otpSmsSent","otpCodeSent","totpKeyGenerated","totpCodeRequested","otpIncorrectCodeSubmitted","passwordSetReady","passwordResetReady","passwordVerifyReady","invalidPasswordSubmitted","incorrectPasswordSubmitted","oauthFlowStarted","oauthFlowFailed","userAuthenticatedFromURL","idFlowSucceeded","idFlowStarted","idFlowFailed","recoveryFlowStarted","recoveryFlowSucceeded","recoveryFlowFailed","webAuthnChallengeProcessed","redirectUriDiscovered","uiCustomizationReceived"],u1=["otpCodeSubmitted","passwordSubmitted","flowCancelled"],f1=["clientSideError"];function wa(e){return d1.includes(e)}function h1(e){return u1.includes(e)}function fo(e){return f1.includes(e)}function p1(){const e=new Map;function t(r){function o(i){r(i.payload)}return e.set(r,o),o}function n(r){if(e.has(r))return e.get(r)}return{decorate:t,getDecorator:n}}async function To(e){return new Promise(async(n,r)=>{const o=new Yh;let i=!1;const a=s=>{const c=s.data;c.id===o.id&&(window.removeEventListener("message",a),c.error?r(c.error):(i=!0,n(e)))};for(window.addEventListener("message",a);!i;)e.postMessage(o,"*"),await tn(50)})}class m1{async getRemoteWindow(){var t;const n=(t=this.remote)===null||t===void 0?void 0:t.contentWindow;if(!n)throw new Error("this context has no remote");return this.remoteReady||(await To(n),this.remoteReady=!0),n}async processEvent(t){let n=null;if(window.parent&&t.source===window.parent&&(n=window.parent),!!n)switch(t.data.type){case pr.StorageGetItem:{const r=t.data;try{const o=await this.localGetItem(r.key);n.postMessage(new ca(t.data.id,o),"*")}catch(o){n.postMessage(new ca(t.data.id,null,o),"*")}}break;case pr.StorageSetItem:{const r=t.data;try{await this.localSetItem(r.key,r.value),n.postMessage(new la(t.data.id),"*")}catch(o){n.postMessage(new la(t.data.id,o),"*")}}break}}async localGetItem(t){return window.localStorage.getItem(t)}async remoteGetItem(t){let n=null;return this.remote&&(n=await new Promise((r,o)=>{const i=new Qh(t),a=s=>{const c=s.data;c.id===i.id&&(window.removeEventListener("message",a),c.error?o(c.error):r(c.value))};window.addEventListener("message",a),this.getRemoteWindow().then(s=>{s.postMessage(i,"*")})})),n}async localSetItem(t,n){return window.localStorage.setItem(t,n)}async remoteSetItem(t,n){this.remote&&await new Promise((r,o)=>{const i=new ep(t,n),a=s=>{const c=s.data;c.id===i.id&&(window.removeEventListener("message",a),c.error?o(c.error):r())};window.addEventListener("message",a),this.getRemoteWindow().then(s=>{s.postMessage(i,"*")})})}constructor(t,n){this.remoteReady=!1,this.remote=t,this.remoteOrigin=n,this.remote||window.addEventListener("message",this.processEvent.bind(this))}}class nc{constructor(t){this.store=t}}class et extends nc{stringify(t){return JSON.stringify(t)}parse(t){return t?JSON.parse(t):[]}async getAll(){const t=this.parse(await this.store.localGetItem(et.LOCAL_STORAGE_IDENTIFIERS_KEY)),n=this.parse(await this.store.remoteGetItem(et.LOCAL_STORAGE_IDENTIFIERS_KEY));return et.merge(t,n)}async add(t){const n=await this.getAll(),r=this.stringify(et.merge(n,[t]));await this.store.localSetItem(et.LOCAL_STORAGE_IDENTIFIERS_KEY,r),await this.store.remoteSetItem(et.LOCAL_STORAGE_IDENTIFIERS_KEY,r)}static identifiersEqual(t,n){return t.type===n.type&&t.value===n.value}static merge(t,n){return t.concat(...n).reduce((r,o)=>{for(const i of r)if(et.identifiersEqual(i,o))return r;return r.push(o),r},[])}}et.LOCAL_STORAGE_IDENTIFIERS_KEY="SLASHID_IDENTIFIERS";class Rr extends nc{static identifiersEqual(t,n){return t===n}static merge(t,n){return t.concat(...n).reduce((r,o)=>{for(const i of r)if(Rr.identifiersEqual(i,o))return r;return r.push(o),r},[])}}class dt extends Rr{stringify(t){return JSON.stringify(t)}parse(t){if(!t)return[];let n=null;try{n=JSON.parse(t)}catch{return[t]}return Array.isArray(n)?n.filter(o=>typeof o=="string"):[]}async getAll(){const t=this.parse(await this.store.localGetItem(dt.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY)),n=this.parse(await this.store.remoteGetItem(dt.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY));return dt.merge(t,n)}async add(t){const n=await this.getAll(),r=this.stringify(dt.merge(n,[t]));await this.store.localSetItem(dt.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY,r),await this.store.remoteSetItem(dt.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY,r)}}dt.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY="SLASHID_WEBAUTHN_CREDENTIAL_ID";class Rn extends Rr{stringify(t){return JSON.stringify(t)}parse(t){if(!t)return{};let n=null;try{n=JSON.parse(t)}catch{return{}}if(typeof n!="object")return{};const r={};for(const o of Object.keys(n)){if(typeof o!="string"||!Array.isArray(n[o]))continue;const i=n[o].filter(a=>typeof a=="string");r[o]=i}return r}async getAll(){return this.parse(await this.store.localGetItem(Rn.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY_V2))}async get(t){return!this.store.remoteOrigin||this.store.remoteOrigin.endsWith(t)?this.v1Storage.getAll():(await this.getAll())[t]||[]}async add(t,n){if(!this.store.remoteOrigin||this.store.remoteOrigin.endsWith(t)){this.v1Storage.add(n);return}const r=await this.getAll(),o=r[t]||[];for(const a of o)if(a===n){console.warn(`Attempted to add already present credential ID: scope=${t} credId=${n}`);return}o.push(n),r[t]=o;const i=this.stringify(r);await this.store.localSetItem(Rn.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY_V2,i)}constructor(t){super(t),this.v1Storage=new dt(t)}}Rn.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY_V2="SLASHID_WEBAUTHN_CREDENTIAL_ID_V2";class g1 extends hn{async mfa(t,n){let r;if(!t)throw new Error("at least one of PersonHandle or Factor is required");t.type&&t.value&&(r=t),t.method&&(n=t);const o=await this._slashid._id(this.decoded.oid,r,n,this._token);this.updateToken(o.toString())}constructor(t,n){super(t,n),this._slashid=n instanceof br?n:new br(n)}}const b1=/firefox|fxios|deno/i,w1=(e,t)=>({sendEvent:async n=>{try{await e(`${t.baseURL}/actions/sdk`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch(r){console.error("@slashid/slashid-sdk: failed to send event",{error:r,event:n})}}}),v1=(e,t)=>({sendEvent:async n=>{const r=b1.test(navigator.userAgent);try{await e(`${t.baseURL}/actions/sdk`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!r})}catch(o){console.error("@slashid/slashid-sdk: failed to send event",{error:o,event:n})}}});class _1{createCorrelationID(){return en()}createEventMetadata({location:t,userAgent:n}={location:"/",userAgent:""}){var r,o,i;return{organization_id:(i=(o=this.config.oid)!==null&&o!==void 0?o:(r=this.user)===null||r===void 0?void 0:r.oid)!==null&&i!==void 0?i:"",analytics_correlation_id:this.correlationId,window_location:t,user_agent:n}}sendEvent(t){this.transport.sendEvent(t)}trackPersonIdentified({user:t}){const n={event_name:Xt.PersonIdentifiedV1,person_id:t.ID},r={...this.createEventMetadata(),event_data:n};this.sendEvent(r)}trackPersonLoggedOut(t){const n=new hn(t.token,this.config),r={event_name:Xt.PersonLoggedOutV1,person_id:n.ID},o={...this.createEventMetadata(),event_data:r};this.sendEvent(o)}identify(t){this.user=t,this.trackPersonIdentified({user:t})}logout(){const t=this.user;t&&(this.trackPersonLoggedOut({token:t.token}),this.user=void 0)}trackVirtualPageView(t){const{url:n=""}=t,r={event_name:Xt.VirtualPageLoadedV1,...this.user&&{person_id:this.user.ID}};var o;const i={...this.createEventMetadata({location:n,userAgent:(o=t.userAgent)!==null&&o!==void 0?o:""}),event_data:r};this.sendEvent(i)}constructor({options:t,user:n,transport:r}){t&&di(t),this.config=fn(t??{}),this.transport=r??w1(fetch,this.config),this.eventsAPI=new Bh(new nt({...rt,basePath:this.config.baseURL})),this.user=n,this.correlationId=this.createCorrelationID()}}class y1 extends _1{createCorrelationID(){const t="@slashid/EVENTS_CORRELATION_ID";try{const r=sessionStorage.getItem(t);if(r)return r}catch{}const n=en();try{sessionStorage.setItem(t,n)}catch{}return n}createEventMetadata({location:t,userAgent:n}={location:window.location.href,userAgent:navigator.userAgent}){return super.createEventMetadata({location:t,userAgent:n})}subscribeToDomainEvents(){this.sdk.subscribe("idFlowSucceeded",n=>this.trackAuthenticationSuccess(n)),this.sdk.subscribe("idFlowFailed",n=>this.trackAuthenticationFailure(n)),this.sdk.subscribe("invalidPasswordSubmitted",n=>this.trackAuthenticationFailure({...n,errorText:"invalid_password"})),this.sdk.subscribe("incorrectPasswordSubmitted",n=>this.trackAuthenticationFailure({...n,errorText:"incorrect_password"})),this.sdk.subscribe("otpIncorrectCodeSubmitted",n=>{var r;const o=(()=>{var i,a;return((i=n.factor)===null||i===void 0?void 0:i.method)==="otp_via_email"?"incorrect_otp_code_via_email":((a=n.factor)===null||a===void 0?void 0:a.method)==="otp_via_sms"?"incorrect_otp_code_via_sms":"incorrect_otp_code"})();this.trackAuthenticationFailure({errorText:o,authenticationFactor:{method:(r=n.factor)===null||r===void 0?void 0:r.method},challengeId:n.challengeId})}),ac(this.sdk).subscribe("clientSideError",n=>{this.trackAuthenticationFailure({...n,errorText:"client_side_error"})})}trackAuthenticationSuccess(t){var n;const r=this.sdk.getUser(t.token);this.identify(r);const o={event_name:Xt.AuthenticationSucceededV1,person_id:r.ID,success_authn_method:(n=t.authenticationFactor)===null||n===void 0?void 0:n.method,authenticated_methods:r.authentication,...t.handle&&{handle:t.handle}},i={...this.createEventMetadata(),event_data:o};this.sendEvent(i)}trackAuthenticationFailure(t){var n;const r=t.previousToken?this.sdk.getUser(t.previousToken):this.user,o={event_name:Xt.AuthenticationFailedV1,failed_authn_method:(n=t.authenticationFactor)===null||n===void 0?void 0:n.method,authenticated_methods:r?.authentication,failure_reason:t.errorText,...t.handle&&{handle:t.handle},...t.challengeId&&{challenge_id:t.challengeId},...t.failureDetail&&{failure_detail:t.failureDetail},...r&&{person_id:r.ID}},i={...this.createEventMetadata(),event_data:o};this.sendEvent(i)}trackSdkLoaded(){const t={...this.createEventMetadata(),event_data:{event_name:Xt.SlashIdsdkLoadedV1}};this.sendEvent(t)}trackVirtualPageView(t){const{url:n=window.location.href,userAgent:r=navigator.userAgent}=t;super.trackVirtualPageView({url:n,userAgent:r})}constructor({sdk:t,user:n}){const r={oid:t.oid,baseURL:t.baseURL,sdkURL:t.sdkURL,analyticsEnabled:!0},o=fn(r);super({options:r,user:n,transport:v1(fetch,o)}),this.sdk=t,this.subscribeToDomainEvents(),this.trackSdkLoaded()}}function x1(e){var t;const n=(t=e.pattern_qualifiers)===null||t===void 0?void 0:t.reduce((o,i)=>i==="case_insensitive"?o+"i":o,"");return new RegExp(e.pattern,n)}function va(e){const t=e.options.validation_rules.regular_expressions;return t?t.map(r=>{const o=x1(r);return{type:"regex",name:r.name,regexp:o,matchType:r.match_type}}):[]}function _a({password:e,rules:t}){const n=[];return t.forEach(r=>{const o=r.regexp.test(e);(o&&r.matchType==="must_not_match"||!o&&r.matchType==="must_match")&&n.push(r)}),n.length===0?{valid:!0,failedRules:[]}:{valid:!1,failedRules:n}}const C1=new Set([ye.Otp,ye.TotpRegister,ye.TotpVerify]);function k1(e){return C1.has(e)}class In{listenForEvents(){this.emitter.on("flowCancelled",()=>{this.flowCancelled=!0})}updateClient(t){this.authnClient=new an(new nt({...rt,basePath:this.slashID.baseURL,middleware:[Lt({maxRetries:5,baseDelayMs:500})],...t&&{accessToken:t}}))}async processChallenges({challenges:t,authnFactor:n,previousToken:r}){this.updateClient(r);let o;for(const i of t)o=await this.process(i,n);if(!o)throw new Error("no user token in attestation response");return o}async process(t,n){let r;switch(t.type){case ye.Proxy:return this.processProxyChallenge(t);case ye.Nonce:r=await this.processNonceChallenge(t);break;case ye.Otp:{const l=new Ys(n?.options);r=await this.processOTPChallenge(t,l);break}case ye.TotpRegister:r=await this.processTOTPRegisterChallenge(t);break;case ye.TotpVerify:r=await this.processTOTPVerifyChallenge(t);break;case ye.WebauthnGet:r=await this.processWebAuthnGetChallenge(t);break;case ye.WebauthnCreate:r=await this.processWebAuthnCreateChallenge(t);break;case ye.Oidc:return this.processOIDCChallenge(t,n);case ye.Saml:return this.processSAMLChallenge(t,n);case ye.PasswordSet:r=await this.processPasswordSetChallenge(t);break;case ye.PasswordVerify:r=await this.processPasswordVerifyChallenge(t);break;case ye.PasswordReset:r=await this.processPasswordResetChallenge(t);break;case ye.UiCustomization:return this.processUiCustomizationChallenge(t);default:throw new Error("unhandled challenge type: "+JSON.stringify(t))}let o,i,a;try{const l=await this.authnClient.postAttestationV3Raw({attestation:r,slashIDSdkVersion:$e.raw},{cache:"no-cache"});o=await l.value(),i=l.raw.headers}catch(l){if(Ae(l))o=await l.response.clone().json(),i=l.response.headers,a=l;else throw l}if(i.has("location")){const l=i.get("location");typeof l=="string"&&l&&this.emitter.emit({name:"redirectUriDiscovered",payload:{redirectUri:l},meta:{access:"public"}})}if(mr(o)&&o.errors.length){if(o.errors[0].httpcode===400&&t.type===ye.PasswordSet)return this.notifySlashID("invalidPasswordSubmitted",{failedRules:[],authenticationFactor:n,challengeId:t.id,failureDetail:o.errors[0].message}),this.process(t,n);if(o.errors[0].httpcode===401&&t.type===ye.PasswordVerify)return this.notifySlashID("incorrectPasswordSubmitted",{authenticationFactor:n,challengeId:t.id,failureDetail:o.errors[0].message}),this.process(t,n);if(o.errors[0].httpcode===401&&k1(t.type))return this.notifySlashID("otpIncorrectCodeSubmitted",{factor:n,challengeId:t.id}),this.process(t,n);throw await Qe(a)}const c=o.result.token;if(!c)throw new Error("no user token in attestation response");if(t.type===ye.WebauthnCreate){const l=t.options;this.slashID.credentialStorage.add(l.rp.id,r.data.rawId)}return c}async processProxyChallenge(t){let n;for(;!n;){if(this.flowCancelled)throw new q({name:T.flowCancelled,message:"The flow has been cancelled!",context:{challenge:t}});await tn(1e3);const r=await this.authnClient.getChallengeChallengeIdV2({challengeId:t.options.challenge_id,slashIDSdkVersion:$e.raw},{cache:"no-cache"});if(r.errors&&(r.errors.length!==1||r.errors[0].httpcode!==202))throw r;n=r.result}return n}async processNonceChallenge(t){var n;return{challenge_id:t.id,challenge_type:t.type,data:{challenge:(n=t.options)===null||n===void 0?void 0:n.challenge}}}shouldProcessEvent(t){var n,r,o,i;return!t.meta||!t.meta.authFlowId&&!t.meta.recoveryFlowId?!0:!(!((n=this.flowMeta)===null||n===void 0)&&n.authFlowId&&((r=t.meta)===null||r===void 0?void 0:r.authFlowId)!==this.flowMeta.authFlowId||!((o=this.flowMeta)===null||o===void 0)&&o.recoveryFlowId&&((i=t.meta)===null||i===void 0?void 0:i.recoveryFlowId)!==this.flowMeta.recoveryFlowId)}async processOTPChallenge(t,n){this.notifySlashID("otpSmsSent"),this.notifySlashID("otpCodeSent");const r=new Promise(a=>{const s=c=>{this.shouldProcessEvent(c)&&(this.emitter.off("otpCodeSubmitted",s),a(c.payload))};this.emitter.on("otpCodeSubmitted",s)});typeof n.getOTP=="function"&&n.getOTP().then(a=>this.notifySlashID("otpCodeSubmitted",a));const o=await r;if(!o)throw new Error("no OTP code provided");return{challenge_id:t.id,challenge_type:t.type,data:{otp:o}}}async processTOTPRegisterChallenge(t){var n,r,o;this.notifySlashID("totpKeyGenerated",{uri:(n=t.options)===null||n===void 0?void 0:n.key_uri,qrCode:(r=t.options)===null||r===void 0?void 0:r.qr_code_data_b64,recoveryCodes:(o=t.options)===null||o===void 0?void 0:o.recovery_codes});const a=await new Promise(c=>{const l=u=>{this.shouldProcessEvent(u)&&(this.emitter.off("otpCodeSubmitted",l),c(u.payload))};this.emitter.on("otpCodeSubmitted",l)});if(!a)throw new q({name:"SlashIDError",message:"no TOTP code provided",context:{challengeId:t.id}});return{challenge_id:t.id,challenge_type:t.type,data:{otp:a}}}async processTOTPVerifyChallenge(t){this.notifySlashID("totpCodeRequested");const r=await new Promise(i=>{const a=s=>{this.shouldProcessEvent(s)&&(this.emitter.off("otpCodeSubmitted",a),i(s.payload))};this.emitter.on("otpCodeSubmitted",a)});if(!r)throw new q({name:"SlashIDError",message:"no TOTP code provided",context:{challengeId:t.id}});return{challenge_id:t.id,challenge_type:t.type,data:{otp:r}}}async processWebAuthnGetChallenge(t){const n=await ma(),r=t.options;if(this.slashID.isLocalScope(r.rpId)){const o={challenge:Zt(r.challenge),extensions:r.extensions,rpId:r.rpId,timeout:r.timeout,userVerification:r.userVerification},i=r.allowCredentials;if(i){o.allowCredentials=new Array(i.length);for(let m=0;m<i.length;m++){const h=i[m];o.allowCredentials[m]={id:Zt(h.id),type:h.type,transports:h.transports}}}const a=await navigator.credentials.get({publicKey:o});if(!a)throw new Error("could not create assert credential");const s=a.response,c=st(new Uint8Array(a.rawId)),l={id:a.id,rawId:c,type:a.type,clientExtensionResults:a.getClientExtensionResults(),response:{clientDataJSON:st(new Uint8Array(s.clientDataJSON)),authenticatorData:st(new Uint8Array(s.authenticatorData)),signature:st(new Uint8Array(s.signature)),userHandle:s.userHandle?st(new Uint8Array(s.userHandle)):null}},u={challenge_id:t.id,challenge_type:t.type,data:l};return this.notifySlashID("webAuthnChallengeProcessed",{credentialId:c}),u}else{const o=this.slashID.getSDKUrl();let i;if(await br.canGetPublicKeyCredentialsInIFrame()){if(i=this.slashID.iframe.contentWindow,!i)throw new Error("cannot get global id iframe")}else if(n||await tn(200),i=window.open(o.toString()),!i)throw new Error("cannot open global id window");return new Promise((s,c)=>{const l=new Xh({baseURL:this.slashID.baseURL,sdkURL:this.slashID.sdkURL},t),u=m=>{const h=m.data;h.id===l.id&&(i.close(),window.removeEventListener("message",u),h.error?c(h.error):s(h.attestation))};window.addEventListener("message",u),To(i).then(m=>{m.postMessage(l,o.origin)})})}}async processWebAuthnCreateChallenge(t){const n=await ma(),r=t.options;if(this.slashID.isLocalScope(r.rp.id)){const o={challenge:Zt(r.challenge),rp:r.rp,user:{id:Zt(r.user.id),name:r.user.name,displayName:r.user.displayName},pubKeyCredParams:r.pubKeyCredParams,authenticatorSelection:r.authenticatorSelection,timeout:r.timeout,extensions:r.extensions,attestation:r.attestation},i=r.excludeCredentials;if(i){o.excludeCredentials=new Array(i.length);for(let m=0;m<i.length;m++){const h=i[m];o.excludeCredentials[m]={id:Zt(h.id),type:h.type,transports:h.transports}}}const a=await navigator.credentials.create({publicKey:o});if(!a)throw new Error("cannot create credential");const s=a.response,c=st(new Uint8Array(a.rawId)),l={id:a.id,rawId:c,type:a.type,clientExtensionResults:a.getClientExtensionResults(),response:{attestationObject:st(new Uint8Array(s.attestationObject)),clientDataJSON:st(new Uint8Array(s.clientDataJSON))}},u={challenge_id:t.id,challenge_type:t.type,data:l};return this.notifySlashID("webAuthnChallengeProcessed",{credentialId:c}),u}else return n||await tn(200),new Promise((i,a)=>{const s=this.slashID.getSDKUrl(),c=window.open(s.toString());if(!c){a(new Error("cannot open global id window"));return}const l=new Jh({baseURL:this.slashID.baseURL,sdkURL:this.slashID.sdkURL},t),u=m=>{const h=m.data;h.id===l.id&&(c.close(),window.removeEventListener("message",u),h.error?a(h.error):i(h.attestation))};window.addEventListener("message",u),To(c).then(m=>{m.postMessage(l,s.origin)})})}async processOIDCChallenge(t,n){if(n.options.ux_mode===Qt.Popup){var r;const i=n.extras.setPopupUrl(t.options.auth_code_url);if(!(!(t==null||(r=t.options)===null||r===void 0)&&r.auth_code_url)){var o;throw this.notifySlashID("oauthFlowFailed",{...n.options,reason:ga.BadOAuthURL}),new Error(`Bad OAuth URL - got ${t==null||(o=t.options)===null||o===void 0?void 0:o.auth_code_url}`)}if(!i)throw this.notifySlashID("oauthFlowFailed",{...n.options,reason:ga.PopupBlocked}),new Error("OIDC flow unsuccesful!")}else if(n.options.ux_mode===Qt.Redirect)window.location.assign(t.options.auth_code_url);else throw new Error(`Unsupported OAuth ux_mode - got ${n.options.ux_mode}`);return this.notifySlashID("oauthFlowStarted",n.options),""}async processSAMLChallenge(t,n){if(n.options.ux_mode===$n.Popup){var r;const i=n.extras.setPopupUrl(t.options.start_authentication_url);if(!(!(t==null||(r=t.options)===null||r===void 0)&&r.start_authentication_url)){var o;throw this.notifySlashID("popupFailed",{reason:ba.BadAuthURL}),new Error(`Bad authentication URL - got ${t==null||(o=t.options)===null||o===void 0?void 0:o.start_authentication_url}`)}if(!i)throw this.notifySlashID("popupFailed",{reason:ba.PopupBlocked}),new Error("SAML flow unsuccesful!")}else if(n.options.ux_mode===$n.Redirect)window.location.assign(t.options.start_authentication_url);else throw new Error(`Unsupported SAML ux_mode - got ${n.options.ux_mode}`);return""}async processPasswordSetChallenge(t){this.notifySlashID("passwordSetReady");const r=await new Promise(a=>{const s=c=>{this.shouldProcessEvent(c)&&(this.emitter.off("passwordSubmitted",s),a(c.payload))};this.emitter.on("passwordSubmitted",s)}),o=_a({password:r,rules:va(t)});return o.valid?{challenge_id:t.id,challenge_type:t.type,data:{password:r}}:(this.notifySlashID("invalidPasswordSubmitted",{failedRules:o.failedRules,challengeId:t.id,authenticationFactor:{method:we.Password},failureDetail:`invalid_password: ${o.failedRules.map(a=>a.name).join(",")}`}),await this.processPasswordSetChallenge(t))}processPasswordVerifyChallenge(t){return this.notifySlashID("passwordVerifyReady"),new Promise(r=>{const o=i=>{this.shouldProcessEvent(i)&&(this.emitter.off("passwordSubmitted",o),r(i.payload))};this.emitter.on("passwordSubmitted",o)}).then(r=>{if(!r)throw new Error("No password provided");return{challenge_id:t.id,challenge_type:t.type,data:{password:r}}})}async processPasswordResetChallenge(t){this.notifySlashID("passwordResetReady");const r=await new Promise(a=>{const s=c=>{this.shouldProcessEvent(c)&&(this.emitter.off("passwordSubmitted",s),a(c.payload))};this.emitter.on("passwordSubmitted",s)}),o=_a({password:r,rules:va(t)});return o.valid?{challenge_id:t.id,challenge_type:t.type,data:{password:r}}:(this.notifySlashID("invalidPasswordSubmitted",{authenticationFactor:{method:we.Password},failedRules:o.failedRules,challengeId:t.id,failureDetail:`invalid_password: ${o.failedRules.map(a=>a.name).join(",")}`}),await this.processPasswordSetChallenge(t))}async processUiCustomizationChallenge(t){var n;const r=(n=t.options)===null||n===void 0?void 0:n.authn_redirect_page_ui_config;if(!r)throw new Error("No customization properties provided!");return this.notifySlashID("uiCustomizationReceived",{customizationProperties:r}),""}constructor(t,n,r){this.flowCancelled=!1,this.notifySlashID=(o,i)=>{this.emitter.emit({name:o,payload:i,meta:{access:"public",...this.flowMeta}})},this.slashID=t,this.authnClient=new an(new nt({...rt,basePath:this.slashID.baseURL,middleware:[Lt({maxRetries:5,baseDelayMs:500})]})),this.emitter=n,this.flowMeta=r,this.listenForEvents()}}class ya{shouldProcessEvent(t){var n;return!(this.flowId&&((n=t.meta)===null||n===void 0?void 0:n.authFlowId)!==this.flowId)}async id(t,n,r){return this._id(t,n,r)}async _id(t,n,r,o){if(r)switch(r.method){case we.Webauthn.toString():{if(!(navigator&&window.PublicKeyCredential))throw new q({name:T.invalidAuthenticationMethodError,message:"The WebAuthn API is not available in the current environment",context:{method:we.Webauthn,handle:n,authenticationFactor:r}});let m=r.options;m||(m={}),m.scope||(m.scope=window.location.hostname);const h=await this.slashID.credentialStorage.get(m.scope);if(h&&(m.available_credential_ids=h),m.attachment||(m.attachment=ta.Any),m.user_verification||(m.user_verification=Nf.Preferred),m.resident_key||(m.resident_key=Mf.Preferred),m.attestation||(m.attestation=Of.None),m.attachment===ta.Platform&&!await window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable())throw new q({name:T.invalidAuthenticationMethodError,message:"This device has no platform authenticator available",context:{method:we.Webauthn,handle:n,authenticationFactor:r}});r.options=m}break;case we.EmailLink.toString():case we.OtpViaEmail.toString():if(n&&n.type!==kt.EmailAddress)throw new q({name:T.invalidAuthenticationMethodError,message:`A handle of type '${kt.EmailAddress}' is required, got '${n.type}' instead`,context:{method:we.EmailLink,handle:n,authenticationFactor:r}});break;case we.SmsLink.toString():case we.OtpViaSms.toString():if(n&&n.type!==kt.PhoneNumber)throw new q({name:T.invalidAuthenticationMethodError,message:`A handle of type '${kt.PhoneNumber}' is required, got '${n.type}' instead`,context:{method:we.SmsLink,handle:n,authenticationFactor:r}});r.options=new Ys(r.options);break;case we.Oidc.toString():{if(n)throw new q({name:T.invalidAuthenticationMethodError,message:"OIDC should not be used with handles",context:{method:we.Oidc,handle:n,authenticationFactor:r}});r=await Js(r);const m=h=>{var p,g;if(!this.shouldProcessEvent(h))return;const f=r;!(f==null||(p=f.extras)===null||p===void 0)&&p.popup&&(f==null||(g=f.extras)===null||g===void 0||g.popup.close()),this.emitter.off("oauthFlowFailed",m)};this.emitter.on("oauthFlowFailed",m)}break;case we.Saml.toString():{if(n)throw new q({name:T.invalidAuthenticationMethodError,message:"SAML should not be used with handles",context:{method:we.Saml,handle:n,authenticationFactor:r}});r=await Jp(r);const m=h=>{var p,g;if(!this.shouldProcessEvent(h))return;const f=r;!(f==null||(p=f.extras)===null||p===void 0)&&p.popup&&(f==null||(g=f.extras)===null||g===void 0||g.popup.close()),this.emitter.off("popupFailed",m)};this.emitter.on("popupFailed",m)}break}const i={method:r?.method,options:r?.options};i.method!==void 0&&(i.options={...i.options,method:i.method}),this.emitter.emit({name:"idFlowStarted",payload:{authenticationFactor:r},meta:{authFlowId:this.flowId,access:"public"}});const s=await new an(new nt({...rt,basePath:this.slashID.baseURL,middleware:[Lt({maxRetries:5,baseDelayMs:500})],...o&&{accessToken:o}})).postId({slashIDOrgID:t,slashIDSdkVersion:$e.raw,iDRequest:{handle:n,factor:i}},{cache:"no-cache"});if(s.errors)throw s;const c=s.result;if(!c)throw new Error("no challenges in ID response");const u=await new In(this.slashID,this.emitter,{authFlowId:this.flowId}).processChallenges({challenges:c,authnFactor:r,previousToken:o});if(n)try{this.slashID.identifiersStorage.add(n)}catch(m){console.warn(m)}return this.emitter.emit({name:"idFlowSucceeded",payload:{token:`${u}`,authenticationFactor:r,handle:n},meta:{authFlowId:this.flowId,access:"public"}}),this.slashID.getUser(u)}async recover({handle:t,factor:n}){const r=new an(new nt({...rt,basePath:this.slashID.baseURL,middleware:[Lt({maxRetries:5,baseDelayMs:500})]})),{result:o}=await r.postRecover({recoverRequest:{handle:t,factor:n},slashIDSdkVersion:$e.raw,slashIDOrgID:this.slashID.oid});if(!o)throw new Error("no result in recover response");await new In(this.slashID,this.emitter,{recoveryFlowId:this.flowId}).processChallenges({challenges:o,authnFactor:n})}constructor(t,n){this.slashID=t,this.flowId=en(),this.emitter=n}}function S1(){const e={},t=new Set;function n(a,s){e[a]||(e[a]=new Set),e[a].add(s)}function r(a,s){const c=e[a];c&&c.delete(s)}function o(a){const s=e[a.name];if(!s||!s.size)return;let c=!1;const l=t.size>0?[...t].reduce((u,m)=>c?u:m(u,()=>{c=!0})||u,a):a;c||s.forEach(u=>u(l))}function i(a){t.add(a)}return{on:n,off:r,emit:o,use:i}}class E1 extends hn{async id(t,n){return this._slashid._id(this.decoded.oid,t,n,this.token)}constructor(t,n){if(super(t,n),this.decoded.person_type!=="anonymous")throw new Error("Token must have person_type 'anonymous'");this._slashid=n}}const xa="__SlashID_iframe",rc=Symbol(),oc=Symbol(),ic=Symbol(),ac=e=>({publish:(t,n)=>e[rc](t,n),subscribe:(t,n)=>e[oc](t,n),unsubscribe:(t,n)=>e[ic](t,n)});class br{getAnalytics(){if(!this.analytics)throw new q({name:T.invalidSlashIDConfigurationError,message:"Analytics has to be enabled to use this method"});return this.analytics}static async canGetPublicKeyCredentialsInIFrame(){const t=window;return!!t.chrome&&(!!t.chrome.webstore||!!t.chrome.runtime)}async startHostedLoginFlow(t){mp(t);const{csrf_token:n,pkce_code_challenge:r}=await ci(),o=new URL("/oauth2/authorize",this.baseURL);o.searchParams.set("redirect_uri",t.redirectUri),o.searchParams.set("client_id",t.clientId),o.searchParams.set("response_type","code"),o.searchParams.set("state",n),o.searchParams.set("scope","openid"),o.searchParams.set("code_challenge",r),o.searchParams.set("code_challenge_method","S256"),window.location.assign(o)}async resolveHostedLoginFlow(){const t=wp(window.location.search);if(t){const{clientId:n,redirectUri:r}=gp();try{const{id_token:o}=await vp({...t,clientId:n,redirectUri:r,apiBaseURL:this.baseURL}),i=this.getUser(o);return this.analytics&&this.getAnalytics().identify(i),bp(),i}catch(o){throw await this.processError(o,{}),await Qe(o)}}}createFlowScopeMiddleware(){const t=this;return function(r,o){var i,a,s,c;return r.meta&&r.meta.authFlowId&&(!((i=t.authFlow)===null||i===void 0)&&i.flowId)&&((a=t.authFlow)===null||a===void 0?void 0:a.flowId)!==r.meta.authFlowId||r.meta&&r.meta.recoveryFlowId&&(!((s=t.recoveryFlow)===null||s===void 0)&&s.flowId)&&((c=t.recoveryFlow)===null||c===void 0?void 0:c.flowId)!==r.meta.recoveryFlowId?o():r}}publish(t,n){var r,o;if(!h1(t))throw new q({name:T.unknown,message:`Trying to publish an unsupported event: ${t}`,context:{type:t,event:n}});this.emitter.emit({name:t,payload:n,meta:{access:"public",authFlowId:(r=this.authFlow)===null||r===void 0?void 0:r.flowId,recoveryFlowId:(o=this.recoveryFlow)===null||o===void 0?void 0:o.flowId}})}[rc](t,n){var r,o;if(!fo(t))throw new q({name:T.unknown,message:`Trying to publish an unsupported event: ${t}`,context:{type:t,event:n}});this.emitter.emit({name:t,payload:n,meta:{access:"private",authFlowId:(r=this.authFlow)===null||r===void 0?void 0:r.flowId,recoveryFlowId:(o=this.recoveryFlow)===null||o===void 0?void 0:o.flowId}})}subscribe(t,n){if(!wa(t))throw new q({name:T.unknown,message:`Trying to subscribe to unsupported event: ${t}`,context:{type:t}});const r=this.emitterDecoratorFactory.decorate(n);this.emitter.on(t,r)}[oc](t,n){if(!fo(t))throw new q({name:T.unknown,message:`Trying to subscribe to unsupported event: ${t}`,context:{type:t}});const r=this.emitterDecoratorFactory.decorate(n);this.emitter.on(t,r)}unsubscribe(t,n){if(!wa(t))throw new q({name:T.unknown,message:`Trying to unsubscribe from an unsupported event: ${t}`,context:{type:t}});const r=this.emitterDecoratorFactory.getDecorator(n);r&&this.emitter.off(t,r)}[ic](t,n){if(!fo(t))throw new q({name:T.unknown,message:`Trying to unsubscribe from an unsupported event: ${t}`,context:{type:t}});const r=this.emitterDecoratorFactory.getDecorator(n);r&&this.emitter.off(t,r)}async getChallengesFromURL(){const t=window.location.search,n=new URLSearchParams(t);let r;const o=n.get(Zh),i=n.get(Kh);if(o&&i)throw new q({name:T.invalidSlashIDURLParamsError,message:"found both 'challenges' and 'sidcp' URL query parameters",context:{challengePackId:o,encodedChallenges:i,queryString:t}});if(o)try{const a=await this.authnClient.getChallengePackChallengePackId({challengePackId:o,slashIDSdkVersion:$e.raw},{cache:"no-cache"});if(a.errors)throw new q({name:T.apiResponseError,message:"error fetching challenges",context:{errors:a.errors}});r=a.result}catch(a){throw await Qe(a)}else if(i){const a=Zt(i),s=new TextDecoder("utf-8").decode(a);r=JSON.parse(s)}return r}async getUserFromURL(){if(!this.userFromURL){if(this.config.identityProviderInitiatedSSOEnabled&&this.oid){const r=Qp(window.location.search);if(r)try{const o=await t1(r);this._id(this.oid,void 0,o)}catch(o){throw await this.processError(o,{}),await Qe(o)}}let n;try{n=await this.getChallengesFromURL()}catch(r){throw await this.processError(r,{}),await Qe(r)}if(n){var t;const r=da(window.location.search);r&&this.resolveSSOChallenge(r);let o;try{o=await new In(this,this.emitter).processChallenges({challenges:n})}catch(i){throw await this.processError(i,{}),Ae(i)&&await fa(i)?new q({name:T.handlePatternNotAllowed,message:i.message,cause:i}):Ae(i)&&await ha(i)?new q({name:T.signUpAwaitingApproval,message:i.message,cause:i}):await Qe(i)}if(this.userFromURL=new hn(o,{baseURL:this.baseURL,sdkURL:this.sdkURL}),!((t=this.userFromURL.authentications)===null||t===void 0)&&t.length){const i=this.userFromURL.authentications[this.userFromURL.authentications.length-1];this.emitter.emit({name:"idFlowSucceeded",payload:{token:o,authenticationFactor:{method:i.method},handle:i.handle},meta:{access:"public"}})}}}return this.userFromURL&&this.emitter.emit({name:"userAuthenticatedFromURL",payload:{token:this.userFromURL.token},meta:{access:"public"}}),this.userFromURL}async resolveSSOChallenge({ssoChallengeID:t,ssoCode:n,csrfToken:r}){if(!(!t||!n||!r))try{const o=window.localStorage.getItem(fr);if(!o)throw new Error("no CSRF token stored");if(r!==o)throw new Error("CSRF token mismatch");const i=window.localStorage.getItem(hr);if(!i)throw new Error("no PKCE code verifier stored");await this.authnClient.postSsoResolve({slashIDOrgID:this.oid,postSsoResolveRequest:{challenge_id:t,code:n,pkce_code_verifier:i}})}catch(o){this.processError(o,{})}finally{window.localStorage.removeItem(fr),window.localStorage.removeItem(hr)}}async processEvent(t){if(rp(t.data)){if(t.origin!==this.baseURL)return;const r=da(t.data.urlParams);r&&await this.resolveSSOChallenge(r);return}let n=null;if(window.opener&&t.source===window.opener&&(n=window.opener),window.parent&&t.source===window.parent&&(n=window.parent),!!n){if(op(t.data)){const r=t.data;try{n.postMessage(new ia(r.id),"*")}catch(o){n.postMessage(new ia(r.id,o.toString()),"*")}}if(tp(t.data)){const r=t.data;try{const i=await new In(this,this.emitter).processWebAuthnCreateChallenge(r.challenge);n.postMessage(new aa(r.id,i),"*")}catch(o){n.postMessage(new aa(r.id,null,o.toString()),"*")}}if(np(t.data)){const r=t.data;try{const i=await new In(this,this.emitter).processWebAuthnGetChallenge(r.challenge);n.postMessage(new sa(r.id,i),"*")}catch(o){n.postMessage(new sa(r.id,null,o.toString()),"*")}}}}async listenForEvents(){window.addEventListener("message",this.processEvent.bind(this))}setupIFrame(){const t=this.getSDKUrl().toString();if(Wh(new URL(window.location.href),new URL(this.sdkURL)))return null;let n=document.getElementById(xa);return n&&n.src!==t&&(n.remove(),n=null),n||(n=document.createElement("iframe"),n.id=xa,n.allow="publickey-credentials-get *",n.src=t,n.style.display="none",document.body.appendChild(n)),n}async getAvailableAuthenticationMethods(t){const n=[we.Password,we.Totp];switch(t){case kt.EmailAddress:n.push(we.EmailLink,we.OtpViaEmail);break;case kt.PhoneNumber:n.push(we.SmsLink,we.OtpViaSms);break;case kt.Username:break;default:throw new q({name:T.unknown,message:`unhandled handle type: ${t}`})}return navigator&&window.PublicKeyCredential&&ap(t)&&n.unshift(we.Webauthn),n}getUser(t){return new g1(t,this)}async id(t,n,r){return this._id(t,n,r)}createAuthFlow(){const t=new ya(this,this.emitter);return this.authFlow=t,t}clearAuthFlow(t){this.authFlow===t&&(this.authFlow=null)}createRecoveryFlow(){const t=new ya(this,this.emitter);return this.recoveryFlow=t,t}clearRecoveryFlow(t){this.recoveryFlow===t&&(this.recoveryFlow=null)}async _id(t,n,r,o){const i=this.createAuthFlow();try{return await i._id(t,n,r,o)}catch(a){if(await this.processError(a,{authenticationFactor:r,handle:n,previousToken:o}),Ae(a)&&li(a)){const p=await Ze(a),g=await Bs(a);throw new q({name:T.rateLimitError,message:p,cause:a,context:{response:g,authenticationFactor:r,handle:n,oid:t}})}throw Ae(a)&&await yp(a)?new q({name:T.noPasswordSet,message:a.message,context:{handle:n,authenticationFactor:r,oid:t}}):Ae(a)&&await ua(a)?new q({name:T.selfRegistrationNotAllowed,message:a.message,cause:a,context:{handle:n,authenticationFactor:r,oid:t}}):Ae(a)&&await fa(a)?new q({name:T.handlePatternNotAllowed,message:a.message,cause:a,context:{handle:n,authenticationFactor:r,oid:t}}):Ae(a)&&await ha(a)?new q({name:T.signUpAwaitingApproval,message:a.message,cause:a,context:{handle:n,authenticationFactor:r,oid:t}}):Ae(a)&&await xp(a)?new q({name:T.signInAwaitingApproval,message:a.message,cause:a,context:{handle:n,authenticationFactor:r,oid:t}}):Ae(a)&&await ua(a)?new q({name:T.selfRegistrationNotAllowed,message:a.message,context:{handle:n,authenticationFactor:r,oid:t}}):await Qe(a)}finally{this.clearAuthFlow(i)}}async getAvailableIdentifiers(){try{return this.identifiersStorage.getAll()}catch(t){return console.warn(t),[]}}async recover({handle:t,factor:n}){if(!this.oid)throw new q({name:T.invalidSlashIDConfigurationError,message:"oid is required - please initialize the SDK with an organization ID"});if(t.type===kt.Username)throw new q({name:T.recoverNonReachableHandleType,message:"Username is not a reachable handle type"});const r=this.createRecoveryFlow();this.emitter.emit({name:"recoveryFlowStarted",payload:{handle:t,authenticationFactor:n},meta:{access:"public",recoveryFlowId:r.flowId}});try{await r.recover({handle:t,factor:n}),this.recoveryFlow=null,this.emitter.emit({name:"recoveryFlowSucceeded",payload:{handle:t,authenticationFactor:n},meta:{access:"public",recoveryFlowId:r.flowId}})}catch(o){const i=await Ks(o),a={errorText:"recovery_failed",authenticationFactor:n,handle:t,failureDetail:i};throw this.emitter.emit({name:"recoveryFlowFailed",payload:a,meta:{access:"public",recoveryFlowId:r.flowId}}),await Qe(o)}finally{this.clearRecoveryFlow(r)}}getSDKUrl(){const t=new URL(this.sdkURL);return t.searchParams.append("v",$e.raw),t}isLocalScope(t){return window.location.hostname.endsWith(t)}async processError(t,{authenticationFactor:n,handle:r,previousToken:o,challengeId:i}){var a,s;if(Zs(t))return;const c=await $p(t,{authenticationFactor:n,handle:r,previousToken:o,challengeId:i});l1(c)?ac(this).publish("clientSideError",c):this.emitter.emit({name:"idFlowFailed",payload:c,meta:{access:"public",authFlowId:(a=this.authFlow)===null||a===void 0?void 0:a.flowId,recoveryFlowId:(s=this.recoveryFlow)===null||s===void 0?void 0:s.flowId}})}async createAnonymousUser(){const t=tc(this),n=await ec(t);return new E1(n,this)}constructor(t){t&&di(t),this.config=fn(t??{});const{baseURL:n,sdkURL:r,oid:o,analyticsEnabled:i=!0}=this.config;this.baseURL=n,this.sdkURL=r,this.oid=o,this.authFlow=null,this.recoveryFlow=null,this.authnClient=new an(new nt({...rt,basePath:this.baseURL,middleware:[Lt({maxRetries:5,baseDelayMs:500})]})),this.personsClient=new Us(new nt({...rt,basePath:this.baseURL,middleware:[Lt({maxRetries:5,baseDelayMs:500})]})),this.iframe=this.setupIFrame();const a=new m1(this.iframe,this.getSDKUrl().origin);this.identifiersStorage=new et(a),this.credentialStorage=new Rn(a),this.userFromURL=null,this.emitter=S1(),this.emitter.use(this.createFlowScopeMiddleware()),this.emitterDecoratorFactory=p1(),this.analytics=i?new y1({sdk:this}):void 0,this.listenForEvents()}}Jt("lDZ5d");const $1={...be},Ve={...$1},sc=Object.prototype.toString;function ui(e){switch(sc.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Pt(e,Error)}}function pn(e,t){return sc.call(e)===`[object ${t}]`}function fi(e){return pn(e,"ErrorEvent")}function Ca(e){return pn(e,"DOMError")}function I1(e){return pn(e,"DOMException")}function ft(e){return pn(e,"String")}function cc(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function lc(e){return e===null||cc(e)||typeof e!="object"&&typeof e!="function"}function qr(e){return pn(e,"Object")}function Dr(e){return typeof Event<"u"&&Pt(e,Event)}function R1(e){return typeof Element<"u"&&Pt(e,Element)}function q1(e){return pn(e,"RegExp")}function hi(e){return!!(e&&e.then&&typeof e.then=="function")}function D1(e){return qr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function A1(e){return typeof e=="number"&&e!==e}function Pt(e,t){try{return e instanceof t}catch{return!1}}function dc(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function zo(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ka(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const o=e[r];try{dc(o)?n.push("[VueViewModel]"):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function T1(e,t,n=!1){return ft(e)?q1(t)?t.test(e):ft(t)?n?e===t:e.includes(t):!1:!1}function Ar(e,t=[],n=!1){return t.some(r=>T1(e,r,n))}function z1(e,t,n=250,r,o,i,a){if(!i.exception||!i.exception.values||!a||!Pt(a.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=L1(Lo(e,t,o,a.originalException,r,i.exception.values,s,0),n))}function Lo(e,t,n,r,o,i,a,s){if(i.length>=n+1)return i;let c=[...i];if(Pt(r[o],Error)){Sa(a,s);const l=e(t,r[o]),u=c.length;Ea(l,o,u,s),c=Lo(e,t,n,r[o],o,[l,...c],l,u)}return Array.isArray(r.errors)&&r.errors.forEach((l,u)=>{if(Pt(l,Error)){Sa(a,s);const m=e(t,l),h=c.length;Ea(m,`errors[${u}]`,h,s),c=Lo(e,t,n,l,o,[m,...c],m,h)}}),c}function Sa(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Ea(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function L1(e,t){return e.map(n=>(n.value&&(n.value=zo(n.value,t)),n))}function jn(e){return e&&e.Math==Math?e:void 0}const ue=typeof globalThis=="object"&&jn(globalThis)||typeof window=="object"&&jn(window)||typeof self=="object"&&jn(self)||typeof global=="object"&&jn(global)||function(){return this}()||{};function pi(){return ue}function uc(e,t,n){const r=n||ue,o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}const mi=pi(),P1=80;function fc(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let i=0,a=0;const s=" > ",c=s.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,m=!Array.isArray(t)&&t.maxStringLength||P1;for(;n&&i++<r&&(l=O1(n,u),!(l==="html"||i>1&&a+o.length*c+l.length>=m));)o.push(l),a+=l.length,n=n.parentNode;return o.reverse().join(s)}catch{return"<unknown>"}}function O1(e,t){const n=e,r=[];let o,i,a,s,c;if(!n||!n.tagName)return"";if(mi.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const l=t&&t.length?t.filter(m=>n.getAttribute(m)).map(m=>[m,n.getAttribute(m)]):null;if(l&&l.length)l.forEach(m=>{r.push(`[${m[0]}="${m[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),o=n.className,o&&ft(o))for(i=o.split(/\s+/),c=0;c<i.length;c++)r.push(`.${i[c]}`);const u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)a=u[c],s=n.getAttribute(a),s&&r.push(`[${a}="${s}"]`);return r.join("")}function M1(){try{return mi.document.location.href}catch{return""}}function N1(e){if(!mi.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const Pn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,U1="Sentry Logger ",Po=["debug","info","warn","error","log","assert","trace"],wr={};function gi(e){if(!("console"in ue))return e();const t=ue.console,n={},r=Object.keys(wr);r.forEach(o=>{const i=wr[o];n[o]=t[o],t[o]=i});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function F1(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Pn?Po.forEach(n=>{t[n]=(...r)=>{e&&gi(()=>{ue.console[n](`${U1}[${n}]:`,...r)})}}):Po.forEach(n=>{t[n]=()=>{}}),t}const ae=F1(),V1=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function B1(e){return e==="http"||e==="https"}function H1(e,t=!1){const{host:n,path:r,pass:o,port:i,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${a}`}function j1(e){const t=V1.exec(e);if(!t){gi(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,o="",i,a="",s]=t.slice(1);let c="",l=s;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const m=l.match(/^\d+/);m&&(l=m[0])}return hc({host:i,pass:o,path:c,projectId:l,port:a,protocol:n,publicKey:r})}function hc(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function G1(e){if(!Pn)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(a=>e[a]?!1:(ae.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:n.match(/^\d+$/)?B1(r)?t&&isNaN(parseInt(t,10))?(ae.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(ae.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(ae.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function W1(e){const t=typeof e=="string"?j1(e):hc(e);if(!(!t||!G1(t)))return t}function Ie(e,t,n){if(!(t in e))return;const r=e[t],o=n(r);typeof o=="function"&&pc(o,r),e[t]=o}function vr(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Pn&&ae.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function pc(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,vr(e,"__sentry_original__",t)}catch{}}function bi(e){return e.__sentry_original__}function mc(e){if(ui(e))return{message:e.message,name:e.name,stack:e.stack,...Ia(e)};if(Dr(e)){const t={type:e.type,target:$a(e.target),currentTarget:$a(e.currentTarget),...Ia(e)};return typeof CustomEvent<"u"&&Pt(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function $a(e){try{return R1(e)?fc(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Ia(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function K1(e,t=40){const n=Object.keys(mc(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return zo(n[0],t);for(let r=n.length;r>0;r--){const o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length?o:zo(o,t)}return""}function Tt(e){return Oo(e,new Map)}function Oo(e,t){if(Z1(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const o of Object.keys(e))typeof e[o]<"u"&&(r[o]=Oo(e[o],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(o=>{r.push(Oo(o,t))}),r}return e}function Z1(e){if(!qr(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const ho="<anonymous>";function St(e){try{return!e||typeof e!="function"?ho:e.name||ho}catch{return ho}}const sr={},Ra={};function Ut(e,t){sr[e]=sr[e]||[],sr[e].push(t)}function Ft(e,t){Ra[e]||(t(),Ra[e]=!0)}function We(e,t){const n=e&&sr[e];if(n)for(const r of n)try{r(t)}catch(o){Pn&&ae.error(`Error while triggering instrumentation handler.
|
|
10
10
|
Type: ${e}
|
|
11
11
|
Name: ${St(r)}
|
|
12
12
|
Error:`,o)}}function Y1(e){const t="console";Ut(t,e),Ft(t,J1)}function J1(){"console"in ue&&Po.forEach(function(e){e in ue.console&&Ie(ue.console,e,function(t){return wr[e]=t,function(...n){We("console",{args:n,level:e});const o=wr[e];o&&o.apply(ue.console,n)}})})}function Ke(){const e=ue,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function gc(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ct(e){const{message:t,event_id:n}=e;if(t)return t;const r=gc(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Mo(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function No(e,t){const n=gc(e);if(!n)return;const r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){const i={...o&&o.data,...t.data};n.mechanism.data=i}}function X1(e){return Array.isArray(e)?e:[e]}const Yt=ue,Q1=1e3;let qa,Uo,Fo;function em(e){const t="dom";Ut(t,e),Ft(t,tm)}function tm(){if(!Yt.document)return;const e=We.bind(null,"dom"),t=Da(e,!0);Yt.document.addEventListener("click",t,!1),Yt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=Yt[n]&&Yt[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Ie(r,"addEventListener",function(o){return function(i,a,s){if(i==="click"||i=="keypress")try{const c=this,l=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},u=l[i]=l[i]||{refCount:0};if(!u.handler){const m=Da(e);u.handler=m,o.call(this,i,m,s)}u.refCount++}catch{}return o.call(this,i,a,s)}}),Ie(r,"removeEventListener",function(o){return function(i,a,s){if(i==="click"||i=="keypress")try{const c=this,l=c.__sentry_instrumentation_handlers__||{},u=l[i];u&&(u.refCount--,u.refCount<=0&&(o.call(this,i,u.handler,s),u.handler=void 0,delete l[i]),Object.keys(l).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,a,s)}}))})}function nm(e){if(e.type!==Uo)return!1;try{if(!e.target||e.target._sentryId!==Fo)return!1}catch{}return!0}function rm(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Da(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=om(n);if(rm(n.type,r))return;vr(n,"_sentryCaptured",!0),r&&!r._sentryId&&vr(r,"_sentryId",Ke());const o=n.type==="keypress"?"input":n.type;nm(n)||(e({event:n,name:o,global:t}),Uo=n.type,Fo=r?r._sentryId:void 0),clearTimeout(qa),qa=Yt.setTimeout(()=>{Fo=void 0,Uo=void 0},Q1)}}function om(e){try{return e.target}catch{return null}}const Vo=pi();function im(){if(!("fetch"in Vo))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Aa(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function am(){if(typeof EdgeRuntime=="string")return!0;if(!im())return!1;if(Aa(Vo.fetch))return!0;let e=!1;const t=Vo.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Aa(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Pn&&ae.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function sm(e){const t="fetch";Ut(t,e),Ft(t,cm)}function cm(){am()&&Ie(ue,"fetch",function(e){return function(...t){const{method:n,url:r}=lm(t),o={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return We("fetch",{...o}),e.apply(ue,t).then(i=>{const a={...o,endTimestamp:Date.now(),response:i};return We("fetch",a),i},i=>{const a={...o,endTimestamp:Date.now(),error:i};throw We("fetch",a),i})}})}function Bo(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Ta(e){return typeof e=="string"?e:e?Bo(e,"url")?e.url:e.toString?e.toString():"":""}function lm(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Ta(n),method:Bo(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Ta(t),method:Bo(t,"method")?String(t.method).toUpperCase():"GET"}}let Gn=null;function dm(e){const t="error";Ut(t,e),Ft(t,um)}function um(){Gn=ue.onerror,ue.onerror=function(e,t,n,r,o){return We("error",{column:r,error:o,line:n,msg:e,url:t}),Gn&&!Gn.__SENTRY_LOADER__?Gn.apply(this,arguments):!1},ue.onerror.__SENTRY_INSTRUMENTED__=!0}let Wn=null;function fm(e){const t="unhandledrejection";Ut(t,e),Ft(t,hm)}function hm(){Wn=ue.onunhandledrejection,ue.onunhandledrejection=function(e){return We("unhandledrejection",e),Wn&&!Wn.__SENTRY_LOADER__?Wn.apply(this,arguments):!0},ue.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Kn=pi();function pm(){const e=Kn.chrome,t=e&&e.app&&e.app.runtime,n="history"in Kn&&!!Kn.history.pushState&&!!Kn.history.replaceState;return!t&&n}const Cn=ue;let Zn;function mm(e){const t="history";Ut(t,e),Ft(t,gm)}function gm(){if(!pm())return;const e=Cn.onpopstate;Cn.onpopstate=function(...n){const r=Cn.location.href,o=Zn;if(Zn=r,We("history",{from:o,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const o=r.length>2?r[2]:void 0;if(o){const i=Zn,a=String(o);Zn=a,We("history",{from:i,to:a})}return n.apply(this,r)}}Ie(Cn.history,"pushState",t),Ie(Cn.history,"replaceState",t)}const bm=ue,En="__sentry_xhr_v3__";function wm(e){const t="xhr";Ut(t,e),Ft(t,vm)}function vm(){if(!bm.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;Ie(e,"open",function(t){return function(...n){const r=Date.now(),o=ft(n[0])?n[0].toUpperCase():void 0,i=_m(n[1]);if(!o||!i)return t.apply(this,n);this[En]={method:o,url:i,request_headers:{}},o==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const a=()=>{const s=this[En];if(s&&this.readyState===4){try{s.status_code=this.status}catch{}const c={args:[o,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};We("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Ie(this,"onreadystatechange",function(s){return function(...c){return a(),s.apply(this,c)}}):this.addEventListener("readystatechange",a),Ie(this,"setRequestHeader",function(s){return function(...c){const[l,u]=c,m=this[En];return m&&ft(l)&&ft(u)&&(m.request_headers[l.toLowerCase()]=u),s.apply(this,c)}}),t.apply(this,n)}}),Ie(e,"send",function(t){return function(...n){const r=this[En];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const o={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return We("xhr",o),t.apply(this,n)}})}function _m(e){if(ft(e))return e;try{return e.toString()}catch{}}function ym(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(o){if(e)return t.has(o)?!0:(t.add(o),!1);for(let i=0;i<t.length;i++)if(t[i]===o)return!0;return t.push(o),!1}function r(o){if(e)t.delete(o);else for(let i=0;i<t.length;i++)if(t[i]===o){t.splice(i,1);break}}return[n,r]}function xm(e,t=100,n=1/0){try{return Ho("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function bc(e,t=3,n=100*1024){const r=xm(e,t);return Em(r)>n?bc(e,t-1,n):r}function Ho(e,t,n=1/0,r=1/0,o=ym()){const[i,a]=o;if(t==null||["number","boolean","string"].includes(typeof t)&&!A1(t))return t;const s=Cm(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return s.replace("object ","");if(i(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const p=l.toJSON();return Ho("",p,c-1,r,o)}catch{}const u=Array.isArray(t)?[]:{};let m=0;const h=mc(t);for(const p in h){if(!Object.prototype.hasOwnProperty.call(h,p))continue;if(m>=r){u[p]="[MaxProperties ~]";break}const g=h[p];u[p]=Ho(p,g,c-1,r,o),m++}return a(t),u}function Cm(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(dc(t))return"[VueViewModel]";if(D1(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${St(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=km(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function km(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Sm(e){return~-encodeURI(e).split(/%..|./).length}function Em(e){return Sm(JSON.stringify(e))}var ct;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(ct||(ct={}));class xt{constructor(t){xt.prototype.__init.call(this),xt.prototype.__init2.call(this),xt.prototype.__init3.call(this),xt.prototype.__init4.call(this),this._state=ct.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new xt((r,o)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(a){o(a)}},i=>{if(!n)o(i);else try{r(n(i))}catch(a){o(a)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new xt((n,r)=>{let o,i;return this.then(a=>{i=!1,o=a,t&&t()},a=>{i=!0,o=a,t&&t()}).then(()=>{if(i){r(o);return}n(o)})})}__init(){this._resolve=t=>{this._setResult(ct.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(ct.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===ct.PENDING){if(hi(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===ct.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===ct.RESOLVED&&n[1](this._value),this._state===ct.REJECTED&&n[2](this._value),n[0]=!0)})}}}function po(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const $m=["fatal","error","warning","log","info","debug"];function Im(e){return e==="warn"?"warning":$m.includes(e)?e:"log"}const wc=1e3;function wi(){return Date.now()/wc}function Rm(){const{performance:e}=ue;if(!e||!e.now)return wi;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/wc}const vc=Rm();(()=>{const{performance:e}=ue;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=o<t,a=e.timing&&e.timing.navigationStart,c=typeof a=="number"?Math.abs(a+n-r):t,l=c<t;return i||l?o<=c?e.timeOrigin:a:r})();const He=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,_c="production";function qm(){return uc("globalEventProcessors",()=>[])}function jo(e,t,n,r=0){return new xt((o,i)=>{const a=e[r];if(t===null||typeof a!="function")o(t);else{const s=a({...t},n);He&&a.id&&s===null&&ae.log(`Event processor "${a.id}" dropped event`),hi(s)?s.then(c=>jo(e,c,n,r+1).then(o)).then(null,i):jo(e,s,n,r+1).then(o).then(null,i)}})}function Dm(e){const t=vc(),n={sid:Ke(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Tm(n)};return e&&Tr(n,e),n}function Tr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||vc(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Ke()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Am(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Tr(e,n)}function Tm(e){return Tt({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const zm=1;function Lm(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:i,status:a,tags:s,origin:c}=_r(e);return Tt({data:r,op:o,parent_span_id:i,span_id:t,status:a,tags:s,trace_id:n,origin:c})}function _r(e){return Pm(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function Pm(e){return typeof e.getSpanJSON=="function"}function Om(e){const{traceFlags:t}=e.spanContext();return!!(t&zm)}function Mm(e){if(e)return Nm(e)?{captureContext:e}:Fm(e)?{captureContext:e}:e}function Nm(e){return e instanceof zt||typeof e=="function"}const Um=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Fm(e){return Object.keys(e).some(t=>Um.includes(t))}function yc(e,t){return Vt().captureException(e,Mm(t))}function xc(e,t){return Vt().captureEvent(e,t)}function Ot(e,t){Vt().addBreadcrumb(e,t)}function Cc(...e){const t=Vt();if(e.length===2){const[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function Ne(){return Vt().getClient()}function Vm(){return Vt().getScope()}function kc(e){return e.transaction}function Bm(e,t,n){const r=t.getOptions(),{publicKey:o}=t.getDsn()||{},{segment:i}=n&&n.getUser()||{},a=Tt({environment:r.environment||_c,release:r.release,user_segment:i,public_key:o,trace_id:e});return t.emit&&t.emit("createDsc",a),a}function Hm(e){const t=Ne();if(!t)return{};const n=Bm(_r(e).trace_id||"",t,Vm()),r=kc(e);if(!r)return n;const o=r&&r._frozenDynamicSamplingContext;if(o)return o;const{sampleRate:i,source:a}=r.metadata;i!=null&&(n.sample_rate=`${i}`);const s=_r(r);return a&&a!=="url"&&(n.transaction=s.description),n.sampled=String(Om(r)),t.emit&&t.emit("createDsc",n),n}function jm(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;Gm(e,t),r&&Zm(e,r),Ym(e,n),Wm(e,o),Km(e,i)}function Gm(e,t){const{extra:n,tags:r,user:o,contexts:i,level:a,transactionName:s}=t,c=Tt(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=Tt(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=Tt(o);u&&Object.keys(u).length&&(e.user={...u,...e.user});const m=Tt(i);m&&Object.keys(m).length&&(e.contexts={...m,...e.contexts}),a&&(e.level=a),s&&(e.transaction=s)}function Wm(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Km(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Zm(e,t){e.contexts={trace:Lm(t),...e.contexts};const n=kc(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:Hm(t),...e.sdkProcessingMetadata};const r=_r(n).description;r&&(e.tags={transaction:r,...e.tags})}}function Ym(e,t){e.fingerprint=e.fingerprint?X1(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const Jm=100;class zt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=za()}static clone(t){return t?t.clone():new zt}clone(){const t=new zt;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&Tr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t;if(n instanceof zt){const r=n.getScopeData();this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(qr(n)){const r=t;this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=za(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Jm;if(r<=0)return this;const o={timestamp:wi(),...t},i=this._breadcrumbs;return i.push(o),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:o,_extra:i,_user:a,_level:s,_fingerprint:c,_eventProcessors:l,_propagationContext:u,_sdkProcessingMetadata:m,_transactionName:h,_span:p}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:o,extra:i,user:a,level:s,fingerprint:c||[],eventProcessors:l,propagationContext:u,sdkProcessingMetadata:m,transactionName:h,span:p}}applyToEvent(t,n={},r=[]){jm(t,this.getScopeData());const o=[...r,...qm(),...this._eventProcessors];return jo(o,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:Ke();if(!this._client)return ae.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){const o=r&&r.event_id?r.event_id:Ke();if(!this._client)return ae.warn("No client configured on scope - will not capture message!"),o;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o},this),o}captureEvent(t,n){const r=n&&n.event_id?n.event_id:Ke();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(ae.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function za(){return{traceId:Ke(),spanId:Ke().substring(16)}}const Xm="7.118.0",Sc=parseFloat(Xm),Qm=100;class Ec{constructor(t,n,r,o=Sc){this._version=o;let i;n?i=n:(i=new zt,i.setClient(t));let a;r?a=r:(a=new zt,a.setClient(t)),this._stack=[{scope:i}],t&&this.bindClient(t),this._isolationScope=a}isOlderThan(t){return this._version<t}bindClient(t){const n=this.getStackTop();n.client=t,n.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const n=this.pushScope();let r;try{r=t(n)}catch(o){throw this.popScope(),o}return hi(r)?r.then(o=>(this.popScope(),o),o=>{throw this.popScope(),o}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:Ke(),o=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:o,...n,event_id:r}),r}captureMessage(t,n,r){const o=this._lastEventId=r&&r.event_id?r.event_id:Ke(),i=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o}),o}captureEvent(t,n){const r=n&&n.event_id?n.event_id:Ke();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){const{scope:r,client:o}=this.getStackTop();if(!o)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Qm}=o.getOptions&&o.getOptions()||{};if(a<=0)return;const c={timestamp:wi(),...t},l=i?gi(()=>i(c,n)):c;l!==null&&(o.emit&&o.emit("beforeAddBreadcrumb",l,n),r.addBreadcrumb(l,a))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){const{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){const n=La(this);try{t(this)}finally{La(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return He&&ae.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){const r=this._callExtensionMethod("startTransaction",t,n);return He&&!r&&(this.getClient()?ae.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
@@ -26,13 +26,13 @@ Url: ${yr(e)}`),!0)}function lg(e,t){return e.type||!t||!t.length?!1:hg(e).some(
|
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the MIT license found in the
|
|
28
28
|
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/var ke=typeof Symbol=="function"&&Symbol.for,_i=ke?Symbol.for("react.element"):60103,yi=ke?Symbol.for("react.portal"):60106,Lr=ke?Symbol.for("react.fragment"):60107,Pr=ke?Symbol.for("react.strict_mode"):60108,Or=ke?Symbol.for("react.profiler"):60114,Mr=ke?Symbol.for("react.provider"):60109,Nr=ke?Symbol.for("react.context"):60110,xi=ke?Symbol.for("react.async_mode"):60111,Ur=ke?Symbol.for("react.concurrent_mode"):60111,Fr=ke?Symbol.for("react.forward_ref"):60112,Vr=ke?Symbol.for("react.suspense"):60113,Jg=ke?Symbol.for("react.suspense_list"):60120,Br=ke?Symbol.for("react.memo"):60115,Hr=ke?Symbol.for("react.lazy"):60116,Xg=ke?Symbol.for("react.block"):60121,Qg=ke?Symbol.for("react.fundamental"):60117,e0=ke?Symbol.for("react.responder"):60118,t0=ke?Symbol.for("react.scope"):60119;function Ue(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case _i:switch(e=e.type,e){case xi:case Ur:case Lr:case Or:case Pr:case Vr:return e;default:switch(e=e&&e.$$typeof,e){case Nr:case Fr:case Hr:case Br:case Mr:return e;default:return t}}case yi:return t}}}function Xc(e){return Ue(e)===Ur}se.AsyncMode=xi;se.ConcurrentMode=Ur;se.ContextConsumer=Nr;se.ContextProvider=Mr;se.Element=_i;se.ForwardRef=Fr;se.Fragment=Lr;se.Lazy=Hr;se.Memo=Br;se.Portal=yi;se.Profiler=Or;se.StrictMode=Pr;se.Suspense=Vr;se.isAsyncMode=function(e){return Xc(e)||Ue(e)===xi};se.isConcurrentMode=Xc;se.isContextConsumer=function(e){return Ue(e)===Nr};se.isContextProvider=function(e){return Ue(e)===Mr};se.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===_i};se.isForwardRef=function(e){return Ue(e)===Fr};se.isFragment=function(e){return Ue(e)===Lr};se.isLazy=function(e){return Ue(e)===Hr};se.isMemo=function(e){return Ue(e)===Br};se.isPortal=function(e){return Ue(e)===yi};se.isProfiler=function(e){return Ue(e)===Or};se.isStrictMode=function(e){return Ue(e)===Pr};se.isSuspense=function(e){return Ue(e)===Vr};se.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Lr||e===Ur||e===Or||e===Pr||e===Vr||e===Jg||typeof e=="object"&&e!==null&&(e.$$typeof===Hr||e.$$typeof===Br||e.$$typeof===Mr||e.$$typeof===Nr||e.$$typeof===Fr||e.$$typeof===Qg||e.$$typeof===e0||e.$$typeof===t0||e.$$typeof===Xg)};se.typeOf=Ue;Jc.exports=se;var n0=Jc.exports,Qc=n0,r0={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o0={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},el={};el[Qc.ForwardRef]=r0;el[Qc.Memo]=o0;const i0=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function a0(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Ha={componentStack:null,error:null,eventId:null};function s0(e,t){const n=new WeakMap;function r(o,i){if(!n.has(o)){if(o.cause)return n.set(o,!0),r(o.cause,i);o.cause=i}}r(e,t)}class Ci extends d.Component{constructor(t){super(t),Ci.prototype.__init.call(this),this.state=Ha,this._openFallbackReportDialog=!0;const n=Ne();n&&n.on&&t.showDialog&&(this._openFallbackReportDialog=!1,n.on("afterSendEvent",r=>{!r.type&&r.event_id===this._lastEventId&&Ba({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:n}){const{beforeCapture:r,onError:o,showDialog:i,dialogOptions:a}=this.props;Cc(s=>{if(a0(d.version)&&ui(t)){const l=new Error(t.message);l.name=`React ErrorBoundary ${t.name}`,l.stack=n,s0(t,l)}r&&r(s,t,n);const c=yc(t,{captureContext:{contexts:{react:{componentStack:n}}},mechanism:{handled:!!this.props.fallback}});o&&o(t,n,c),i&&(this._lastEventId=c,this._openFallbackReportDialog&&Ba({...a,eventId:c})),this.setState({error:t,componentStack:n,eventId:c})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:o}=this.props;o&&o(t,n,r)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:n,componentStack:r,eventId:o}=this.state;t&&t(n,r,o),this.setState(Ha)}}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.error){let o;return typeof t=="function"?o=t({error:r.error,componentStack:r.componentStack,resetError:this.resetErrorBoundary,eventId:r.eventId}):o=t,d.isValidElement(o)?o:(t&&i0&&ae.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}}function tl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=tl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ge(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=tl(e))&&(r&&(r+=" "),r+=t);return r}var c0="y2413r0",l0="y2413r1",d0="y2413r2",u0="y2413r3",ja="sid-theme-root";function nl(){return typeof window<"u"&&globalThis===window}function rl({theme:e,className:t}){return Ge(ja,`${ja}__${e}`,u0,{[c0]:e==="dark",[d0]:e==="auto",[l0]:e==="light"},t)}function f0({theme:e,className:t}){const n=rl({theme:e,className:t});document.body.classList.add(...n.split(" "))}const ol=({children:e})=>
|
|
29
|
+
*/var ke=typeof Symbol=="function"&&Symbol.for,_i=ke?Symbol.for("react.element"):60103,yi=ke?Symbol.for("react.portal"):60106,Lr=ke?Symbol.for("react.fragment"):60107,Pr=ke?Symbol.for("react.strict_mode"):60108,Or=ke?Symbol.for("react.profiler"):60114,Mr=ke?Symbol.for("react.provider"):60109,Nr=ke?Symbol.for("react.context"):60110,xi=ke?Symbol.for("react.async_mode"):60111,Ur=ke?Symbol.for("react.concurrent_mode"):60111,Fr=ke?Symbol.for("react.forward_ref"):60112,Vr=ke?Symbol.for("react.suspense"):60113,Jg=ke?Symbol.for("react.suspense_list"):60120,Br=ke?Symbol.for("react.memo"):60115,Hr=ke?Symbol.for("react.lazy"):60116,Xg=ke?Symbol.for("react.block"):60121,Qg=ke?Symbol.for("react.fundamental"):60117,e0=ke?Symbol.for("react.responder"):60118,t0=ke?Symbol.for("react.scope"):60119;function Ue(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case _i:switch(e=e.type,e){case xi:case Ur:case Lr:case Or:case Pr:case Vr:return e;default:switch(e=e&&e.$$typeof,e){case Nr:case Fr:case Hr:case Br:case Mr:return e;default:return t}}case yi:return t}}}function Xc(e){return Ue(e)===Ur}se.AsyncMode=xi;se.ConcurrentMode=Ur;se.ContextConsumer=Nr;se.ContextProvider=Mr;se.Element=_i;se.ForwardRef=Fr;se.Fragment=Lr;se.Lazy=Hr;se.Memo=Br;se.Portal=yi;se.Profiler=Or;se.StrictMode=Pr;se.Suspense=Vr;se.isAsyncMode=function(e){return Xc(e)||Ue(e)===xi};se.isConcurrentMode=Xc;se.isContextConsumer=function(e){return Ue(e)===Nr};se.isContextProvider=function(e){return Ue(e)===Mr};se.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===_i};se.isForwardRef=function(e){return Ue(e)===Fr};se.isFragment=function(e){return Ue(e)===Lr};se.isLazy=function(e){return Ue(e)===Hr};se.isMemo=function(e){return Ue(e)===Br};se.isPortal=function(e){return Ue(e)===yi};se.isProfiler=function(e){return Ue(e)===Or};se.isStrictMode=function(e){return Ue(e)===Pr};se.isSuspense=function(e){return Ue(e)===Vr};se.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Lr||e===Ur||e===Or||e===Pr||e===Vr||e===Jg||typeof e=="object"&&e!==null&&(e.$$typeof===Hr||e.$$typeof===Br||e.$$typeof===Mr||e.$$typeof===Nr||e.$$typeof===Fr||e.$$typeof===Qg||e.$$typeof===e0||e.$$typeof===t0||e.$$typeof===Xg)};se.typeOf=Ue;Jc.exports=se;var n0=Jc.exports,Qc=n0,r0={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o0={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},el={};el[Qc.ForwardRef]=r0;el[Qc.Memo]=o0;const i0=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function a0(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Ha={componentStack:null,error:null,eventId:null};function s0(e,t){const n=new WeakMap;function r(o,i){if(!n.has(o)){if(o.cause)return n.set(o,!0),r(o.cause,i);o.cause=i}}r(e,t)}class Ci extends d.Component{constructor(t){super(t),Ci.prototype.__init.call(this),this.state=Ha,this._openFallbackReportDialog=!0;const n=Ne();n&&n.on&&t.showDialog&&(this._openFallbackReportDialog=!1,n.on("afterSendEvent",r=>{!r.type&&r.event_id===this._lastEventId&&Ba({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:n}){const{beforeCapture:r,onError:o,showDialog:i,dialogOptions:a}=this.props;Cc(s=>{if(a0(d.version)&&ui(t)){const l=new Error(t.message);l.name=`React ErrorBoundary ${t.name}`,l.stack=n,s0(t,l)}r&&r(s,t,n);const c=yc(t,{captureContext:{contexts:{react:{componentStack:n}}},mechanism:{handled:!!this.props.fallback}});o&&o(t,n,c),i&&(this._lastEventId=c,this._openFallbackReportDialog&&Ba({...a,eventId:c})),this.setState({error:t,componentStack:n,eventId:c})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:o}=this.props;o&&o(t,n,r)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:n,componentStack:r,eventId:o}=this.state;t&&t(n,r,o),this.setState(Ha)}}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.error){let o;return typeof t=="function"?o=t({error:r.error,componentStack:r.componentStack,resetError:this.resetErrorBoundary,eventId:r.eventId}):o=t,d.isValidElement(o)?o:(t&&i0&&ae.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}}function tl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=tl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ge(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=tl(e))&&(r&&(r+=" "),r+=t);return r}var c0="y2413r0",l0="y2413r1",d0="y2413r2",u0="y2413r3",ja="sid-theme-root";function nl(){return typeof window<"u"&&globalThis===window}function rl({theme:e,className:t}){return Ge(ja,`${ja}__${e}`,u0,{[c0]:e==="dark",[d0]:e==="auto",[l0]:e==="light"},t)}function f0({theme:e,className:t}){const n=rl({theme:e,className:t});document.body.classList.add(...n.split(" "))}const ol=({children:e})=>C.jsx("div",{className:rl({theme:"light"}),children:e}),h0=({children:e,theme:t="light",className:n})=>{const[r,o]=V.useState(!1);return d.useLayoutEffect(()=>{r||o(!0)},[n,r,t]),d.useLayoutEffect(()=>{r&&f0({theme:t,className:n})},[n,r,t]),r?C.jsx(C.Fragment,{children:e}):C.jsx(ol,{children:e})};function p0({children:e,theme:t="light",className:n}){return nl()?C.jsx(h0,{theme:t,className:n,children:e}):C.jsx(ol,{children:e})}var m0={default:"_92y0ua2 _92y0ua1",short:"_92y0ua3 _92y0ua1"};const ki=({className:e,variant:t="default"})=>C.jsx("div",{className:Ge(m0[t],e)});var g0={primary:"eccmw2 eccmw0",secondary:"eccmw3 eccmw0",secondaryMd:"eccmw4 eccmw0 eccmw1",neutral:"eccmw5 eccmw0",neutralMd:"eccmw6 eccmw0 eccmw1",ghost:"eccmw7 eccmw0",ghostMd:"eccmw8 eccmw0 eccmw1"},b0="eccmw9",w0="eccmwa",v0={primary:"eccmwb",secondary:"eccmwc",secondaryMd:"eccmwd",neutral:"eccmwe",neutralMd:"eccmwf",ghost:"eccmwg",ghostMd:"eccmwh"};const il=d.forwardRef(({children:e,onClick:t,className:n,type:r="button",variant:o="primary",testId:i,icon:a,disabled:s,loading:c=!1,style:l},u)=>C.jsx("button",{style:l,ref:u,"data-testid":i,type:r,disabled:s,className:Ge("sid-button",`sid-button--${o}`,g0[o],{[b0]:s},n),onClick:t,children:c?C.jsx(ki,{variant:"short",className:v0[o]}):C.jsxs(C.Fragment,{children:[a?C.jsx("i",{className:w0,children:a}):null,e]})}));il.displayName="Button";var _0="_1doytsg0",y0="_1doytsg3",x0="_1doytsg4",C0={text:"_1doytsg6 _1doytsg5",email:"_1doytsg7 _1doytsg5",password:"_1doytsg8 _1doytsg5",tel:"_1doytsg9 _1doytsg5"},k0="_1doytsga",S0="_1doytsgc";const E0=({id:e,name:t,label:n,placeholder:r="",autoComplete:o="",value:i,onChange:a,type:s="text",style:c})=>{const l=d.useCallback(u=>{a(u)},[a]);return C.jsxs("div",{className:C0[s],children:[C.jsx("label",{htmlFor:e,className:k0,children:n}),C.jsx("input",{style:c,type:s,id:e,name:t,className:_0,placeholder:r,value:i,onChange:l,autoComplete:o})]})},Si=`
|
|
30
30
|
@media (prefers-color-scheme: dark) {
|
|
31
31
|
.sid-theme-root__auto path { fill: white; }
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.sid-theme-root__dark path { fill: white; }
|
|
35
|
-
`;function Ga(){return x.jsxs("svg",{width:"5",height:"20",viewBox:"0 0 5 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 0C3.32843 1.19209e-07 4 0.671573 4 1.5L4 11.5C4 12.3284 3.32843 13 2.5 13C1.67157 13 1 12.3284 1 11.5L1 1.5C1 0.671573 1.67157 -1.19209e-07 2.5 0Z",fill:"white"}),x.jsx("path",{d:"M4.5 18C4.5 19.1046 3.60457 20 2.5 20C1.39543 20 0.5 19.1046 0.5 18C0.5 16.8954 1.39543 16 2.5 16C3.60457 16 4.5 16.8954 4.5 18Z",fill:"white"})]})}const $0=()=>x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("style",{children:Si}),x.jsx("g",{clipPath:"url(#clip0_2610_9920)",children:x.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.220551 7.4C1.00905 5.8258 3.50342 2 8.00001 2C12.4966 2 14.991 5.8258 15.7796 7.4C16.0733 7.98635 16.0737 8.0153 15.7796 8.60228C14.99 10.1778 12.4949 14 8.00001 14C3.50298 14 1.00762 10.1738 0.219399 8.6C-0.0739824 8.01422 -0.0726647 7.98539 0.220551 7.4ZM8 12C10.2091 12 12 10.2091 12 8C12 5.79086 10.2091 4 8 4C5.79086 4 4 5.79086 4 8C4 10.2091 5.79086 12 8 12ZM9.5 8C9.5 8.82843 8.82843 9.5 8 9.5C7.17157 9.5 6.5 8.82843 6.5 8C6.5 7.17157 7.17157 6.5 8 6.5C8.82843 6.5 9.5 7.17157 9.5 8Z",fill:"#142049"})}),x.jsx("defs",{children:x.jsx("clipPath",{id:"clip0_2610_9920",children:x.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),I0=()=>x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("style",{children:Si}),x.jsxs("g",{clipPath:"url(#clip0_2610_9933)",children:[x.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.220551 7.4C1.00905 5.8258 3.50342 2 8.00001 2C12.4966 2 14.991 5.8258 15.7796 7.4C16.0733 7.98635 16.0737 8.0153 15.7796 8.60228C14.99 10.1778 12.4949 14 8.00001 14C3.50298 14 1.00762 10.1738 0.219399 8.6C-0.0739824 8.01422 -0.0726647 7.98539 0.220551 7.4ZM8 12C10.2091 12 12 10.2091 12 8C12 5.79086 10.2091 4 8 4C5.79086 4 4 5.79086 4 8C4 10.2091 5.79086 12 8 12ZM9.5 8C9.5 8.82843 8.82843 9.5 8 9.5C7.17157 9.5 6.5 8.82843 6.5 8C6.5 7.17157 7.17157 6.5 8 6.5C8.82843 6.5 9.5 7.17157 9.5 8Z",fill:"#142049"}),x.jsx("path",{d:"M2.34314 2.34315L13.6568 13.6569",stroke:"#142049",strokeWidth:"1.5",strokeLinecap:"round"})]}),x.jsx("defs",{children:x.jsx("clipPath",{id:"clip0_2610_9933",children:x.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),al=()=>x.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("style",{children:Si}),x.jsx("path",{d:"M12.686 10L2 30.228H5.198L15.884 10H12.686Z",fill:"#2A6AFF"}),x.jsx("path",{d:"M19.7923 15.694C20.9373 15.694 21.8723 14.732 21.8723 13.588C21.8723 12.444 20.9373 11.482 19.7923 11.482C18.6223 11.482 17.6873 12.444 17.6873 13.588C17.6873 14.732 18.6233 15.694 19.7933 15.694H19.7923ZM18.0773 17.514V30.228H21.4573V17.514H18.0773ZM34.1883 10V18.502C33.172 17.6398 31.8809 17.1695 30.5483 17.176C26.8563 17.176 24.0743 20.14 24.0743 23.884C24.0743 27.628 26.8563 30.592 30.5483 30.592C32.0823 30.592 33.4343 30.02 34.4483 29.032V30.228H37.5683V10H34.1883ZM30.9383 27.42C28.9883 27.42 27.5583 25.912 27.5583 23.884C27.5583 21.856 28.9883 20.348 30.9383 20.348C32.8883 20.348 34.3183 21.856 34.3183 23.884C34.3183 25.912 32.8883 27.42 30.9383 27.42Z",fill:"#142049"})]}),Wa=e=>{const[t,n]=d.useState(!1);return x.jsxs("div",{className:Ge("sid-input","sid-input--password",y0,e.error&&x0,e.className),style:e.style,children:[x.jsx(E0,{...e,type:t?"text":"password"}),x.jsx("button",{tabIndex:-1,className:S0,type:"button",onClick:()=>n(!t),children:t?x.jsx(I0,{}):x.jsx($0,{})})]})};var R0="_1rf2mux3",q0="_1rf2mux5",D0={blue:"_1rf2mux6 _1rf2mux4",red:"_1rf2mux7 _1rf2mux4",primary:"_1rf2mux8 _1rf2mux4"},A0="_1rf2muxa",T0={blue:"_1rf2muxb _1rf2mux9",red:"_1rf2muxc _1rf2mux9",primary:"_1rf2muxd _1rf2mux9"},z0="_1rf2muxf",L0={blue:"_1rf2muxg _1rf2muxe",red:"_1rf2muxh _1rf2muxe",primary:"_1rf2muxi _1rf2muxe"},P0="_1rf2muxj";const qn=({children:e,className:t,variant:n="blue",shouldAnimate:r=!0})=>x.jsxs("div",{className:Ge(R0,t),children:[x.jsx("div",{className:Ge(D0[n],{[q0]:r})}),x.jsx("div",{className:Ge(T0[n],{[A0]:r})}),x.jsx("div",{className:Ge(L0[n],{[z0]:r})}),x.jsx("div",{className:P0,children:e})]});function O0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Za(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ka(Object(n),!0).forEach(function(r){O0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ka(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var M0=(e,t,n)=>{for(var r of Object.keys(e)){var o;if(e[r]!==((o=t[r])!==null&&o!==void 0?o:n[r]))return!1}return!0},sl=e=>t=>{var n=e.defaultClassName,r=Za(Za({},e.defaultVariants),t);for(var o in r){var i,a=(i=r[o])!==null&&i!==void 0?i:e.defaultVariants[o];if(a!=null){var s=a;typeof s=="boolean"&&(s=s===!0?"true":"false");var c=e.variantClassNames[o][s];c&&(n+=" "+c)}}for(var[l,u]of e.compoundVariants)M0(l,r,e.defaultVariants)&&(n+=" "+u);return n},N0=sl({defaultClassName:"s3l9sv0",variantClassNames:{direction:{vertical:"s3l9sv1",horizontal:"s3l9sv2"},space:{between:"s3l9sv3",evenly:"s3l9sv4"}},defaultVariants:{direction:"vertical"},compoundVariants:[]});function U0(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F0(e){var t=U0(e,"string");return typeof t=="symbol"?t:String(t)}function V0(e,t,n){return t=F0(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function go(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ya(Object(n),!0).forEach(function(r){V0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var B0=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Object.assign({},...n.map(c=>c.styles)),i=Object.keys(o),a=i.filter(c=>"mappings"in o[c]),s=c=>{var l=[],u={},m=go({},c),h=!1;for(var p of a){var g=c[p];if(g!=null){var f=o[p];h=!0;for(var w of f.mappings)u[w]=g,m[w]==null&&delete m[w]}}var y=h?go(go({},u),m):c,v=function(){var I=y[_],R=o[_];try{if(R.mappings)return"continue";if(typeof I=="string"||typeof I=="number")l.push(R.values[I].defaultClass);else if(Array.isArray(I))for(var D=0;D<I.length;D++){var P=I[D];if(P!=null){var G=R.responsiveArray[D];l.push(R.values[P].conditions[G])}}else for(var H in I){var j=I[H];j!=null&&l.push(R.values[j].conditions[H])}}catch(J){throw J}};for(var _ in y)var C=v();return e(l.join(" "))};return Object.assign(s,{properties:new Set(i)})},H0=e=>e,j0=function(){return B0(H0)(...arguments)},cl=j0({conditions:{defaultCondition:"lightMode",conditionNames:["lightMode","darkMode"],responsiveArray:void 0},styles:{color:{values:{background:{conditions:{lightMode:"_1hbz9ox0",darkMode:"_1hbz9ox1"},defaultClass:"_1hbz9ox0"},mute:{conditions:{lightMode:"_1hbz9ox2",darkMode:"_1hbz9ox3"},defaultClass:"_1hbz9ox2"},panel:{conditions:{lightMode:"_1hbz9ox4",darkMode:"_1hbz9ox5"},defaultClass:"_1hbz9ox4"},foreground:{conditions:{lightMode:"_1hbz9ox6",darkMode:"_1hbz9ox7"},defaultClass:"_1hbz9ox6"},contrast:{conditions:{lightMode:"_1hbz9ox8",darkMode:"_1hbz9ox9"},defaultClass:"_1hbz9ox8"},secondary:{conditions:{lightMode:"_1hbz9oxa",darkMode:"_1hbz9oxb"},defaultClass:"_1hbz9oxa"},tertiary:{conditions:{lightMode:"_1hbz9oxc",darkMode:"_1hbz9oxd"},defaultClass:"_1hbz9oxc"},placeholder:{conditions:{lightMode:"_1hbz9oxe",darkMode:"_1hbz9oxf"},defaultClass:"_1hbz9oxe"},smooth:{conditions:{lightMode:"_1hbz9oxg",darkMode:"_1hbz9oxh"},defaultClass:"_1hbz9oxg"},subtle:{conditions:{lightMode:"_1hbz9oxi",darkMode:"_1hbz9oxj"},defaultClass:"_1hbz9oxi"},soft:{conditions:{lightMode:"_1hbz9oxk",darkMode:"_1hbz9oxl"},defaultClass:"_1hbz9oxk"},offset:{conditions:{lightMode:"_1hbz9oxm",darkMode:"_1hbz9oxn"},defaultClass:"_1hbz9oxm"},primary:{conditions:{lightMode:"_1hbz9oxo",darkMode:"_1hbz9oxp"},defaultClass:"_1hbz9oxo"},primaryHover:{conditions:{lightMode:"_1hbz9oxq",darkMode:"_1hbz9oxr"},defaultClass:"_1hbz9oxq"},transparent:{conditions:{lightMode:"_1hbz9oxs",darkMode:"_1hbz9oxt"},defaultClass:"_1hbz9oxs"},error:{conditions:{lightMode:"_1hbz9oxu",darkMode:"_1hbz9oxv"},defaultClass:"_1hbz9oxu"},auxiliary:{conditions:{lightMode:"_1hbz9oxw",darkMode:"_1hbz9oxx"},defaultClass:"_1hbz9oxw"},success:{conditions:{lightMode:"_1hbz9oxy",darkMode:"_1hbz9oxz"},defaultClass:"_1hbz9oxy"},foregroundSuccess:{conditions:{lightMode:"_1hbz9ox10",darkMode:"_1hbz9ox11"},defaultClass:"_1hbz9ox10"},backgroundSuccess:{conditions:{lightMode:"_1hbz9ox12",darkMode:"_1hbz9ox13"},defaultClass:"_1hbz9ox12"},failure:{conditions:{lightMode:"_1hbz9ox14",darkMode:"_1hbz9ox15"},defaultClass:"_1hbz9ox14"},foregroundFailure:{conditions:{lightMode:"_1hbz9ox16",darkMode:"_1hbz9ox17"},defaultClass:"_1hbz9ox16"},backgroundFailure:{conditions:{lightMode:"_1hbz9ox18",darkMode:"_1hbz9ox19"},defaultClass:"_1hbz9ox18"}}},backgroundColor:{values:{background:{conditions:{lightMode:"_1hbz9ox1a",darkMode:"_1hbz9ox1b"},defaultClass:"_1hbz9ox1a"},mute:{conditions:{lightMode:"_1hbz9ox1c",darkMode:"_1hbz9ox1d"},defaultClass:"_1hbz9ox1c"},panel:{conditions:{lightMode:"_1hbz9ox1e",darkMode:"_1hbz9ox1f"},defaultClass:"_1hbz9ox1e"},foreground:{conditions:{lightMode:"_1hbz9ox1g",darkMode:"_1hbz9ox1h"},defaultClass:"_1hbz9ox1g"},contrast:{conditions:{lightMode:"_1hbz9ox1i",darkMode:"_1hbz9ox1j"},defaultClass:"_1hbz9ox1i"},secondary:{conditions:{lightMode:"_1hbz9ox1k",darkMode:"_1hbz9ox1l"},defaultClass:"_1hbz9ox1k"},tertiary:{conditions:{lightMode:"_1hbz9ox1m",darkMode:"_1hbz9ox1n"},defaultClass:"_1hbz9ox1m"},placeholder:{conditions:{lightMode:"_1hbz9ox1o",darkMode:"_1hbz9ox1p"},defaultClass:"_1hbz9ox1o"},smooth:{conditions:{lightMode:"_1hbz9ox1q",darkMode:"_1hbz9ox1r"},defaultClass:"_1hbz9ox1q"},subtle:{conditions:{lightMode:"_1hbz9ox1s",darkMode:"_1hbz9ox1t"},defaultClass:"_1hbz9ox1s"},soft:{conditions:{lightMode:"_1hbz9ox1u",darkMode:"_1hbz9ox1v"},defaultClass:"_1hbz9ox1u"},offset:{conditions:{lightMode:"_1hbz9ox1w",darkMode:"_1hbz9ox1x"},defaultClass:"_1hbz9ox1w"},primary:{conditions:{lightMode:"_1hbz9ox1y",darkMode:"_1hbz9ox1z"},defaultClass:"_1hbz9ox1y"},primaryHover:{conditions:{lightMode:"_1hbz9ox20",darkMode:"_1hbz9ox21"},defaultClass:"_1hbz9ox20"},transparent:{conditions:{lightMode:"_1hbz9ox22",darkMode:"_1hbz9ox23"},defaultClass:"_1hbz9ox22"},error:{conditions:{lightMode:"_1hbz9ox24",darkMode:"_1hbz9ox25"},defaultClass:"_1hbz9ox24"},auxiliary:{conditions:{lightMode:"_1hbz9ox26",darkMode:"_1hbz9ox27"},defaultClass:"_1hbz9ox26"},success:{conditions:{lightMode:"_1hbz9ox28",darkMode:"_1hbz9ox29"},defaultClass:"_1hbz9ox28"},foregroundSuccess:{conditions:{lightMode:"_1hbz9ox2a",darkMode:"_1hbz9ox2b"},defaultClass:"_1hbz9ox2a"},backgroundSuccess:{conditions:{lightMode:"_1hbz9ox2c",darkMode:"_1hbz9ox2d"},defaultClass:"_1hbz9ox2c"},failure:{conditions:{lightMode:"_1hbz9ox2e",darkMode:"_1hbz9ox2f"},defaultClass:"_1hbz9ox2e"},foregroundFailure:{conditions:{lightMode:"_1hbz9ox2g",darkMode:"_1hbz9ox2h"},defaultClass:"_1hbz9ox2g"},backgroundFailure:{conditions:{lightMode:"_1hbz9ox2i",darkMode:"_1hbz9ox2j"},defaultClass:"_1hbz9ox2i"}}}}},{conditions:void 0,styles:{marginY:{mappings:["marginTop","marginBottom"]},marginX:{mappings:["marginLeft","marginRight"]},gap:{values:{0:{defaultClass:"_1hbz9ox2k"},1:{defaultClass:"_1hbz9ox2l"},2:{defaultClass:"_1hbz9ox2m"},3:{defaultClass:"_1hbz9ox2n"},4:{defaultClass:"_1hbz9ox2o"},5:{defaultClass:"_1hbz9ox2p"},6:{defaultClass:"_1hbz9ox2q"},7:{defaultClass:"_1hbz9ox2r"},8:{defaultClass:"_1hbz9ox2s"},9:{defaultClass:"_1hbz9ox2t"},10:{defaultClass:"_1hbz9ox2u"},11:{defaultClass:"_1hbz9ox2v"},12:{defaultClass:"_1hbz9ox2w"},13:{defaultClass:"_1hbz9ox2x"},14:{defaultClass:"_1hbz9ox2y"},15:{defaultClass:"_1hbz9ox2z"},16:{defaultClass:"_1hbz9ox30"},20:{defaultClass:"_1hbz9ox31"},24:{defaultClass:"_1hbz9ox32"},28:{defaultClass:"_1hbz9ox33"},32:{defaultClass:"_1hbz9ox34"},36:{defaultClass:"_1hbz9ox35"},40:{defaultClass:"_1hbz9ox36"},44:{defaultClass:"_1hbz9ox37"},48:{defaultClass:"_1hbz9ox38"},52:{defaultClass:"_1hbz9ox39"},56:{defaultClass:"_1hbz9ox3a"},60:{defaultClass:"_1hbz9ox3b"},64:{defaultClass:"_1hbz9ox3c"},68:{defaultClass:"_1hbz9ox3d"},72:{defaultClass:"_1hbz9ox3e"},76:{defaultClass:"_1hbz9ox3f"},80:{defaultClass:"_1hbz9ox3g"},96:{defaultClass:"_1hbz9ox3h"},px:{defaultClass:"_1hbz9ox3i"},"0.25":{defaultClass:"_1hbz9ox3j"},"0.5":{defaultClass:"_1hbz9ox3k"},"0.75":{defaultClass:"_1hbz9ox3l"},"1.5":{defaultClass:"_1hbz9ox3m"},"2.5":{defaultClass:"_1hbz9ox3n"},"3.5":{defaultClass:"_1hbz9ox3o"}}},marginTop:{values:{0:{defaultClass:"_1hbz9ox3p"},1:{defaultClass:"_1hbz9ox3q"},2:{defaultClass:"_1hbz9ox3r"},3:{defaultClass:"_1hbz9ox3s"},4:{defaultClass:"_1hbz9ox3t"},5:{defaultClass:"_1hbz9ox3u"},6:{defaultClass:"_1hbz9ox3v"},7:{defaultClass:"_1hbz9ox3w"},8:{defaultClass:"_1hbz9ox3x"},9:{defaultClass:"_1hbz9ox3y"},10:{defaultClass:"_1hbz9ox3z"},11:{defaultClass:"_1hbz9ox40"},12:{defaultClass:"_1hbz9ox41"},13:{defaultClass:"_1hbz9ox42"},14:{defaultClass:"_1hbz9ox43"},15:{defaultClass:"_1hbz9ox44"},16:{defaultClass:"_1hbz9ox45"},20:{defaultClass:"_1hbz9ox46"},24:{defaultClass:"_1hbz9ox47"},28:{defaultClass:"_1hbz9ox48"},32:{defaultClass:"_1hbz9ox49"},36:{defaultClass:"_1hbz9ox4a"},40:{defaultClass:"_1hbz9ox4b"},44:{defaultClass:"_1hbz9ox4c"},48:{defaultClass:"_1hbz9ox4d"},52:{defaultClass:"_1hbz9ox4e"},56:{defaultClass:"_1hbz9ox4f"},60:{defaultClass:"_1hbz9ox4g"},64:{defaultClass:"_1hbz9ox4h"},68:{defaultClass:"_1hbz9ox4i"},72:{defaultClass:"_1hbz9ox4j"},76:{defaultClass:"_1hbz9ox4k"},80:{defaultClass:"_1hbz9ox4l"},96:{defaultClass:"_1hbz9ox4m"},px:{defaultClass:"_1hbz9ox4n"},"0.25":{defaultClass:"_1hbz9ox4o"},"0.5":{defaultClass:"_1hbz9ox4p"},"0.75":{defaultClass:"_1hbz9ox4q"},"1.5":{defaultClass:"_1hbz9ox4r"},"2.5":{defaultClass:"_1hbz9ox4s"},"3.5":{defaultClass:"_1hbz9ox4t"}}},marginBottom:{values:{0:{defaultClass:"_1hbz9ox4u"},1:{defaultClass:"_1hbz9ox4v"},2:{defaultClass:"_1hbz9ox4w"},3:{defaultClass:"_1hbz9ox4x"},4:{defaultClass:"_1hbz9ox4y"},5:{defaultClass:"_1hbz9ox4z"},6:{defaultClass:"_1hbz9ox50"},7:{defaultClass:"_1hbz9ox51"},8:{defaultClass:"_1hbz9ox52"},9:{defaultClass:"_1hbz9ox53"},10:{defaultClass:"_1hbz9ox54"},11:{defaultClass:"_1hbz9ox55"},12:{defaultClass:"_1hbz9ox56"},13:{defaultClass:"_1hbz9ox57"},14:{defaultClass:"_1hbz9ox58"},15:{defaultClass:"_1hbz9ox59"},16:{defaultClass:"_1hbz9ox5a"},20:{defaultClass:"_1hbz9ox5b"},24:{defaultClass:"_1hbz9ox5c"},28:{defaultClass:"_1hbz9ox5d"},32:{defaultClass:"_1hbz9ox5e"},36:{defaultClass:"_1hbz9ox5f"},40:{defaultClass:"_1hbz9ox5g"},44:{defaultClass:"_1hbz9ox5h"},48:{defaultClass:"_1hbz9ox5i"},52:{defaultClass:"_1hbz9ox5j"},56:{defaultClass:"_1hbz9ox5k"},60:{defaultClass:"_1hbz9ox5l"},64:{defaultClass:"_1hbz9ox5m"},68:{defaultClass:"_1hbz9ox5n"},72:{defaultClass:"_1hbz9ox5o"},76:{defaultClass:"_1hbz9ox5p"},80:{defaultClass:"_1hbz9ox5q"},96:{defaultClass:"_1hbz9ox5r"},px:{defaultClass:"_1hbz9ox5s"},"0.25":{defaultClass:"_1hbz9ox5t"},"0.5":{defaultClass:"_1hbz9ox5u"},"0.75":{defaultClass:"_1hbz9ox5v"},"1.5":{defaultClass:"_1hbz9ox5w"},"2.5":{defaultClass:"_1hbz9ox5x"},"3.5":{defaultClass:"_1hbz9ox5y"}}},marginLeft:{values:{0:{defaultClass:"_1hbz9ox5z"},1:{defaultClass:"_1hbz9ox60"},2:{defaultClass:"_1hbz9ox61"},3:{defaultClass:"_1hbz9ox62"},4:{defaultClass:"_1hbz9ox63"},5:{defaultClass:"_1hbz9ox64"},6:{defaultClass:"_1hbz9ox65"},7:{defaultClass:"_1hbz9ox66"},8:{defaultClass:"_1hbz9ox67"},9:{defaultClass:"_1hbz9ox68"},10:{defaultClass:"_1hbz9ox69"},11:{defaultClass:"_1hbz9ox6a"},12:{defaultClass:"_1hbz9ox6b"},13:{defaultClass:"_1hbz9ox6c"},14:{defaultClass:"_1hbz9ox6d"},15:{defaultClass:"_1hbz9ox6e"},16:{defaultClass:"_1hbz9ox6f"},20:{defaultClass:"_1hbz9ox6g"},24:{defaultClass:"_1hbz9ox6h"},28:{defaultClass:"_1hbz9ox6i"},32:{defaultClass:"_1hbz9ox6j"},36:{defaultClass:"_1hbz9ox6k"},40:{defaultClass:"_1hbz9ox6l"},44:{defaultClass:"_1hbz9ox6m"},48:{defaultClass:"_1hbz9ox6n"},52:{defaultClass:"_1hbz9ox6o"},56:{defaultClass:"_1hbz9ox6p"},60:{defaultClass:"_1hbz9ox6q"},64:{defaultClass:"_1hbz9ox6r"},68:{defaultClass:"_1hbz9ox6s"},72:{defaultClass:"_1hbz9ox6t"},76:{defaultClass:"_1hbz9ox6u"},80:{defaultClass:"_1hbz9ox6v"},96:{defaultClass:"_1hbz9ox6w"},px:{defaultClass:"_1hbz9ox6x"},"0.25":{defaultClass:"_1hbz9ox6y"},"0.5":{defaultClass:"_1hbz9ox6z"},"0.75":{defaultClass:"_1hbz9ox70"},"1.5":{defaultClass:"_1hbz9ox71"},"2.5":{defaultClass:"_1hbz9ox72"},"3.5":{defaultClass:"_1hbz9ox73"}}},marginRight:{values:{0:{defaultClass:"_1hbz9ox74"},1:{defaultClass:"_1hbz9ox75"},2:{defaultClass:"_1hbz9ox76"},3:{defaultClass:"_1hbz9ox77"},4:{defaultClass:"_1hbz9ox78"},5:{defaultClass:"_1hbz9ox79"},6:{defaultClass:"_1hbz9ox7a"},7:{defaultClass:"_1hbz9ox7b"},8:{defaultClass:"_1hbz9ox7c"},9:{defaultClass:"_1hbz9ox7d"},10:{defaultClass:"_1hbz9ox7e"},11:{defaultClass:"_1hbz9ox7f"},12:{defaultClass:"_1hbz9ox7g"},13:{defaultClass:"_1hbz9ox7h"},14:{defaultClass:"_1hbz9ox7i"},15:{defaultClass:"_1hbz9ox7j"},16:{defaultClass:"_1hbz9ox7k"},20:{defaultClass:"_1hbz9ox7l"},24:{defaultClass:"_1hbz9ox7m"},28:{defaultClass:"_1hbz9ox7n"},32:{defaultClass:"_1hbz9ox7o"},36:{defaultClass:"_1hbz9ox7p"},40:{defaultClass:"_1hbz9ox7q"},44:{defaultClass:"_1hbz9ox7r"},48:{defaultClass:"_1hbz9ox7s"},52:{defaultClass:"_1hbz9ox7t"},56:{defaultClass:"_1hbz9ox7u"},60:{defaultClass:"_1hbz9ox7v"},64:{defaultClass:"_1hbz9ox7w"},68:{defaultClass:"_1hbz9ox7x"},72:{defaultClass:"_1hbz9ox7y"},76:{defaultClass:"_1hbz9ox7z"},80:{defaultClass:"_1hbz9ox80"},96:{defaultClass:"_1hbz9ox81"},px:{defaultClass:"_1hbz9ox82"},"0.25":{defaultClass:"_1hbz9ox83"},"0.5":{defaultClass:"_1hbz9ox84"},"0.75":{defaultClass:"_1hbz9ox85"},"1.5":{defaultClass:"_1hbz9ox86"},"2.5":{defaultClass:"_1hbz9ox87"},"3.5":{defaultClass:"_1hbz9ox88"}}}}});const Ei=e=>x.jsx("div",{className:Ge("sid-stack",N0(e.variant),cl({gap:e.space||"2"}),e.className),style:e.style,children:e.children});var G0=sl({defaultClassName:"_1wn0ypy0",variantClassNames:{size:{xs:"_1wn0ypy1",sm:"_1wn0ypy2",base:"_1wn0ypy3",xl:"_1wn0ypy4","2xl-title":"_1wn0ypy5"},weight:{medium:"_1wn0ypy6",semibold:"_1wn0ypy7",bold:"_1wn0ypy8"},color:{contrast:"_1wn0ypy9",tertiary:"_1wn0ypya",placeholder:"_1wn0ypyb",white:"_1wn0ypyc",success:"_1wn0ypyd",failure:"_1wn0ypye"}},defaultVariants:{size:"base",weight:"medium"},compoundVariants:[]});const W0={text:{}},$i=d.createContext(W0);$i.displayName="SlashIDTextContext";const K0=({text:e,children:t})=>{const n=d.useMemo(()=>({text:e}),[e]);return x.jsx($i.Provider,{value:n,children:t})};function Z0(){const{text:e}=V.useContext($i);return e}const bo={opening:"{{",closing:"}}"};function ll(e,t){return e.includes(bo.opening)?Object.keys(t).reduce((r,o)=>r.replace(`${bo.opening}${o}${bo.closing}`,t[o]),e):e}const Ko=({as:e,t,tokens:n,variant:r,className:o,children:i})=>{const a=Z0(),s=e||"p";return x.jsxs(s,{className:Ge("sid-text",`sid-text--${e}`,G0(r),o),children:[n?ll(a[t],n):a[t],i||null]})};function Y0(){const e=navigator.language.toLowerCase();return e==="ja"||e.startsWith("ja-")?"ja":"en"}const pe={"footer.text":"Top-tier security by SlashID","initial.title":"Logging you in...","initial.details":"Please follow the on-screen instructions.","recover.password.title":"Reset password","recover.password.details":"Enter your new password.","recover.password.input.password.label":"Password","recover.password.input.confirmPassword.label":"Confirm password","recover.password.input.placeholder":"Type your new password","recover.password.submit":"Reset password","recover.password.validation.passwordsDoNotMatch":"Passwords do not match","recover.password.validation.length":"8-256 characters required","recover.password.validation.password_variants":"Contains word 'password'","recover.password.validation.admin_variants":"Contains word 'admin'","recover.password.validation.user_variants":"Contains word 'user'","recover.password.validation.alphanumeric_sequences_1":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.alphanumeric_sequences_2":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_sequences_ascending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_subsequences_ascending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_sequences_descending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_subsequences_descending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.common_password_xkcd":"Common password","success.title":"All done!","success.details.default":"Close this page and return to the website.","success.details.autoclose":"Return to the website, this page will close in a moment...","error.title":"Something went wrong...","error.title.authentication_expired":"Magic link expired","error.title.registration_already_completed":"Magic link expired","error.detail":"Return to the form and log in again.","error.detail.authentication_expired":"Return to the form and log in again to continue.","error.detail.registration_already_completed":"Return to the form and log in again to continue."},dl={en:pe,ja:{"footer.text":pe["footer.text"],"initial.title":"ログイン処理を行っています。","initial.details":"処理完了後、画面は自動で切り替わります。","success.title":"認証が完了しました!","success.details.default":"このページを閉じて、元のページへ戻ってください。","success.details.autoclose":pe["success.details.autoclose"],"recover.password.title":pe["recover.password.title"],"recover.password.details":pe["recover.password.details"],"recover.password.input.password.label":pe["recover.password.input.password.label"],"recover.password.input.confirmPassword.label":pe["recover.password.input.confirmPassword.label"],"recover.password.input.placeholder":pe["recover.password.input.placeholder"],"recover.password.submit":pe["recover.password.submit"],"recover.password.validation.passwordsDoNotMatch":pe["recover.password.validation.passwordsDoNotMatch"],"recover.password.validation.length":pe["recover.password.validation.length"],"recover.password.validation.password_variants":pe["recover.password.validation.password_variants"],"recover.password.validation.admin_variants":pe["recover.password.validation.admin_variants"],"recover.password.validation.user_variants":pe["recover.password.validation.user_variants"],"recover.password.validation.alphanumeric_sequences_1":pe["recover.password.validation.alphanumeric_sequences_1"],"recover.password.validation.alphanumeric_sequences_2":pe["recover.password.validation.alphanumeric_sequences_2"],"recover.password.validation.numeric_sequences_ascending":pe["recover.password.validation.numeric_sequences_ascending"],"recover.password.validation.numeric_subsequences_ascending":pe["recover.password.validation.numeric_subsequences_ascending"],"recover.password.validation.numeric_sequences_descending":pe["recover.password.validation.numeric_sequences_descending"],"recover.password.validation.numeric_subsequences_descending":pe["recover.password.validation.numeric_subsequences_descending"],"recover.password.validation.common_password_xkcd":pe["recover.password.validation.common_password_xkcd"],"error.title":pe["error.title"],"error.title.authentication_expired":pe["error.title.authentication_expired"],"error.title.registration_already_completed":pe["error.title.registration_already_completed"],"error.detail":"再度ログインをしてください。","error.detail.authentication_expired":pe["error.detail.authentication_expired"],"error.detail.registration_already_completed":pe["error.detail.registration_already_completed"]}},J0=e=>t=>dl[e][t],ul={logo:x.jsx(al,{}),language:"en",state:"initial",sdk:void 0,setLogo:()=>{}},fl=d.createContext(ul),On=()=>d.useContext(fl);var hl={exports:{}},kn={};/**
|
|
35
|
+
`;function Ga(){return C.jsxs("svg",{width:"5",height:"20",viewBox:"0 0 5 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[C.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 0C3.32843 1.19209e-07 4 0.671573 4 1.5L4 11.5C4 12.3284 3.32843 13 2.5 13C1.67157 13 1 12.3284 1 11.5L1 1.5C1 0.671573 1.67157 -1.19209e-07 2.5 0Z",fill:"var(--sid-color-foreground)"}),C.jsx("path",{d:"M4.5 18C4.5 19.1046 3.60457 20 2.5 20C1.39543 20 0.5 19.1046 0.5 18C0.5 16.8954 1.39543 16 2.5 16C3.60457 16 4.5 16.8954 4.5 18Z",fill:"var(--sid-color-foreground)"})]})}const $0=()=>C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[C.jsx("style",{children:Si}),C.jsx("g",{clipPath:"url(#clip0_2610_9920)",children:C.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.220551 7.4C1.00905 5.8258 3.50342 2 8.00001 2C12.4966 2 14.991 5.8258 15.7796 7.4C16.0733 7.98635 16.0737 8.0153 15.7796 8.60228C14.99 10.1778 12.4949 14 8.00001 14C3.50298 14 1.00762 10.1738 0.219399 8.6C-0.0739824 8.01422 -0.0726647 7.98539 0.220551 7.4ZM8 12C10.2091 12 12 10.2091 12 8C12 5.79086 10.2091 4 8 4C5.79086 4 4 5.79086 4 8C4 10.2091 5.79086 12 8 12ZM9.5 8C9.5 8.82843 8.82843 9.5 8 9.5C7.17157 9.5 6.5 8.82843 6.5 8C6.5 7.17157 7.17157 6.5 8 6.5C8.82843 6.5 9.5 7.17157 9.5 8Z",fill:"#142049"})}),C.jsx("defs",{children:C.jsx("clipPath",{id:"clip0_2610_9920",children:C.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),I0=()=>C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[C.jsx("style",{children:Si}),C.jsxs("g",{clipPath:"url(#clip0_2610_9933)",children:[C.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.220551 7.4C1.00905 5.8258 3.50342 2 8.00001 2C12.4966 2 14.991 5.8258 15.7796 7.4C16.0733 7.98635 16.0737 8.0153 15.7796 8.60228C14.99 10.1778 12.4949 14 8.00001 14C3.50298 14 1.00762 10.1738 0.219399 8.6C-0.0739824 8.01422 -0.0726647 7.98539 0.220551 7.4ZM8 12C10.2091 12 12 10.2091 12 8C12 5.79086 10.2091 4 8 4C5.79086 4 4 5.79086 4 8C4 10.2091 5.79086 12 8 12ZM9.5 8C9.5 8.82843 8.82843 9.5 8 9.5C7.17157 9.5 6.5 8.82843 6.5 8C6.5 7.17157 7.17157 6.5 8 6.5C8.82843 6.5 9.5 7.17157 9.5 8Z",fill:"#142049"}),C.jsx("path",{d:"M2.34314 2.34315L13.6568 13.6569",stroke:"#142049",strokeWidth:"1.5",strokeLinecap:"round"})]}),C.jsx("defs",{children:C.jsx("clipPath",{id:"clip0_2610_9933",children:C.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),al=()=>C.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[C.jsx("style",{children:Si}),C.jsx("path",{d:"M12.686 10L2 30.228H5.198L15.884 10H12.686Z",fill:"#2A6AFF"}),C.jsx("path",{d:"M19.7923 15.694C20.9373 15.694 21.8723 14.732 21.8723 13.588C21.8723 12.444 20.9373 11.482 19.7923 11.482C18.6223 11.482 17.6873 12.444 17.6873 13.588C17.6873 14.732 18.6233 15.694 19.7933 15.694H19.7923ZM18.0773 17.514V30.228H21.4573V17.514H18.0773ZM34.1883 10V18.502C33.172 17.6398 31.8809 17.1695 30.5483 17.176C26.8563 17.176 24.0743 20.14 24.0743 23.884C24.0743 27.628 26.8563 30.592 30.5483 30.592C32.0823 30.592 33.4343 30.02 34.4483 29.032V30.228H37.5683V10H34.1883ZM30.9383 27.42C28.9883 27.42 27.5583 25.912 27.5583 23.884C27.5583 21.856 28.9883 20.348 30.9383 20.348C32.8883 20.348 34.3183 21.856 34.3183 23.884C34.3183 25.912 32.8883 27.42 30.9383 27.42Z",fill:"#142049"})]}),Wa=e=>{const[t,n]=d.useState(!1);return C.jsxs("div",{className:Ge("sid-input","sid-input--password",y0,e.error&&x0,e.className),style:e.style,children:[C.jsx(E0,{...e,type:t?"text":"password"}),C.jsx("button",{tabIndex:-1,className:S0,type:"button",onClick:()=>n(!t),children:t?C.jsx(I0,{}):C.jsx($0,{})})]})};var R0="_1rf2mux3",q0="_1rf2mux5",D0={blue:"_1rf2mux6 _1rf2mux4",red:"_1rf2mux7 _1rf2mux4",primary:"_1rf2mux8 _1rf2mux4",grey:"_1rf2mux9 _1rf2mux4"},A0="_1rf2muxb",T0={blue:"_1rf2muxc _1rf2muxa",red:"_1rf2muxd _1rf2muxa",primary:"_1rf2muxe _1rf2muxa",grey:"_1rf2muxf _1rf2muxa"},z0="_1rf2muxh",L0={blue:"_1rf2muxi _1rf2muxg",red:"_1rf2muxj _1rf2muxg",primary:"_1rf2muxk _1rf2muxg",grey:"_1rf2muxl _1rf2muxg"},P0="_1rf2muxm";const qn=({children:e,className:t,variant:n="blue",shouldAnimate:r=!0,testId:o})=>C.jsxs("div",{className:Ge(R0,t),"data-testid":o,children:[C.jsx("div",{className:Ge(D0[n],{[q0]:r})}),C.jsx("div",{className:Ge(T0[n],{[A0]:r})}),C.jsx("div",{className:Ge(L0[n],{[z0]:r})}),C.jsx("div",{className:P0,children:e})]});function O0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Za(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ka(Object(n),!0).forEach(function(r){O0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ka(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var M0=(e,t,n)=>{for(var r of Object.keys(e)){var o;if(e[r]!==((o=t[r])!==null&&o!==void 0?o:n[r]))return!1}return!0},sl=e=>t=>{var n=e.defaultClassName,r=Za(Za({},e.defaultVariants),t);for(var o in r){var i,a=(i=r[o])!==null&&i!==void 0?i:e.defaultVariants[o];if(a!=null){var s=a;typeof s=="boolean"&&(s=s===!0?"true":"false");var c=e.variantClassNames[o][s];c&&(n+=" "+c)}}for(var[l,u]of e.compoundVariants)M0(l,r,e.defaultVariants)&&(n+=" "+u);return n},N0=sl({defaultClassName:"s3l9sv0",variantClassNames:{direction:{vertical:"s3l9sv1",horizontal:"s3l9sv2"},space:{between:"s3l9sv3",evenly:"s3l9sv4"}},defaultVariants:{direction:"vertical"},compoundVariants:[]});function U0(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F0(e){var t=U0(e,"string");return typeof t=="symbol"?t:String(t)}function V0(e,t,n){return t=F0(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function go(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ya(Object(n),!0).forEach(function(r){V0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var B0=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Object.assign({},...n.map(c=>c.styles)),i=Object.keys(o),a=i.filter(c=>"mappings"in o[c]),s=c=>{var l=[],u={},m=go({},c),h=!1;for(var p of a){var g=c[p];if(g!=null){var f=o[p];h=!0;for(var w of f.mappings)u[w]=g,m[w]==null&&delete m[w]}}var y=h?go(go({},u),m):c,v=function(){var I=y[_],R=o[_];try{if(R.mappings)return"continue";if(typeof I=="string"||typeof I=="number")l.push(R.values[I].defaultClass);else if(Array.isArray(I))for(var D=0;D<I.length;D++){var P=I[D];if(P!=null){var G=R.responsiveArray[D];l.push(R.values[P].conditions[G])}}else for(var H in I){var j=I[H];j!=null&&l.push(R.values[j].conditions[H])}}catch(J){throw J}};for(var _ in y)var x=v();return e(l.join(" "))};return Object.assign(s,{properties:new Set(i)})},H0=e=>e,j0=function(){return B0(H0)(...arguments)},cl=j0({conditions:{defaultCondition:"lightMode",conditionNames:["lightMode","darkMode"],responsiveArray:void 0},styles:{color:{values:{background:{conditions:{lightMode:"_1hbz9ox0",darkMode:"_1hbz9ox1"},defaultClass:"_1hbz9ox0"},mute:{conditions:{lightMode:"_1hbz9ox2",darkMode:"_1hbz9ox3"},defaultClass:"_1hbz9ox2"},panel:{conditions:{lightMode:"_1hbz9ox4",darkMode:"_1hbz9ox5"},defaultClass:"_1hbz9ox4"},foreground:{conditions:{lightMode:"_1hbz9ox6",darkMode:"_1hbz9ox7"},defaultClass:"_1hbz9ox6"},contrast:{conditions:{lightMode:"_1hbz9ox8",darkMode:"_1hbz9ox9"},defaultClass:"_1hbz9ox8"},secondary:{conditions:{lightMode:"_1hbz9oxa",darkMode:"_1hbz9oxb"},defaultClass:"_1hbz9oxa"},tertiary:{conditions:{lightMode:"_1hbz9oxc",darkMode:"_1hbz9oxd"},defaultClass:"_1hbz9oxc"},placeholder:{conditions:{lightMode:"_1hbz9oxe",darkMode:"_1hbz9oxf"},defaultClass:"_1hbz9oxe"},smooth:{conditions:{lightMode:"_1hbz9oxg",darkMode:"_1hbz9oxh"},defaultClass:"_1hbz9oxg"},subtle:{conditions:{lightMode:"_1hbz9oxi",darkMode:"_1hbz9oxj"},defaultClass:"_1hbz9oxi"},soft:{conditions:{lightMode:"_1hbz9oxk",darkMode:"_1hbz9oxl"},defaultClass:"_1hbz9oxk"},offset:{conditions:{lightMode:"_1hbz9oxm",darkMode:"_1hbz9oxn"},defaultClass:"_1hbz9oxm"},primary:{conditions:{lightMode:"_1hbz9oxo",darkMode:"_1hbz9oxp"},defaultClass:"_1hbz9oxo"},primaryHover:{conditions:{lightMode:"_1hbz9oxq",darkMode:"_1hbz9oxr"},defaultClass:"_1hbz9oxq"},transparent:{conditions:{lightMode:"_1hbz9oxs",darkMode:"_1hbz9oxt"},defaultClass:"_1hbz9oxs"},error:{conditions:{lightMode:"_1hbz9oxu",darkMode:"_1hbz9oxv"},defaultClass:"_1hbz9oxu"},auxiliary:{conditions:{lightMode:"_1hbz9oxw",darkMode:"_1hbz9oxx"},defaultClass:"_1hbz9oxw"},success:{conditions:{lightMode:"_1hbz9oxy",darkMode:"_1hbz9oxz"},defaultClass:"_1hbz9oxy"},foregroundSuccess:{conditions:{lightMode:"_1hbz9ox10",darkMode:"_1hbz9ox11"},defaultClass:"_1hbz9ox10"},backgroundSuccess:{conditions:{lightMode:"_1hbz9ox12",darkMode:"_1hbz9ox13"},defaultClass:"_1hbz9ox12"},failure:{conditions:{lightMode:"_1hbz9ox14",darkMode:"_1hbz9ox15"},defaultClass:"_1hbz9ox14"},foregroundFailure:{conditions:{lightMode:"_1hbz9ox16",darkMode:"_1hbz9ox17"},defaultClass:"_1hbz9ox16"},backgroundFailure:{conditions:{lightMode:"_1hbz9ox18",darkMode:"_1hbz9ox19"},defaultClass:"_1hbz9ox18"}}},backgroundColor:{values:{background:{conditions:{lightMode:"_1hbz9ox1a",darkMode:"_1hbz9ox1b"},defaultClass:"_1hbz9ox1a"},mute:{conditions:{lightMode:"_1hbz9ox1c",darkMode:"_1hbz9ox1d"},defaultClass:"_1hbz9ox1c"},panel:{conditions:{lightMode:"_1hbz9ox1e",darkMode:"_1hbz9ox1f"},defaultClass:"_1hbz9ox1e"},foreground:{conditions:{lightMode:"_1hbz9ox1g",darkMode:"_1hbz9ox1h"},defaultClass:"_1hbz9ox1g"},contrast:{conditions:{lightMode:"_1hbz9ox1i",darkMode:"_1hbz9ox1j"},defaultClass:"_1hbz9ox1i"},secondary:{conditions:{lightMode:"_1hbz9ox1k",darkMode:"_1hbz9ox1l"},defaultClass:"_1hbz9ox1k"},tertiary:{conditions:{lightMode:"_1hbz9ox1m",darkMode:"_1hbz9ox1n"},defaultClass:"_1hbz9ox1m"},placeholder:{conditions:{lightMode:"_1hbz9ox1o",darkMode:"_1hbz9ox1p"},defaultClass:"_1hbz9ox1o"},smooth:{conditions:{lightMode:"_1hbz9ox1q",darkMode:"_1hbz9ox1r"},defaultClass:"_1hbz9ox1q"},subtle:{conditions:{lightMode:"_1hbz9ox1s",darkMode:"_1hbz9ox1t"},defaultClass:"_1hbz9ox1s"},soft:{conditions:{lightMode:"_1hbz9ox1u",darkMode:"_1hbz9ox1v"},defaultClass:"_1hbz9ox1u"},offset:{conditions:{lightMode:"_1hbz9ox1w",darkMode:"_1hbz9ox1x"},defaultClass:"_1hbz9ox1w"},primary:{conditions:{lightMode:"_1hbz9ox1y",darkMode:"_1hbz9ox1z"},defaultClass:"_1hbz9ox1y"},primaryHover:{conditions:{lightMode:"_1hbz9ox20",darkMode:"_1hbz9ox21"},defaultClass:"_1hbz9ox20"},transparent:{conditions:{lightMode:"_1hbz9ox22",darkMode:"_1hbz9ox23"},defaultClass:"_1hbz9ox22"},error:{conditions:{lightMode:"_1hbz9ox24",darkMode:"_1hbz9ox25"},defaultClass:"_1hbz9ox24"},auxiliary:{conditions:{lightMode:"_1hbz9ox26",darkMode:"_1hbz9ox27"},defaultClass:"_1hbz9ox26"},success:{conditions:{lightMode:"_1hbz9ox28",darkMode:"_1hbz9ox29"},defaultClass:"_1hbz9ox28"},foregroundSuccess:{conditions:{lightMode:"_1hbz9ox2a",darkMode:"_1hbz9ox2b"},defaultClass:"_1hbz9ox2a"},backgroundSuccess:{conditions:{lightMode:"_1hbz9ox2c",darkMode:"_1hbz9ox2d"},defaultClass:"_1hbz9ox2c"},failure:{conditions:{lightMode:"_1hbz9ox2e",darkMode:"_1hbz9ox2f"},defaultClass:"_1hbz9ox2e"},foregroundFailure:{conditions:{lightMode:"_1hbz9ox2g",darkMode:"_1hbz9ox2h"},defaultClass:"_1hbz9ox2g"},backgroundFailure:{conditions:{lightMode:"_1hbz9ox2i",darkMode:"_1hbz9ox2j"},defaultClass:"_1hbz9ox2i"}}}}},{conditions:void 0,styles:{marginY:{mappings:["marginTop","marginBottom"]},marginX:{mappings:["marginLeft","marginRight"]},gap:{values:{0:{defaultClass:"_1hbz9ox2k"},1:{defaultClass:"_1hbz9ox2l"},2:{defaultClass:"_1hbz9ox2m"},3:{defaultClass:"_1hbz9ox2n"},4:{defaultClass:"_1hbz9ox2o"},5:{defaultClass:"_1hbz9ox2p"},6:{defaultClass:"_1hbz9ox2q"},7:{defaultClass:"_1hbz9ox2r"},8:{defaultClass:"_1hbz9ox2s"},9:{defaultClass:"_1hbz9ox2t"},10:{defaultClass:"_1hbz9ox2u"},11:{defaultClass:"_1hbz9ox2v"},12:{defaultClass:"_1hbz9ox2w"},13:{defaultClass:"_1hbz9ox2x"},14:{defaultClass:"_1hbz9ox2y"},15:{defaultClass:"_1hbz9ox2z"},16:{defaultClass:"_1hbz9ox30"},20:{defaultClass:"_1hbz9ox31"},24:{defaultClass:"_1hbz9ox32"},28:{defaultClass:"_1hbz9ox33"},32:{defaultClass:"_1hbz9ox34"},36:{defaultClass:"_1hbz9ox35"},40:{defaultClass:"_1hbz9ox36"},44:{defaultClass:"_1hbz9ox37"},48:{defaultClass:"_1hbz9ox38"},52:{defaultClass:"_1hbz9ox39"},56:{defaultClass:"_1hbz9ox3a"},60:{defaultClass:"_1hbz9ox3b"},64:{defaultClass:"_1hbz9ox3c"},68:{defaultClass:"_1hbz9ox3d"},72:{defaultClass:"_1hbz9ox3e"},76:{defaultClass:"_1hbz9ox3f"},80:{defaultClass:"_1hbz9ox3g"},96:{defaultClass:"_1hbz9ox3h"},px:{defaultClass:"_1hbz9ox3i"},"0.25":{defaultClass:"_1hbz9ox3j"},"0.5":{defaultClass:"_1hbz9ox3k"},"0.75":{defaultClass:"_1hbz9ox3l"},"1.5":{defaultClass:"_1hbz9ox3m"},"2.5":{defaultClass:"_1hbz9ox3n"},"3.5":{defaultClass:"_1hbz9ox3o"}}},marginTop:{values:{0:{defaultClass:"_1hbz9ox3p"},1:{defaultClass:"_1hbz9ox3q"},2:{defaultClass:"_1hbz9ox3r"},3:{defaultClass:"_1hbz9ox3s"},4:{defaultClass:"_1hbz9ox3t"},5:{defaultClass:"_1hbz9ox3u"},6:{defaultClass:"_1hbz9ox3v"},7:{defaultClass:"_1hbz9ox3w"},8:{defaultClass:"_1hbz9ox3x"},9:{defaultClass:"_1hbz9ox3y"},10:{defaultClass:"_1hbz9ox3z"},11:{defaultClass:"_1hbz9ox40"},12:{defaultClass:"_1hbz9ox41"},13:{defaultClass:"_1hbz9ox42"},14:{defaultClass:"_1hbz9ox43"},15:{defaultClass:"_1hbz9ox44"},16:{defaultClass:"_1hbz9ox45"},20:{defaultClass:"_1hbz9ox46"},24:{defaultClass:"_1hbz9ox47"},28:{defaultClass:"_1hbz9ox48"},32:{defaultClass:"_1hbz9ox49"},36:{defaultClass:"_1hbz9ox4a"},40:{defaultClass:"_1hbz9ox4b"},44:{defaultClass:"_1hbz9ox4c"},48:{defaultClass:"_1hbz9ox4d"},52:{defaultClass:"_1hbz9ox4e"},56:{defaultClass:"_1hbz9ox4f"},60:{defaultClass:"_1hbz9ox4g"},64:{defaultClass:"_1hbz9ox4h"},68:{defaultClass:"_1hbz9ox4i"},72:{defaultClass:"_1hbz9ox4j"},76:{defaultClass:"_1hbz9ox4k"},80:{defaultClass:"_1hbz9ox4l"},96:{defaultClass:"_1hbz9ox4m"},px:{defaultClass:"_1hbz9ox4n"},"0.25":{defaultClass:"_1hbz9ox4o"},"0.5":{defaultClass:"_1hbz9ox4p"},"0.75":{defaultClass:"_1hbz9ox4q"},"1.5":{defaultClass:"_1hbz9ox4r"},"2.5":{defaultClass:"_1hbz9ox4s"},"3.5":{defaultClass:"_1hbz9ox4t"}}},marginBottom:{values:{0:{defaultClass:"_1hbz9ox4u"},1:{defaultClass:"_1hbz9ox4v"},2:{defaultClass:"_1hbz9ox4w"},3:{defaultClass:"_1hbz9ox4x"},4:{defaultClass:"_1hbz9ox4y"},5:{defaultClass:"_1hbz9ox4z"},6:{defaultClass:"_1hbz9ox50"},7:{defaultClass:"_1hbz9ox51"},8:{defaultClass:"_1hbz9ox52"},9:{defaultClass:"_1hbz9ox53"},10:{defaultClass:"_1hbz9ox54"},11:{defaultClass:"_1hbz9ox55"},12:{defaultClass:"_1hbz9ox56"},13:{defaultClass:"_1hbz9ox57"},14:{defaultClass:"_1hbz9ox58"},15:{defaultClass:"_1hbz9ox59"},16:{defaultClass:"_1hbz9ox5a"},20:{defaultClass:"_1hbz9ox5b"},24:{defaultClass:"_1hbz9ox5c"},28:{defaultClass:"_1hbz9ox5d"},32:{defaultClass:"_1hbz9ox5e"},36:{defaultClass:"_1hbz9ox5f"},40:{defaultClass:"_1hbz9ox5g"},44:{defaultClass:"_1hbz9ox5h"},48:{defaultClass:"_1hbz9ox5i"},52:{defaultClass:"_1hbz9ox5j"},56:{defaultClass:"_1hbz9ox5k"},60:{defaultClass:"_1hbz9ox5l"},64:{defaultClass:"_1hbz9ox5m"},68:{defaultClass:"_1hbz9ox5n"},72:{defaultClass:"_1hbz9ox5o"},76:{defaultClass:"_1hbz9ox5p"},80:{defaultClass:"_1hbz9ox5q"},96:{defaultClass:"_1hbz9ox5r"},px:{defaultClass:"_1hbz9ox5s"},"0.25":{defaultClass:"_1hbz9ox5t"},"0.5":{defaultClass:"_1hbz9ox5u"},"0.75":{defaultClass:"_1hbz9ox5v"},"1.5":{defaultClass:"_1hbz9ox5w"},"2.5":{defaultClass:"_1hbz9ox5x"},"3.5":{defaultClass:"_1hbz9ox5y"}}},marginLeft:{values:{0:{defaultClass:"_1hbz9ox5z"},1:{defaultClass:"_1hbz9ox60"},2:{defaultClass:"_1hbz9ox61"},3:{defaultClass:"_1hbz9ox62"},4:{defaultClass:"_1hbz9ox63"},5:{defaultClass:"_1hbz9ox64"},6:{defaultClass:"_1hbz9ox65"},7:{defaultClass:"_1hbz9ox66"},8:{defaultClass:"_1hbz9ox67"},9:{defaultClass:"_1hbz9ox68"},10:{defaultClass:"_1hbz9ox69"},11:{defaultClass:"_1hbz9ox6a"},12:{defaultClass:"_1hbz9ox6b"},13:{defaultClass:"_1hbz9ox6c"},14:{defaultClass:"_1hbz9ox6d"},15:{defaultClass:"_1hbz9ox6e"},16:{defaultClass:"_1hbz9ox6f"},20:{defaultClass:"_1hbz9ox6g"},24:{defaultClass:"_1hbz9ox6h"},28:{defaultClass:"_1hbz9ox6i"},32:{defaultClass:"_1hbz9ox6j"},36:{defaultClass:"_1hbz9ox6k"},40:{defaultClass:"_1hbz9ox6l"},44:{defaultClass:"_1hbz9ox6m"},48:{defaultClass:"_1hbz9ox6n"},52:{defaultClass:"_1hbz9ox6o"},56:{defaultClass:"_1hbz9ox6p"},60:{defaultClass:"_1hbz9ox6q"},64:{defaultClass:"_1hbz9ox6r"},68:{defaultClass:"_1hbz9ox6s"},72:{defaultClass:"_1hbz9ox6t"},76:{defaultClass:"_1hbz9ox6u"},80:{defaultClass:"_1hbz9ox6v"},96:{defaultClass:"_1hbz9ox6w"},px:{defaultClass:"_1hbz9ox6x"},"0.25":{defaultClass:"_1hbz9ox6y"},"0.5":{defaultClass:"_1hbz9ox6z"},"0.75":{defaultClass:"_1hbz9ox70"},"1.5":{defaultClass:"_1hbz9ox71"},"2.5":{defaultClass:"_1hbz9ox72"},"3.5":{defaultClass:"_1hbz9ox73"}}},marginRight:{values:{0:{defaultClass:"_1hbz9ox74"},1:{defaultClass:"_1hbz9ox75"},2:{defaultClass:"_1hbz9ox76"},3:{defaultClass:"_1hbz9ox77"},4:{defaultClass:"_1hbz9ox78"},5:{defaultClass:"_1hbz9ox79"},6:{defaultClass:"_1hbz9ox7a"},7:{defaultClass:"_1hbz9ox7b"},8:{defaultClass:"_1hbz9ox7c"},9:{defaultClass:"_1hbz9ox7d"},10:{defaultClass:"_1hbz9ox7e"},11:{defaultClass:"_1hbz9ox7f"},12:{defaultClass:"_1hbz9ox7g"},13:{defaultClass:"_1hbz9ox7h"},14:{defaultClass:"_1hbz9ox7i"},15:{defaultClass:"_1hbz9ox7j"},16:{defaultClass:"_1hbz9ox7k"},20:{defaultClass:"_1hbz9ox7l"},24:{defaultClass:"_1hbz9ox7m"},28:{defaultClass:"_1hbz9ox7n"},32:{defaultClass:"_1hbz9ox7o"},36:{defaultClass:"_1hbz9ox7p"},40:{defaultClass:"_1hbz9ox7q"},44:{defaultClass:"_1hbz9ox7r"},48:{defaultClass:"_1hbz9ox7s"},52:{defaultClass:"_1hbz9ox7t"},56:{defaultClass:"_1hbz9ox7u"},60:{defaultClass:"_1hbz9ox7v"},64:{defaultClass:"_1hbz9ox7w"},68:{defaultClass:"_1hbz9ox7x"},72:{defaultClass:"_1hbz9ox7y"},76:{defaultClass:"_1hbz9ox7z"},80:{defaultClass:"_1hbz9ox80"},96:{defaultClass:"_1hbz9ox81"},px:{defaultClass:"_1hbz9ox82"},"0.25":{defaultClass:"_1hbz9ox83"},"0.5":{defaultClass:"_1hbz9ox84"},"0.75":{defaultClass:"_1hbz9ox85"},"1.5":{defaultClass:"_1hbz9ox86"},"2.5":{defaultClass:"_1hbz9ox87"},"3.5":{defaultClass:"_1hbz9ox88"}}}}});const Ei=e=>C.jsx("div",{className:Ge("sid-stack",N0(e.variant),cl({gap:e.space||"2"}),e.className),style:e.style,children:e.children});var G0=sl({defaultClassName:"_1wn0ypy0",variantClassNames:{size:{xs:"_1wn0ypy1",sm:"_1wn0ypy2",base:"_1wn0ypy3",xl:"_1wn0ypy4","2xl-title":"_1wn0ypy5"},weight:{medium:"_1wn0ypy6",semibold:"_1wn0ypy7",bold:"_1wn0ypy8"},color:{contrast:"_1wn0ypy9",tertiary:"_1wn0ypya",placeholder:"_1wn0ypyb",white:"_1wn0ypyc",success:"_1wn0ypyd",failure:"_1wn0ypye"}},defaultVariants:{size:"base",weight:"medium"},compoundVariants:[]});const W0={text:{}},$i=d.createContext(W0);$i.displayName="SlashIDTextContext";const K0=({text:e,children:t})=>{const n=d.useMemo(()=>({text:e}),[e]);return C.jsx($i.Provider,{value:n,children:t})};function Z0(){const{text:e}=V.useContext($i);return e}const bo={opening:"{{",closing:"}}"};function ll(e,t){return e.includes(bo.opening)?Object.keys(t).reduce((r,o)=>r.replace(`${bo.opening}${o}${bo.closing}`,t[o]),e):e}const Ko=({as:e,t,tokens:n,variant:r,className:o,children:i})=>{const a=Z0(),s=e||"p";return C.jsxs(s,{className:Ge("sid-text",`sid-text--${s}`,G0(r),o),children:[n?ll(a[t],n):a[t],i||null]})};function Y0(){const e=navigator.language.toLowerCase();return e==="ja"||e.startsWith("ja-")?"ja":"en"}const pe={"footer.text":"Top-tier security by SlashID","initial.title":"Logging you in...","initial.details":"Please follow the on-screen instructions.","recover.password.title":"Reset password","recover.password.details":"Enter your new password.","recover.password.input.password.label":"Password","recover.password.input.confirmPassword.label":"Confirm password","recover.password.input.placeholder":"Type your new password","recover.password.submit":"Reset password","recover.password.validation.passwordsDoNotMatch":"Passwords do not match","recover.password.validation.length":"8-256 characters required","recover.password.validation.password_variants":"Contains word 'password'","recover.password.validation.admin_variants":"Contains word 'admin'","recover.password.validation.user_variants":"Contains word 'user'","recover.password.validation.alphanumeric_sequences_1":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.alphanumeric_sequences_2":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_sequences_ascending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_subsequences_ascending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_sequences_descending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_subsequences_descending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.common_password_xkcd":"Common password","success.title":"All done!","success.details.default":"Close this page and return to the website.","success.details.autoclose":"Return to the website, this page will close in a moment...","error.title":"Something went wrong...","error.title.authentication_expired":"Magic link expired","error.title.registration_already_completed":"Magic link expired","error.detail":"Return to the form and log in again.","error.detail.authentication_expired":"Return to the form and log in again to continue.","error.detail.registration_already_completed":"Return to the form and log in again to continue."},dl={en:pe,ja:{"footer.text":pe["footer.text"],"initial.title":"ログイン処理を行っています。","initial.details":"処理完了後、画面は自動で切り替わります。","success.title":"認証が完了しました!","success.details.default":"このページを閉じて、元のページへ戻ってください。","success.details.autoclose":pe["success.details.autoclose"],"recover.password.title":pe["recover.password.title"],"recover.password.details":pe["recover.password.details"],"recover.password.input.password.label":pe["recover.password.input.password.label"],"recover.password.input.confirmPassword.label":pe["recover.password.input.confirmPassword.label"],"recover.password.input.placeholder":pe["recover.password.input.placeholder"],"recover.password.submit":pe["recover.password.submit"],"recover.password.validation.passwordsDoNotMatch":pe["recover.password.validation.passwordsDoNotMatch"],"recover.password.validation.length":pe["recover.password.validation.length"],"recover.password.validation.password_variants":pe["recover.password.validation.password_variants"],"recover.password.validation.admin_variants":pe["recover.password.validation.admin_variants"],"recover.password.validation.user_variants":pe["recover.password.validation.user_variants"],"recover.password.validation.alphanumeric_sequences_1":pe["recover.password.validation.alphanumeric_sequences_1"],"recover.password.validation.alphanumeric_sequences_2":pe["recover.password.validation.alphanumeric_sequences_2"],"recover.password.validation.numeric_sequences_ascending":pe["recover.password.validation.numeric_sequences_ascending"],"recover.password.validation.numeric_subsequences_ascending":pe["recover.password.validation.numeric_subsequences_ascending"],"recover.password.validation.numeric_sequences_descending":pe["recover.password.validation.numeric_sequences_descending"],"recover.password.validation.numeric_subsequences_descending":pe["recover.password.validation.numeric_subsequences_descending"],"recover.password.validation.common_password_xkcd":pe["recover.password.validation.common_password_xkcd"],"error.title":pe["error.title"],"error.title.authentication_expired":pe["error.title.authentication_expired"],"error.title.registration_already_completed":pe["error.title.registration_already_completed"],"error.detail":"再度ログインをしてください。","error.detail.authentication_expired":pe["error.detail.authentication_expired"],"error.detail.registration_already_completed":pe["error.detail.registration_already_completed"]}},J0=e=>t=>dl[e][t],ul={logo:C.jsx(al,{}),language:"en",state:"initial",sdk:void 0,setLogo:()=>{}},fl=d.createContext(ul),On=()=>d.useContext(fl);var hl={exports:{}},kn={};/**
|
|
36
36
|
* @license React
|
|
37
37
|
* react-jsx-runtime.production.min.js
|
|
38
38
|
*
|
|
@@ -52,7 +52,7 @@ Url: ${yr(e)}`),!0)}function lg(e,t){return e.type||!t||!t.length?!1:hg(e).some(
|
|
|
52
52
|
U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
|
|
53
53
|
src: url('${t}') format('woff2');
|
|
54
54
|
font-display: swap;
|
|
55
|
-
}`,document.head.appendChild(n),!0}return!1}var je={},Ri={};Object.defineProperty(Ri,"__esModule",{value:!0});var Db=[{name:"Afghanistan",dial_code:"+93",code:"AF",flag:"🇦🇫"},{name:"Albania",dial_code:"+355",code:"AL",flag:"🇦🇱"},{name:"Algeria",dial_code:"+213",code:"DZ",flag:"🇩🇿"},{name:"AmericanSamoa",dial_code:"+1684",code:"AS",flag:"🇦🇸"},{name:"Andorra",dial_code:"+376",code:"AD",flag:"🇦🇩"},{name:"Angola",dial_code:"+244",code:"AO",flag:"🇦🇴"},{name:"Anguilla",dial_code:"+1264",code:"AI",flag:"🇦🇮"},{name:"Antarctica",dial_code:"+672",code:"AQ",flag:"🇦🇶"},{name:"Antigua and Barbuda",dial_code:"+1268",code:"AG",flag:"🇦🇬"},{name:"Argentina",dial_code:"+54",code:"AR",flag:"🇦🇷"},{name:"Armenia",dial_code:"+374",code:"AM",flag:"🇦🇲"},{name:"Aruba",dial_code:"+297",code:"AW",flag:"🇦🇼"},{name:"Australia",dial_code:"+61",code:"AU",preferred:!0,flag:"🇦🇺"},{name:"Austria",dial_code:"+43",code:"AT",flag:"🇦🇹"},{name:"Azerbaijan",dial_code:"+994",code:"AZ",flag:"🇦🇿"},{name:"Bahamas",dial_code:"+1242",code:"BS",flag:"🇧🇸"},{name:"Bahrain",dial_code:"+973",code:"BH",flag:"🇧🇭"},{name:"Bangladesh",dial_code:"+880",code:"BD",flag:"🇧🇩"},{name:"Barbados",dial_code:"+1246",code:"BB",flag:"🇧🇧"},{name:"Belarus",dial_code:"+375",code:"BY",flag:"🇧🇾"},{name:"Belgium",dial_code:"+32",code:"BE",flag:"🇧🇪"},{name:"Belize",dial_code:"+501",code:"BZ",flag:"🇧🇿"},{name:"Benin",dial_code:"+229",code:"BJ",flag:"🇧🇯"},{name:"Bermuda",dial_code:"+1441",code:"BM",flag:"🇧🇲"},{name:"Bhutan",dial_code:"+975",code:"BT",flag:"🇧🇹"},{name:"Bolivia, Plurinational State of",dial_code:"+591",code:"BO",flag:"🇧🇴"},{name:"Bosnia and Herzegovina",dial_code:"+387",code:"BA",flag:"🇧🇦"},{name:"Botswana",dial_code:"+267",code:"BW",flag:"🇧🇼"},{name:"Brazil",dial_code:"+55",code:"BR",flag:"🇧🇷"},{name:"British Indian Ocean Territory",dial_code:"+246",code:"IO",flag:"🇮🇴"},{name:"Brunei Darussalam",dial_code:"+673",code:"BN",flag:"🇧🇳"},{name:"Bulgaria",dial_code:"+359",code:"BG",flag:"🇧🇬"},{name:"Burkina Faso",dial_code:"+226",code:"BF",flag:"🇧🇫"},{name:"Burundi",dial_code:"+257",code:"BI",flag:"🇧🇮"},{name:"Cambodia",dial_code:"+855",code:"KH",flag:"🇰🇭"},{name:"Cameroon",dial_code:"+237",code:"CM",flag:"🇨🇲"},{name:"Canada",dial_code:"+1",code:"CA",flag:"🇨🇦"},{name:"Cape Verde",dial_code:"+238",code:"CV",flag:"🇨🇻"},{name:"Cayman Islands",dial_code:"+345",code:"KY",flag:"🇰🇾"},{name:"Central African Republic",dial_code:"+236",code:"CF",flag:"🇨🇫"},{name:"Chad",dial_code:"+235",code:"TD",flag:"🇹🇩"},{name:"Chile",dial_code:"+56",code:"CL",flag:"🇨🇱"},{name:"China",dial_code:"+86",code:"CN",flag:"🇨🇳"},{name:"Christmas Island",dial_code:"+61",code:"CX",flag:"🇨🇽"},{name:"Cocos (Keeling) Islands",dial_code:"+61",code:"CC",flag:"🇨🇨"},{name:"Colombia",dial_code:"+57",code:"CO",flag:"🇨🇴"},{name:"Comoros",dial_code:"+269",code:"KM",flag:"🇰🇲"},{name:"Congo",dial_code:"+242",code:"CG",flag:"🇨🇬"},{name:"Congo, The Democratic Republic of the",dial_code:"+243",code:"CD",flag:"🇨🇩"},{name:"Cook Islands",dial_code:"+682",code:"CK",flag:"🇨🇰"},{name:"Costa Rica",dial_code:"+506",code:"CR",flag:"🇨🇷"},{name:"Cote d'Ivoire",dial_code:"+225",code:"CI",flag:"🇨🇮"},{name:"Croatia",dial_code:"+385",code:"HR",flag:"🇭🇷"},{name:"Cuba",dial_code:"+53",code:"CU",flag:"🇨🇺"},{name:"Cyprus",dial_code:"+357",code:"CY",flag:"🇨🇾"},{name:"Czech Republic",dial_code:"+420",code:"CZ",flag:"🇨🇿"},{name:"Denmark",dial_code:"+45",code:"DK",flag:"🇩🇰"},{name:"Djibouti",dial_code:"+253",code:"DJ",flag:"🇩🇯"},{name:"Dominica",dial_code:"+1767",code:"DM",flag:"🇩🇲"},{name:"Dominican Republic",dial_code:"+1849",code:"DO",flag:"🇩🇴"},{name:"Ecuador",dial_code:"+593",code:"EC",flag:"🇪🇨"},{name:"Egypt",dial_code:"+20",code:"EG",flag:"🇪🇬"},{name:"El Salvador",dial_code:"+503",code:"SV",flag:"🇸🇻"},{name:"Equatorial Guinea",dial_code:"+240",code:"GQ",flag:"🇬🇶"},{name:"Eritrea",dial_code:"+291",code:"ER",flag:"🇪🇷"},{name:"Estonia",dial_code:"+372",code:"EE",flag:"🇪🇪"},{name:"Ethiopia",dial_code:"+251",code:"ET",flag:"🇪🇹"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",code:"FK",flag:"🇫🇰"},{name:"Faroe Islands",dial_code:"+298",code:"FO",flag:"🇫🇴"},{name:"Fiji",dial_code:"+679",code:"FJ",flag:"🇫🇯"},{name:"Finland",dial_code:"+358",code:"FI",flag:"🇫🇮"},{name:"France",dial_code:"+33",code:"FR",flag:"🇫🇷"},{name:"French Guiana",dial_code:"+594",code:"GF",flag:"🇬🇫"},{name:"French Polynesia",dial_code:"+689",code:"PF",flag:"🇵🇫"},{name:"Gabon",dial_code:"+241",code:"GA",flag:"🇬🇦"},{name:"Gambia",dial_code:"+220",code:"GM",flag:"🇬🇲"},{name:"Georgia",dial_code:"+995",code:"GE",flag:"🇬🇪"},{name:"Germany",dial_code:"+49",code:"DE",flag:"🇩🇪"},{name:"Ghana",dial_code:"+233",code:"GH",flag:"🇬🇭"},{name:"Gibraltar",dial_code:"+350",code:"GI",flag:"🇬🇮"},{name:"Greece",dial_code:"+30",code:"GR",flag:"🇬🇷"},{name:"Greenland",dial_code:"+299",code:"GL",flag:"🇬🇱"},{name:"Grenada",dial_code:"+1473",code:"GD",flag:"🇬🇩"},{name:"Guadeloupe",dial_code:"+590",code:"GP",flag:"🇬🇵"},{name:"Guam",dial_code:"+1671",code:"GU",flag:"🇬🇺"},{name:"Guatemala",dial_code:"+502",code:"GT",flag:"🇬🇹"},{name:"Guernsey",dial_code:"+44",code:"GG",flag:"🇬🇬"},{name:"Guinea",dial_code:"+224",code:"GN",flag:"🇬🇳"},{name:"Guinea-Bissau",dial_code:"+245",code:"GW",flag:"🇬🇼"},{name:"Guyana",dial_code:"+592",code:"GY",flag:"🇬🇾"},{name:"Haiti",dial_code:"+509",code:"HT",flag:"🇭🇹"},{name:"Holy See (Vatican City State)",dial_code:"+379",code:"VA",flag:"🇻🇦"},{name:"Honduras",dial_code:"+504",code:"HN",flag:"🇭🇳"},{name:"Hong Kong",dial_code:"+852",code:"HK",flag:"🇭🇰"},{name:"Hungary",dial_code:"+36",code:"HU",flag:"🇭🇺"},{name:"Iceland",dial_code:"+354",code:"IS",flag:"🇮🇸"},{name:"India",dial_code:"+91",code:"IN",preferred:!0,flag:"🇮🇳"},{name:"Indonesia",dial_code:"+62",code:"ID",flag:"🇮🇩"},{name:"Iran, Islamic Republic of",dial_code:"+98",code:"IR",flag:"🇮🇷"},{name:"Iraq",dial_code:"+964",code:"IQ",flag:"🇮🇶"},{name:"Ireland",dial_code:"+353",code:"IE",flag:"🇮🇪"},{name:"Isle of Man",dial_code:"+44",code:"IM",flag:"🇮🇲"},{name:"Israel",dial_code:"+972",code:"IL",flag:"🇮🇱"},{name:"Italy",dial_code:"+39",code:"IT",flag:"🇮🇹"},{name:"Jamaica",dial_code:"+1876",code:"JM",flag:"🇯🇲"},{name:"Japan",dial_code:"+81",code:"JP",flag:"🇯🇵"},{name:"Jersey",dial_code:"+44",code:"JE",flag:"🇯🇪"},{name:"Jordan",dial_code:"+962",code:"JO",flag:"🇯🇴"},{name:"Kazakhstan",dial_code:"+77",code:"KZ",flag:"🇰🇿"},{name:"Kenya",dial_code:"+254",code:"KE",flag:"🇰🇪"},{name:"Kiribati",dial_code:"+686",code:"KI",flag:"🇰🇮"},{name:"Korea, Democratic People's Republic of",dial_code:"+850",code:"KP",flag:"🇰🇵"},{name:"Korea, Republic of",dial_code:"+82",code:"KR",flag:"🇰🇷"},{name:"Kuwait",dial_code:"+965",code:"KW",flag:"🇰🇼"},{name:"Kyrgyzstan",dial_code:"+996",code:"KG",flag:"🇰🇬"},{name:"Lao People's Democratic Republic",dial_code:"+856",code:"LA",flag:"🇱🇦"},{name:"Latvia",dial_code:"+371",code:"LV",flag:"🇱🇻"},{name:"Lebanon",dial_code:"+961",code:"LB",flag:"🇱🇧"},{name:"Lesotho",dial_code:"+266",code:"LS",flag:"🇱🇸"},{name:"Liberia",dial_code:"+231",code:"LR",flag:"🇱🇷"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",code:"LY",flag:"🇱🇾"},{name:"Liechtenstein",dial_code:"+423",code:"LI",flag:"🇱🇮"},{name:"Lithuania",dial_code:"+370",code:"LT",flag:"🇱🇹"},{name:"Luxembourg",dial_code:"+352",code:"LU",flag:"🇱🇺"},{name:"Macao",dial_code:"+853",code:"MO",flag:"🇲🇴"},{name:"Macedonia, The Former Yugoslav Republic of",dial_code:"+389",code:"MK",flag:"🇲🇰"},{name:"Madagascar",dial_code:"+261",code:"MG",flag:"🇲🇬"},{name:"Malawi",dial_code:"+265",code:"MW",flag:"🇲🇼"},{name:"Malaysia",dial_code:"+60",code:"MY",flag:"🇲🇾"},{name:"Maldives",dial_code:"+960",code:"MV",flag:"🇲🇻"},{name:"Mali",dial_code:"+223",code:"ML",flag:"🇲🇱"},{name:"Malta",dial_code:"+356",code:"MT",flag:"🇲🇹"},{name:"Marshall Islands",dial_code:"+692",code:"MH",flag:"🇲🇭"},{name:"Martinique",dial_code:"+596",code:"MQ",flag:"🇲🇶"},{name:"Mauritania",dial_code:"+222",code:"MR",flag:"🇲🇷"},{name:"Mauritius",dial_code:"+230",code:"MU",flag:"🇲🇺"},{name:"Mayotte",dial_code:"+262",code:"YT",flag:"🇾🇹"},{name:"Mexico",dial_code:"+52",code:"MX",flag:"🇲🇽"},{name:"Micronesia, Federated States of",dial_code:"+691",code:"FM",flag:"🇫🇲"},{name:"Moldova, Republic of",dial_code:"+373",code:"MD",flag:"🇲🇩"},{name:"Monaco",dial_code:"+377",code:"MC",flag:"🇲🇨"},{name:"Mongolia",dial_code:"+976",code:"MN",flag:"🇲🇳"},{name:"Montenegro",dial_code:"+382",code:"ME",flag:"🇲🇪"},{name:"Montserrat",dial_code:"+1664",code:"MS",flag:"🇲🇸"},{name:"Morocco",dial_code:"+212",code:"MA",flag:"🇲🇦"},{name:"Mozambique",dial_code:"+258",code:"MZ",flag:"🇲🇿"},{name:"Myanmar",dial_code:"+95",code:"MM",flag:"🇲🇲"},{name:"Namibia",dial_code:"+264",code:"NA",flag:"🇳🇦"},{name:"Nauru",dial_code:"+674",code:"NR",flag:"🇳🇷"},{name:"Nepal",dial_code:"+977",code:"NP",flag:"🇳🇵"},{name:"Netherlands",dial_code:"+31",code:"NL",flag:"🇳🇱"},{name:"Netherlands Antilles",dial_code:"+599",code:"AN",flag:"🇦🇳"},{name:"New Caledonia",dial_code:"+687",code:"NC",flag:"🇳🇨"},{name:"New Zealand",dial_code:"+64",code:"NZ",flag:"🇳🇿"},{name:"Nicaragua",dial_code:"+505",code:"NI",flag:"🇳🇮"},{name:"Niger",dial_code:"+227",code:"NE",flag:"🇳🇪"},{name:"Nigeria",dial_code:"+234",code:"NG",flag:"🇳🇬"},{name:"Niue",dial_code:"+683",code:"NU",flag:"🇳🇺"},{name:"Norfolk Island",dial_code:"+672",code:"NF",flag:"🇳🇫"},{name:"Northern Mariana Islands",dial_code:"+1670",code:"MP",flag:"🇲🇵"},{name:"Norway",dial_code:"+47",code:"NO",flag:"🇳🇴"},{name:"Oman",dial_code:"+968",code:"OM",flag:"🇴🇲"},{name:"Pakistan",dial_code:"+92",code:"PK",flag:"🇵🇰"},{name:"Palau",dial_code:"+680",code:"PW",flag:"🇵🇼"},{name:"Palestinian Territory, Occupied",dial_code:"+970",code:"PS",flag:"🇵🇸"},{name:"Panama",dial_code:"+507",code:"PA",flag:"🇵🇦"},{name:"Papua New Guinea",dial_code:"+675",code:"PG",flag:"🇵🇬"},{name:"Paraguay",dial_code:"+595",code:"PY",flag:"🇵🇾"},{name:"Peru",dial_code:"+51",code:"PE",flag:"🇵🇪"},{name:"Philippines",dial_code:"+63",code:"PH",flag:"🇵🇭"},{name:"Pitcairn",dial_code:"+872",code:"PN",flag:"🇵🇳"},{name:"Poland",dial_code:"+48",code:"PL",flag:"🇵🇱"},{name:"Portugal",dial_code:"+351",code:"PT",flag:"🇵🇹"},{name:"Puerto Rico",dial_code:"+1939",code:"PR",flag:"🇵🇷"},{name:"Qatar",dial_code:"+974",code:"QA",flag:"🇶🇦"},{name:"Romania",dial_code:"+40",code:"RO",flag:"🇷🇴"},{name:"Russia",dial_code:"+7",code:"RU",flag:"🇷🇺"},{name:"Rwanda",dial_code:"+250",code:"RW",flag:"🇷🇼"},{name:"Réunion",dial_code:"+262",code:"RE",flag:"🇷🇪"},{name:"Saint Barthélemy",dial_code:"+590",code:"BL",flag:"🇧🇱"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",code:"SH",flag:"🇸🇭"},{name:"Saint Kitts and Nevis",dial_code:"+1869",code:"KN",flag:"🇰🇳"},{name:"Saint Lucia",dial_code:"+1758",code:"LC",flag:"🇱🇨"},{name:"Saint Martin",dial_code:"+590",code:"MF",flag:"🇲🇫"},{name:"Saint Pierre and Miquelon",dial_code:"+508",code:"PM",flag:"🇵🇲"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",code:"VC",flag:"🇻🇨"},{name:"Samoa",dial_code:"+685",code:"WS",flag:"🇼🇸"},{name:"San Marino",dial_code:"+378",code:"SM",flag:"🇸🇲"},{name:"Sao Tome and Principe",dial_code:"+239",code:"ST",flag:"🇸🇹"},{name:"Saudi Arabia",dial_code:"+966",code:"SA",flag:"🇸🇦"},{name:"Senegal",dial_code:"+221",code:"SN",flag:"🇸🇳"},{name:"Serbia",dial_code:"+381",code:"RS",flag:"🇷🇸"},{name:"Seychelles",dial_code:"+248",code:"SC",flag:"🇸🇨"},{name:"Sierra Leone",dial_code:"+232",code:"SL",flag:"🇸🇱"},{name:"Singapore",dial_code:"+65",code:"SG",flag:"🇸🇬"},{name:"Slovakia",dial_code:"+421",code:"SK",flag:"🇸🇰"},{name:"Slovenia",dial_code:"+386",code:"SI",flag:"🇸🇮"},{name:"Solomon Islands",dial_code:"+677",code:"SB",flag:"🇸🇧"},{name:"Somalia",dial_code:"+252",code:"SO",flag:"🇸🇴"},{name:"South Africa",dial_code:"+27",code:"ZA",flag:"🇿🇦"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",code:"GS",flag:"🇬🇸"},{name:"Spain",dial_code:"+34",code:"ES",flag:"🇪🇸"},{name:"Sri Lanka",dial_code:"+94",code:"LK",flag:"🇱🇰"},{name:"Sudan",dial_code:"+249",code:"SD",flag:"🇸🇩"},{name:"South Sudan",dial_code:"+211",code:"SS",flag:"🇸🇸"},{name:"Suriname",dial_code:"+597",code:"SR",flag:"🇸🇷"},{name:"Svalbard and Jan Mayen",dial_code:"+47",code:"SJ",flag:"🇸🇯"},{name:"Swaziland",dial_code:"+268",code:"SZ",flag:"🇸🇿"},{name:"Sweden",dial_code:"+46",code:"SE",flag:"🇸🇪"},{name:"Switzerland",dial_code:"+41",code:"CH",flag:"🇨🇭"},{name:"Syrian Arab Republic",dial_code:"+963",code:"SY",flag:"🇸🇾"},{name:"Taiwan, Province of China",dial_code:"+886",code:"TW",flag:"🇹🇼"},{name:"Tajikistan",dial_code:"+992",code:"TJ",flag:"🇹🇯"},{name:"Tanzania, United Republic of",dial_code:"+255",code:"TZ",flag:"🇹🇿"},{name:"Thailand",dial_code:"+66",code:"TH",flag:"🇹🇭"},{name:"Timor-Leste",dial_code:"+670",code:"TL",flag:"🇹🇱"},{name:"Togo",dial_code:"+228",code:"TG",flag:"🇹🇬"},{name:"Tokelau",dial_code:"+690",code:"TK",flag:"🇹🇰"},{name:"Tonga",dial_code:"+676",code:"TO",flag:"🇹🇴"},{name:"Trinidad and Tobago",dial_code:"+1868",code:"TT",flag:"🇹🇹"},{name:"Tunisia",dial_code:"+216",code:"TN",flag:"🇹🇳"},{name:"Turkey",dial_code:"+90",code:"TR",flag:"🇹🇷"},{name:"Turkmenistan",dial_code:"+993",code:"TM",flag:"🇹🇲"},{name:"Turks and Caicos Islands",dial_code:"+1649",code:"TC",flag:"🇹🇨"},{name:"Tuvalu",dial_code:"+688",code:"TV",flag:"🇹🇻"},{name:"Uganda",dial_code:"+256",code:"UG",flag:"🇺🇬"},{name:"Ukraine",dial_code:"+380",code:"UA",flag:"🇺🇦"},{name:"United Arab Emirates",dial_code:"+971",code:"AE",preferred:!0,flag:"🇦🇪"},{name:"United Kingdom",dial_code:"+44",code:"GB",preferred:!0,flag:"🇬🇧"},{name:"United States",dial_code:"+1",code:"US",preferred:!0,flag:"🇺🇸"},{name:"Uruguay",dial_code:"+598",code:"UY",flag:"🇺🇾"},{name:"Uzbekistan",dial_code:"+998",code:"UZ",flag:"🇺🇿"},{name:"Vanuatu",dial_code:"+678",code:"VU",flag:"🇻🇺"},{name:"Venezuela, Bolivarian Republic of",dial_code:"+58",code:"VE",flag:"🇻🇪"},{name:"Viet Nam",dial_code:"+84",code:"VN",flag:"🇻🇳"},{name:"Virgin Islands, British",dial_code:"+1284",code:"VG",flag:"🇻🇬"},{name:"Virgin Islands, U.S.",dial_code:"+1340",code:"VI",flag:"🇻🇮"},{name:"Wallis and Futuna",dial_code:"+681",code:"WF",flag:"🇼🇫"},{name:"Yemen",dial_code:"+967",code:"YE",flag:"🇾🇪"},{name:"Zambia",dial_code:"+260",code:"ZM",flag:"🇿🇲"},{name:"Zimbabwe",dial_code:"+263",code:"ZW",flag:"🇿🇼"},{name:"Åland Islands",dial_code:"+358",code:"AX",flag:"🇦🇽"}];Ri.default=Db;Object.defineProperty(je,"__esModule",{value:!0});je.searchFlag=je.findFlagsByDialCode=vl=je.findFlagByDialCode=qi=je.findFlag=Di=je.getList=void 0;var jr=Ri,Ab=function(e){return jr.default.find(function(t){return t.code.toLowerCase()===e.toLowerCase()})},qi=je.findFlag=Ab,Tb=function(e){var t,n=_l(e),r=n.find(function(o){return o.dial_code===e&&o.preferred});return r||((t=n[0])!==null&&t!==void 0?t:null)},vl=je.findFlagByDialCode=Tb,_l=function(e){return jr.default.filter(function(t){return t.dial_code===e})};je.findFlagsByDialCode=_l;var zb=function(){return jr.default},Di=je.getList=zb,Lb=function(e){return jr.default.filter(function(t){return t.code.toLowerCase().includes(e.toLowerCase())||t.name.toLowerCase().includes(e.toLowerCase())||t.dial_code.toLowerCase().includes(e.toLowerCase())})};je.searchFlag=Lb;const Pb=({name:e,id:t,label:n,placeholder:r="",className:o="",value:i,flag:a,onChange:s,onFlagChange:c})=>{d.useLayoutEffect(()=>{qb()},[]);const l=d.useCallback(u=>{const m=u.target.value;c(qi(m))},[c]);return b.jsxs("div",{className:te("sid-input","sid-input--tel",ml,o),children:[a?b.jsxs("div",{className:fb,children:[b.jsxs("div",{className:gb,children:[b.jsxs("div",{children:[a.flag," ",a.dial_code]}),b.jsx(bl,{})]}),b.jsx("select",{className:ub,value:a.code,onChange:l,children:Di().map(u=>b.jsxs("option",{value:u.code,children:[u.name," ",u.dial_code]},u.code))})]}):null,b.jsx(gl,{id:t,name:e,label:n,placeholder:r,className:o,type:"tel",value:i,onChange:s})]})};var Ob="_1dpv0n90",Mb="_1dpv0n91",es="_1dpv0n92";const yl=({children:e})=>b.jsxs("div",{className:te("sid-divider",Ob),children:[b.jsx("hr",{className:es}),b.jsx("span",{className:Mb,children:e}),b.jsx("hr",{className:es})]});function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z.apply(this,arguments)}function wt(e,t=[]){let n=[];function r(i,a){const s=d.createContext(a),c=n.length;n=[...n,a];function l(m){const{scope:h,children:p,...g}=m,f=h?.[e][c]||s,w=d.useMemo(()=>g,Object.values(g));return d.createElement(f.Provider,{value:w},p)}function u(m,h){const p=h?.[e][c]||s,g=d.useContext(p);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=n.map(a=>d.createContext(a));return function(a){const s=a?.[e]||i;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:s}}),[a,s])}};return o.scopeName=e,[r,Nb(o,...t)]}function Nb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(o){const i=r.reduce((a,{useScope:s,scopeName:c})=>{const l=s(o)[`__scope${c}`];return{...a,...l}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ub(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function xl(...e){return t=>e.forEach(n=>Ub(n,t))}function Ce(...e){return d.useCallback(xl(...e),e)}const Dn=d.forwardRef((e,t)=>{const{children:n,...r}=e,o=d.Children.toArray(n),i=o.find(Vb);if(i){const a=i.props.children,s=o.map(c=>c===i?d.Children.count(a)>1?d.Children.only(null):d.isValidElement(a)?a.props.children:null:c);return d.createElement(Zo,Z({},r,{ref:t}),d.isValidElement(a)?d.cloneElement(a,void 0,s):null)}return d.createElement(Zo,Z({},r,{ref:t}),n)});Dn.displayName="Slot";const Zo=d.forwardRef((e,t)=>{const{children:n,...r}=e;return d.isValidElement(n)?d.cloneElement(n,{...Bb(r,n.props),ref:t?xl(t,n.ref):n.ref}):d.Children.count(n)>1?d.Children.only(null):null});Zo.displayName="SlotClone";const Fb=({children:e})=>d.createElement(d.Fragment,null,e);function Vb(e){return d.isValidElement(e)&&e.type===Fb}function Bb(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ai(e){const t=e+"CollectionProvider",[n,r]=wt(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:g,children:f}=p,w=V.useRef(null),y=V.useRef(new Map).current;return V.createElement(o,{scope:g,itemMap:y,collectionRef:w},f)},s=e+"CollectionSlot",c=V.forwardRef((p,g)=>{const{scope:f,children:w}=p,y=i(s,f),v=Ce(g,y.collectionRef);return V.createElement(Dn,{ref:v},w)}),l=e+"CollectionItemSlot",u="data-radix-collection-item",m=V.forwardRef((p,g)=>{const{scope:f,children:w,...y}=p,v=V.useRef(null),_=Ce(g,v),C=i(l,f);return V.useEffect(()=>(C.itemMap.set(v,{ref:v,...y}),()=>void C.itemMap.delete(v))),V.createElement(Dn,{[u]:"",ref:_},w)});function h(p){const g=i(e+"CollectionConsumer",p);return V.useCallback(()=>{const f=g.collectionRef.current;if(!f)return[];const w=Array.from(f.querySelectorAll(`[${u}]`));return Array.from(g.itemMap.values()).sort((y,v)=>w.indexOf(y.ref.current)-w.indexOf(v.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:c,ItemSlot:m},h,r]}function de(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function ot(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function cn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Hb({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=ot(n),c=d.useCallback(l=>{if(i){const u=typeof l=="function"?l(e):l;u!==e&&s(u)}else o(l)},[i,e,o,s]);return[a,c]}function Hb({defaultProp:e,onChange:t}){const n=d.useState(e),[r]=n,o=d.useRef(r),i=ot(t);return d.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const jb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],_e=jb.reduce((e,t)=>{const n=d.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Dn:t;return d.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),d.createElement(s,Z({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Gb(e,t){e&&un.flushSync(()=>e.dispatchEvent(t))}const Pe=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{};function Wb(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}const Cl=e=>{const{present:t,children:n}=e,r=Kb(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),i=Ce(r.ref,o.ref);return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:i}):null};Cl.displayName="Presence";function Kb(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),i=d.useRef("none"),a=e?"mounted":"unmounted",[s,c]=Wb(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const l=Jn(r.current);i.current=s==="mounted"?l:"none"},[s]),Pe(()=>{const l=r.current,u=o.current;if(u!==e){const m=i.current,h=Jn(l);e?c("MOUNT"):h==="none"||l?.display==="none"?c("UNMOUNT"):c(u&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Pe(()=>{if(t){const l=m=>{const h=Jn(r.current).includes(m.animationName);m.target===t&&h&&un.flushSync(()=>c("ANIMATION_END"))},u=m=>{m.target===t&&(i.current=Jn(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:d.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Jn(e){return e?.animationName||"none"}const Zb=d.useId||(()=>{});let Yb=0;function Mn(e){const[t,n]=d.useState(Zb());return Pe(()=>{e||n(r=>r??String(Yb++))},[e]),e||(t?`radix-${t}`:"")}const kl="Collapsible",[Jb,Sl]=wt(kl);Jb(kl);const Xb=d.createContext(void 0);function Gr(e){const t=d.useContext(Xb);return e||t||"ltr"}const Nn="Accordion",Qb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[El,ew,tw]=Ai(Nn),[Wr,U6]=wt(Nn,[tw,Sl]);Sl();const nw=V.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return V.createElement(El.Provider,{scope:e.__scopeAccordion},n==="multiple"?V.createElement(ow,Z({},i,{ref:t})):V.createElement(rw,Z({},o,{ref:t})))});nw.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[$l,F6]=Wr(Nn),[Il,V6]=Wr(Nn,{collapsible:!1}),rw=V.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,c]=cn({prop:n,defaultProp:r,onChange:o});return V.createElement($l,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:V.useCallback(()=>i&&c(""),[i,c])},V.createElement(Il,{scope:e.__scopeAccordion,collapsible:i},V.createElement(Rl,Z({},a,{ref:t}))))}),ow=V.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=cn({prop:n,defaultProp:r,onChange:o}),c=V.useCallback(u=>s((m=[])=>[...m,u]),[s]),l=V.useCallback(u=>s((m=[])=>m.filter(h=>h!==u)),[s]);return V.createElement($l,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:l},V.createElement(Il,{scope:e.__scopeAccordion,collapsible:!0},V.createElement(Rl,Z({},i,{ref:t}))))}),[iw,B6]=Wr(Nn),Rl=V.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,s=V.useRef(null),c=Ce(s,t),l=ew(n),u=Gr(o)==="ltr",m=de(e.onKeyDown,h=>{var p;if(!Qb.includes(h.key))return;const g=h.target,f=l().filter(D=>{var P;return!((P=D.ref.current)!==null&&P!==void 0&&P.disabled)}),w=f.findIndex(D=>D.ref.current===g),y=f.length;if(w===-1)return;h.preventDefault();let v=w;const _=0,C=y-1,S=()=>{v=w+1,v>C&&(v=_)},I=()=>{v=w-1,v<_&&(v=C)};switch(h.key){case"Home":v=_;break;case"End":v=C;break;case"ArrowRight":i==="horizontal"&&(u?S():I());break;case"ArrowDown":i==="vertical"&&S();break;case"ArrowLeft":i==="horizontal"&&(u?I():S());break;case"ArrowUp":i==="vertical"&&I();break}const R=v%y;(p=f[R].ref.current)===null||p===void 0||p.focus()});return V.createElement(iw,{scope:n,disabled:r,direction:o,orientation:i},V.createElement(El.Slot,{scope:n},V.createElement(_e.div,Z({},a,{"data-orientation":i,ref:c,onKeyDown:r?void 0:m}))))}),aw="AccordionItem";Wr(aw);function sw(e,t=globalThis?.document){const n=ot(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}let vo=0;function cw(){d.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:ts()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:ts()),vo++,()=>{vo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),vo--}},[])}function ts(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var tt=function(){return tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},tt.apply(this,arguments)};function ql(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function lw(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var cr="right-scroll-bar-position",lr="width-before-scroll-bar",dw="with-scroll-bars-hidden",uw="--removed-body-scroll-bar-size";function fw(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function hw(e,t){var n=d.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function pw(e,t){return hw(null,function(n){return e.forEach(function(r){return fw(r,n)})})}function mw(e){return e}function gw(e,t){t===void 0&&(t=mw);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var u=a;a=[],u.forEach(i)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),n}}}};return o}function bw(e){e===void 0&&(e={});var t=gw(null);return t.options=tt({async:!0,ssr:!1},e),t}var Dl=function(e){var t=e.sideCar,n=ql(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,tt({},n))};Dl.isSideCarExport=!0;function ww(e,t){return e.useMedium(t),Dl}var Al=bw(),_o=function(){},Kr=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:_o,onWheelCapture:_o,onTouchMoveCapture:_o}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,m=e.shards,h=e.sideCar,p=e.noIsolation,g=e.inert,f=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,v=ql(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=h,C=pw([n,t]),S=tt(tt({},v),o);return d.createElement(d.Fragment,null,u&&d.createElement(_,{sideCar:Al,removeScrollBar:l,shards:m,noIsolation:p,inert:g,setCallbacks:i,allowPinchZoom:!!f,lockRef:n}),a?d.cloneElement(d.Children.only(s),tt(tt({},S),{ref:C})):d.createElement(y,tt({},S,{className:c,ref:C}),s))});Kr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Kr.classNames={fullWidth:lr,zeroRight:cr};var vw=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _w(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=vw();return t&&e.setAttribute("nonce",t),e}function yw(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xw(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Cw=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_w())&&(yw(t,n),xw(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},kw=function(){var e=Cw();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Tl=function(){var e=kw(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Sw={left:0,top:0,right:0,gap:0},yo=function(e){return parseInt(e||"",10)||0},Ew=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[yo(n),yo(r),yo(o)]},$w=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Sw;var t=Ew(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Iw=Tl(),Rw=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
55
|
+
}`,document.head.appendChild(n),!0}return!1}var je={},Ri={};Object.defineProperty(Ri,"__esModule",{value:!0});var Db=[{name:"Afghanistan",dial_code:"+93",code:"AF",flag:"🇦🇫"},{name:"Albania",dial_code:"+355",code:"AL",flag:"🇦🇱"},{name:"Algeria",dial_code:"+213",code:"DZ",flag:"🇩🇿"},{name:"AmericanSamoa",dial_code:"+1684",code:"AS",flag:"🇦🇸"},{name:"Andorra",dial_code:"+376",code:"AD",flag:"🇦🇩"},{name:"Angola",dial_code:"+244",code:"AO",flag:"🇦🇴"},{name:"Anguilla",dial_code:"+1264",code:"AI",flag:"🇦🇮"},{name:"Antarctica",dial_code:"+672",code:"AQ",flag:"🇦🇶"},{name:"Antigua and Barbuda",dial_code:"+1268",code:"AG",flag:"🇦🇬"},{name:"Argentina",dial_code:"+54",code:"AR",flag:"🇦🇷"},{name:"Armenia",dial_code:"+374",code:"AM",flag:"🇦🇲"},{name:"Aruba",dial_code:"+297",code:"AW",flag:"🇦🇼"},{name:"Australia",dial_code:"+61",code:"AU",preferred:!0,flag:"🇦🇺"},{name:"Austria",dial_code:"+43",code:"AT",flag:"🇦🇹"},{name:"Azerbaijan",dial_code:"+994",code:"AZ",flag:"🇦🇿"},{name:"Bahamas",dial_code:"+1242",code:"BS",flag:"🇧🇸"},{name:"Bahrain",dial_code:"+973",code:"BH",flag:"🇧🇭"},{name:"Bangladesh",dial_code:"+880",code:"BD",flag:"🇧🇩"},{name:"Barbados",dial_code:"+1246",code:"BB",flag:"🇧🇧"},{name:"Belarus",dial_code:"+375",code:"BY",flag:"🇧🇾"},{name:"Belgium",dial_code:"+32",code:"BE",flag:"🇧🇪"},{name:"Belize",dial_code:"+501",code:"BZ",flag:"🇧🇿"},{name:"Benin",dial_code:"+229",code:"BJ",flag:"🇧🇯"},{name:"Bermuda",dial_code:"+1441",code:"BM",flag:"🇧🇲"},{name:"Bhutan",dial_code:"+975",code:"BT",flag:"🇧🇹"},{name:"Bolivia, Plurinational State of",dial_code:"+591",code:"BO",flag:"🇧🇴"},{name:"Bosnia and Herzegovina",dial_code:"+387",code:"BA",flag:"🇧🇦"},{name:"Botswana",dial_code:"+267",code:"BW",flag:"🇧🇼"},{name:"Brazil",dial_code:"+55",code:"BR",flag:"🇧🇷"},{name:"British Indian Ocean Territory",dial_code:"+246",code:"IO",flag:"🇮🇴"},{name:"Brunei Darussalam",dial_code:"+673",code:"BN",flag:"🇧🇳"},{name:"Bulgaria",dial_code:"+359",code:"BG",flag:"🇧🇬"},{name:"Burkina Faso",dial_code:"+226",code:"BF",flag:"🇧🇫"},{name:"Burundi",dial_code:"+257",code:"BI",flag:"🇧🇮"},{name:"Cambodia",dial_code:"+855",code:"KH",flag:"🇰🇭"},{name:"Cameroon",dial_code:"+237",code:"CM",flag:"🇨🇲"},{name:"Canada",dial_code:"+1",code:"CA",flag:"🇨🇦"},{name:"Cape Verde",dial_code:"+238",code:"CV",flag:"🇨🇻"},{name:"Cayman Islands",dial_code:"+345",code:"KY",flag:"🇰🇾"},{name:"Central African Republic",dial_code:"+236",code:"CF",flag:"🇨🇫"},{name:"Chad",dial_code:"+235",code:"TD",flag:"🇹🇩"},{name:"Chile",dial_code:"+56",code:"CL",flag:"🇨🇱"},{name:"China",dial_code:"+86",code:"CN",flag:"🇨🇳"},{name:"Christmas Island",dial_code:"+61",code:"CX",flag:"🇨🇽"},{name:"Cocos (Keeling) Islands",dial_code:"+61",code:"CC",flag:"🇨🇨"},{name:"Colombia",dial_code:"+57",code:"CO",flag:"🇨🇴"},{name:"Comoros",dial_code:"+269",code:"KM",flag:"🇰🇲"},{name:"Congo",dial_code:"+242",code:"CG",flag:"🇨🇬"},{name:"Congo, The Democratic Republic of the",dial_code:"+243",code:"CD",flag:"🇨🇩"},{name:"Cook Islands",dial_code:"+682",code:"CK",flag:"🇨🇰"},{name:"Costa Rica",dial_code:"+506",code:"CR",flag:"🇨🇷"},{name:"Cote d'Ivoire",dial_code:"+225",code:"CI",flag:"🇨🇮"},{name:"Croatia",dial_code:"+385",code:"HR",flag:"🇭🇷"},{name:"Cuba",dial_code:"+53",code:"CU",flag:"🇨🇺"},{name:"Cyprus",dial_code:"+357",code:"CY",flag:"🇨🇾"},{name:"Czech Republic",dial_code:"+420",code:"CZ",flag:"🇨🇿"},{name:"Denmark",dial_code:"+45",code:"DK",flag:"🇩🇰"},{name:"Djibouti",dial_code:"+253",code:"DJ",flag:"🇩🇯"},{name:"Dominica",dial_code:"+1767",code:"DM",flag:"🇩🇲"},{name:"Dominican Republic",dial_code:"+1849",code:"DO",flag:"🇩🇴"},{name:"Ecuador",dial_code:"+593",code:"EC",flag:"🇪🇨"},{name:"Egypt",dial_code:"+20",code:"EG",flag:"🇪🇬"},{name:"El Salvador",dial_code:"+503",code:"SV",flag:"🇸🇻"},{name:"Equatorial Guinea",dial_code:"+240",code:"GQ",flag:"🇬🇶"},{name:"Eritrea",dial_code:"+291",code:"ER",flag:"🇪🇷"},{name:"Estonia",dial_code:"+372",code:"EE",flag:"🇪🇪"},{name:"Ethiopia",dial_code:"+251",code:"ET",flag:"🇪🇹"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",code:"FK",flag:"🇫🇰"},{name:"Faroe Islands",dial_code:"+298",code:"FO",flag:"🇫🇴"},{name:"Fiji",dial_code:"+679",code:"FJ",flag:"🇫🇯"},{name:"Finland",dial_code:"+358",code:"FI",flag:"🇫🇮"},{name:"France",dial_code:"+33",code:"FR",flag:"🇫🇷"},{name:"French Guiana",dial_code:"+594",code:"GF",flag:"🇬🇫"},{name:"French Polynesia",dial_code:"+689",code:"PF",flag:"🇵🇫"},{name:"Gabon",dial_code:"+241",code:"GA",flag:"🇬🇦"},{name:"Gambia",dial_code:"+220",code:"GM",flag:"🇬🇲"},{name:"Georgia",dial_code:"+995",code:"GE",flag:"🇬🇪"},{name:"Germany",dial_code:"+49",code:"DE",flag:"🇩🇪"},{name:"Ghana",dial_code:"+233",code:"GH",flag:"🇬🇭"},{name:"Gibraltar",dial_code:"+350",code:"GI",flag:"🇬🇮"},{name:"Greece",dial_code:"+30",code:"GR",flag:"🇬🇷"},{name:"Greenland",dial_code:"+299",code:"GL",flag:"🇬🇱"},{name:"Grenada",dial_code:"+1473",code:"GD",flag:"🇬🇩"},{name:"Guadeloupe",dial_code:"+590",code:"GP",flag:"🇬🇵"},{name:"Guam",dial_code:"+1671",code:"GU",flag:"🇬🇺"},{name:"Guatemala",dial_code:"+502",code:"GT",flag:"🇬🇹"},{name:"Guernsey",dial_code:"+44",code:"GG",flag:"🇬🇬"},{name:"Guinea",dial_code:"+224",code:"GN",flag:"🇬🇳"},{name:"Guinea-Bissau",dial_code:"+245",code:"GW",flag:"🇬🇼"},{name:"Guyana",dial_code:"+592",code:"GY",flag:"🇬🇾"},{name:"Haiti",dial_code:"+509",code:"HT",flag:"🇭🇹"},{name:"Holy See (Vatican City State)",dial_code:"+379",code:"VA",flag:"🇻🇦"},{name:"Honduras",dial_code:"+504",code:"HN",flag:"🇭🇳"},{name:"Hong Kong",dial_code:"+852",code:"HK",flag:"🇭🇰"},{name:"Hungary",dial_code:"+36",code:"HU",flag:"🇭🇺"},{name:"Iceland",dial_code:"+354",code:"IS",flag:"🇮🇸"},{name:"India",dial_code:"+91",code:"IN",preferred:!0,flag:"🇮🇳"},{name:"Indonesia",dial_code:"+62",code:"ID",flag:"🇮🇩"},{name:"Iran, Islamic Republic of",dial_code:"+98",code:"IR",flag:"🇮🇷"},{name:"Iraq",dial_code:"+964",code:"IQ",flag:"🇮🇶"},{name:"Ireland",dial_code:"+353",code:"IE",flag:"🇮🇪"},{name:"Isle of Man",dial_code:"+44",code:"IM",flag:"🇮🇲"},{name:"Israel",dial_code:"+972",code:"IL",flag:"🇮🇱"},{name:"Italy",dial_code:"+39",code:"IT",flag:"🇮🇹"},{name:"Jamaica",dial_code:"+1876",code:"JM",flag:"🇯🇲"},{name:"Japan",dial_code:"+81",code:"JP",flag:"🇯🇵"},{name:"Jersey",dial_code:"+44",code:"JE",flag:"🇯🇪"},{name:"Jordan",dial_code:"+962",code:"JO",flag:"🇯🇴"},{name:"Kazakhstan",dial_code:"+77",code:"KZ",flag:"🇰🇿"},{name:"Kenya",dial_code:"+254",code:"KE",flag:"🇰🇪"},{name:"Kiribati",dial_code:"+686",code:"KI",flag:"🇰🇮"},{name:"Korea, Democratic People's Republic of",dial_code:"+850",code:"KP",flag:"🇰🇵"},{name:"Korea, Republic of",dial_code:"+82",code:"KR",flag:"🇰🇷"},{name:"Kuwait",dial_code:"+965",code:"KW",flag:"🇰🇼"},{name:"Kyrgyzstan",dial_code:"+996",code:"KG",flag:"🇰🇬"},{name:"Lao People's Democratic Republic",dial_code:"+856",code:"LA",flag:"🇱🇦"},{name:"Latvia",dial_code:"+371",code:"LV",flag:"🇱🇻"},{name:"Lebanon",dial_code:"+961",code:"LB",flag:"🇱🇧"},{name:"Lesotho",dial_code:"+266",code:"LS",flag:"🇱🇸"},{name:"Liberia",dial_code:"+231",code:"LR",flag:"🇱🇷"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",code:"LY",flag:"🇱🇾"},{name:"Liechtenstein",dial_code:"+423",code:"LI",flag:"🇱🇮"},{name:"Lithuania",dial_code:"+370",code:"LT",flag:"🇱🇹"},{name:"Luxembourg",dial_code:"+352",code:"LU",flag:"🇱🇺"},{name:"Macao",dial_code:"+853",code:"MO",flag:"🇲🇴"},{name:"Macedonia, The Former Yugoslav Republic of",dial_code:"+389",code:"MK",flag:"🇲🇰"},{name:"Madagascar",dial_code:"+261",code:"MG",flag:"🇲🇬"},{name:"Malawi",dial_code:"+265",code:"MW",flag:"🇲🇼"},{name:"Malaysia",dial_code:"+60",code:"MY",flag:"🇲🇾"},{name:"Maldives",dial_code:"+960",code:"MV",flag:"🇲🇻"},{name:"Mali",dial_code:"+223",code:"ML",flag:"🇲🇱"},{name:"Malta",dial_code:"+356",code:"MT",flag:"🇲🇹"},{name:"Marshall Islands",dial_code:"+692",code:"MH",flag:"🇲🇭"},{name:"Martinique",dial_code:"+596",code:"MQ",flag:"🇲🇶"},{name:"Mauritania",dial_code:"+222",code:"MR",flag:"🇲🇷"},{name:"Mauritius",dial_code:"+230",code:"MU",flag:"🇲🇺"},{name:"Mayotte",dial_code:"+262",code:"YT",flag:"🇾🇹"},{name:"Mexico",dial_code:"+52",code:"MX",flag:"🇲🇽"},{name:"Micronesia, Federated States of",dial_code:"+691",code:"FM",flag:"🇫🇲"},{name:"Moldova, Republic of",dial_code:"+373",code:"MD",flag:"🇲🇩"},{name:"Monaco",dial_code:"+377",code:"MC",flag:"🇲🇨"},{name:"Mongolia",dial_code:"+976",code:"MN",flag:"🇲🇳"},{name:"Montenegro",dial_code:"+382",code:"ME",flag:"🇲🇪"},{name:"Montserrat",dial_code:"+1664",code:"MS",flag:"🇲🇸"},{name:"Morocco",dial_code:"+212",code:"MA",flag:"🇲🇦"},{name:"Mozambique",dial_code:"+258",code:"MZ",flag:"🇲🇿"},{name:"Myanmar",dial_code:"+95",code:"MM",flag:"🇲🇲"},{name:"Namibia",dial_code:"+264",code:"NA",flag:"🇳🇦"},{name:"Nauru",dial_code:"+674",code:"NR",flag:"🇳🇷"},{name:"Nepal",dial_code:"+977",code:"NP",flag:"🇳🇵"},{name:"Netherlands",dial_code:"+31",code:"NL",flag:"🇳🇱"},{name:"Netherlands Antilles",dial_code:"+599",code:"AN",flag:"🇦🇳"},{name:"New Caledonia",dial_code:"+687",code:"NC",flag:"🇳🇨"},{name:"New Zealand",dial_code:"+64",code:"NZ",flag:"🇳🇿"},{name:"Nicaragua",dial_code:"+505",code:"NI",flag:"🇳🇮"},{name:"Niger",dial_code:"+227",code:"NE",flag:"🇳🇪"},{name:"Nigeria",dial_code:"+234",code:"NG",flag:"🇳🇬"},{name:"Niue",dial_code:"+683",code:"NU",flag:"🇳🇺"},{name:"Norfolk Island",dial_code:"+672",code:"NF",flag:"🇳🇫"},{name:"Northern Mariana Islands",dial_code:"+1670",code:"MP",flag:"🇲🇵"},{name:"Norway",dial_code:"+47",code:"NO",flag:"🇳🇴"},{name:"Oman",dial_code:"+968",code:"OM",flag:"🇴🇲"},{name:"Pakistan",dial_code:"+92",code:"PK",flag:"🇵🇰"},{name:"Palau",dial_code:"+680",code:"PW",flag:"🇵🇼"},{name:"Palestinian Territory, Occupied",dial_code:"+970",code:"PS",flag:"🇵🇸"},{name:"Panama",dial_code:"+507",code:"PA",flag:"🇵🇦"},{name:"Papua New Guinea",dial_code:"+675",code:"PG",flag:"🇵🇬"},{name:"Paraguay",dial_code:"+595",code:"PY",flag:"🇵🇾"},{name:"Peru",dial_code:"+51",code:"PE",flag:"🇵🇪"},{name:"Philippines",dial_code:"+63",code:"PH",flag:"🇵🇭"},{name:"Pitcairn",dial_code:"+872",code:"PN",flag:"🇵🇳"},{name:"Poland",dial_code:"+48",code:"PL",flag:"🇵🇱"},{name:"Portugal",dial_code:"+351",code:"PT",flag:"🇵🇹"},{name:"Puerto Rico",dial_code:"+1939",code:"PR",flag:"🇵🇷"},{name:"Qatar",dial_code:"+974",code:"QA",flag:"🇶🇦"},{name:"Romania",dial_code:"+40",code:"RO",flag:"🇷🇴"},{name:"Russia",dial_code:"+7",code:"RU",flag:"🇷🇺"},{name:"Rwanda",dial_code:"+250",code:"RW",flag:"🇷🇼"},{name:"Réunion",dial_code:"+262",code:"RE",flag:"🇷🇪"},{name:"Saint Barthélemy",dial_code:"+590",code:"BL",flag:"🇧🇱"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",code:"SH",flag:"🇸🇭"},{name:"Saint Kitts and Nevis",dial_code:"+1869",code:"KN",flag:"🇰🇳"},{name:"Saint Lucia",dial_code:"+1758",code:"LC",flag:"🇱🇨"},{name:"Saint Martin",dial_code:"+590",code:"MF",flag:"🇲🇫"},{name:"Saint Pierre and Miquelon",dial_code:"+508",code:"PM",flag:"🇵🇲"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",code:"VC",flag:"🇻🇨"},{name:"Samoa",dial_code:"+685",code:"WS",flag:"🇼🇸"},{name:"San Marino",dial_code:"+378",code:"SM",flag:"🇸🇲"},{name:"Sao Tome and Principe",dial_code:"+239",code:"ST",flag:"🇸🇹"},{name:"Saudi Arabia",dial_code:"+966",code:"SA",flag:"🇸🇦"},{name:"Senegal",dial_code:"+221",code:"SN",flag:"🇸🇳"},{name:"Serbia",dial_code:"+381",code:"RS",flag:"🇷🇸"},{name:"Seychelles",dial_code:"+248",code:"SC",flag:"🇸🇨"},{name:"Sierra Leone",dial_code:"+232",code:"SL",flag:"🇸🇱"},{name:"Singapore",dial_code:"+65",code:"SG",flag:"🇸🇬"},{name:"Slovakia",dial_code:"+421",code:"SK",flag:"🇸🇰"},{name:"Slovenia",dial_code:"+386",code:"SI",flag:"🇸🇮"},{name:"Solomon Islands",dial_code:"+677",code:"SB",flag:"🇸🇧"},{name:"Somalia",dial_code:"+252",code:"SO",flag:"🇸🇴"},{name:"South Africa",dial_code:"+27",code:"ZA",flag:"🇿🇦"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",code:"GS",flag:"🇬🇸"},{name:"Spain",dial_code:"+34",code:"ES",flag:"🇪🇸"},{name:"Sri Lanka",dial_code:"+94",code:"LK",flag:"🇱🇰"},{name:"Sudan",dial_code:"+249",code:"SD",flag:"🇸🇩"},{name:"South Sudan",dial_code:"+211",code:"SS",flag:"🇸🇸"},{name:"Suriname",dial_code:"+597",code:"SR",flag:"🇸🇷"},{name:"Svalbard and Jan Mayen",dial_code:"+47",code:"SJ",flag:"🇸🇯"},{name:"Swaziland",dial_code:"+268",code:"SZ",flag:"🇸🇿"},{name:"Sweden",dial_code:"+46",code:"SE",flag:"🇸🇪"},{name:"Switzerland",dial_code:"+41",code:"CH",flag:"🇨🇭"},{name:"Syrian Arab Republic",dial_code:"+963",code:"SY",flag:"🇸🇾"},{name:"Taiwan, Province of China",dial_code:"+886",code:"TW",flag:"🇹🇼"},{name:"Tajikistan",dial_code:"+992",code:"TJ",flag:"🇹🇯"},{name:"Tanzania, United Republic of",dial_code:"+255",code:"TZ",flag:"🇹🇿"},{name:"Thailand",dial_code:"+66",code:"TH",flag:"🇹🇭"},{name:"Timor-Leste",dial_code:"+670",code:"TL",flag:"🇹🇱"},{name:"Togo",dial_code:"+228",code:"TG",flag:"🇹🇬"},{name:"Tokelau",dial_code:"+690",code:"TK",flag:"🇹🇰"},{name:"Tonga",dial_code:"+676",code:"TO",flag:"🇹🇴"},{name:"Trinidad and Tobago",dial_code:"+1868",code:"TT",flag:"🇹🇹"},{name:"Tunisia",dial_code:"+216",code:"TN",flag:"🇹🇳"},{name:"Turkey",dial_code:"+90",code:"TR",flag:"🇹🇷"},{name:"Turkmenistan",dial_code:"+993",code:"TM",flag:"🇹🇲"},{name:"Turks and Caicos Islands",dial_code:"+1649",code:"TC",flag:"🇹🇨"},{name:"Tuvalu",dial_code:"+688",code:"TV",flag:"🇹🇻"},{name:"Uganda",dial_code:"+256",code:"UG",flag:"🇺🇬"},{name:"Ukraine",dial_code:"+380",code:"UA",flag:"🇺🇦"},{name:"United Arab Emirates",dial_code:"+971",code:"AE",preferred:!0,flag:"🇦🇪"},{name:"United Kingdom",dial_code:"+44",code:"GB",preferred:!0,flag:"🇬🇧"},{name:"United States",dial_code:"+1",code:"US",preferred:!0,flag:"🇺🇸"},{name:"Uruguay",dial_code:"+598",code:"UY",flag:"🇺🇾"},{name:"Uzbekistan",dial_code:"+998",code:"UZ",flag:"🇺🇿"},{name:"Vanuatu",dial_code:"+678",code:"VU",flag:"🇻🇺"},{name:"Venezuela, Bolivarian Republic of",dial_code:"+58",code:"VE",flag:"🇻🇪"},{name:"Viet Nam",dial_code:"+84",code:"VN",flag:"🇻🇳"},{name:"Virgin Islands, British",dial_code:"+1284",code:"VG",flag:"🇻🇬"},{name:"Virgin Islands, U.S.",dial_code:"+1340",code:"VI",flag:"🇻🇮"},{name:"Wallis and Futuna",dial_code:"+681",code:"WF",flag:"🇼🇫"},{name:"Yemen",dial_code:"+967",code:"YE",flag:"🇾🇪"},{name:"Zambia",dial_code:"+260",code:"ZM",flag:"🇿🇲"},{name:"Zimbabwe",dial_code:"+263",code:"ZW",flag:"🇿🇼"},{name:"Åland Islands",dial_code:"+358",code:"AX",flag:"🇦🇽"}];Ri.default=Db;Object.defineProperty(je,"__esModule",{value:!0});je.searchFlag=je.findFlagsByDialCode=vl=je.findFlagByDialCode=qi=je.findFlag=Di=je.getList=void 0;var jr=Ri,Ab=function(e){return jr.default.find(function(t){return t.code.toLowerCase()===e.toLowerCase()})},qi=je.findFlag=Ab,Tb=function(e){var t,n=_l(e),r=n.find(function(o){return o.dial_code===e&&o.preferred});return r||((t=n[0])!==null&&t!==void 0?t:null)},vl=je.findFlagByDialCode=Tb,_l=function(e){return jr.default.filter(function(t){return t.dial_code===e})};je.findFlagsByDialCode=_l;var zb=function(){return jr.default},Di=je.getList=zb,Lb=function(e){return jr.default.filter(function(t){return t.code.toLowerCase().includes(e.toLowerCase())||t.name.toLowerCase().includes(e.toLowerCase())||t.dial_code.toLowerCase().includes(e.toLowerCase())})};je.searchFlag=Lb;const Pb=({name:e,id:t,label:n,placeholder:r="",className:o="",value:i,flag:a,onChange:s,onFlagChange:c})=>{d.useLayoutEffect(()=>{qb()},[]);const l=d.useCallback(u=>{const m=u.target.value;c(qi(m))},[c]);return b.jsxs("div",{className:te("sid-input","sid-input--tel",ml,o),children:[a?b.jsxs("div",{className:fb,children:[b.jsxs("div",{className:gb,children:[b.jsxs("div",{children:[a.flag," ",a.dial_code]}),b.jsx(bl,{})]}),b.jsx("select",{className:ub,value:a.code,onChange:l,children:Di().map(u=>b.jsxs("option",{value:u.code,children:[u.name," ",u.dial_code]},u.code))})]}):null,b.jsx(gl,{id:t,name:e,label:n,placeholder:r,className:o,type:"tel",value:i,onChange:s})]})};var Ob="_1dpv0n90",Mb="_1dpv0n91",es="_1dpv0n92";const yl=({children:e})=>b.jsxs("div",{className:te("sid-divider",Ob),children:[b.jsx("hr",{className:es}),b.jsx("span",{className:Mb,children:e}),b.jsx("hr",{className:es})]});function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z.apply(this,arguments)}function wt(e,t=[]){let n=[];function r(i,a){const s=d.createContext(a),c=n.length;n=[...n,a];function l(m){const{scope:h,children:p,...g}=m,f=h?.[e][c]||s,w=d.useMemo(()=>g,Object.values(g));return d.createElement(f.Provider,{value:w},p)}function u(m,h){const p=h?.[e][c]||s,g=d.useContext(p);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=n.map(a=>d.createContext(a));return function(a){const s=a?.[e]||i;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:s}}),[a,s])}};return o.scopeName=e,[r,Nb(o,...t)]}function Nb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(o){const i=r.reduce((a,{useScope:s,scopeName:c})=>{const l=s(o)[`__scope${c}`];return{...a,...l}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ub(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function xl(...e){return t=>e.forEach(n=>Ub(n,t))}function Ce(...e){return d.useCallback(xl(...e),e)}const Dn=d.forwardRef((e,t)=>{const{children:n,...r}=e,o=d.Children.toArray(n),i=o.find(Vb);if(i){const a=i.props.children,s=o.map(c=>c===i?d.Children.count(a)>1?d.Children.only(null):d.isValidElement(a)?a.props.children:null:c);return d.createElement(Zo,Z({},r,{ref:t}),d.isValidElement(a)?d.cloneElement(a,void 0,s):null)}return d.createElement(Zo,Z({},r,{ref:t}),n)});Dn.displayName="Slot";const Zo=d.forwardRef((e,t)=>{const{children:n,...r}=e;return d.isValidElement(n)?d.cloneElement(n,{...Bb(r,n.props),ref:t?xl(t,n.ref):n.ref}):d.Children.count(n)>1?d.Children.only(null):null});Zo.displayName="SlotClone";const Fb=({children:e})=>d.createElement(d.Fragment,null,e);function Vb(e){return d.isValidElement(e)&&e.type===Fb}function Bb(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ai(e){const t=e+"CollectionProvider",[n,r]=wt(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:g,children:f}=p,w=V.useRef(null),y=V.useRef(new Map).current;return V.createElement(o,{scope:g,itemMap:y,collectionRef:w},f)},s=e+"CollectionSlot",c=V.forwardRef((p,g)=>{const{scope:f,children:w}=p,y=i(s,f),v=Ce(g,y.collectionRef);return V.createElement(Dn,{ref:v},w)}),l=e+"CollectionItemSlot",u="data-radix-collection-item",m=V.forwardRef((p,g)=>{const{scope:f,children:w,...y}=p,v=V.useRef(null),_=Ce(g,v),x=i(l,f);return V.useEffect(()=>(x.itemMap.set(v,{ref:v,...y}),()=>void x.itemMap.delete(v))),V.createElement(Dn,{[u]:"",ref:_},w)});function h(p){const g=i(e+"CollectionConsumer",p);return V.useCallback(()=>{const f=g.collectionRef.current;if(!f)return[];const w=Array.from(f.querySelectorAll(`[${u}]`));return Array.from(g.itemMap.values()).sort((y,v)=>w.indexOf(y.ref.current)-w.indexOf(v.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:c,ItemSlot:m},h,r]}function de(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function ot(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function cn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Hb({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=ot(n),c=d.useCallback(l=>{if(i){const u=typeof l=="function"?l(e):l;u!==e&&s(u)}else o(l)},[i,e,o,s]);return[a,c]}function Hb({defaultProp:e,onChange:t}){const n=d.useState(e),[r]=n,o=d.useRef(r),i=ot(t);return d.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const jb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],_e=jb.reduce((e,t)=>{const n=d.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Dn:t;return d.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),d.createElement(s,Z({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Gb(e,t){e&&un.flushSync(()=>e.dispatchEvent(t))}const Pe=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{};function Wb(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}const Cl=e=>{const{present:t,children:n}=e,r=Kb(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),i=Ce(r.ref,o.ref);return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:i}):null};Cl.displayName="Presence";function Kb(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),i=d.useRef("none"),a=e?"mounted":"unmounted",[s,c]=Wb(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const l=Jn(r.current);i.current=s==="mounted"?l:"none"},[s]),Pe(()=>{const l=r.current,u=o.current;if(u!==e){const m=i.current,h=Jn(l);e?c("MOUNT"):h==="none"||l?.display==="none"?c("UNMOUNT"):c(u&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Pe(()=>{if(t){const l=m=>{const h=Jn(r.current).includes(m.animationName);m.target===t&&h&&un.flushSync(()=>c("ANIMATION_END"))},u=m=>{m.target===t&&(i.current=Jn(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:d.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Jn(e){return e?.animationName||"none"}const Zb=d.useId||(()=>{});let Yb=0;function Mn(e){const[t,n]=d.useState(Zb());return Pe(()=>{e||n(r=>r??String(Yb++))},[e]),e||(t?`radix-${t}`:"")}const kl="Collapsible",[Jb,Sl]=wt(kl);Jb(kl);const Xb=d.createContext(void 0);function Gr(e){const t=d.useContext(Xb);return e||t||"ltr"}const Nn="Accordion",Qb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[El,ew,tw]=Ai(Nn),[Wr,Ny]=wt(Nn,[tw,Sl]);Sl();const nw=V.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return V.createElement(El.Provider,{scope:e.__scopeAccordion},n==="multiple"?V.createElement(ow,Z({},i,{ref:t})):V.createElement(rw,Z({},o,{ref:t})))});nw.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[$l,Uy]=Wr(Nn),[Il,Fy]=Wr(Nn,{collapsible:!1}),rw=V.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,c]=cn({prop:n,defaultProp:r,onChange:o});return V.createElement($l,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:V.useCallback(()=>i&&c(""),[i,c])},V.createElement(Il,{scope:e.__scopeAccordion,collapsible:i},V.createElement(Rl,Z({},a,{ref:t}))))}),ow=V.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=cn({prop:n,defaultProp:r,onChange:o}),c=V.useCallback(u=>s((m=[])=>[...m,u]),[s]),l=V.useCallback(u=>s((m=[])=>m.filter(h=>h!==u)),[s]);return V.createElement($l,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:l},V.createElement(Il,{scope:e.__scopeAccordion,collapsible:!0},V.createElement(Rl,Z({},i,{ref:t}))))}),[iw,Vy]=Wr(Nn),Rl=V.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,s=V.useRef(null),c=Ce(s,t),l=ew(n),u=Gr(o)==="ltr",m=de(e.onKeyDown,h=>{var p;if(!Qb.includes(h.key))return;const g=h.target,f=l().filter(D=>{var P;return!((P=D.ref.current)!==null&&P!==void 0&&P.disabled)}),w=f.findIndex(D=>D.ref.current===g),y=f.length;if(w===-1)return;h.preventDefault();let v=w;const _=0,x=y-1,S=()=>{v=w+1,v>x&&(v=_)},I=()=>{v=w-1,v<_&&(v=x)};switch(h.key){case"Home":v=_;break;case"End":v=x;break;case"ArrowRight":i==="horizontal"&&(u?S():I());break;case"ArrowDown":i==="vertical"&&S();break;case"ArrowLeft":i==="horizontal"&&(u?I():S());break;case"ArrowUp":i==="vertical"&&I();break}const R=v%y;(p=f[R].ref.current)===null||p===void 0||p.focus()});return V.createElement(iw,{scope:n,disabled:r,direction:o,orientation:i},V.createElement(El.Slot,{scope:n},V.createElement(_e.div,Z({},a,{"data-orientation":i,ref:c,onKeyDown:r?void 0:m}))))}),aw="AccordionItem";Wr(aw);function sw(e,t=globalThis?.document){const n=ot(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}let vo=0;function cw(){d.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:ts()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:ts()),vo++,()=>{vo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),vo--}},[])}function ts(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var tt=function(){return tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},tt.apply(this,arguments)};function ql(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function lw(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var cr="right-scroll-bar-position",lr="width-before-scroll-bar",dw="with-scroll-bars-hidden",uw="--removed-body-scroll-bar-size";function fw(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function hw(e,t){var n=d.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function pw(e,t){return hw(null,function(n){return e.forEach(function(r){return fw(r,n)})})}function mw(e){return e}function gw(e,t){t===void 0&&(t=mw);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var u=a;a=[],u.forEach(i)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),n}}}};return o}function bw(e){e===void 0&&(e={});var t=gw(null);return t.options=tt({async:!0,ssr:!1},e),t}var Dl=function(e){var t=e.sideCar,n=ql(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,tt({},n))};Dl.isSideCarExport=!0;function ww(e,t){return e.useMedium(t),Dl}var Al=bw(),_o=function(){},Kr=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:_o,onWheelCapture:_o,onTouchMoveCapture:_o}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,m=e.shards,h=e.sideCar,p=e.noIsolation,g=e.inert,f=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,v=ql(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=h,x=pw([n,t]),S=tt(tt({},v),o);return d.createElement(d.Fragment,null,u&&d.createElement(_,{sideCar:Al,removeScrollBar:l,shards:m,noIsolation:p,inert:g,setCallbacks:i,allowPinchZoom:!!f,lockRef:n}),a?d.cloneElement(d.Children.only(s),tt(tt({},S),{ref:x})):d.createElement(y,tt({},S,{className:c,ref:x}),s))});Kr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Kr.classNames={fullWidth:lr,zeroRight:cr};var vw=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _w(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=vw();return t&&e.setAttribute("nonce",t),e}function yw(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xw(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Cw=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_w())&&(yw(t,n),xw(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},kw=function(){var e=Cw();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Tl=function(){var e=kw(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Sw={left:0,top:0,right:0,gap:0},yo=function(e){return parseInt(e||"",10)||0},Ew=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[yo(n),yo(r),yo(o)]},$w=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Sw;var t=Ew(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Iw=Tl(),Rw=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
56
56
|
.`.concat(dw,` {
|
|
57
57
|
overflow: hidden `).concat(r,`;
|
|
58
58
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
@@ -92,5 +92,5 @@ Url: ${yr(e)}`),!0)}function lg(e,t){return e.type||!t||!t.length?!1:hg(e).some(
|
|
|
92
92
|
`)},qw=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=d.useMemo(function(){return $w(o)},[o]);return d.createElement(Iw,{styles:Rw(i,!t,o,n?"":"!important")})},Yo=!1;if(typeof window<"u")try{var Xn=Object.defineProperty({},"passive",{get:function(){return Yo=!0,!0}});window.addEventListener("test",Xn,Xn),window.removeEventListener("test",Xn,Xn)}catch{Yo=!1}var Gt=Yo?{passive:!1}:!1,Dw=function(e){return e.tagName==="TEXTAREA"},zl=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Dw(e)&&n[t]==="visible")},Aw=function(e){return zl(e,"overflowY")},Tw=function(e){return zl(e,"overflowX")},ns=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Ll(e,n);if(r){var o=Pl(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},zw=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Lw=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ll=function(e,t){return e==="v"?Aw(t):Tw(t)},Pl=function(e,t){return e==="v"?zw(t):Lw(t)},Pw=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ow=function(e,t,n,r,o){var i=Pw(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),l=!1,u=a>0,m=0,h=0;do{var p=Pl(e,s),g=p[0],f=p[1],w=p[2],y=f-w-i*g;(g||y)&&Ll(e,s)&&(m+=y,h+=g),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(m===0||!o)||!u&&(h===0||!o))&&(l=!0),l},Qn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rs=function(e){return[e.deltaX,e.deltaY]},os=function(e){return e&&"current"in e?e.current:e},Mw=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Nw=function(e){return`
|
|
93
93
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
94
94
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
95
|
-
`)},Uw=0,Wt=[];function Fw(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Uw++)[0],i=d.useState(function(){return Tl()})[0],a=d.useRef(e);d.useEffect(function(){a.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=lw([e.lockRef.current],(e.shards||[]).map(os),!0).filter(Boolean);return f.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback(function(f,w){if("touches"in f&&f.touches.length===2)return!a.current.allowPinchZoom;var y=Qn(f),v=n.current,_="deltaX"in f?f.deltaX:v[0]-y[0],C="deltaY"in f?f.deltaY:v[1]-y[1],S,I=f.target,R=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in f&&R==="h"&&I.type==="range")return!1;var D=ns(R,I);if(!D)return!0;if(D?S=R:(S=R==="v"?"h":"v",D=ns(R,I)),!D)return!1;if(!r.current&&"changedTouches"in f&&(_||C)&&(r.current=S),!S)return!0;var P=r.current||S;return Ow(P,w,f,P==="h"?_:C,!0)},[]),c=d.useCallback(function(f){var w=f;if(!(!Wt.length||Wt[Wt.length-1]!==i)){var y="deltaY"in w?rs(w):Qn(w),v=t.current.filter(function(S){return S.name===w.type&&S.target===w.target&&Mw(S.delta,y)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}if(!v){var _=(a.current.shards||[]).map(os).filter(Boolean).filter(function(S){return S.contains(w.target)}),C=_.length>0?s(w,_[0]):!a.current.noIsolation;C&&w.cancelable&&w.preventDefault()}}},[]),l=d.useCallback(function(f,w,y,v){var _={name:f,delta:w,target:y,should:v};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),u=d.useCallback(function(f){n.current=Qn(f),r.current=void 0},[]),m=d.useCallback(function(f){l(f.type,rs(f),f.target,s(f,e.lockRef.current))},[]),h=d.useCallback(function(f){l(f.type,Qn(f),f.target,s(f,e.lockRef.current))},[]);d.useEffect(function(){return Wt.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Gt),document.addEventListener("touchmove",c,Gt),document.addEventListener("touchstart",u,Gt),function(){Wt=Wt.filter(function(f){return f!==i}),document.removeEventListener("wheel",c,Gt),document.removeEventListener("touchmove",c,Gt),document.removeEventListener("touchstart",u,Gt)}},[]);var p=e.removeScrollBar,g=e.inert;return d.createElement(d.Fragment,null,g?d.createElement(i,{styles:Nw(o)}):null,p?d.createElement(qw,{gapMode:"margin"}):null)}const Vw=ww(Al,Fw);var Ol=d.forwardRef(function(e,t){return d.createElement(Kr,tt({},e,{ref:t,sideCar:Vw}))});Ol.classNames=Kr.classNames;var Bw=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Kt=new WeakMap,er=new WeakMap,tr={},xo=0,Ml=function(e){return e&&(e.host||Ml(e.parentNode))},Hw=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ml(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},jw=function(e,t,n,r){var o=Hw(t,Array.isArray(e)?e:[e]);tr[n]||(tr[n]=new WeakMap);var i=tr[n],a=[],s=new Set,c=new Set(o),l=function(m){!m||s.has(m)||(s.add(m),l(m.parentNode))};o.forEach(l);var u=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(h){if(s.has(h))u(h);else{var p=h.getAttribute(r),g=p!==null&&p!=="false",f=(Kt.get(h)||0)+1,w=(i.get(h)||0)+1;Kt.set(h,f),i.set(h,w),a.push(h),f===1&&g&&er.set(h,!0),w===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}})};return u(t),s.clear(),xo++,function(){a.forEach(function(m){var h=Kt.get(m)-1,p=i.get(m)-1;Kt.set(m,h),i.set(m,p),h||(er.has(m)||m.removeAttribute(r),er.delete(m)),p||m.removeAttribute(n)}),xo--,xo||(Kt=new WeakMap,Kt=new WeakMap,er=new WeakMap,tr={})}},Gw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Bw(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),jw(r,o,n,"aria-hidden")):function(){return null}};const Nl="Dialog",[Ul,H6]=wt(Nl);Ul(Nl);const Ww="DialogPortal";Ul(Ww,{forceMount:void 0});function Kw(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Zw(e){const[t,n]=d.useState(void 0);return Pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Fl="Switch",[Yw,j6]=wt(Fl);Yw(Fl);var Jw="q9c0is3",Xw="q9c0is5",Qw={blue:"q9c0is6 q9c0is4",red:"q9c0is7 q9c0is4",primary:"q9c0is8 q9c0is4",grey:"q9c0is9 q9c0is4"},e2="q9c0isb",t2={blue:"q9c0isc q9c0isa",red:"q9c0isd q9c0isa",primary:"q9c0ise q9c0isa",grey:"q9c0isf q9c0isa"},n2="q9c0ish",r2={blue:"q9c0isi q9c0isg",red:"q9c0isj q9c0isg",primary:"q9c0isk q9c0isg",grey:"q9c0isl q9c0isg"},o2="q9c0ism";const i2=({children:e,className:t,variant:n="blue",shouldAnimate:r=!0,testId:o})=>b.jsxs("div",{className:te(Jw,t),"data-testid":o,children:[b.jsx("div",{className:te(Qw[n],{[Xw]:r})}),b.jsx("div",{className:te(t2[n],{[e2]:r})}),b.jsx("div",{className:te(r2[n],{[n2]:r})}),b.jsx("div",{className:o2,children:e})]});function a2(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function is(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function as(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?is(Object(n),!0).forEach(function(r){a2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):is(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var s2=(e,t,n)=>{for(var r of Object.keys(e)){var o;if(e[r]!==((o=t[r])!==null&&o!==void 0?o:n[r]))return!1}return!0},c2=e=>t=>{var n=e.defaultClassName,r=as(as({},e.defaultVariants),t);for(var o in r){var i,a=(i=r[o])!==null&&i!==void 0?i:e.defaultVariants[o];if(a!=null){var s=a;typeof s=="boolean"&&(s=s===!0?"true":"false");var c=e.variantClassNames[o][s];c&&(n+=" "+c)}}for(var[l,u]of e.compoundVariants)s2(l,r,e.defaultVariants)&&(n+=" "+u);return n};function l2(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function d2(e){var t=l2(e,"string");return typeof t=="symbol"?t:String(t)}function u2(e,t,n){return t=d2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ss(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Co(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ss(Object(n),!0).forEach(function(r){u2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ss(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var f2=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Object.assign({},...n.map(c=>c.styles)),i=Object.keys(o),a=i.filter(c=>"mappings"in o[c]),s=c=>{var l=[],u={},m=Co({},c),h=!1;for(var p of a){var g=c[p];if(g!=null){var f=o[p];h=!0;for(var w of f.mappings)u[w]=g,m[w]==null&&delete m[w]}}var y=h?Co(Co({},u),m):c,v=function(){var S=y[_],I=o[_];try{if(I.mappings)return"continue";if(typeof S=="string"||typeof S=="number")l.push(I.values[S].defaultClass);else if(Array.isArray(S))for(var R=0;R<S.length;R++){var D=S[R];if(D!=null){var P=I.responsiveArray[R];l.push(I.values[D].conditions[P])}}else for(var G in S){var H=S[G];H!=null&&l.push(I.values[H].conditions[G])}}catch(j){throw j}};for(var _ in y)var C=v();return e(l.join(" "))};return Object.assign(s,{properties:new Set(i)})},h2=e=>e,p2=function(){return f2(h2)(...arguments)},ut=p2({conditions:{defaultCondition:"lightMode",conditionNames:["lightMode","darkMode"],responsiveArray:void 0},styles:{color:{values:{background:{conditions:{lightMode:"kqvzqt0",darkMode:"kqvzqt1"},defaultClass:"kqvzqt0"},mute:{conditions:{lightMode:"kqvzqt2",darkMode:"kqvzqt3"},defaultClass:"kqvzqt2"},panel:{conditions:{lightMode:"kqvzqt4",darkMode:"kqvzqt5"},defaultClass:"kqvzqt4"},foreground:{conditions:{lightMode:"kqvzqt6",darkMode:"kqvzqt7"},defaultClass:"kqvzqt6"},contrast:{conditions:{lightMode:"kqvzqt8",darkMode:"kqvzqt9"},defaultClass:"kqvzqt8"},secondary:{conditions:{lightMode:"kqvzqta",darkMode:"kqvzqtb"},defaultClass:"kqvzqta"},tertiary:{conditions:{lightMode:"kqvzqtc",darkMode:"kqvzqtd"},defaultClass:"kqvzqtc"},placeholder:{conditions:{lightMode:"kqvzqte",darkMode:"kqvzqtf"},defaultClass:"kqvzqte"},smooth:{conditions:{lightMode:"kqvzqtg",darkMode:"kqvzqth"},defaultClass:"kqvzqtg"},subtle:{conditions:{lightMode:"kqvzqti",darkMode:"kqvzqtj"},defaultClass:"kqvzqti"},soft:{conditions:{lightMode:"kqvzqtk",darkMode:"kqvzqtl"},defaultClass:"kqvzqtk"},offset:{conditions:{lightMode:"kqvzqtm",darkMode:"kqvzqtn"},defaultClass:"kqvzqtm"},primary:{conditions:{lightMode:"kqvzqto",darkMode:"kqvzqtp"},defaultClass:"kqvzqto"},primaryHover:{conditions:{lightMode:"kqvzqtq",darkMode:"kqvzqtr"},defaultClass:"kqvzqtq"},transparent:{conditions:{lightMode:"kqvzqts",darkMode:"kqvzqtt"},defaultClass:"kqvzqts"},error:{conditions:{lightMode:"kqvzqtu",darkMode:"kqvzqtv"},defaultClass:"kqvzqtu"},auxiliary:{conditions:{lightMode:"kqvzqtw",darkMode:"kqvzqtx"},defaultClass:"kqvzqtw"},success:{conditions:{lightMode:"kqvzqty",darkMode:"kqvzqtz"},defaultClass:"kqvzqty"},foregroundSuccess:{conditions:{lightMode:"kqvzqt10",darkMode:"kqvzqt11"},defaultClass:"kqvzqt10"},backgroundSuccess:{conditions:{lightMode:"kqvzqt12",darkMode:"kqvzqt13"},defaultClass:"kqvzqt12"},failure:{conditions:{lightMode:"kqvzqt14",darkMode:"kqvzqt15"},defaultClass:"kqvzqt14"},foregroundFailure:{conditions:{lightMode:"kqvzqt16",darkMode:"kqvzqt17"},defaultClass:"kqvzqt16"},backgroundFailure:{conditions:{lightMode:"kqvzqt18",darkMode:"kqvzqt19"},defaultClass:"kqvzqt18"}}},backgroundColor:{values:{background:{conditions:{lightMode:"kqvzqt1a",darkMode:"kqvzqt1b"},defaultClass:"kqvzqt1a"},mute:{conditions:{lightMode:"kqvzqt1c",darkMode:"kqvzqt1d"},defaultClass:"kqvzqt1c"},panel:{conditions:{lightMode:"kqvzqt1e",darkMode:"kqvzqt1f"},defaultClass:"kqvzqt1e"},foreground:{conditions:{lightMode:"kqvzqt1g",darkMode:"kqvzqt1h"},defaultClass:"kqvzqt1g"},contrast:{conditions:{lightMode:"kqvzqt1i",darkMode:"kqvzqt1j"},defaultClass:"kqvzqt1i"},secondary:{conditions:{lightMode:"kqvzqt1k",darkMode:"kqvzqt1l"},defaultClass:"kqvzqt1k"},tertiary:{conditions:{lightMode:"kqvzqt1m",darkMode:"kqvzqt1n"},defaultClass:"kqvzqt1m"},placeholder:{conditions:{lightMode:"kqvzqt1o",darkMode:"kqvzqt1p"},defaultClass:"kqvzqt1o"},smooth:{conditions:{lightMode:"kqvzqt1q",darkMode:"kqvzqt1r"},defaultClass:"kqvzqt1q"},subtle:{conditions:{lightMode:"kqvzqt1s",darkMode:"kqvzqt1t"},defaultClass:"kqvzqt1s"},soft:{conditions:{lightMode:"kqvzqt1u",darkMode:"kqvzqt1v"},defaultClass:"kqvzqt1u"},offset:{conditions:{lightMode:"kqvzqt1w",darkMode:"kqvzqt1x"},defaultClass:"kqvzqt1w"},primary:{conditions:{lightMode:"kqvzqt1y",darkMode:"kqvzqt1z"},defaultClass:"kqvzqt1y"},primaryHover:{conditions:{lightMode:"kqvzqt20",darkMode:"kqvzqt21"},defaultClass:"kqvzqt20"},transparent:{conditions:{lightMode:"kqvzqt22",darkMode:"kqvzqt23"},defaultClass:"kqvzqt22"},error:{conditions:{lightMode:"kqvzqt24",darkMode:"kqvzqt25"},defaultClass:"kqvzqt24"},auxiliary:{conditions:{lightMode:"kqvzqt26",darkMode:"kqvzqt27"},defaultClass:"kqvzqt26"},success:{conditions:{lightMode:"kqvzqt28",darkMode:"kqvzqt29"},defaultClass:"kqvzqt28"},foregroundSuccess:{conditions:{lightMode:"kqvzqt2a",darkMode:"kqvzqt2b"},defaultClass:"kqvzqt2a"},backgroundSuccess:{conditions:{lightMode:"kqvzqt2c",darkMode:"kqvzqt2d"},defaultClass:"kqvzqt2c"},failure:{conditions:{lightMode:"kqvzqt2e",darkMode:"kqvzqt2f"},defaultClass:"kqvzqt2e"},foregroundFailure:{conditions:{lightMode:"kqvzqt2g",darkMode:"kqvzqt2h"},defaultClass:"kqvzqt2g"},backgroundFailure:{conditions:{lightMode:"kqvzqt2i",darkMode:"kqvzqt2j"},defaultClass:"kqvzqt2i"}}}}},{conditions:void 0,styles:{marginY:{mappings:["marginTop","marginBottom"]},marginX:{mappings:["marginLeft","marginRight"]},gap:{values:{0:{defaultClass:"kqvzqt2k"},1:{defaultClass:"kqvzqt2l"},2:{defaultClass:"kqvzqt2m"},3:{defaultClass:"kqvzqt2n"},4:{defaultClass:"kqvzqt2o"},5:{defaultClass:"kqvzqt2p"},6:{defaultClass:"kqvzqt2q"},7:{defaultClass:"kqvzqt2r"},8:{defaultClass:"kqvzqt2s"},9:{defaultClass:"kqvzqt2t"},10:{defaultClass:"kqvzqt2u"},11:{defaultClass:"kqvzqt2v"},12:{defaultClass:"kqvzqt2w"},13:{defaultClass:"kqvzqt2x"},14:{defaultClass:"kqvzqt2y"},15:{defaultClass:"kqvzqt2z"},16:{defaultClass:"kqvzqt30"},20:{defaultClass:"kqvzqt31"},24:{defaultClass:"kqvzqt32"},28:{defaultClass:"kqvzqt33"},32:{defaultClass:"kqvzqt34"},36:{defaultClass:"kqvzqt35"},40:{defaultClass:"kqvzqt36"},44:{defaultClass:"kqvzqt37"},48:{defaultClass:"kqvzqt38"},52:{defaultClass:"kqvzqt39"},56:{defaultClass:"kqvzqt3a"},60:{defaultClass:"kqvzqt3b"},64:{defaultClass:"kqvzqt3c"},68:{defaultClass:"kqvzqt3d"},72:{defaultClass:"kqvzqt3e"},76:{defaultClass:"kqvzqt3f"},80:{defaultClass:"kqvzqt3g"},96:{defaultClass:"kqvzqt3h"},px:{defaultClass:"kqvzqt3i"},"0.25":{defaultClass:"kqvzqt3j"},"0.5":{defaultClass:"kqvzqt3k"},"0.75":{defaultClass:"kqvzqt3l"},"1.5":{defaultClass:"kqvzqt3m"},"2.5":{defaultClass:"kqvzqt3n"},"3.5":{defaultClass:"kqvzqt3o"}}},marginTop:{values:{0:{defaultClass:"kqvzqt3p"},1:{defaultClass:"kqvzqt3q"},2:{defaultClass:"kqvzqt3r"},3:{defaultClass:"kqvzqt3s"},4:{defaultClass:"kqvzqt3t"},5:{defaultClass:"kqvzqt3u"},6:{defaultClass:"kqvzqt3v"},7:{defaultClass:"kqvzqt3w"},8:{defaultClass:"kqvzqt3x"},9:{defaultClass:"kqvzqt3y"},10:{defaultClass:"kqvzqt3z"},11:{defaultClass:"kqvzqt40"},12:{defaultClass:"kqvzqt41"},13:{defaultClass:"kqvzqt42"},14:{defaultClass:"kqvzqt43"},15:{defaultClass:"kqvzqt44"},16:{defaultClass:"kqvzqt45"},20:{defaultClass:"kqvzqt46"},24:{defaultClass:"kqvzqt47"},28:{defaultClass:"kqvzqt48"},32:{defaultClass:"kqvzqt49"},36:{defaultClass:"kqvzqt4a"},40:{defaultClass:"kqvzqt4b"},44:{defaultClass:"kqvzqt4c"},48:{defaultClass:"kqvzqt4d"},52:{defaultClass:"kqvzqt4e"},56:{defaultClass:"kqvzqt4f"},60:{defaultClass:"kqvzqt4g"},64:{defaultClass:"kqvzqt4h"},68:{defaultClass:"kqvzqt4i"},72:{defaultClass:"kqvzqt4j"},76:{defaultClass:"kqvzqt4k"},80:{defaultClass:"kqvzqt4l"},96:{defaultClass:"kqvzqt4m"},px:{defaultClass:"kqvzqt4n"},"0.25":{defaultClass:"kqvzqt4o"},"0.5":{defaultClass:"kqvzqt4p"},"0.75":{defaultClass:"kqvzqt4q"},"1.5":{defaultClass:"kqvzqt4r"},"2.5":{defaultClass:"kqvzqt4s"},"3.5":{defaultClass:"kqvzqt4t"}}},marginBottom:{values:{0:{defaultClass:"kqvzqt4u"},1:{defaultClass:"kqvzqt4v"},2:{defaultClass:"kqvzqt4w"},3:{defaultClass:"kqvzqt4x"},4:{defaultClass:"kqvzqt4y"},5:{defaultClass:"kqvzqt4z"},6:{defaultClass:"kqvzqt50"},7:{defaultClass:"kqvzqt51"},8:{defaultClass:"kqvzqt52"},9:{defaultClass:"kqvzqt53"},10:{defaultClass:"kqvzqt54"},11:{defaultClass:"kqvzqt55"},12:{defaultClass:"kqvzqt56"},13:{defaultClass:"kqvzqt57"},14:{defaultClass:"kqvzqt58"},15:{defaultClass:"kqvzqt59"},16:{defaultClass:"kqvzqt5a"},20:{defaultClass:"kqvzqt5b"},24:{defaultClass:"kqvzqt5c"},28:{defaultClass:"kqvzqt5d"},32:{defaultClass:"kqvzqt5e"},36:{defaultClass:"kqvzqt5f"},40:{defaultClass:"kqvzqt5g"},44:{defaultClass:"kqvzqt5h"},48:{defaultClass:"kqvzqt5i"},52:{defaultClass:"kqvzqt5j"},56:{defaultClass:"kqvzqt5k"},60:{defaultClass:"kqvzqt5l"},64:{defaultClass:"kqvzqt5m"},68:{defaultClass:"kqvzqt5n"},72:{defaultClass:"kqvzqt5o"},76:{defaultClass:"kqvzqt5p"},80:{defaultClass:"kqvzqt5q"},96:{defaultClass:"kqvzqt5r"},px:{defaultClass:"kqvzqt5s"},"0.25":{defaultClass:"kqvzqt5t"},"0.5":{defaultClass:"kqvzqt5u"},"0.75":{defaultClass:"kqvzqt5v"},"1.5":{defaultClass:"kqvzqt5w"},"2.5":{defaultClass:"kqvzqt5x"},"3.5":{defaultClass:"kqvzqt5y"}}},marginLeft:{values:{0:{defaultClass:"kqvzqt5z"},1:{defaultClass:"kqvzqt60"},2:{defaultClass:"kqvzqt61"},3:{defaultClass:"kqvzqt62"},4:{defaultClass:"kqvzqt63"},5:{defaultClass:"kqvzqt64"},6:{defaultClass:"kqvzqt65"},7:{defaultClass:"kqvzqt66"},8:{defaultClass:"kqvzqt67"},9:{defaultClass:"kqvzqt68"},10:{defaultClass:"kqvzqt69"},11:{defaultClass:"kqvzqt6a"},12:{defaultClass:"kqvzqt6b"},13:{defaultClass:"kqvzqt6c"},14:{defaultClass:"kqvzqt6d"},15:{defaultClass:"kqvzqt6e"},16:{defaultClass:"kqvzqt6f"},20:{defaultClass:"kqvzqt6g"},24:{defaultClass:"kqvzqt6h"},28:{defaultClass:"kqvzqt6i"},32:{defaultClass:"kqvzqt6j"},36:{defaultClass:"kqvzqt6k"},40:{defaultClass:"kqvzqt6l"},44:{defaultClass:"kqvzqt6m"},48:{defaultClass:"kqvzqt6n"},52:{defaultClass:"kqvzqt6o"},56:{defaultClass:"kqvzqt6p"},60:{defaultClass:"kqvzqt6q"},64:{defaultClass:"kqvzqt6r"},68:{defaultClass:"kqvzqt6s"},72:{defaultClass:"kqvzqt6t"},76:{defaultClass:"kqvzqt6u"},80:{defaultClass:"kqvzqt6v"},96:{defaultClass:"kqvzqt6w"},px:{defaultClass:"kqvzqt6x"},"0.25":{defaultClass:"kqvzqt6y"},"0.5":{defaultClass:"kqvzqt6z"},"0.75":{defaultClass:"kqvzqt70"},"1.5":{defaultClass:"kqvzqt71"},"2.5":{defaultClass:"kqvzqt72"},"3.5":{defaultClass:"kqvzqt73"}}},marginRight:{values:{0:{defaultClass:"kqvzqt74"},1:{defaultClass:"kqvzqt75"},2:{defaultClass:"kqvzqt76"},3:{defaultClass:"kqvzqt77"},4:{defaultClass:"kqvzqt78"},5:{defaultClass:"kqvzqt79"},6:{defaultClass:"kqvzqt7a"},7:{defaultClass:"kqvzqt7b"},8:{defaultClass:"kqvzqt7c"},9:{defaultClass:"kqvzqt7d"},10:{defaultClass:"kqvzqt7e"},11:{defaultClass:"kqvzqt7f"},12:{defaultClass:"kqvzqt7g"},13:{defaultClass:"kqvzqt7h"},14:{defaultClass:"kqvzqt7i"},15:{defaultClass:"kqvzqt7j"},16:{defaultClass:"kqvzqt7k"},20:{defaultClass:"kqvzqt7l"},24:{defaultClass:"kqvzqt7m"},28:{defaultClass:"kqvzqt7n"},32:{defaultClass:"kqvzqt7o"},36:{defaultClass:"kqvzqt7p"},40:{defaultClass:"kqvzqt7q"},44:{defaultClass:"kqvzqt7r"},48:{defaultClass:"kqvzqt7s"},52:{defaultClass:"kqvzqt7t"},56:{defaultClass:"kqvzqt7u"},60:{defaultClass:"kqvzqt7v"},64:{defaultClass:"kqvzqt7w"},68:{defaultClass:"kqvzqt7x"},72:{defaultClass:"kqvzqt7y"},76:{defaultClass:"kqvzqt7z"},80:{defaultClass:"kqvzqt80"},96:{defaultClass:"kqvzqt81"},px:{defaultClass:"kqvzqt82"},"0.25":{defaultClass:"kqvzqt83"},"0.5":{defaultClass:"kqvzqt84"},"0.75":{defaultClass:"kqvzqt85"},"1.5":{defaultClass:"kqvzqt86"},"2.5":{defaultClass:"kqvzqt87"},"3.5":{defaultClass:"kqvzqt88"}}}}}),m2=c2({defaultClassName:"_1qam6z30",variantClassNames:{size:{xs:"_1qam6z31",sm:"_1qam6z32",base:"_1qam6z33",xl:"_1qam6z34","2xl-title":"_1qam6z35"},weight:{medium:"_1qam6z36",semibold:"_1qam6z37",bold:"_1qam6z38"},color:{contrast:"_1qam6z39",tertiary:"_1qam6z3a",placeholder:"_1qam6z3b",white:"_1qam6z3c",success:"_1qam6z3d",failure:"_1qam6z3e"}},defaultVariants:{size:"base",weight:"medium"},compoundVariants:[]});const g2={text:{}},Vl=d.createContext(g2);Vl.displayName="SlashIDTextContext";function b2(){const{text:e}=V.useContext(Vl);return e}const ko={opening:"{{",closing:"}}"};function w2(e,t){return e.includes(ko.opening)?Object.keys(t).reduce((n,r)=>n.replace(`${ko.opening}${r}${ko.closing}`,t[r]),e):e}const v2=({as:e,t,tokens:n,variant:r,className:o,children:i})=>{const a=b2(),s=e||"p";return b.jsxs(s,{className:te("sid-text",`sid-text--${s}`,m2(r),o),children:[n?w2(a[t],n):a[t],i||null]})};function cs(e,[t,n]){return Math.min(n,Math.max(t,e))}const Jo="dismissableLayer.update",_2="dismissableLayer.pointerDownOutside",y2="dismissableLayer.focusOutside";let ls;const x2=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),C2=d.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...l}=e,u=d.useContext(x2),[m,h]=d.useState(null),p=(n=m?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,g]=d.useState({}),f=Ce(t,D=>h(D)),w=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=w.indexOf(y),_=m?w.indexOf(m):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,S=_>=v,I=k2(D=>{const P=D.target,G=[...u.branches].some(H=>H.contains(P));!S||G||(i?.(D),s?.(D),D.defaultPrevented||c==null||c())},p),R=S2(D=>{const P=D.target;[...u.branches].some(G=>G.contains(P))||(a?.(D),s?.(D),D.defaultPrevented||c==null||c())},p);return sw(D=>{_===u.layers.size-1&&(o?.(D),!D.defaultPrevented&&c&&(D.preventDefault(),c()))},p),d.useEffect(()=>{if(m)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ls=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),ds(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ls)}},[m,p,r,u]),d.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),ds())},[m,u]),d.useEffect(()=>{const D=()=>g({});return document.addEventListener(Jo,D),()=>document.removeEventListener(Jo,D)},[]),d.createElement(_e.div,Z({},l,{ref:f,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:de(e.onFocusCapture,R.onFocusCapture),onBlurCapture:de(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:de(e.onPointerDownCapture,I.onPointerDownCapture)}))});function k2(e,t=globalThis?.document){const n=ot(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){Bl(_2,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function S2(e,t=globalThis?.document){const n=ot(e),r=d.useRef(!1);return d.useEffect(()=>{const o=i=>{i.target&&!r.current&&Bl(y2,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ds(){const e=new CustomEvent(Jo);document.dispatchEvent(e)}function Bl(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Gb(o,i):o.dispatchEvent(i)}const So="focusScope.autoFocusOnMount",Eo="focusScope.autoFocusOnUnmount",us={bubbles:!1,cancelable:!0},E2=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=d.useState(null),l=ot(o),u=ot(i),m=d.useRef(null),h=Ce(t,f=>c(f)),p=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let f=function(_){if(p.paused||!s)return;const C=_.target;s.contains(C)?m.current=C:yt(m.current,{select:!0})},w=function(_){if(p.paused||!s)return;const C=_.relatedTarget;C!==null&&(s.contains(C)||yt(m.current,{select:!0}))},y=function(_){const C=document.activeElement;for(const S of _)S.removedNodes.length>0&&(s!=null&&s.contains(C)||yt(s))};document.addEventListener("focusin",f),document.addEventListener("focusout",w);const v=new MutationObserver(y);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",w),v.disconnect()}}},[r,s,p.paused]),d.useEffect(()=>{if(s){hs.add(p);const f=document.activeElement;if(!s.contains(f)){const w=new CustomEvent(So,us);s.addEventListener(So,l),s.dispatchEvent(w),w.defaultPrevented||($2(A2(Hl(s)),{select:!0}),document.activeElement===f&&yt(s))}return()=>{s.removeEventListener(So,l),setTimeout(()=>{const w=new CustomEvent(Eo,us);s.addEventListener(Eo,u),s.dispatchEvent(w),w.defaultPrevented||yt(f??document.body,{select:!0}),s.removeEventListener(Eo,u),hs.remove(p)},0)}}},[s,l,u,p]);const g=d.useCallback(f=>{if(!n&&!r||p.paused)return;const w=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,y=document.activeElement;if(w&&y){const v=f.currentTarget,[_,C]=I2(v);_&&C?!f.shiftKey&&y===C?(f.preventDefault(),n&&yt(_,{select:!0})):f.shiftKey&&y===_&&(f.preventDefault(),n&&yt(C,{select:!0})):y===v&&f.preventDefault()}},[n,r,p.paused]);return d.createElement(_e.div,Z({tabIndex:-1},a,{ref:h,onKeyDown:g}))});function $2(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(yt(r,{select:t}),document.activeElement!==n)return}function I2(e){const t=Hl(e),n=fs(t,e),r=fs(t.reverse(),e);return[n,r]}function Hl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fs(e,t){for(const n of e)if(!R2(n,{upTo:t}))return n}function R2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function q2(e){return e instanceof HTMLInputElement&&"select"in e}function yt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&q2(e)&&t&&e.select()}}const hs=D2();function D2(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ps(e,t),e.unshift(t)},remove(t){var n;e=ps(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function ps(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function A2(e){return e.filter(t=>t.tagName!=="A")}const T2=["top","right","bottom","left"],Et=Math.min,ze=Math.max,xr=Math.round,nr=Math.floor,$t=e=>({x:e,y:e}),z2={left:"right",right:"left",bottom:"top",top:"bottom"},L2={start:"end",end:"start"};function Xo(e,t,n){return ze(e,Et(t,n))}function ht(e,t){return typeof e=="function"?e(t):e}function pt(e){return e.split("-")[0]}function mn(e){return e.split("-")[1]}function Ti(e){return e==="x"?"y":"x"}function zi(e){return e==="y"?"height":"width"}function gn(e){return["top","bottom"].includes(pt(e))?"y":"x"}function Li(e){return Ti(gn(e))}function P2(e,t,n){n===void 0&&(n=!1);const r=mn(e),o=Li(e),i=zi(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Cr(a)),[a,Cr(a)]}function O2(e){const t=Cr(e);return[Qo(e),t,Qo(t)]}function Qo(e){return e.replace(/start|end/g,t=>L2[t])}function M2(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function N2(e,t,n,r){const o=mn(e);let i=M2(pt(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Qo)))),i}function Cr(e){return e.replace(/left|right|bottom|top/g,t=>z2[t])}function U2(e){return{top:0,right:0,bottom:0,left:0,...e}}function jl(e){return typeof e!="number"?U2(e):{top:e,right:e,bottom:e,left:e}}function kr(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ms(e,t,n){let{reference:r,floating:o}=e;const i=gn(t),a=Li(t),s=zi(a),c=pt(t),l=i==="y",u=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:m};break;case"left":p={x:r.x-o.width,y:m};break;default:p={x:r.x,y:r.y}}switch(mn(t)){case"start":p[a]-=h*(n&&l?-1:1);break;case"end":p[a]+=h*(n&&l?-1:1);break}return p}const F2=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:m}=ms(l,r,c),h=r,p={},g=0;for(let f=0;f<s.length;f++){const{name:w,fn:y}=s[f],{x:v,y:_,data:C,reset:S}=await y({x:u,y:m,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=v??u,m=_??m,p={...p,[w]:{...p[w],...C}},S&&g<=50){g++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(l=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:m}=ms(l,h,c)),f=-1;continue}}return{x:u,y:m,placement:h,strategy:o,middlewareData:p}};async function An(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:m="floating",altBoundary:h=!1,padding:p=0}=ht(t,e),g=jl(p),f=s[h?m==="floating"?"reference":"floating":m],w=kr(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(f)))==null||n?f:f.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),y=m==="floating"?{...a.floating,x:r,y:o}:a.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),_=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},C=kr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:v,strategy:c}):y);return{top:(w.top-C.top+g.top)/_.y,bottom:(C.bottom-w.bottom+g.bottom)/_.y,left:(w.left-C.left+g.left)/_.x,right:(C.right-w.right+g.right)/_.x}}const gs=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ht(e,t)||{};if(l==null)return{};const m=jl(u),h={x:n,y:r},p=Li(o),g=zi(p),f=await a.getDimensions(l),w=p==="y",y=w?"top":"left",v=w?"bottom":"right",_=w?"clientHeight":"clientWidth",C=i.reference[g]+i.reference[p]-h[p]-i.floating[g],S=h[p]-i.reference[p],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let R=I?I[_]:0;(!R||!await(a.isElement==null?void 0:a.isElement(I)))&&(R=s.floating[_]||i.floating[g]);const D=C/2-S/2,P=R/2-f[g]/2-1,G=Et(m[y],P),H=Et(m[v],P),j=G,J=R-f[g]-H,N=R/2-f[g]/2+D,Y=Xo(j,N,J),M=!c.arrow&&mn(o)!=null&&N!=Y&&i.reference[g]/2-(N<j?G:H)-f[g]/2<0,X=M?N<j?N-j:N-J:0;return{[p]:h[p]+X,data:{[p]:Y,centerOffset:N-Y-X,...M&&{alignmentOffset:X}},reset:M}}}),V2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:f=!0,...w}=ht(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=pt(o),v=pt(s)===s,_=await(c.isRTL==null?void 0:c.isRTL(l.floating)),C=h||(v||!f?[Cr(s)]:O2(s));!h&&g!=="none"&&C.push(...N2(s,f,g,_));const S=[s,...C],I=await An(t,w),R=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&R.push(I[y]),m){const j=P2(o,a,_);R.push(I[j[0]],I[j[1]])}if(D=[...D,{placement:o,overflows:R}],!R.every(j=>j<=0)){var P,G;const j=(((P=i.flip)==null?void 0:P.index)||0)+1,J=S[j];if(J)return{data:{index:j,overflows:D},reset:{placement:J}};let N=(G=D.filter(Y=>Y.overflows[0]<=0).sort((Y,M)=>Y.overflows[1]-M.overflows[1])[0])==null?void 0:G.placement;if(!N)switch(p){case"bestFit":{var H;const Y=(H=D.map(M=>[M.placement,M.overflows.filter(X=>X>0).reduce((X,ge)=>X+ge,0)]).sort((M,X)=>M[1]-X[1])[0])==null?void 0:H[0];Y&&(N=Y);break}case"initialPlacement":N=s;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function bs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ws(e){return T2.some(t=>e[t]>=0)}const B2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ht(e,t);switch(r){case"referenceHidden":{const i=await An(t,{...o,elementContext:"reference"}),a=bs(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ws(a)}}}case"escaped":{const i=await An(t,{...o,altBoundary:!0}),a=bs(i,n.floating);return{data:{escapedOffsets:a,escaped:ws(a)}}}default:return{}}}}};async function H2(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=pt(n),s=mn(n),c=gn(n)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,m=ht(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),c?{x:p*u,y:h*l}:{x:h*l,y:p*u}}const j2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await H2(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},G2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:w=>{let{x:y,y:v}=w;return{x:y,y:v}}},...c}=ht(e,t),l={x:n,y:r},u=await An(t,c),m=gn(pt(o)),h=Ti(m);let p=l[h],g=l[m];if(i){const w=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=p+u[w],_=p-u[y];p=Xo(v,p,_)}if(a){const w=m==="y"?"top":"left",y=m==="y"?"bottom":"right",v=g+u[w],_=g-u[y];g=Xo(v,g,_)}const f=s.fn({...t,[h]:p,[m]:g});return{...f,data:{x:f.x-n,y:f.y-r}}}}},W2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ht(e,t),u={x:n,y:r},m=gn(o),h=Ti(m);let p=u[h],g=u[m];const f=ht(s,t),w=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const _=h==="y"?"height":"width",C=i.reference[h]-i.floating[_]+w.mainAxis,S=i.reference[h]+i.reference[_]-w.mainAxis;p<C?p=C:p>S&&(p=S)}if(l){var y,v;const _=h==="y"?"width":"height",C=["top","left"].includes(pt(o)),S=i.reference[m]-i.floating[_]+(C&&((y=a.offset)==null?void 0:y[m])||0)+(C?0:w.crossAxis),I=i.reference[m]+i.reference[_]+(C?0:((v=a.offset)==null?void 0:v[m])||0)-(C?w.crossAxis:0);g<S?g=S:g>I&&(g=I)}return{[h]:p,[m]:g}}}},K2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=ht(e,t),c=await An(t,s),l=pt(n),u=mn(n),m=gn(n)==="y",{width:h,height:p}=r.floating;let g,f;l==="top"||l==="bottom"?(g=l,f=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(f=l,g=u==="end"?"top":"bottom");const w=p-c[g],y=h-c[f],v=!t.middlewareData.shift;let _=w,C=y;if(m){const I=h-c.left-c.right;C=u||v?Et(y,I):I}else{const I=p-c.top-c.bottom;_=u||v?Et(w,I):I}if(v&&!u){const I=ze(c.left,0),R=ze(c.right,0),D=ze(c.top,0),P=ze(c.bottom,0);m?C=h-2*(I!==0||R!==0?I+R:ze(c.left,c.right)):_=p-2*(D!==0||P!==0?D+P:ze(c.top,c.bottom))}await a({...t,availableWidth:C,availableHeight:_});const S=await o.getDimensions(i.floating);return h!==S.width||p!==S.height?{reset:{rects:!0}}:{}}}};function It(e){return Gl(e)?(e.nodeName||"").toLowerCase():"#document"}function Le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vt(e){var t;return(t=(Gl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Gl(e){return e instanceof Node||e instanceof Le(e).Node}function mt(e){return e instanceof Element||e instanceof Le(e).Element}function it(e){return e instanceof HTMLElement||e instanceof Le(e).HTMLElement}function vs(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Le(e).ShadowRoot}function Un(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Be(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Z2(e){return["table","td","th"].includes(It(e))}function Pi(e){const t=Oi(),n=Be(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Y2(e){let t=ln(e);for(;it(t)&&!Zr(t);){if(Pi(t))return t;t=ln(t)}return null}function Oi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Zr(e){return["html","body","#document"].includes(It(e))}function Be(e){return Le(e).getComputedStyle(e)}function Yr(e){return mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ln(e){if(It(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vs(e)&&e.host||vt(e);return vs(t)?t.host:t}function Wl(e){const t=ln(e);return Zr(t)?e.ownerDocument?e.ownerDocument.body:e.body:it(t)&&Un(t)?t:Wl(t)}function Tn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wl(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Le(o);return i?t.concat(a,a.visualViewport||[],Un(o)?o:[],a.frameElement&&n?Tn(a.frameElement):[]):t.concat(o,Tn(o,[],n))}function Kl(e){const t=Be(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=it(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=xr(n)!==i||xr(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Mi(e){return mt(e)?e:e.contextElement}function rn(e){const t=Mi(e);if(!it(t))return $t(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Kl(t);let a=(i?xr(n.width):n.width)/r,s=(i?xr(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const J2=$t(0);function Zl(e){const t=Le(e);return!Oi()||!t.visualViewport?J2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function X2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Le(e)?!1:t}function Mt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Mi(e);let a=$t(1);t&&(r?mt(r)&&(a=rn(r)):a=rn(e));const s=X2(i,n,r)?Zl(i):$t(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,m=o.height/a.y;if(i){const h=Le(i),p=r&&mt(r)?Le(r):r;let g=h.frameElement;for(;g&&r&&p!==h;){const f=rn(g),w=g.getBoundingClientRect(),y=Be(g),v=w.left+(g.clientLeft+parseFloat(y.paddingLeft))*f.x,_=w.top+(g.clientTop+parseFloat(y.paddingTop))*f.y;c*=f.x,l*=f.y,u*=f.x,m*=f.y,c+=v,l+=_,g=Le(g).frameElement}}return kr({width:u,height:m,x:c,y:l})}function Q2(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=it(n),i=vt(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=$t(1);const c=$t(0);if((o||!o&&r!=="fixed")&&((It(n)!=="body"||Un(i))&&(a=Yr(n)),it(n))){const l=Mt(n);s=rn(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function ev(e){return Array.from(e.getClientRects())}function Yl(e){return Mt(vt(e)).left+Yr(e).scrollLeft}function tv(e){const t=vt(e),n=Yr(e),r=e.ownerDocument.body,o=ze(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ze(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Yl(e);const s=-n.scrollTop;return Be(r).direction==="rtl"&&(a+=ze(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function nv(e,t){const n=Le(e),r=vt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const l=Oi();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function rv(e,t){const n=Mt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=it(e)?rn(e):$t(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:a,height:s,x:c,y:l}}function _s(e,t,n){let r;if(t==="viewport")r=nv(e,n);else if(t==="document")r=tv(vt(e));else if(mt(t))r=rv(t,n);else{const o=Zl(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return kr(r)}function Jl(e,t){const n=ln(e);return n===t||!mt(n)||Zr(n)?!1:Be(n).position==="fixed"||Jl(n,t)}function ov(e,t){const n=t.get(e);if(n)return n;let r=Tn(e,[],!1).filter(s=>mt(s)&&It(s)!=="body"),o=null;const i=Be(e).position==="fixed";let a=i?ln(e):e;for(;mt(a)&&!Zr(a);){const s=Be(a),c=Pi(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&o&&["absolute","fixed"].includes(o.position)||Un(a)&&!c&&Jl(e,a))?r=r.filter(l=>l!==a):o=s,a=ln(a)}return t.set(e,r),r}function iv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?ov(t,this._c):[].concat(n),r],a=i[0],s=i.reduce((c,l)=>{const u=_s(t,l,o);return c.top=ze(u.top,c.top),c.right=Et(u.right,c.right),c.bottom=Et(u.bottom,c.bottom),c.left=ze(u.left,c.left),c},_s(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function av(e){return Kl(e)}function sv(e,t,n){const r=it(t),o=vt(t),i=n==="fixed",a=Mt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=$t(0);if(r||!r&&!i)if((It(t)!=="body"||Un(o))&&(s=Yr(t)),r){const l=Mt(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=Yl(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function ys(e,t){return!it(e)||Be(e).position==="fixed"?null:t?t(e):e.offsetParent}function Xl(e,t){const n=Le(e);if(!it(e))return n;let r=ys(e,t);for(;r&&Z2(r)&&Be(r).position==="static";)r=ys(r,t);return r&&(It(r)==="html"||It(r)==="body"&&Be(r).position==="static"&&!Pi(r))?n:r||Y2(e)||n}const cv=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Xl,i=this.getDimensions;return{reference:sv(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function lv(e){return Be(e).direction==="rtl"}const dv={convertOffsetParentRelativeRectToViewportRelativeRect:Q2,getDocumentElement:vt,getClippingRect:iv,getOffsetParent:Xl,getElementRects:cv,getClientRects:ev,getDimensions:av,getScale:rn,isElement:mt,isRTL:lv};function uv(e,t){let n=null,r;const o=vt(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:m,height:h}=e.getBoundingClientRect();if(s||t(),!m||!h)return;const p=nr(u),g=nr(o.clientWidth-(l+m)),f=nr(o.clientHeight-(u+h)),w=nr(l),y={rootMargin:-p+"px "+-g+"px "+-f+"px "+-w+"px",threshold:ze(0,Et(1,c))||1};let v=!0;function _(C){const S=C[0].intersectionRatio;if(S!==c){if(!v)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(_,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,y)}n.observe(e)}return a(!0),i}function fv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Mi(e),u=o||i?[...l?Tn(l):[],...Tn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const m=l&&s?uv(l,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(y=>{let[v]=y;v&&v.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let g,f=c?Mt(e):null;c&&w();function w(){const y=Mt(e);f&&(y.x!==f.x||y.y!==f.y||y.width!==f.width||y.height!==f.height)&&n(),f=y,g=requestAnimationFrame(w)}return n(),()=>{u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),m&&m(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const hv=(e,t,n)=>{const r=new Map,o={platform:dv,...n},i={...o.platform,_c:r};return F2(e,t,{...o,platform:i})},pv=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?gs({element:r.current,padding:o}).fn(n):{}:r?gs({element:r,padding:o}).fn(n):{}}}};var dr=typeof document<"u"?d.useLayoutEffect:d.useEffect;function Sr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Sr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Sr(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ql(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xs(e,t){const n=Ql(e);return Math.round(t*n)/n}function Cs(e){const t=d.useRef(e);return dr(()=>{t.current=e}),t}function mv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,m]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=d.useState(r);Sr(h,r)||p(r);const[g,f]=d.useState(null),[w,y]=d.useState(null),v=d.useCallback(M=>{M!=I.current&&(I.current=M,f(M))},[f]),_=d.useCallback(M=>{M!==R.current&&(R.current=M,y(M))},[y]),C=i||g,S=a||w,I=d.useRef(null),R=d.useRef(null),D=d.useRef(u),P=Cs(c),G=Cs(o),H=d.useCallback(()=>{if(!I.current||!R.current)return;const M={placement:t,strategy:n,middleware:h};G.current&&(M.platform=G.current),hv(I.current,R.current,M).then(X=>{const ge={...X,isPositioned:!0};j.current&&!Sr(D.current,ge)&&(D.current=ge,un.flushSync(()=>{m(ge)}))})},[h,t,n,G]);dr(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,m(M=>({...M,isPositioned:!1})))},[l]);const j=d.useRef(!1);dr(()=>(j.current=!0,()=>{j.current=!1}),[]),dr(()=>{if(C&&(I.current=C),S&&(R.current=S),C&&S){if(P.current)return P.current(C,S,H);H()}},[C,S,H,P]);const J=d.useMemo(()=>({reference:I,floating:R,setReference:v,setFloating:_}),[v,_]),N=d.useMemo(()=>({reference:C,floating:S}),[C,S]),Y=d.useMemo(()=>{const M={position:n,left:0,top:0};if(!N.floating)return M;const X=xs(N.floating,u.x),ge=xs(N.floating,u.y);return s?{...M,transform:"translate("+X+"px, "+ge+"px)",...Ql(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:ge}},[n,s,N.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:H,refs:J,elements:N,floatingStyles:Y}),[u,H,J,N,Y])}const ed="Popper",[td,nd]=wt(ed),[gv,rd]=td(ed),bv=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return d.createElement(gv,{scope:t,anchor:r,onAnchorChange:o},n)},wv="PopperAnchor",vv=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=rd(wv,n),a=d.useRef(null),s=Ce(t,a);return d.useEffect(()=>{i.onAnchorChange(r?.current||a.current)}),r?null:d.createElement(_e.div,Z({},o,{ref:s}))}),od="PopperContent",[_v,G6]=td(od),yv=d.forwardRef((e,t)=>{var n,r,o,i,a,s,c,l;const{__scopePopper:u,side:m="bottom",sideOffset:h=0,align:p="center",alignOffset:g=0,arrowPadding:f=0,collisionBoundary:w=[],collisionPadding:y=0,sticky:v="partial",hideWhenDetached:_=!1,avoidCollisions:C=!0,onPlaced:S,...I}=e,R=rd(od,u),[D,P]=d.useState(null),G=Ce(t,Se=>P(Se)),[H,j]=d.useState(null),J=Zw(H),N=(n=J?.width)!==null&&n!==void 0?n:0,Y=(r=J?.height)!==null&&r!==void 0?r:0,M=m+(p!=="center"?"-"+p:""),X=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},ge=Array.isArray(w)?w:[w],E=ge.length>0,k={padding:X,boundary:ge.filter(xv),altBoundary:E},{refs:$,floatingStyles:O,placement:z,isPositioned:F,middlewareData:ne}=mv({strategy:"fixed",placement:M,whileElementsMounted:fv,elements:{reference:R.anchor},middleware:[j2({mainAxis:h+Y,alignmentAxis:g}),C&&G2({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?W2():void 0,...k}),C&&V2({...k}),K2({...k,apply:({elements:Se,rects:qt,availableWidth:at,availableHeight:Dt})=>{const{width:yn,height:no}=qt.reference,At=Se.floating.style;At.setProperty("--radix-popper-available-width",`${at}px`),At.setProperty("--radix-popper-available-height",`${Dt}px`),At.setProperty("--radix-popper-anchor-width",`${yn}px`),At.setProperty("--radix-popper-anchor-height",`${no}px`)}}),H&&pv({element:H,padding:f}),Cv({arrowWidth:N,arrowHeight:Y}),_&&B2({strategy:"referenceHidden"})]}),[ce,L]=id(z),K=ot(S);Pe(()=>{F&&K?.()},[F,K]);const le=(o=ne.arrow)===null||o===void 0?void 0:o.x,W=(i=ne.arrow)===null||i===void 0?void 0:i.y,ee=((a=ne.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[fe,Re]=d.useState();return Pe(()=>{D&&Re(window.getComputedStyle(D).zIndex)},[D]),d.createElement("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:F?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(s=ne.transformOrigin)===null||s===void 0?void 0:s.x,(c=ne.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},d.createElement(_v,{scope:u,placedSide:ce,onArrowChange:j,arrowX:le,arrowY:W,shouldHideArrow:ee},d.createElement(_e.div,Z({"data-side":ce,"data-align":L},I,{ref:G,style:{...I.style,animation:F?void 0:"none",opacity:(l=ne.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))});function xv(e){return e!==null}const Cv=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:c,middlewareData:l}=t,u=((n=l.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[p,g]=id(s),f={start:"0%",center:"50%",end:"100%"}[g],w=((r=(o=l.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+m/2,y=((i=(a=l.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let v="",_="";return p==="bottom"?(v=u?f:`${w}px`,_=`${-h}px`):p==="top"?(v=u?f:`${w}px`,_=`${c.floating.height+h}px`):p==="right"?(v=`${-h}px`,_=u?f:`${y}px`):p==="left"&&(v=`${c.floating.width+h}px`,_=u?f:`${y}px`),{data:{x:v,y:_}}}});function id(e){const[t,n="center"]=e.split("-");return[t,n]}const kv=bv,Sv=vv,Ev=yv,$v=d.forwardRef((e,t)=>d.createElement(_e.span,Z({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),Iv=[" ","Enter","ArrowUp","ArrowDown"],Rv=[" ","Enter"],Jr="Select",[Xr,Qr,qv]=Ai(Jr),[bn,W6]=wt(Jr,[qv,nd]),Ni=nd(),[Dv,Ht]=bn(Jr),[Av,Tv]=bn(Jr),zv=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:m,disabled:h,required:p}=e,g=Ni(t),[f,w]=d.useState(null),[y,v]=d.useState(null),[_,C]=d.useState(!1),S=Gr(l),[I=!1,R]=cn({prop:r,defaultProp:o,onChange:i}),[D,P]=cn({prop:a,defaultProp:s,onChange:c}),G=d.useRef(null),H=f?!!f.closest("form"):!0,[j,J]=d.useState(new Set),N=Array.from(j).map(Y=>Y.props.value).join(";");return d.createElement(kv,g,d.createElement(Dv,{required:p,scope:t,trigger:f,onTriggerChange:w,valueNode:y,onValueNodeChange:v,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:Mn(),value:D,onValueChange:P,open:I,onOpenChange:R,dir:S,triggerPointerDownPosRef:G,disabled:h},d.createElement(Xr.Provider,{scope:t},d.createElement(Av,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(Y=>{J(M=>new Set(M).add(Y))},[]),onNativeOptionRemove:d.useCallback(Y=>{J(M=>{const X=new Set(M);return X.delete(Y),X})},[])},n)),H?d.createElement(ld,{key:N,"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:m,value:D,onChange:Y=>P(Y.target.value),disabled:h},D===void 0?d.createElement("option",{value:""}):null,Array.from(j)):null))},Lv="SelectTrigger",Pv=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ni(n),a=Ht(Lv,n),s=a.disabled||r,c=Ce(t,a.onTriggerChange),l=Qr(n),[u,m,h]=dd(g=>{const f=l().filter(v=>!v.disabled),w=f.find(v=>v.value===a.value),y=ud(f,g,w);y!==void 0&&a.onValueChange(y.value)}),p=()=>{s||(a.onOpenChange(!0),h())};return d.createElement(Sv,Z({asChild:!0},i),d.createElement(_e.button,Z({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":a.value===void 0?"":void 0},o,{ref:c,onClick:de(o.onClick,g=>{g.currentTarget.focus()}),onPointerDown:de(o.onPointerDown,g=>{const f=g.target;f.hasPointerCapture(g.pointerId)&&f.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)},g.preventDefault())}),onKeyDown:de(o.onKeyDown,g=>{const f=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&m(g.key),!(f&&g.key===" ")&&Iv.includes(g.key)&&(p(),g.preventDefault())})})))}),Ov="SelectValue",Mv=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Ht(Ov,n),{onValueNodeHasChildrenChange:l}=c,u=i!==void 0,m=Ce(t,c.onValueNodeChange);return Pe(()=>{l(u)},[l,u]),d.createElement(_e.span,Z({},s,{ref:m,style:{pointerEvents:"none"}}),c.value===void 0&&a!==void 0?a:i)}),dn="SelectContent",Nv=d.forwardRef((e,t)=>{const n=Ht(dn,e.__scopeSelect),[r,o]=d.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?un.createPortal(d.createElement(ad,{scope:e.__scopeSelect},d.createElement(Xr.Slot,{scope:e.__scopeSelect},d.createElement("div",null,e.children))),i):null}return d.createElement(Uv,Z({},e,{ref:t}))}),lt=10,[ad,wn]=bn(dn),Uv=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:f,avoidCollisions:w,...y}=e,v=Ht(dn,n),[_,C]=d.useState(null),[S,I]=d.useState(null),R=Ce(t,L=>C(L)),[D,P]=d.useState(null),[G,H]=d.useState(null),j=Qr(n),[J,N]=d.useState(!1),Y=d.useRef(!1);d.useEffect(()=>{if(_)return Gw(_)},[_]),cw();const M=d.useCallback(L=>{const[K,...le]=j().map(fe=>fe.ref.current),[W]=le.slice(-1),ee=document.activeElement;for(const fe of L)if(fe===ee||(fe?.scrollIntoView({block:"nearest"}),fe===K&&S&&(S.scrollTop=0),fe===W&&S&&(S.scrollTop=S.scrollHeight),fe?.focus(),document.activeElement!==ee))return},[j,S]),X=d.useCallback(()=>M([D,_]),[M,D,_]);d.useEffect(()=>{J&&X()},[J,X]);const{onOpenChange:ge,triggerPointerDownPosRef:E}=v;d.useEffect(()=>{if(_){let L={x:0,y:0};const K=W=>{var ee,fe,Re,Se;L={x:Math.abs(Math.round(W.pageX)-((ee=(fe=E.current)===null||fe===void 0?void 0:fe.x)!==null&&ee!==void 0?ee:0)),y:Math.abs(Math.round(W.pageY)-((Re=(Se=E.current)===null||Se===void 0?void 0:Se.y)!==null&&Re!==void 0?Re:0))}},le=W=>{L.x<=10&&L.y<=10?W.preventDefault():_.contains(W.target)||ge(!1),document.removeEventListener("pointermove",K),E.current=null};return E.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",le,{capture:!0})}}},[_,ge,E]),d.useEffect(()=>{const L=()=>ge(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[ge]);const[k,$]=dd(L=>{const K=j().filter(ee=>!ee.disabled),le=K.find(ee=>ee.ref.current===document.activeElement),W=ud(K,L,le);W&&setTimeout(()=>W.ref.current.focus())}),O=d.useCallback((L,K,le)=>{const W=!Y.current&&!le;(v.value!==void 0&&v.value===K||W)&&(P(L),W&&(Y.current=!0))},[v.value]),z=d.useCallback(()=>_?.focus(),[_]),F=d.useCallback((L,K,le)=>{const W=!Y.current&&!le;(v.value!==void 0&&v.value===K||W)&&H(L)},[v.value]),ne=r==="popper"?ks:Fv,ce=ne===ks?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:f,avoidCollisions:w}:{};return d.createElement(ad,{scope:n,content:_,viewport:S,onViewportChange:I,itemRefCallback:O,selectedItem:D,onItemLeave:z,itemTextRefCallback:F,focusSelectedItem:X,selectedItemText:G,position:r,isPositioned:J,searchRef:k},d.createElement(Ol,{as:Dn,allowPinchZoom:!0},d.createElement(E2,{asChild:!0,trapped:v.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:de(o,L=>{var K;(K=v.trigger)===null||K===void 0||K.focus({preventScroll:!0}),L.preventDefault()})},d.createElement(C2,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>v.onOpenChange(!1)},d.createElement(ne,Z({role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:L=>L.preventDefault()},y,ce,{onPlaced:()=>N(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:de(y.onKeyDown,L=>{const K=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!K&&L.key.length===1&&$(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let le=j().filter(W=>!W.disabled).map(W=>W.ref.current);if(["ArrowUp","End"].includes(L.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const W=L.target,ee=le.indexOf(W);le=le.slice(ee+1)}setTimeout(()=>M(le)),L.preventDefault()}})}))))))}),Fv=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Ht(dn,n),a=wn(dn,n),[s,c]=d.useState(null),[l,u]=d.useState(null),m=Ce(t,R=>u(R)),h=Qr(n),p=d.useRef(!1),g=d.useRef(!0),{viewport:f,selectedItem:w,selectedItemText:y,focusSelectedItem:v}=a,_=d.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&l&&f&&w&&y){const R=i.trigger.getBoundingClientRect(),D=l.getBoundingClientRect(),P=i.valueNode.getBoundingClientRect(),G=y.getBoundingClientRect();if(i.dir!=="rtl"){const W=G.left-D.left,ee=P.left-W,fe=R.left-ee,Re=R.width+fe,Se=Math.max(Re,D.width),qt=window.innerWidth-lt,at=cs(ee,[lt,qt-Se]);s.style.minWidth=Re+"px",s.style.left=at+"px"}else{const W=D.right-G.right,ee=window.innerWidth-P.right-W,fe=window.innerWidth-R.right-ee,Re=R.width+fe,Se=Math.max(Re,D.width),qt=window.innerWidth-lt,at=cs(ee,[lt,qt-Se]);s.style.minWidth=Re+"px",s.style.right=at+"px"}const H=h(),j=window.innerHeight-lt*2,J=f.scrollHeight,N=window.getComputedStyle(l),Y=parseInt(N.borderTopWidth,10),M=parseInt(N.paddingTop,10),X=parseInt(N.borderBottomWidth,10),ge=parseInt(N.paddingBottom,10),E=Y+M+J+ge+X,k=Math.min(w.offsetHeight*5,E),$=window.getComputedStyle(f),O=parseInt($.paddingTop,10),z=parseInt($.paddingBottom,10),F=R.top+R.height/2-lt,ne=j-F,ce=w.offsetHeight/2,L=w.offsetTop+ce,K=Y+M+L,le=E-K;if(K<=F){const W=w===H[H.length-1].ref.current;s.style.bottom="0px";const ee=l.clientHeight-f.offsetTop-f.offsetHeight,fe=Math.max(ne,ce+(W?z:0)+ee+X),Re=K+fe;s.style.height=Re+"px"}else{const W=w===H[0].ref.current;s.style.top="0px";const ee=Math.max(F,Y+f.offsetTop+(W?O:0)+ce)+le;s.style.height=ee+"px",f.scrollTop=K-F+f.offsetTop}s.style.margin=`${lt}px 0`,s.style.minHeight=k+"px",s.style.maxHeight=j+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,i.trigger,i.valueNode,s,l,f,w,y,i.dir,r]);Pe(()=>_(),[_]);const[C,S]=d.useState();Pe(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]);const I=d.useCallback(R=>{R&&g.current===!0&&(_(),v?.(),g.current=!1)},[_,v]);return d.createElement(Vv,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:I},d.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C}},d.createElement(_e.div,Z({},o,{ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),ks=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=lt,...i}=e,a=Ni(n);return d.createElement(Ev,Z({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[Vv,sd]=bn(dn,{}),Ss="SelectViewport",Bv=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=wn(Ss,n),i=sd(Ss,n),a=Ce(t,o.onViewportChange),s=d.useRef(0);return d.createElement(d.Fragment,null,d.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),d.createElement(Xr.Slot,{scope:n},d.createElement(_e.div,Z({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:de(r.onScroll,c=>{const l=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:m}=i;if(m!=null&&m.current&&u){const h=Math.abs(s.current-l.scrollTop);if(h>0){const p=window.innerHeight-lt*2,g=parseFloat(u.style.minHeight),f=parseFloat(u.style.height),w=Math.max(g,f);if(w<p){const y=w+h,v=Math.min(p,y),_=y-v;u.style.height=v+"px",u.style.bottom==="0px"&&(l.scrollTop=_>0?_:0,u.style.justifyContent="flex-end")}}}s.current=l.scrollTop})}))))}),Hv="SelectGroup",[jv,K6]=bn(Hv),Gv=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Mn();return d.createElement(jv,{scope:n,id:o},d.createElement(_e.div,Z({role:"group","aria-labelledby":o},r,{ref:t})))}),ei="SelectItem",[Wv,cd]=bn(ei),Kv=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Ht(ei,n),c=wn(ei,n),l=s.value===r,[u,m]=d.useState(i??""),[h,p]=d.useState(!1),g=Ce(t,y=>{var v;return(v=c.itemRefCallback)===null||v===void 0?void 0:v.call(c,y,r,o)}),f=Mn(),w=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return d.createElement(Wv,{scope:n,value:r,disabled:o,textId:f,isSelected:l,onItemTextChange:d.useCallback(y=>{m(v=>{var _;return v||((_=y?.textContent)!==null&&_!==void 0?_:"").trim()})},[])},d.createElement(Xr.ItemSlot,{scope:n,value:r,disabled:o,textValue:u},d.createElement(_e.div,Z({role:"option","aria-labelledby":f,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:g,onFocus:de(a.onFocus,()=>p(!0)),onBlur:de(a.onBlur,()=>p(!1)),onPointerUp:de(a.onPointerUp,w),onPointerMove:de(a.onPointerMove,y=>{if(o){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}else y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:de(a.onPointerLeave,y=>{if(y.currentTarget===document.activeElement){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}}),onKeyDown:de(a.onKeyDown,y=>{var v;((v=c.searchRef)===null||v===void 0?void 0:v.current)!==""&&y.key===" "||(Rv.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})}))))}),rr="SelectItemText",Zv=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Ht(rr,n),s=wn(rr,n),c=cd(rr,n),l=Tv(rr,n),[u,m]=d.useState(null),h=Ce(t,y=>m(y),c.onItemTextChange,y=>{var v;return(v=s.itemTextRefCallback)===null||v===void 0?void 0:v.call(s,y,c.value,c.disabled)}),p=u?.textContent,g=d.useMemo(()=>d.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p),[c.disabled,c.value,p]),{onNativeOptionAdd:f,onNativeOptionRemove:w}=l;return Pe(()=>(f(g),()=>w(g)),[f,w,g]),d.createElement(d.Fragment,null,d.createElement(_e.span,Z({id:c.textId},i,{ref:h})),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?un.createPortal(i.children,a.valueNode):null)}),Yv="SelectItemIndicator",Jv=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return cd(Yv,n).isSelected?d.createElement(_e.span,Z({"aria-hidden":!0},r,{ref:t})):null}),Es="SelectScrollDownButton",Xv=d.forwardRef((e,t)=>{const n=wn(Es,e.__scopeSelect),r=sd(Es,e.__scopeSelect),[o,i]=d.useState(!1),a=Ce(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;i(u)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?d.createElement(Qv,Z({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),Qv=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=wn("SelectScrollButton",n),a=d.useRef(null),s=Qr(n),c=d.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),Pe(()=>{var l;const u=s().find(m=>m.ref.current===document.activeElement);u==null||(l=u.ref.current)===null||l===void 0||l.scrollIntoView({block:"nearest"})},[s]),d.createElement(_e.div,Z({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:de(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:de(o.onPointerMove,()=>{var l;(l=i.onItemLeave)===null||l===void 0||l.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:de(o.onPointerLeave,()=>{c()})}))}),ld=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=d.useRef(null),i=Ce(t,o),a=Kw(n);return d.useEffect(()=>{const s=o.current,c=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&l){const u=new Event("change",{bubbles:!0});l.call(s,n),s.dispatchEvent(u)}},[a,n]),d.createElement($v,{asChild:!0},d.createElement("select",Z({},r,{ref:i,defaultValue:n})))});ld.displayName="BubbleSelect";function dd(e){const t=ot(e),n=d.useRef(""),r=d.useRef(0),o=d.useCallback(a=>{const s=n.current+a;t(s),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),i=d.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function ud(e,t,n){const r=t.length>1&&Array.from(t).every(s=>s===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=e_(e,Math.max(o,0));r.length===1&&(i=i.filter(s=>s!==n));const a=i.find(s=>s.textValue.toLowerCase().startsWith(r.toLowerCase()));return a!==n?a:void 0}function e_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const t_=zv,n_=Pv,r_=Mv,o_=Nv,i_=Bv,a_=Gv,s_=Kv,c_=Zv,l_=Jv,d_=Xv;var u_="_1wo163v0",f_="_1wo163v1",h_="_1wo163v2",p_="_1wo163v3",m_="_1wo163v4",g_="_1wo163v5",b_="_1wo163v6",w_="_1wo163v7";const v_=({label:e,items:t,defaultValue:n,onChange:r,className:o,contentProps:i,disabled:a=!1})=>{const[s,c]=d.useState(n),l=d.useCallback(u=>{c(u),r(u)},[r]);return b.jsx("div",{className:"sid-dropdown",children:b.jsxs(t_,{disabled:a,onValueChange:l,defaultValue:n,children:[b.jsxs(n_,{className:te("sid-dropdown__trigger",u_,o),children:[b.jsx("label",{className:te("sid-dropdown__trigger__label",f_),children:e}),b.jsx("div",{className:te("sid-dropdown__trigger__input",h_),children:b.jsx(r_,{})}),b.jsx(bl,{className:te("sid-dropdown__trigger__icon",b_)})]}),b.jsxs(o_,{...i,className:te("sid-dropdown__popover",p_,i?.className),children:[b.jsx(i_,{className:te("sid-dropdown__viewport",m_),children:b.jsx(a_,{children:t.map(u=>b.jsxs(s_,{className:te("sid-dropdown__item",u.value===s&&"sid-dropdown__item--selected",g_),value:u.value,textValue:u.textValue,children:[b.jsx(c_,{children:u.label}),b.jsx(l_,{className:w_,children:b.jsx(Eb,{className:"sid-dropdown__item--selected__icon"})})]},u.value))})}),b.jsx(d_,{})]})]})})},$o="rovingFocusGroup.onEntryFocus",__={bubbles:!1,cancelable:!0},Ui="RovingFocusGroup",[ti,fd,y_]=Ai(Ui),[x_,hd]=wt(Ui,[y_]),[C_,k_]=x_(Ui),S_=d.forwardRef((e,t)=>d.createElement(ti.Provider,{scope:e.__scopeRovingFocusGroup},d.createElement(ti.Slot,{scope:e.__scopeRovingFocusGroup},d.createElement(E_,Z({},e,{ref:t}))))),E_=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,...u}=e,m=d.useRef(null),h=Ce(t,m),p=Gr(i),[g=null,f]=cn({prop:a,defaultProp:s,onChange:c}),[w,y]=d.useState(!1),v=ot(l),_=fd(n),C=d.useRef(!1),[S,I]=d.useState(0);return d.useEffect(()=>{const R=m.current;if(R)return R.addEventListener($o,v),()=>R.removeEventListener($o,v)},[v]),d.createElement(C_,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:g,onItemFocus:d.useCallback(R=>f(R),[f]),onItemShiftTab:d.useCallback(()=>y(!0),[]),onFocusableItemAdd:d.useCallback(()=>I(R=>R+1),[]),onFocusableItemRemove:d.useCallback(()=>I(R=>R-1),[])},d.createElement(_e.div,Z({tabIndex:w||S===0?-1:0,"data-orientation":r},u,{ref:h,style:{outline:"none",...e.style},onMouseDown:de(e.onMouseDown,()=>{C.current=!0}),onFocus:de(e.onFocus,R=>{const D=!C.current;if(R.target===R.currentTarget&&D&&!w){const P=new CustomEvent($o,__);if(R.currentTarget.dispatchEvent(P),!P.defaultPrevented){const G=_().filter(N=>N.focusable),H=G.find(N=>N.active),j=G.find(N=>N.id===g),J=[H,j,...G].filter(Boolean).map(N=>N.ref.current);pd(J)}}C.current=!1}),onBlur:de(e.onBlur,()=>y(!1))})))}),$_="RovingFocusGroupItem",I_=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Mn(),c=i||s,l=k_($_,n),u=l.currentTabStopId===c,m=fd(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=l;return d.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),d.createElement(ti.ItemSlot,{scope:n,id:c,focusable:r,active:o},d.createElement(_e.span,Z({tabIndex:u?0:-1,"data-orientation":l.orientation},a,{ref:t,onMouseDown:de(e.onMouseDown,g=>{r?l.onItemFocus(c):g.preventDefault()}),onFocus:de(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:de(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const f=D_(g,l.orientation,l.dir);if(f!==void 0){g.preventDefault();let w=m().filter(y=>y.focusable).map(y=>y.ref.current);if(f==="last")w.reverse();else if(f==="prev"||f==="next"){f==="prev"&&w.reverse();const y=w.indexOf(g.currentTarget);w=l.loop?A_(w,y+1):w.slice(y+1)}setTimeout(()=>pd(w))}})})))}),R_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function q_(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function D_(e,t,n){const r=q_(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return R_[r]}function pd(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function A_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const T_=S_,z_=I_,md="Tabs",[L_,Z6]=wt(md,[hd]),gd=hd(),[P_,Fi]=L_(md),O_=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:c="automatic",...l}=e,u=Gr(s),[m,h]=cn({prop:r,onChange:o,defaultProp:i});return d.createElement(P_,{scope:n,baseId:Mn(),value:m,onValueChange:h,orientation:a,dir:u,activationMode:c},d.createElement(_e.div,Z({dir:u,"data-orientation":a},l,{ref:t})))}),M_="TabsList",N_=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=Fi(M_,n),a=gd(n);return d.createElement(T_,Z({asChild:!0},a,{orientation:i.orientation,dir:i.dir,loop:r}),d.createElement(_e.div,Z({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))}),U_="TabsTrigger",F_=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=Fi(U_,n),s=gd(n),c=bd(a.baseId,r),l=wd(a.baseId,r),u=r===a.value;return d.createElement(z_,Z({asChild:!0},s,{focusable:!o,active:u}),d.createElement(_e.button,Z({type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c},i,{ref:t,onMouseDown:de(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?a.onValueChange(r):m.preventDefault()}),onKeyDown:de(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&a.onValueChange(r)}),onFocus:de(e.onFocus,()=>{const m=a.activationMode!=="manual";!u&&!o&&m&&a.onValueChange(r)})})))}),V_="TabsContent",B_=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=Fi(V_,n),c=bd(s.baseId,r),l=wd(s.baseId,r),u=r===s.value,m=d.useRef(u);return d.useEffect(()=>{const h=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(h)},[]),d.createElement(Cl,{present:o||u},({present:h})=>d.createElement(_e.div,Z({"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:l,tabIndex:0},a,{ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0}}),h&&i))});function bd(e,t){return`${e}-trigger-${t}`}function wd(e,t){return`${e}-content-${t}`}const H_=O_,j_=N_,G_=F_,W_=B_;var K_="_1bc2uou0",Z_="_1bc2uou1";const Y_=({className:e,tabs:t,defaultValue:n,testId:r})=>{var o;return t.length?b.jsxs(H_,{"data-testid":r,className:te("sid-tabs",e),defaultValue:n??((o=t[0])==null?void 0:o.id),children:[b.jsx(j_,{className:K_,"aria-label":"SlashID Tabs",children:t.map(({id:i,title:a})=>b.jsx(G_,{"data-testid":`sid-tabs-trigger-${i}`,className:Z_,value:i,children:a},i))}),t.map(({id:i,content:a})=>b.jsx(W_,{value:i,children:a},i))]}):null},J_=e=>{const t=globalThis.document.getElementById(e);if(t!==null)return t;const n=document.createElement("div");return n.id=e,document.body.appendChild(n),n},X_=({to:e,children:t,renderKey:n})=>{const r=J_(e);return b.jsx(b.Fragment,{children:un.createPortal(t,r,n)})},Q_=["--sid-color-background","--sid-color-mute","--sid-color-panel","--sid-color-foreground","--sid-color-contrast","--sid-color-secondary","--sid-color-tertiary","--sid-color-placeholder","--sid-color-smooth","--sid-color-subtle","--sid-color-soft","--sid-color-offset","--sid-color-primary","--sid-color-primary-hover","--sid-color-transparent","--sid-color-error","--sid-color-auxiliary","--sid-color-success","--sid-color-foreground-success","--sid-color-background-success","--sid-color-failure","--sid-color-foreground-failure","--sid-color-background-failure","--sid-font-family","--sid-border-width-panel","--sid-input-border-radius","--sid-input-border-color","--sid-input-label-color","--sid-button-border-radius","--sid-form-border-radius","--sid-form-logo-width"];var e9={exports:{}};(function(e){var t=function(n){var r=Object.prototype,o=r.hasOwnProperty,i=Object.defineProperty||function(E,k,$){E[k]=$.value},a,s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function m(E,k,$){return Object.defineProperty(E,k,{value:$,enumerable:!0,configurable:!0,writable:!0}),E[k]}try{m({},"")}catch{m=function(E,k,$){return E[k]=$}}function h(E,k,$,O){var z=k&&k.prototype instanceof _?k:_,F=Object.create(z.prototype),ne=new M(O||[]);return i(F,"_invoke",{value:j(E,$,ne)}),F}n.wrap=h;function p(E,k,$){try{return{type:"normal",arg:E.call(k,$)}}catch(O){return{type:"throw",arg:O}}}var g="suspendedStart",f="suspendedYield",w="executing",y="completed",v={};function _(){}function C(){}function S(){}var I={};m(I,c,function(){return this});var R=Object.getPrototypeOf,D=R&&R(R(X([])));D&&D!==r&&o.call(D,c)&&(I=D);var P=S.prototype=_.prototype=Object.create(I);C.prototype=S,i(P,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:C,configurable:!0}),C.displayName=m(S,u,"GeneratorFunction");function G(E){["next","throw","return"].forEach(function(k){m(E,k,function($){return this._invoke(k,$)})})}n.isGeneratorFunction=function(E){var k=typeof E=="function"&&E.constructor;return k?k===C||(k.displayName||k.name)==="GeneratorFunction":!1},n.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,S):(E.__proto__=S,m(E,u,"GeneratorFunction")),E.prototype=Object.create(P),E},n.awrap=function(E){return{__await:E}};function H(E,k){function $(F,ne,ce,L){var K=p(E[F],E,ne);if(K.type==="throw")L(K.arg);else{var le=K.arg,W=le.value;return W&&typeof W=="object"&&o.call(W,"__await")?k.resolve(W.__await).then(function(ee){$("next",ee,ce,L)},function(ee){$("throw",ee,ce,L)}):k.resolve(W).then(function(ee){le.value=ee,ce(le)},function(ee){return $("throw",ee,ce,L)})}}var O;function z(F,ne){function ce(){return new k(function(L,K){$(F,ne,L,K)})}return O=O?O.then(ce,ce):ce()}i(this,"_invoke",{value:z})}G(H.prototype),m(H.prototype,l,function(){return this}),n.AsyncIterator=H,n.async=function(E,k,$,O,z){z===void 0&&(z=Promise);var F=new H(h(E,k,$,O),z);return n.isGeneratorFunction(k)?F:F.next().then(function(ne){return ne.done?ne.value:F.next()})};function j(E,k,$){var O=g;return function(z,F){if(O===w)throw new Error("Generator is already running");if(O===y){if(z==="throw")throw F;return ge()}for($.method=z,$.arg=F;;){var ne=$.delegate;if(ne){var ce=J(ne,$);if(ce){if(ce===v)continue;return ce}}if($.method==="next")$.sent=$._sent=$.arg;else if($.method==="throw"){if(O===g)throw O=y,$.arg;$.dispatchException($.arg)}else $.method==="return"&&$.abrupt("return",$.arg);O=w;var L=p(E,k,$);if(L.type==="normal"){if(O=$.done?y:f,L.arg===v)continue;return{value:L.arg,done:$.done}}else L.type==="throw"&&(O=y,$.method="throw",$.arg=L.arg)}}}function J(E,k){var $=k.method,O=E.iterator[$];if(O===a)return k.delegate=null,$==="throw"&&E.iterator.return&&(k.method="return",k.arg=a,J(E,k),k.method==="throw")||$!=="return"&&(k.method="throw",k.arg=new TypeError("The iterator does not provide a '"+$+"' method")),v;var z=p(O,E.iterator,k.arg);if(z.type==="throw")return k.method="throw",k.arg=z.arg,k.delegate=null,v;var F=z.arg;if(!F)return k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,v;if(F.done)k[E.resultName]=F.value,k.next=E.nextLoc,k.method!=="return"&&(k.method="next",k.arg=a);else return F;return k.delegate=null,v}G(P),m(P,u,"Generator"),m(P,c,function(){return this}),m(P,"toString",function(){return"[object Generator]"});function N(E){var k={tryLoc:E[0]};1 in E&&(k.catchLoc=E[1]),2 in E&&(k.finallyLoc=E[2],k.afterLoc=E[3]),this.tryEntries.push(k)}function Y(E){var k=E.completion||{};k.type="normal",delete k.arg,E.completion=k}function M(E){this.tryEntries=[{tryLoc:"root"}],E.forEach(N,this),this.reset(!0)}n.keys=function(E){var k=Object(E),$=[];for(var O in k)$.push(O);return $.reverse(),function z(){for(;$.length;){var F=$.pop();if(F in k)return z.value=F,z.done=!1,z}return z.done=!0,z}};function X(E){if(E){var k=E[c];if(k)return k.call(E);if(typeof E.next=="function")return E;if(!isNaN(E.length)){var $=-1,O=function z(){for(;++$<E.length;)if(o.call(E,$))return z.value=E[$],z.done=!1,z;return z.value=a,z.done=!0,z};return O.next=O}}return{next:ge}}n.values=X;function ge(){return{value:a,done:!0}}return M.prototype={constructor:M,reset:function(E){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(Y),!E)for(var k in this)k.charAt(0)==="t"&&o.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=a)},stop:function(){this.done=!0;var E=this.tryEntries[0],k=E.completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(E){if(this.done)throw E;var k=this;function $(L,K){return F.type="throw",F.arg=E,k.next=L,K&&(k.method="next",k.arg=a),!!K}for(var O=this.tryEntries.length-1;O>=0;--O){var z=this.tryEntries[O],F=z.completion;if(z.tryLoc==="root")return $("end");if(z.tryLoc<=this.prev){var ne=o.call(z,"catchLoc"),ce=o.call(z,"finallyLoc");if(ne&&ce){if(this.prev<z.catchLoc)return $(z.catchLoc,!0);if(this.prev<z.finallyLoc)return $(z.finallyLoc)}else if(ne){if(this.prev<z.catchLoc)return $(z.catchLoc,!0)}else if(ce){if(this.prev<z.finallyLoc)return $(z.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(E,k){for(var $=this.tryEntries.length-1;$>=0;--$){var O=this.tryEntries[$];if(O.tryLoc<=this.prev&&o.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var z=O;break}}z&&(E==="break"||E==="continue")&&z.tryLoc<=k&&k<=z.finallyLoc&&(z=null);var F=z?z.completion:{};return F.type=E,F.arg=k,z?(this.method="next",this.next=z.finallyLoc,v):this.complete(F)},complete:function(E,k){if(E.type==="throw")throw E.arg;return E.type==="break"||E.type==="continue"?this.next=E.arg:E.type==="return"?(this.rval=this.arg=E.arg,this.method="return",this.next="end"):E.type==="normal"&&k&&(this.next=k),v},finish:function(E){for(var k=this.tryEntries.length-1;k>=0;--k){var $=this.tryEntries[k];if($.finallyLoc===E)return this.complete($.completion,$.afterLoc),Y($),v}},catch:function(E){for(var k=this.tryEntries.length-1;k>=0;--k){var $=this.tryEntries[k];if($.tryLoc===E){var O=$.completion;if(O.type==="throw"){var z=O.arg;Y($)}return z}}throw new Error("illegal catch attempt")},delegateYield:function(E,k,$){return this.delegate={iterator:X(E),resultName:k,nextLoc:$},this.method==="next"&&(this.arg=a),v}},n}(e.exports);try{regeneratorRuntime=t}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}})(e9);const t9={sid:void 0,user:void 0,anonymousUser:void 0,sdkState:"initial",logOut:()=>{},logIn:()=>Promise.reject("NYI"),mfa:()=>Promise.reject("NYI"),recover:()=>Promise.reject("NYI"),validateToken:async()=>!1,__switchOrganizationInContext:async()=>{},__syncExternalState:async()=>{}},n9=d.createContext(t9);n9.displayName="SlashIDContext";const r9=["email_address","phone_number","username"],o9=["webauthn","otp_via_email","email_link","password","totp"],i9=["otp_via_sms","sms_link","password"],a9=["password"],s9=["oidc","saml"];function c9(e){return"allowedHandleTypes"in e?e.allowedHandleTypes.every(t=>r9.includes(t)):!1}function Io(e,t){return c9(e)?e.allowedHandleTypes.includes(t):t!=="username"}function l9(e){const t=new Set;return o9.includes(e.method)&&Io(e,"email_address")&&t.add("email_address"),i9.includes(e.method)&&Io(e,"phone_number")&&t.add("phone_number"),a9.includes(e.method)&&Io(e,"username")&&t.add("username"),t}function Vi(e){const t=new Set;return e.forEach(n=>{l9(n).forEach(r=>t.add(r))}),Array.from(t)}function d9(e,t){return e.filter(n=>Vi([n]).includes(t))}function vd(e){return e.method==="oidc"}function ni(e){return s9.includes(e.method)}function Bi(e){return e.method!=="oidc"}function u9(e){return e.some(ni)&&e.some(t=>!ni(t))}function or(e,t){if(!(!e||e.type!==t))return e.value}function f9(e){for(const t of Di())if(e.startsWith(t.dial_code))return{dialCode:t.dial_code,number:e.substring(t.dial_code.length).trim(),countryCode:vl(t.dial_code).code}}const Er=e=>b.jsx(v2,{...e}),h9={"":"NYI","footer.branding":"Top-tier security by SlashID","initial.title":"Welcome to SlashID","initial.subtitle":"Sign in to your account","initial.oidc":"Sign in with","initial.sso":"Sign in with","initial.authenticationMethod":"Authentication method","initial.handle.email":"Email","initial.handle.phone":"Phone","initial.handle.username":"Username","initial.handle.email.placeholder":"Type your email","initial.handle.phone.placeholder":"Type your phone number","initial.handle.username.placeholder":"Type your username","initial.submit":"Continue","initial.divider":"or","resolving_factors.title":"Loading configuration...","resolving_factors.subtitle":"We're fetching authentication methods for your account, it may take a while","resolved_factors.title":"Sign in","resolved_factors.subtitle":"Choose one of the authentication methods below","authenticating.subtitle":"","authenticating.password.label":"Password","authenticating.password.placeholder":"Type your password","authenticating.passwordConfirm.label":"Confirm password","authenticating.retryPrompt":"Didn’t receive the message?","authenticating.retry":"Resend","authenticating.back":"Back","authenticating.initial.password.title":"Log in with a password.","authenticating.initial.password.message.email":"If you are using a password for the first time, you will receive an email to verify your email address.","authenticating.initial.password.message.phone":"If you are using a password for the first time, you will receive a message to verify your phone number.","authenticating.setPassword.title":"Create your password","authenticating.setPassword.message":"Define a secure password to sign up.","authenticating.setPassword.validation.required":"Password is required","authenticating.setPassword.validation.mismatch":"Passwords should match","authenticating.setPassword.validation.incorrect":"Incorrect handle or password","authenticating.setPassword.validation.length":"8-256 characters required","authenticating.setPassword.validation.password_variants":"Contains word 'password'","authenticating.setPassword.validation.admin_variants":"Contains word 'admin'","authenticating.setPassword.validation.user_variants":"Contains word 'user'","authenticating.setPassword.validation.alphanumeric_sequences_1":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","authenticating.setPassword.validation.alphanumeric_sequences_2":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","authenticating.setPassword.validation.numeric_sequences_ascending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","authenticating.setPassword.validation.numeric_subsequences_ascending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","authenticating.setPassword.validation.numeric_sequences_descending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","authenticating.setPassword.validation.numeric_subsequences_descending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","authenticating.setPassword.validation.common_password_xkcd":"Common password","authenticating.verifyPassword.title":"Enter your password","authenticating.verifyPassword.message":"Type your password to sign in.","authenticating.verifyPassword.recover.prompt":"Forgot password?","authenticating.verifyPassword.recover.cta":"Reset","authenticating.recoverPassword.title.email":"Check your email","authenticating.recoverPassword.message.email":"We have sent an email to {{EMAIL_ADDRESS}} with instructions for resetting your password. This email can take a few minutes to arrive, make sure to check your spam.","authenticating.recoverPassword.title.phone":"Check your phone","authenticating.recoverPassword.message.phone":"We have sent a message to {{PHONE_NUMBER}} with instructions for resetting your password. This message can take a few minutes to arrive, make sure to check your spam.","authenticating.password.submit":"Continue","authenticating.submitting.password.title":"Logging you in...","authenticating.submitting.password.message":"This may take some time.","authenticating.initial.totp.title":"Log in with TOTP","authenticating.initial.totp.message":"If this is your first time logging with TOTP, we will generate a secret for your Authenticator app.","authenticating.registerAuthenticator.totp.title":"Set up One Time Password","authenticating.registerAuthenticator.totp.message":"Scan the QR code with an authenticator app to set up your One Time Password.","authenticating.registerAuthenticator.totp.prompt":"Can't scan?","authenticating.registerAuthenticator.totp.cta":"Set up with a code","authenticating.input.totp.cta":"Use recovery code","authenticating.input.totp.title":"Enter authentication code","authenticating.input.totp.message":"Enter the 6-digit code displayed in your authenticator app.","authenticating.saveRecoveryCodes.totp.title":"Save your recovery codes","authenticating.saveRecoveryCodes.totp.message":"Use these codes to authenticate if you lose access to your device. Store them somewhere safe.","authenticating.continue":"Continue","authenticating.confirm":"Confirm","authenticating.downloadCodes":"Download codes","authenticating.message.webauthn":"If you are registering for the first time, you will receive an email at {{EMAIL_ADDRESS}} to verify your email address.","authenticating.title.webauthn":"You'll be prompted to validate your login via your device","authenticating.message.emailLink":"We have sent you a link via email to {{EMAIL_ADDRESS}}. Follow the link provided to complete your authentication.","authenticating.title.emailLink":"Check your email","authenticating.message.smsLink":"We have sent you a link via text to {{PHONE_NUMBER}}. Follow the link provided to complete your authentication.","authenticating.title.smsLink":"Check your phone","authenticating.message.emailOtp":"We have sent you a code via email to {{EMAIL_ADDRESS}}. Please insert it here.","authenticating.title.emailOtp":"Check your email","authenticating.submitting.message.emailOtp":"We are verifying the code.","authenticating.submitting.title.emailOtp":"Please wait","authenticating.retry.message.emailOtp":"We are resending the OTP code to {{EMAIL_ADDRESS}}...","authenticating.retry.title.emailOtp":"Please wait","authenticating.message.smsOtp":"We have sent you a code via text to {{PHONE_NUMBER}}. Please insert it here.","authenticating.title.smsOtp":"Check your phone","authenticating.submitting.message.smsOtp":"We are verifying the code.","authenticating.submitting.title.smsOtp":"Please wait","authenticating.retry.message.smsOtp":"We are resending the OTP code to {{PHONE_NUMBER}}...","authenticating.retry.title.smsOtp":"Please wait","authenticating.message.oidc":"Please follow the instructions in the login screen from your SSO provider.","authenticating.title.oidc":"Sign in with ","authenticating.otpInput":"OTP","authenticating.otpInput.submit":"Submit","authenticating.otpInput.submit.error":"Please enter a valid code","success.title":"You are now authenticated!","success.subtitle":"You can now close this page.","error.title":"Something went wrong...","error.subtitle":"There has been an error while submitting your form. Please try again.","error.title.rateLimit":"Too many attempts...","error.subtitle.rateLimit":"Your request has been rate limited. Please try again later.","error.title.recoverNonReachableHandleType":"Cannot reset password","error.subtitle.recoverNonReachableHandleType":"Please use an email address or a phone number to reset your password.","error.title.noPasswordSet":"No password set","error.subtitle.noPasswordSet":"Contact support to set a password or log in with your email or phone number.","error.title.authenticationExpired":"Log in expired","error.title.selfRegistrationNotAllowed":"Cannot register","error.title.signUpAwaitingApproval":"Awaiting approval","error.title.signInAwaitingApproval":"Awaiting approval","error.subtitle.selfRegistrationNotAllowed":"Self-registration is disabled for this organization. Please reach out to the organization admin in order to create your account.","error.subtitle.signUpAwaitingApproval":"Your account has been created. The organization administrator needs to approve your registration before you can sign in.","error.subtitle.signInAwaitingApproval":"The organization administrator needs to approve your registration before you can sign in.","error.subtitle.authenticationExpired":"Your attempt to login took too long, try again to continue.","error.title.invalidEmailAddressFormat":"Invalid email format","error.subtitle.invalidEmailAddressFormat":"{{EMAIL_ADDRESS}} is not a valid email address. Please go back to login and check the address for errors.","error.retry.invalidEmailAddressFormat":"Go back to login","error.title.invalidPhoneNumberFormat":"Invalid phone number format","error.subtitle.invalidPhoneNumberFormat":"{{PHONE_NUMBER}} is not a valid phone number. Please go back to login and check the number for errors.","error.retry.invalidPhoneNumberFormat":"Go back to login","error.retry":"Try again","error.retry.rateLimit":"Try again","error.retry.noPasswordSet":"Go back to login","error.retry.recoverNonReachableHandleType":"Go back to login","error.retry.authenticationExpired":"Try again","error.retry.selfRegistrationNotAllowed":"Go back to login","error.retry.signUpAwaitingApproval":"Go back to login","error.retry.signInAwaitingApproval":"Go back to login","error.contactSupport.prompt":"Need help?","error.contactSupport.cta":"Contact support","error.divider":"or","factor.webauthn":"Passkeys","factor.otpViaSms":"OTP via SMS","factor.otpViaEmail":"OTP via email","factor.emailLink":"Email link","factor.smsLink":"SMS link","factor.password":"Password","validationError.otp":"Please enter the OTP code.","validationError.email":"Please enter your email address.","validationError.phoneNumber":"Please enter your phone number.","validationError.username":"Please enter a valid username.","kyc.mobile.end.title":"Upload was successful.","kyc.mobile.end.description":"Please return to desktop.","kyc.mobile.failure.generic.title":"Something went wrong","kyc.mobile.failure.generic.description":"Please try again","kyc.mobile.failure.upload_not_supported.title":"Upload not supported","kyc.mobile.failure.upload_not_supported.description":"Please try with a different browser or device","kyc.mobile.failure.invalid_state.title":"Invalid State","kyc.mobile.failure.invalid_state.description":"Cannot render anything due to inconsistent state","kyc.upload.mobile.empty.id_card.front":"Upload the front side of your ID card","kyc.upload.mobile.empty.id_card.back":"Upload the back side of your ID card","kyc.upload.mobile.empty.driver_license.front":"Upload the front side of your driver license","kyc.upload.mobile.empty.driver_license.back":"Upload the back side of your driver license","kyc.upload.mobile.empty.passport.front":"Upload the front side of your passport","kyc.upload.mobile.empty.passport.back":"Upload the back side of your passport","kyc.upload.mobile.empty.cta":"Upload","kyc.upload.mobile.loading.message":"Checking image quality","kyc.upload.mobile.failure.generic.title":"Cannot load image","kyc.upload.mobile.failure.generic.description":"Please try with a different image","kyc.upload.mobile.failure.quality.title":"Invalid Image","kyc.upload.mobile.failure.quality.description":"Please try with a different image","kyc.upload.mobile.failure.quality.detect_blur.title":"Image is too blurry","kyc.upload.mobile.failure.quality.detect_blur.description":"Please try with a different image","kyc.upload.mobile.failure.quality.detect_cutoff.title":"Document is not entirely visible","kyc.upload.mobile.failure.quality.detect_cutoff.description":"Please try with a different image","kyc.upload.mobile.failure.quality.document_detection.title":"Document not found","kyc.upload.mobile.failure.quality.document_detection.description":"Please try with a different image","kyc.upload.mobile.success.title":"Image looks good","kyc.upload.mobile.upload.cta.continue":"Continue","kyc.upload.mobile.upload.cta.again":"Upload again","kyc.upload.mobile.title":"Your document","kyc.upload.mobile.subtitle":"Upload the required images of your documents","kyc.livephoto.mobile.upload.cta.continue":"Continue","kyc.livephoto.mobile.upload.cta.again":"Upload again","kyc.livephoto.mobile.empty":"Upload a selfie picture.","kyc.livephoto.mobile.empty.cta":"Upload","kyc.livephoto.mobile.loading.message":"Validating picture","kyc.livephoto.mobile.failure.generic.title":"Cannot load image","kyc.livephoto.mobile.failure.generic.description":"Please try with a different image","kyc.livephoto.mobile.failure.validation.title":"An error occurred","kyc.livephoto.mobile.failure.validation.description":"Please try with a different image","kyc.livephoto.mobile.failure.validation.face_detection.title":"Face not detected","kyc.livephoto.mobile.failure.validation.face_detection.description":"Please try with a different image","kyc.livephoto.mobile.success.title":"Image looks good","kyc.livephoto.mobile.title":"Selfie Check","kyc.livephoto.mobile.subtitle":"Upload a selfie picture to confirm your identity.","org.switcher.label":"Organization","gdpr.dialog.title":"We value your privacy","gdpr.dialog.subtitle":"We use cookies to improve your experience. Learn more in our Cookie policy.","gdpr.consent.necessary.title":"Necessary cookies","gdpr.consent.necessary.description":"Cookies that are essential to provide the service you have requested or which are required to comply with legal requirements, like data protection laws.","gdpr.consent.analytics.title":"Analytics","gdpr.consent.analytics.description":"Cookies that are used for analytics or performance measurement purposes, like counting the number of unique visitors to our site, how long you stay on the site, and what parts of our site you visit.","gdpr.consent.marketing.title":"Marketing","gdpr.consent.marketing.description":"Cookies that are used to display advertising personalised to you (whether on or off our site) based on your browsing and profile.","gdpr.consent.retargeting.title":"Retargeting","gdpr.consent.retargeting.description":"Cookies that are used to display advertising personalised to you (whether on or off our site) based on your browsing and profile.","gdpr.consent.tracking.title":"Tracking","gdpr.consent.tracking.description":"Cookies that track your online behaviour, such as clicks, preferences, device specifications, location, and search history. This data helps in targeted advertising and gathering website analytics.","gdpr.dialog.error.title":"Oops!","gdpr.dialog.error.subtitle":"Looks like something went wrong...","initial.handle.phone.email":""},Hi=/([0-9]+)px$/,ji=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,eo=/(?:['"]?([\\\w\d\- ]+)['"]?(?:,\s*)?)/g,_d=new Set(["Open Sans","Inter"]),yd=["sans-serif",..._d],xd=(e,t)=>{const n=e.toString().match(t);if(!n)return null;const[r]=n;return t.test(r)?r:null},ir=e=>Array.isArray(e)?null:xd(e,Hi),Sn=e=>Array.isArray(e)?null:xd(e,ji),Cd=e=>e.map(t=>t.replaceAll(",","").trim()).filter(t=>{for(const n of yd)if(t===n||t===`'${n}'`||t===`"${n}"`)return!0;return!1}),p9=e=>{const t=e.toString().match(eo);if(!t)return null;const n=Cd(t);return n.length?n.join(", "):null},Gi=(e,t)=>{const n=e.toString().match(t);if(!n)return!1;const[r]=n;return!!t.test(r)},m9=e=>Gi(e,Hi),g9=e=>Gi(e,ji),b9=e=>t=>!(Array.isArray(t)||!e.some(n=>n===t)),w9=e=>{const t=e.toString().match(eo);return!(!t||Cd(t).length!==t.length)},v9=e=>{try{return new URL(e),!0}catch{return!1}},_9=Object.freeze(Object.defineProperty({__proto__:null,exactValidator:b9,fontFamilyRegExp:eo,fontFamilyValidator:w9,hexValidator:g9,hexValueRegExp:ji,pixelValueRegExp:Hi,pxValidator:m9,supportedFonts:yd,urlValidator:v9,validate:Gi},Symbol.toStringTag,{value:"Module"})),y9={text:h9,factors:[{method:"webauthn"},{method:"email_link"}],logo:b.jsx(wl,{}),storeLastHandle:!1,storeLastFactor:!1,showBanner:!0,defaultCountryCode:"US",supportURL:void 0},kd=d.createContext(y9);kd.displayName="SlashIDConfigurationContext";function Fe(){return V.useContext(kd)}const to=()=>d.useContext(eb),x9=new RegExp("(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[-\b\v\f-!#-[]-]|\\[- \v\f-])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[-\b\v\f-!-ZS-]|\\[- \v\f-])+)\\])"),C9=e=>!(typeof e!="string"||e===""),k9=e=>typeof e!="string"||e===""?!1:x9.test(e),S9=e=>typeof e!="string"||e===""?!1:e.length<=128;var E9="_1xl24760";const $9=({name:e})=>{const{errors:t}=to(),n=t[e];return n?b.jsx("span",{"data-testid":"sid-form-error-message",className:E9,children:n.message}):null},I9=V.createContext({flowState:null,lastHandle:void 0,lastFactor:void 0,submitPayloadRef:{current:{}},handleSubmit:()=>null,selectedFactor:void 0,setSelectedFactor:()=>null}),vn=()=>V.useContext(I9);var R9="_4i40i60",q9="_4i40i61";function D9(e){var t,n;if(((t=e.context.config.handle)==null?void 0:t.type)==="email_address")return{EMAIL_ADDRESS:e.context.config.handle.value};if(((n=e.context.config.handle)==null?void 0:n.type)==="phone_number")return{PHONE_NUMBER:e.context.config.handle.value}}const A9=({variant:e="red"})=>b.jsx(i2,{variant:e,shouldAnimate:!1,className:"sid-form-error-icon",children:b.jsx($b,{})}),T9=["selfRegistrationNotAllowed","signUpAwaitingApproval","signInAwaitingApproval"];async function z9(e){return Ve.isTimeoutError(e)?"timeout":Ve.isInvalidEmailAddressFormatError(e)?"invalidEmailAddressFormat":Ve.isInvalidPhoneNumberFormatError(e)?"invalidPhoneNumberFormat":Ve.isAPIResponseError(e)?"response":Ve.isRateLimitError(e)?"rateLimit":Ve.isNonReachableHandleTypeError(e)?"recoverNonReachableHandleType":Ve.isNoPasswordSetError(e)?"noPasswordSet":Ve.isSelfRegistrationNotAllowedError(e)?"selfRegistrationNotAllowed":Ve.isSignUpAwaitingApprovalError(e)?"signUpAwaitingApproval":Ve.isSignInAwaitingApprovalError(e)?"signInAwaitingApproval":"unknown"}function L9(e){switch(e){case"timeout":return{title:"error.title.authenticationExpired",description:"error.subtitle.authenticationExpired",retry:"error.retry.authenticationExpired"};case"rateLimit":return{title:"error.title.rateLimit",description:"error.subtitle.rateLimit",retry:"error.retry.rateLimit"};case"recoverNonReachableHandleType":return{title:"error.title.recoverNonReachableHandleType",description:"error.subtitle.recoverNonReachableHandleType",retry:"error.retry.recoverNonReachableHandleType"};case"noPasswordSet":return{title:"error.title.noPasswordSet",description:"error.subtitle.noPasswordSet",retry:"error.retry.noPasswordSet"};case"selfRegistrationNotAllowed":return{title:"error.title.selfRegistrationNotAllowed",description:"error.subtitle.selfRegistrationNotAllowed",retry:"error.retry.selfRegistrationNotAllowed"};case"signUpAwaitingApproval":return{title:"error.title.signUpAwaitingApproval",description:"error.subtitle.signUpAwaitingApproval",retry:"error.retry.signUpAwaitingApproval"};case"signInAwaitingApproval":return{title:"error.title.signInAwaitingApproval",description:"error.subtitle.signInAwaitingApproval",retry:"error.retry.signInAwaitingApproval"};case"invalidEmailAddressFormat":return{title:"error.title.invalidEmailAddressFormat",description:"error.subtitle.invalidEmailAddressFormat",retry:"error.retry.invalidEmailAddressFormat"};case"invalidPhoneNumberFormat":return{title:"error.title.invalidPhoneNumberFormat",description:"error.subtitle.invalidPhoneNumberFormat",retry:"error.retry.invalidPhoneNumberFormat"};default:return{title:"error.title",description:"error.subtitle",retry:"error.retry"}}}function P9(e){switch(e){case"recoverNonReachableHandleType":case"noPasswordSet":case"selfRegistrationNotAllowed":case"signUpAwaitingApproval":case"signInAwaitingApproval":case"invalidEmailAddressFormat":case"invalidPhoneNumberFormat":return"reset";case"timeout":case"rateLimit":default:return"retry"}}function O9(){const{text:e,supportURL:t}=Fe();return t?b.jsxs(b.Fragment,{children:[b.jsx(yl,{children:e["error.divider"]}),b.jsx("div",{className:te("sid-form-error-contact-support",R9),"data-testid":"sid-form-error-support-prompt",children:b.jsx("a",{className:q9,target:"_blank",href:t,rel:"noreferrer",children:b.jsx(Bt,{variant:"secondary",children:e["error.contactSupport.cta"]})})})]}):null}const M9=({children:e})=>{const{flowState:t}=vn();return t?.status!=="error"?null:typeof e=="function"?b.jsx("div",{"data-testid":"sid-form-error-function",children:e({context:t.context,retry:t.retry,cancel:t.cancel})}):d.Children.count(e)>0?b.jsx("div",{"data-testid":"sid-form-error-children",children:e}):b.jsx(N9,{flowState:t})};M9.displayName="Form.Error";const N9=({flowState:e})=>{const{text:t}=Fe(),[n,r]=d.useState(null);if(d.useEffect(()=>{r(null),(async()=>{const l=await z9(e.context.error);r(l)})()},[e.context.error]),!n)return b.jsx(b.Fragment,{});const{title:o,description:i,retry:a}=L9(n),s=P9(n),c=T9.includes(n);return b.jsxs("article",{"data-testid":"sid-form-error-state",children:[b.jsx(lb,{className:ut({marginBottom:"4"}),testId:"sid-form-authenticating-cancel-button",variant:"back",onClick:()=>e.cancel(),children:t["authenticating.back"]}),b.jsx(Er,{as:"h1",t:o,variant:{size:"2xl-title",weight:"bold"}}),b.jsx(Er,{as:"h2",t:i,tokens:D9(e),variant:{color:"contrast",weight:"semibold"}}),b.jsx(A9,{variant:c?"grey":"red"}),b.jsx(Bt,{type:"submit",variant:"primary",testId:"sid-form-error-retry-button",onClick:()=>e.retry(s),children:t[a]}),b.jsx(O9,{})]})};var U9="_1xoz4760",F9="_1xoz4761",V9="_1xoz4762",Ro="_1xoz4763",B9="_1xoz4764",H9="_1xoz4765",$s="_1xoz4766";const j9=({logo:e})=>{if(typeof e=="string"&&e)return b.jsx("div",{className:te("sid-logo","sid-logo--image",Ro),children:b.jsx("div",{children:b.jsx("img",{className:Ro,src:e,alt:"Company logo"})})});const t=e||b.jsx(wl,{});return e||console.info("SlashID: No logo provided. Using default logo."),b.jsx("div",{className:te("sid-logo","sid-logo--component",Ro),children:t})},Wi=({children:e})=>{const{logo:t}=Fe();return typeof e!="function"?b.jsx(j9,{logo:t}):b.jsx(b.Fragment,{children:e({logo:t})})};Wi.displayName="Logo";const G9={email_link:"factor.emailLink",otp_via_sms:"factor.otpViaSms",otp_via_email:"factor.otpViaEmail",sms_link:"factor.smsLink",webauthn:"factor.webauthn",password:"factor.password",oidc:"",saml:"",totp:""},on={email:"email",phone:"phone",username:"username"},W9={phone_number:on.phone,email_address:on.email,username:on.username},Fn=({children:e})=>{const{factors:t,text:n}=Fe(),{handleSubmit:r,submitPayloadRef:o,selectedFactor:i}=vn(),{registerSubmit:a}=to(),s=d.useMemo(()=>t.filter(u=>Bi(u)),[t]),c=d.useMemo(()=>Vi(t),[t]);if(s.length===0)return null;const l=u=>{if(u.preventDefault(),!o.current.handleType||!o.current.handleValue||!i)return;const{handleType:m,handleValue:h,flag:p}=o.current;m==="phone_number"&&!p||r(i,{type:m,value:m==="phone_number"?`${p.dial_code}${h}`:h})};return typeof e=="function"?b.jsx("div",{"data-testid":"sid-form-initial-function",children:e({handleSubmit:r,factors:s,handleTypes:c,text:n})}):d.Children.count(e)>0?b.jsx("form",{"data-testid":"sid-form-initial-children",onSubmit:a(l),noValidate:!0,children:e}):b.jsxs("form",{"data-testid":"sid-form-initial-default",onSubmit:a(l),noValidate:!0,children:[b.jsx(Ki,{}),b.jsx(Zi,{})]})},Ki=({children:e})=>{const{lastHandle:t}=vn(),{factors:n,text:r}=Fe(),o=d.useMemo(()=>n.filter(a=>Bi(a)),[n]),i=d.useMemo(()=>Vi(n),[n]);return typeof e=="function"?b.jsx(b.Fragment,{children:e({factors:o,handleTypes:i})}):d.Children.count(e)>0?b.jsx(b.Fragment,{children:e}):i.length===1?b.jsx(b.Fragment,{children:b.jsx(ar,{factors:o,handleType:i[0],defaultValue:or(t,i[0])})}):b.jsx(Y_,{testId:"sid-handle-type-tabs",className:ut({marginY:"6"}),defaultValue:W9[t?.type??"email_address"],tabs:[...i.includes("email_address")?[{id:on.email,title:r["initial.handle.email"],content:b.jsx(ar,{factors:o,handleType:"email_address",defaultValue:or(t,"email_address")})}]:[],...i.includes("phone_number")?[{id:on.phone,title:r["initial.handle.phone"],content:b.jsx(ar,{factors:o,handleType:"phone_number",defaultValue:or(t,"phone_number")})}]:[],...i.includes("username")?[{id:on.username,title:r["initial.handle.username"],content:b.jsx(ar,{factors:o,handleType:"username",defaultValue:or(t,"username")})}]:[]]})};Ki.displayName="Input";const Zi=({children:e})=>{const{text:t}=Fe(),{status:n}=to();return typeof e=="function"?b.jsx(b.Fragment,{children:e({text:t,status:n})}):d.Children.count(e)>0?b.jsx(b.Fragment,{children:e}):b.jsx(Bt,{className:ut({marginTop:"6"}),type:"submit",variant:"primary",testId:"sid-form-initial-submit-button",disabled:n==="invalid",children:t["initial.submit"]})};Zi.displayName="Submit";const ar=({handleType:e,factors:t,defaultValue:n})=>{const{setSelectedFactor:r,submitPayloadRef:o,lastFactor:i}=vn(),a=d.useMemo(()=>d9(t,e).filter(v=>!vd(v)),[t,e]),{text:s,defaultCountryCode:c}=Fe(),{registerField:l,values:u,resetForm:m}=to(),h=a.length>1,p=f9(n??""),[g,f]=d.useState(qi(p?.countryCode??c)),w=d.useMemo(()=>i&&Bi(i)&&a.find(({method:v})=>i.method===v)?i:a[0],[a,i]);d.useEffect(()=>{r(w)},[w,r]),d.useEffect(()=>m,[m]),d.useEffect(()=>{o.current.flag=g},[g,o]),d.useEffect(()=>{const v=u[e];o.current={...o.current,handleType:e,handleValue:v}},[e,o,u]);const y=d.useMemo(()=>e==="phone_number"?b.jsx(Pb,{className:ut({marginTop:"4"}),id:`sid-input-${e}`,name:e,type:"tel",label:s["initial.handle.phone"],placeholder:s["initial.handle.phone.placeholder"],value:u[e]??"",flag:g,onChange:l(e,{defaultValue:p?.number,validator:v=>{if(!C9(v))return{message:s["validationError.phoneNumber"]}}}),onFlagChange:f}):e==="username"?b.jsx(Xa,{className:ut({marginTop:"4"}),id:`sid-input-${e}`,name:e,type:"text",label:s["initial.handle.username"],placeholder:s["initial.handle.username.placeholder"],value:u[e]??"",onChange:l(e,{defaultValue:n,validator:v=>{if(!S9(v))return{message:s["validationError.username"]}}})}):b.jsx(Xa,{className:ut({marginTop:"4"}),id:`sid-input-${e}`,name:e,type:"email",label:s["initial.handle.email"],placeholder:s["initial.handle.phone.email"]||s["initial.handle.email.placeholder"],value:u[e]??"",onChange:l(e,{defaultValue:n,validator:v=>{if(!k9(v))return{message:s["validationError.email"]}}})}),[g,e,s,l,u,n,p]);return b.jsxs(b.Fragment,{children:[h&&b.jsx(v_,{defaultValue:w.method,className:ut({marginBottom:"3",marginTop:"6"}),label:s["initial.authenticationMethod"],items:a.map(v=>({label:s[G9[v.method]],value:v.method})),onChange:v=>{const _=a.find(C=>C.method===v);r(_)},contentProps:{className:H9,position:"popper"}}),y,b.jsx($9,{name:e})]})};Fn.displayName="Controls";Fn.Input=Ki;Fn.Submit=Zi;const Yi=({children:e})=>{const{text:t}=Fe(),n=V.useMemo(()=>b.jsxs("div",{className:B9,children:[b.jsx(Er,{as:"h1",variant:{size:"2xl-title",weight:"bold"},t:"initial.title"}),b.jsx(Er,{variant:{color:"contrast",weight:"semibold"},as:"h2",t:"initial.subtitle"})]}),[]);return typeof e=="function"?b.jsx(b.Fragment,{children:e({text:t})}):V.Children.count(e)>0?b.jsx(b.Fragment,{children:e}):n};Yi.displayName="Header";const K9={google:b.jsx(Cb,{}),facebook:b.jsx(_b,{}),github:b.jsx(yb,{}),gitlab:b.jsx(xb,{}),line:b.jsx(kb,{}),bitbucket:b.jsx(vb,{}),azuread:b.jsx(wb,{}),okta:b.jsx(Sb,{}),apple:b.jsx(bb,{})},Z9={google:"Google",facebook:"Facebook",github:"GitHub",gitlab:"GitLab",line:"LINE",bitbucket:"Bitbucket",azuread:"Azure AD",okta:"Okta",apple:"Apple"};function Y9({provider:e,handleClick:t}){var n;const{text:r}=Fe();return(n=e.options)!=null&&n.provider_credentials_id?b.jsxs(Bt,{onClick:()=>t({method:"saml",options:e.options}),variant:"secondary",icon:b.jsx(J9,{logo:e.logo,id:e.options.provider_credentials_id}),className:te("sid-saml--button"),children:[r["initial.sso"],b.jsx("span",{className:F9,children:e.label||"SAML"})]}):null}function J9({logo:e,id:t}){return e?typeof e=="string"?b.jsx("img",{className:te("sid-sso-logo",`sid-sso-logo--${t}`,$s),src:e,alt:"SSO provider logo"}):b.jsx("div",{className:te("sid-sso-logo",`sid-sso-logo--${t}`,$s),children:e}):null}function X9({provider:e,handleClick:t}){var n,r,o;const{text:i}=Fe();return(n=e.options)!=null&&n.provider?b.jsxs(Bt,{onClick:()=>t({method:"oidc",options:e.options}),variant:"secondary",icon:K9[(r=e.options)==null?void 0:r.provider],className:te("sid-oidc--button"),children:[i["initial.oidc"],b.jsx("span",{className:U9,children:e.label||Z9[(o=e.options)==null?void 0:o.provider]})]}):null}function Sd({providers:e,handleClick:t}){return e.length?b.jsx("div",{className:te("sid-form-sso",ut({marginTop:"4"}),V9),children:e.map(n=>{var r,o;switch(n.method){case"oidc":return b.jsx(X9,{provider:n,handleClick:t},(r=n.options)==null?void 0:r.client_id);case"saml":return b.jsx(Y9,{provider:n,handleClick:t},(o=n.options)==null?void 0:o.provider_credentials_id);default:throw new Error("unsupported SSO method")}})}):null}const Ed=()=>{const{factors:e,text:t}=Fe(),n=d.useMemo(()=>u9(e),[e]);return b.jsx(b.Fragment,{children:n&&b.jsx(yl,{children:t["initial.divider"]})})},$d=({children:e})=>{const{factors:t}=Fe(),{handleSubmit:n}=vn(),r=t.filter(vd),o=V.useMemo(()=>b.jsx(Sd,{providers:r,handleClick:n}),[n,r]);return typeof e=="function"?b.jsx(b.Fragment,{children:e({factors:r,handleClick:n})}):V.Children.count(e)>0?b.jsx(b.Fragment,{children:e}):o};$d.displayName="OIDC";const Ji=({children:e})=>{const{factors:t}=Fe(),{handleSubmit:n}=vn(),r=t.filter(ni),o=V.useMemo(()=>b.jsx(Sd,{providers:r,handleClick:n}),[n,r]);return typeof e=="function"?b.jsx(b.Fragment,{children:e({factors:r,handleClick:n})}):V.Children.count(e)>0?b.jsx(b.Fragment,{children:e}):o};Ji.displayName="SSO";const _n=()=>b.jsxs("article",{"data-testid":"sid-form-initial-state",children:[b.jsx(Wi,{}),b.jsx(Yi,{}),b.jsx(Fn,{}),b.jsx(Ed,{}),b.jsx(Ji,{})]});_n.Logo=Wi;_n.Header=Yi;_n.Controls=Fn;_n.Divider=Ed;_n.OIDC=$d;_n.SSO=Ji;var Q9="sluhu72";const e6=d.forwardRef(({buttonClassName:e,...t},n)=>b.jsx(X_,{to:"sid-cookie-button",children:b.jsx(Bt,{...t,ref:n,testId:"sid-gdpr-consent-dialog-trigger",variant:"neutralMd",className:te("sid-gdpr-consent-dialog-trigger",Q9,e),children:b.jsx(Ib,{})})}));e6.displayName="TriggerButton";ut({marginBottom:"3",marginTop:"5"});const t6=e=>Object.entries(e),n6=new Set(Q_),r6={"--sid-color-primary":Sn,"--sid-color-primary-hover":Sn,"--sid-font-family":p9,"--sid-form-logo-width":ir,"--sid-form-border-radius":ir,"--sid-button-border-radius":ir,"--sid-color-foreground":Sn,"--sid-input-border-radius":ir,"--sid-input-border-color":Sn,"--sid-input-label-color":Sn},o6=e=>t6(e).filter(t=>n6.has(t[0])).reduce((t,[n,r])=>{if(r===void 0)return t;const o=r6[n](r);return o===null||(t[n]=o),t},{}),i6=e=>{const t=e.toString().match(eo);if(!t)return[];const n=t.map(r=>r.replaceAll(",","").replaceAll("'","").replaceAll('"',"").trim()).filter(r=>_d.has(r)).map(r=>`<link href="https://fonts.googleapis.com/css2?family=${r.replace(" ","+")}:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">`);return n.length?['<link rel="preconnect" href="https://fonts.googleapis.com">','<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>',...n.join(`
|
|
96
|
-
`)]:[]},
|
|
95
|
+
`)},Uw=0,Wt=[];function Fw(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Uw++)[0],i=d.useState(function(){return Tl()})[0],a=d.useRef(e);d.useEffect(function(){a.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=lw([e.lockRef.current],(e.shards||[]).map(os),!0).filter(Boolean);return f.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback(function(f,w){if("touches"in f&&f.touches.length===2)return!a.current.allowPinchZoom;var y=Qn(f),v=n.current,_="deltaX"in f?f.deltaX:v[0]-y[0],x="deltaY"in f?f.deltaY:v[1]-y[1],S,I=f.target,R=Math.abs(_)>Math.abs(x)?"h":"v";if("touches"in f&&R==="h"&&I.type==="range")return!1;var D=ns(R,I);if(!D)return!0;if(D?S=R:(S=R==="v"?"h":"v",D=ns(R,I)),!D)return!1;if(!r.current&&"changedTouches"in f&&(_||x)&&(r.current=S),!S)return!0;var P=r.current||S;return Ow(P,w,f,P==="h"?_:x,!0)},[]),c=d.useCallback(function(f){var w=f;if(!(!Wt.length||Wt[Wt.length-1]!==i)){var y="deltaY"in w?rs(w):Qn(w),v=t.current.filter(function(S){return S.name===w.type&&S.target===w.target&&Mw(S.delta,y)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}if(!v){var _=(a.current.shards||[]).map(os).filter(Boolean).filter(function(S){return S.contains(w.target)}),x=_.length>0?s(w,_[0]):!a.current.noIsolation;x&&w.cancelable&&w.preventDefault()}}},[]),l=d.useCallback(function(f,w,y,v){var _={name:f,delta:w,target:y,should:v};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(x){return x!==_})},1)},[]),u=d.useCallback(function(f){n.current=Qn(f),r.current=void 0},[]),m=d.useCallback(function(f){l(f.type,rs(f),f.target,s(f,e.lockRef.current))},[]),h=d.useCallback(function(f){l(f.type,Qn(f),f.target,s(f,e.lockRef.current))},[]);d.useEffect(function(){return Wt.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Gt),document.addEventListener("touchmove",c,Gt),document.addEventListener("touchstart",u,Gt),function(){Wt=Wt.filter(function(f){return f!==i}),document.removeEventListener("wheel",c,Gt),document.removeEventListener("touchmove",c,Gt),document.removeEventListener("touchstart",u,Gt)}},[]);var p=e.removeScrollBar,g=e.inert;return d.createElement(d.Fragment,null,g?d.createElement(i,{styles:Nw(o)}):null,p?d.createElement(qw,{gapMode:"margin"}):null)}const Vw=ww(Al,Fw);var Ol=d.forwardRef(function(e,t){return d.createElement(Kr,tt({},e,{ref:t,sideCar:Vw}))});Ol.classNames=Kr.classNames;var Bw=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Kt=new WeakMap,er=new WeakMap,tr={},xo=0,Ml=function(e){return e&&(e.host||Ml(e.parentNode))},Hw=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ml(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},jw=function(e,t,n,r){var o=Hw(t,Array.isArray(e)?e:[e]);tr[n]||(tr[n]=new WeakMap);var i=tr[n],a=[],s=new Set,c=new Set(o),l=function(m){!m||s.has(m)||(s.add(m),l(m.parentNode))};o.forEach(l);var u=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(h){if(s.has(h))u(h);else{var p=h.getAttribute(r),g=p!==null&&p!=="false",f=(Kt.get(h)||0)+1,w=(i.get(h)||0)+1;Kt.set(h,f),i.set(h,w),a.push(h),f===1&&g&&er.set(h,!0),w===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}})};return u(t),s.clear(),xo++,function(){a.forEach(function(m){var h=Kt.get(m)-1,p=i.get(m)-1;Kt.set(m,h),i.set(m,p),h||(er.has(m)||m.removeAttribute(r),er.delete(m)),p||m.removeAttribute(n)}),xo--,xo||(Kt=new WeakMap,Kt=new WeakMap,er=new WeakMap,tr={})}},Gw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Bw(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),jw(r,o,n,"aria-hidden")):function(){return null}};const Nl="Dialog",[Ul,By]=wt(Nl);Ul(Nl);const Ww="DialogPortal";Ul(Ww,{forceMount:void 0});function Kw(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Zw(e){const[t,n]=d.useState(void 0);return Pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Fl="Switch",[Yw,Hy]=wt(Fl);Yw(Fl);var Jw="q9c0is3",Xw="q9c0is5",Qw={blue:"q9c0is6 q9c0is4",red:"q9c0is7 q9c0is4",primary:"q9c0is8 q9c0is4",grey:"q9c0is9 q9c0is4"},e2="q9c0isb",t2={blue:"q9c0isc q9c0isa",red:"q9c0isd q9c0isa",primary:"q9c0ise q9c0isa",grey:"q9c0isf q9c0isa"},n2="q9c0ish",r2={blue:"q9c0isi q9c0isg",red:"q9c0isj q9c0isg",primary:"q9c0isk q9c0isg",grey:"q9c0isl q9c0isg"},o2="q9c0ism";const i2=({children:e,className:t,variant:n="blue",shouldAnimate:r=!0,testId:o})=>b.jsxs("div",{className:te(Jw,t),"data-testid":o,children:[b.jsx("div",{className:te(Qw[n],{[Xw]:r})}),b.jsx("div",{className:te(t2[n],{[e2]:r})}),b.jsx("div",{className:te(r2[n],{[n2]:r})}),b.jsx("div",{className:o2,children:e})]});function a2(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function is(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function as(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?is(Object(n),!0).forEach(function(r){a2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):is(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var s2=(e,t,n)=>{for(var r of Object.keys(e)){var o;if(e[r]!==((o=t[r])!==null&&o!==void 0?o:n[r]))return!1}return!0},c2=e=>t=>{var n=e.defaultClassName,r=as(as({},e.defaultVariants),t);for(var o in r){var i,a=(i=r[o])!==null&&i!==void 0?i:e.defaultVariants[o];if(a!=null){var s=a;typeof s=="boolean"&&(s=s===!0?"true":"false");var c=e.variantClassNames[o][s];c&&(n+=" "+c)}}for(var[l,u]of e.compoundVariants)s2(l,r,e.defaultVariants)&&(n+=" "+u);return n};function l2(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function d2(e){var t=l2(e,"string");return typeof t=="symbol"?t:String(t)}function u2(e,t,n){return t=d2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ss(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Co(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ss(Object(n),!0).forEach(function(r){u2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ss(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var f2=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Object.assign({},...n.map(c=>c.styles)),i=Object.keys(o),a=i.filter(c=>"mappings"in o[c]),s=c=>{var l=[],u={},m=Co({},c),h=!1;for(var p of a){var g=c[p];if(g!=null){var f=o[p];h=!0;for(var w of f.mappings)u[w]=g,m[w]==null&&delete m[w]}}var y=h?Co(Co({},u),m):c,v=function(){var S=y[_],I=o[_];try{if(I.mappings)return"continue";if(typeof S=="string"||typeof S=="number")l.push(I.values[S].defaultClass);else if(Array.isArray(S))for(var R=0;R<S.length;R++){var D=S[R];if(D!=null){var P=I.responsiveArray[R];l.push(I.values[D].conditions[P])}}else for(var G in S){var H=S[G];H!=null&&l.push(I.values[H].conditions[G])}}catch(j){throw j}};for(var _ in y)var x=v();return e(l.join(" "))};return Object.assign(s,{properties:new Set(i)})},h2=e=>e,p2=function(){return f2(h2)(...arguments)},ut=p2({conditions:{defaultCondition:"lightMode",conditionNames:["lightMode","darkMode"],responsiveArray:void 0},styles:{color:{values:{background:{conditions:{lightMode:"kqvzqt0",darkMode:"kqvzqt1"},defaultClass:"kqvzqt0"},mute:{conditions:{lightMode:"kqvzqt2",darkMode:"kqvzqt3"},defaultClass:"kqvzqt2"},panel:{conditions:{lightMode:"kqvzqt4",darkMode:"kqvzqt5"},defaultClass:"kqvzqt4"},foreground:{conditions:{lightMode:"kqvzqt6",darkMode:"kqvzqt7"},defaultClass:"kqvzqt6"},contrast:{conditions:{lightMode:"kqvzqt8",darkMode:"kqvzqt9"},defaultClass:"kqvzqt8"},secondary:{conditions:{lightMode:"kqvzqta",darkMode:"kqvzqtb"},defaultClass:"kqvzqta"},tertiary:{conditions:{lightMode:"kqvzqtc",darkMode:"kqvzqtd"},defaultClass:"kqvzqtc"},placeholder:{conditions:{lightMode:"kqvzqte",darkMode:"kqvzqtf"},defaultClass:"kqvzqte"},smooth:{conditions:{lightMode:"kqvzqtg",darkMode:"kqvzqth"},defaultClass:"kqvzqtg"},subtle:{conditions:{lightMode:"kqvzqti",darkMode:"kqvzqtj"},defaultClass:"kqvzqti"},soft:{conditions:{lightMode:"kqvzqtk",darkMode:"kqvzqtl"},defaultClass:"kqvzqtk"},offset:{conditions:{lightMode:"kqvzqtm",darkMode:"kqvzqtn"},defaultClass:"kqvzqtm"},primary:{conditions:{lightMode:"kqvzqto",darkMode:"kqvzqtp"},defaultClass:"kqvzqto"},primaryHover:{conditions:{lightMode:"kqvzqtq",darkMode:"kqvzqtr"},defaultClass:"kqvzqtq"},transparent:{conditions:{lightMode:"kqvzqts",darkMode:"kqvzqtt"},defaultClass:"kqvzqts"},error:{conditions:{lightMode:"kqvzqtu",darkMode:"kqvzqtv"},defaultClass:"kqvzqtu"},auxiliary:{conditions:{lightMode:"kqvzqtw",darkMode:"kqvzqtx"},defaultClass:"kqvzqtw"},success:{conditions:{lightMode:"kqvzqty",darkMode:"kqvzqtz"},defaultClass:"kqvzqty"},foregroundSuccess:{conditions:{lightMode:"kqvzqt10",darkMode:"kqvzqt11"},defaultClass:"kqvzqt10"},backgroundSuccess:{conditions:{lightMode:"kqvzqt12",darkMode:"kqvzqt13"},defaultClass:"kqvzqt12"},failure:{conditions:{lightMode:"kqvzqt14",darkMode:"kqvzqt15"},defaultClass:"kqvzqt14"},foregroundFailure:{conditions:{lightMode:"kqvzqt16",darkMode:"kqvzqt17"},defaultClass:"kqvzqt16"},backgroundFailure:{conditions:{lightMode:"kqvzqt18",darkMode:"kqvzqt19"},defaultClass:"kqvzqt18"}}},backgroundColor:{values:{background:{conditions:{lightMode:"kqvzqt1a",darkMode:"kqvzqt1b"},defaultClass:"kqvzqt1a"},mute:{conditions:{lightMode:"kqvzqt1c",darkMode:"kqvzqt1d"},defaultClass:"kqvzqt1c"},panel:{conditions:{lightMode:"kqvzqt1e",darkMode:"kqvzqt1f"},defaultClass:"kqvzqt1e"},foreground:{conditions:{lightMode:"kqvzqt1g",darkMode:"kqvzqt1h"},defaultClass:"kqvzqt1g"},contrast:{conditions:{lightMode:"kqvzqt1i",darkMode:"kqvzqt1j"},defaultClass:"kqvzqt1i"},secondary:{conditions:{lightMode:"kqvzqt1k",darkMode:"kqvzqt1l"},defaultClass:"kqvzqt1k"},tertiary:{conditions:{lightMode:"kqvzqt1m",darkMode:"kqvzqt1n"},defaultClass:"kqvzqt1m"},placeholder:{conditions:{lightMode:"kqvzqt1o",darkMode:"kqvzqt1p"},defaultClass:"kqvzqt1o"},smooth:{conditions:{lightMode:"kqvzqt1q",darkMode:"kqvzqt1r"},defaultClass:"kqvzqt1q"},subtle:{conditions:{lightMode:"kqvzqt1s",darkMode:"kqvzqt1t"},defaultClass:"kqvzqt1s"},soft:{conditions:{lightMode:"kqvzqt1u",darkMode:"kqvzqt1v"},defaultClass:"kqvzqt1u"},offset:{conditions:{lightMode:"kqvzqt1w",darkMode:"kqvzqt1x"},defaultClass:"kqvzqt1w"},primary:{conditions:{lightMode:"kqvzqt1y",darkMode:"kqvzqt1z"},defaultClass:"kqvzqt1y"},primaryHover:{conditions:{lightMode:"kqvzqt20",darkMode:"kqvzqt21"},defaultClass:"kqvzqt20"},transparent:{conditions:{lightMode:"kqvzqt22",darkMode:"kqvzqt23"},defaultClass:"kqvzqt22"},error:{conditions:{lightMode:"kqvzqt24",darkMode:"kqvzqt25"},defaultClass:"kqvzqt24"},auxiliary:{conditions:{lightMode:"kqvzqt26",darkMode:"kqvzqt27"},defaultClass:"kqvzqt26"},success:{conditions:{lightMode:"kqvzqt28",darkMode:"kqvzqt29"},defaultClass:"kqvzqt28"},foregroundSuccess:{conditions:{lightMode:"kqvzqt2a",darkMode:"kqvzqt2b"},defaultClass:"kqvzqt2a"},backgroundSuccess:{conditions:{lightMode:"kqvzqt2c",darkMode:"kqvzqt2d"},defaultClass:"kqvzqt2c"},failure:{conditions:{lightMode:"kqvzqt2e",darkMode:"kqvzqt2f"},defaultClass:"kqvzqt2e"},foregroundFailure:{conditions:{lightMode:"kqvzqt2g",darkMode:"kqvzqt2h"},defaultClass:"kqvzqt2g"},backgroundFailure:{conditions:{lightMode:"kqvzqt2i",darkMode:"kqvzqt2j"},defaultClass:"kqvzqt2i"}}}}},{conditions:void 0,styles:{marginY:{mappings:["marginTop","marginBottom"]},marginX:{mappings:["marginLeft","marginRight"]},gap:{values:{0:{defaultClass:"kqvzqt2k"},1:{defaultClass:"kqvzqt2l"},2:{defaultClass:"kqvzqt2m"},3:{defaultClass:"kqvzqt2n"},4:{defaultClass:"kqvzqt2o"},5:{defaultClass:"kqvzqt2p"},6:{defaultClass:"kqvzqt2q"},7:{defaultClass:"kqvzqt2r"},8:{defaultClass:"kqvzqt2s"},9:{defaultClass:"kqvzqt2t"},10:{defaultClass:"kqvzqt2u"},11:{defaultClass:"kqvzqt2v"},12:{defaultClass:"kqvzqt2w"},13:{defaultClass:"kqvzqt2x"},14:{defaultClass:"kqvzqt2y"},15:{defaultClass:"kqvzqt2z"},16:{defaultClass:"kqvzqt30"},20:{defaultClass:"kqvzqt31"},24:{defaultClass:"kqvzqt32"},28:{defaultClass:"kqvzqt33"},32:{defaultClass:"kqvzqt34"},36:{defaultClass:"kqvzqt35"},40:{defaultClass:"kqvzqt36"},44:{defaultClass:"kqvzqt37"},48:{defaultClass:"kqvzqt38"},52:{defaultClass:"kqvzqt39"},56:{defaultClass:"kqvzqt3a"},60:{defaultClass:"kqvzqt3b"},64:{defaultClass:"kqvzqt3c"},68:{defaultClass:"kqvzqt3d"},72:{defaultClass:"kqvzqt3e"},76:{defaultClass:"kqvzqt3f"},80:{defaultClass:"kqvzqt3g"},96:{defaultClass:"kqvzqt3h"},px:{defaultClass:"kqvzqt3i"},"0.25":{defaultClass:"kqvzqt3j"},"0.5":{defaultClass:"kqvzqt3k"},"0.75":{defaultClass:"kqvzqt3l"},"1.5":{defaultClass:"kqvzqt3m"},"2.5":{defaultClass:"kqvzqt3n"},"3.5":{defaultClass:"kqvzqt3o"}}},marginTop:{values:{0:{defaultClass:"kqvzqt3p"},1:{defaultClass:"kqvzqt3q"},2:{defaultClass:"kqvzqt3r"},3:{defaultClass:"kqvzqt3s"},4:{defaultClass:"kqvzqt3t"},5:{defaultClass:"kqvzqt3u"},6:{defaultClass:"kqvzqt3v"},7:{defaultClass:"kqvzqt3w"},8:{defaultClass:"kqvzqt3x"},9:{defaultClass:"kqvzqt3y"},10:{defaultClass:"kqvzqt3z"},11:{defaultClass:"kqvzqt40"},12:{defaultClass:"kqvzqt41"},13:{defaultClass:"kqvzqt42"},14:{defaultClass:"kqvzqt43"},15:{defaultClass:"kqvzqt44"},16:{defaultClass:"kqvzqt45"},20:{defaultClass:"kqvzqt46"},24:{defaultClass:"kqvzqt47"},28:{defaultClass:"kqvzqt48"},32:{defaultClass:"kqvzqt49"},36:{defaultClass:"kqvzqt4a"},40:{defaultClass:"kqvzqt4b"},44:{defaultClass:"kqvzqt4c"},48:{defaultClass:"kqvzqt4d"},52:{defaultClass:"kqvzqt4e"},56:{defaultClass:"kqvzqt4f"},60:{defaultClass:"kqvzqt4g"},64:{defaultClass:"kqvzqt4h"},68:{defaultClass:"kqvzqt4i"},72:{defaultClass:"kqvzqt4j"},76:{defaultClass:"kqvzqt4k"},80:{defaultClass:"kqvzqt4l"},96:{defaultClass:"kqvzqt4m"},px:{defaultClass:"kqvzqt4n"},"0.25":{defaultClass:"kqvzqt4o"},"0.5":{defaultClass:"kqvzqt4p"},"0.75":{defaultClass:"kqvzqt4q"},"1.5":{defaultClass:"kqvzqt4r"},"2.5":{defaultClass:"kqvzqt4s"},"3.5":{defaultClass:"kqvzqt4t"}}},marginBottom:{values:{0:{defaultClass:"kqvzqt4u"},1:{defaultClass:"kqvzqt4v"},2:{defaultClass:"kqvzqt4w"},3:{defaultClass:"kqvzqt4x"},4:{defaultClass:"kqvzqt4y"},5:{defaultClass:"kqvzqt4z"},6:{defaultClass:"kqvzqt50"},7:{defaultClass:"kqvzqt51"},8:{defaultClass:"kqvzqt52"},9:{defaultClass:"kqvzqt53"},10:{defaultClass:"kqvzqt54"},11:{defaultClass:"kqvzqt55"},12:{defaultClass:"kqvzqt56"},13:{defaultClass:"kqvzqt57"},14:{defaultClass:"kqvzqt58"},15:{defaultClass:"kqvzqt59"},16:{defaultClass:"kqvzqt5a"},20:{defaultClass:"kqvzqt5b"},24:{defaultClass:"kqvzqt5c"},28:{defaultClass:"kqvzqt5d"},32:{defaultClass:"kqvzqt5e"},36:{defaultClass:"kqvzqt5f"},40:{defaultClass:"kqvzqt5g"},44:{defaultClass:"kqvzqt5h"},48:{defaultClass:"kqvzqt5i"},52:{defaultClass:"kqvzqt5j"},56:{defaultClass:"kqvzqt5k"},60:{defaultClass:"kqvzqt5l"},64:{defaultClass:"kqvzqt5m"},68:{defaultClass:"kqvzqt5n"},72:{defaultClass:"kqvzqt5o"},76:{defaultClass:"kqvzqt5p"},80:{defaultClass:"kqvzqt5q"},96:{defaultClass:"kqvzqt5r"},px:{defaultClass:"kqvzqt5s"},"0.25":{defaultClass:"kqvzqt5t"},"0.5":{defaultClass:"kqvzqt5u"},"0.75":{defaultClass:"kqvzqt5v"},"1.5":{defaultClass:"kqvzqt5w"},"2.5":{defaultClass:"kqvzqt5x"},"3.5":{defaultClass:"kqvzqt5y"}}},marginLeft:{values:{0:{defaultClass:"kqvzqt5z"},1:{defaultClass:"kqvzqt60"},2:{defaultClass:"kqvzqt61"},3:{defaultClass:"kqvzqt62"},4:{defaultClass:"kqvzqt63"},5:{defaultClass:"kqvzqt64"},6:{defaultClass:"kqvzqt65"},7:{defaultClass:"kqvzqt66"},8:{defaultClass:"kqvzqt67"},9:{defaultClass:"kqvzqt68"},10:{defaultClass:"kqvzqt69"},11:{defaultClass:"kqvzqt6a"},12:{defaultClass:"kqvzqt6b"},13:{defaultClass:"kqvzqt6c"},14:{defaultClass:"kqvzqt6d"},15:{defaultClass:"kqvzqt6e"},16:{defaultClass:"kqvzqt6f"},20:{defaultClass:"kqvzqt6g"},24:{defaultClass:"kqvzqt6h"},28:{defaultClass:"kqvzqt6i"},32:{defaultClass:"kqvzqt6j"},36:{defaultClass:"kqvzqt6k"},40:{defaultClass:"kqvzqt6l"},44:{defaultClass:"kqvzqt6m"},48:{defaultClass:"kqvzqt6n"},52:{defaultClass:"kqvzqt6o"},56:{defaultClass:"kqvzqt6p"},60:{defaultClass:"kqvzqt6q"},64:{defaultClass:"kqvzqt6r"},68:{defaultClass:"kqvzqt6s"},72:{defaultClass:"kqvzqt6t"},76:{defaultClass:"kqvzqt6u"},80:{defaultClass:"kqvzqt6v"},96:{defaultClass:"kqvzqt6w"},px:{defaultClass:"kqvzqt6x"},"0.25":{defaultClass:"kqvzqt6y"},"0.5":{defaultClass:"kqvzqt6z"},"0.75":{defaultClass:"kqvzqt70"},"1.5":{defaultClass:"kqvzqt71"},"2.5":{defaultClass:"kqvzqt72"},"3.5":{defaultClass:"kqvzqt73"}}},marginRight:{values:{0:{defaultClass:"kqvzqt74"},1:{defaultClass:"kqvzqt75"},2:{defaultClass:"kqvzqt76"},3:{defaultClass:"kqvzqt77"},4:{defaultClass:"kqvzqt78"},5:{defaultClass:"kqvzqt79"},6:{defaultClass:"kqvzqt7a"},7:{defaultClass:"kqvzqt7b"},8:{defaultClass:"kqvzqt7c"},9:{defaultClass:"kqvzqt7d"},10:{defaultClass:"kqvzqt7e"},11:{defaultClass:"kqvzqt7f"},12:{defaultClass:"kqvzqt7g"},13:{defaultClass:"kqvzqt7h"},14:{defaultClass:"kqvzqt7i"},15:{defaultClass:"kqvzqt7j"},16:{defaultClass:"kqvzqt7k"},20:{defaultClass:"kqvzqt7l"},24:{defaultClass:"kqvzqt7m"},28:{defaultClass:"kqvzqt7n"},32:{defaultClass:"kqvzqt7o"},36:{defaultClass:"kqvzqt7p"},40:{defaultClass:"kqvzqt7q"},44:{defaultClass:"kqvzqt7r"},48:{defaultClass:"kqvzqt7s"},52:{defaultClass:"kqvzqt7t"},56:{defaultClass:"kqvzqt7u"},60:{defaultClass:"kqvzqt7v"},64:{defaultClass:"kqvzqt7w"},68:{defaultClass:"kqvzqt7x"},72:{defaultClass:"kqvzqt7y"},76:{defaultClass:"kqvzqt7z"},80:{defaultClass:"kqvzqt80"},96:{defaultClass:"kqvzqt81"},px:{defaultClass:"kqvzqt82"},"0.25":{defaultClass:"kqvzqt83"},"0.5":{defaultClass:"kqvzqt84"},"0.75":{defaultClass:"kqvzqt85"},"1.5":{defaultClass:"kqvzqt86"},"2.5":{defaultClass:"kqvzqt87"},"3.5":{defaultClass:"kqvzqt88"}}}}}),m2=c2({defaultClassName:"_1qam6z30",variantClassNames:{size:{xs:"_1qam6z31",sm:"_1qam6z32",base:"_1qam6z33",xl:"_1qam6z34","2xl-title":"_1qam6z35"},weight:{medium:"_1qam6z36",semibold:"_1qam6z37",bold:"_1qam6z38"},color:{contrast:"_1qam6z39",tertiary:"_1qam6z3a",placeholder:"_1qam6z3b",white:"_1qam6z3c",success:"_1qam6z3d",failure:"_1qam6z3e"}},defaultVariants:{size:"base",weight:"medium"},compoundVariants:[]});const g2={text:{}},Vl=d.createContext(g2);Vl.displayName="SlashIDTextContext";function b2(){const{text:e}=V.useContext(Vl);return e}const ko={opening:"{{",closing:"}}"};function w2(e,t){return e.includes(ko.opening)?Object.keys(t).reduce((n,r)=>n.replace(`${ko.opening}${r}${ko.closing}`,t[r]),e):e}const v2=({as:e,t,tokens:n,variant:r,className:o,children:i})=>{const a=b2(),s=e||"p";return b.jsxs(s,{className:te("sid-text",`sid-text--${s}`,m2(r),o),children:[n?w2(a[t],n):a[t],i||null]})};function cs(e,[t,n]){return Math.min(n,Math.max(t,e))}const Jo="dismissableLayer.update",_2="dismissableLayer.pointerDownOutside",y2="dismissableLayer.focusOutside";let ls;const x2=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),C2=d.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...l}=e,u=d.useContext(x2),[m,h]=d.useState(null),p=(n=m?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,g]=d.useState({}),f=Ce(t,D=>h(D)),w=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=w.indexOf(y),_=m?w.indexOf(m):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=_>=v,I=k2(D=>{const P=D.target,G=[...u.branches].some(H=>H.contains(P));!S||G||(i?.(D),s?.(D),D.defaultPrevented||c==null||c())},p),R=S2(D=>{const P=D.target;[...u.branches].some(G=>G.contains(P))||(a?.(D),s?.(D),D.defaultPrevented||c==null||c())},p);return sw(D=>{_===u.layers.size-1&&(o?.(D),!D.defaultPrevented&&c&&(D.preventDefault(),c()))},p),d.useEffect(()=>{if(m)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ls=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),ds(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ls)}},[m,p,r,u]),d.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),ds())},[m,u]),d.useEffect(()=>{const D=()=>g({});return document.addEventListener(Jo,D),()=>document.removeEventListener(Jo,D)},[]),d.createElement(_e.div,Z({},l,{ref:f,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:de(e.onFocusCapture,R.onFocusCapture),onBlurCapture:de(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:de(e.onPointerDownCapture,I.onPointerDownCapture)}))});function k2(e,t=globalThis?.document){const n=ot(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){Bl(_2,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function S2(e,t=globalThis?.document){const n=ot(e),r=d.useRef(!1);return d.useEffect(()=>{const o=i=>{i.target&&!r.current&&Bl(y2,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ds(){const e=new CustomEvent(Jo);document.dispatchEvent(e)}function Bl(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Gb(o,i):o.dispatchEvent(i)}const So="focusScope.autoFocusOnMount",Eo="focusScope.autoFocusOnUnmount",us={bubbles:!1,cancelable:!0},E2=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=d.useState(null),l=ot(o),u=ot(i),m=d.useRef(null),h=Ce(t,f=>c(f)),p=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let f=function(_){if(p.paused||!s)return;const x=_.target;s.contains(x)?m.current=x:yt(m.current,{select:!0})},w=function(_){if(p.paused||!s)return;const x=_.relatedTarget;x!==null&&(s.contains(x)||yt(m.current,{select:!0}))},y=function(_){const x=document.activeElement;for(const S of _)S.removedNodes.length>0&&(s!=null&&s.contains(x)||yt(s))};document.addEventListener("focusin",f),document.addEventListener("focusout",w);const v=new MutationObserver(y);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",w),v.disconnect()}}},[r,s,p.paused]),d.useEffect(()=>{if(s){hs.add(p);const f=document.activeElement;if(!s.contains(f)){const w=new CustomEvent(So,us);s.addEventListener(So,l),s.dispatchEvent(w),w.defaultPrevented||($2(A2(Hl(s)),{select:!0}),document.activeElement===f&&yt(s))}return()=>{s.removeEventListener(So,l),setTimeout(()=>{const w=new CustomEvent(Eo,us);s.addEventListener(Eo,u),s.dispatchEvent(w),w.defaultPrevented||yt(f??document.body,{select:!0}),s.removeEventListener(Eo,u),hs.remove(p)},0)}}},[s,l,u,p]);const g=d.useCallback(f=>{if(!n&&!r||p.paused)return;const w=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,y=document.activeElement;if(w&&y){const v=f.currentTarget,[_,x]=I2(v);_&&x?!f.shiftKey&&y===x?(f.preventDefault(),n&&yt(_,{select:!0})):f.shiftKey&&y===_&&(f.preventDefault(),n&&yt(x,{select:!0})):y===v&&f.preventDefault()}},[n,r,p.paused]);return d.createElement(_e.div,Z({tabIndex:-1},a,{ref:h,onKeyDown:g}))});function $2(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(yt(r,{select:t}),document.activeElement!==n)return}function I2(e){const t=Hl(e),n=fs(t,e),r=fs(t.reverse(),e);return[n,r]}function Hl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fs(e,t){for(const n of e)if(!R2(n,{upTo:t}))return n}function R2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function q2(e){return e instanceof HTMLInputElement&&"select"in e}function yt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&q2(e)&&t&&e.select()}}const hs=D2();function D2(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ps(e,t),e.unshift(t)},remove(t){var n;e=ps(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function ps(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function A2(e){return e.filter(t=>t.tagName!=="A")}const T2=["top","right","bottom","left"],Et=Math.min,ze=Math.max,xr=Math.round,nr=Math.floor,$t=e=>({x:e,y:e}),z2={left:"right",right:"left",bottom:"top",top:"bottom"},L2={start:"end",end:"start"};function Xo(e,t,n){return ze(e,Et(t,n))}function ht(e,t){return typeof e=="function"?e(t):e}function pt(e){return e.split("-")[0]}function mn(e){return e.split("-")[1]}function Ti(e){return e==="x"?"y":"x"}function zi(e){return e==="y"?"height":"width"}function gn(e){return["top","bottom"].includes(pt(e))?"y":"x"}function Li(e){return Ti(gn(e))}function P2(e,t,n){n===void 0&&(n=!1);const r=mn(e),o=Li(e),i=zi(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Cr(a)),[a,Cr(a)]}function O2(e){const t=Cr(e);return[Qo(e),t,Qo(t)]}function Qo(e){return e.replace(/start|end/g,t=>L2[t])}function M2(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function N2(e,t,n,r){const o=mn(e);let i=M2(pt(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Qo)))),i}function Cr(e){return e.replace(/left|right|bottom|top/g,t=>z2[t])}function U2(e){return{top:0,right:0,bottom:0,left:0,...e}}function jl(e){return typeof e!="number"?U2(e):{top:e,right:e,bottom:e,left:e}}function kr(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ms(e,t,n){let{reference:r,floating:o}=e;const i=gn(t),a=Li(t),s=zi(a),c=pt(t),l=i==="y",u=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:m};break;case"left":p={x:r.x-o.width,y:m};break;default:p={x:r.x,y:r.y}}switch(mn(t)){case"start":p[a]-=h*(n&&l?-1:1);break;case"end":p[a]+=h*(n&&l?-1:1);break}return p}const F2=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:m}=ms(l,r,c),h=r,p={},g=0;for(let f=0;f<s.length;f++){const{name:w,fn:y}=s[f],{x:v,y:_,data:x,reset:S}=await y({x:u,y:m,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=v??u,m=_??m,p={...p,[w]:{...p[w],...x}},S&&g<=50){g++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(l=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:m}=ms(l,h,c)),f=-1;continue}}return{x:u,y:m,placement:h,strategy:o,middlewareData:p}};async function An(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:m="floating",altBoundary:h=!1,padding:p=0}=ht(t,e),g=jl(p),f=s[h?m==="floating"?"reference":"floating":m],w=kr(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(f)))==null||n?f:f.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),y=m==="floating"?{...a.floating,x:r,y:o}:a.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),_=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},x=kr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:v,strategy:c}):y);return{top:(w.top-x.top+g.top)/_.y,bottom:(x.bottom-w.bottom+g.bottom)/_.y,left:(w.left-x.left+g.left)/_.x,right:(x.right-w.right+g.right)/_.x}}const gs=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ht(e,t)||{};if(l==null)return{};const m=jl(u),h={x:n,y:r},p=Li(o),g=zi(p),f=await a.getDimensions(l),w=p==="y",y=w?"top":"left",v=w?"bottom":"right",_=w?"clientHeight":"clientWidth",x=i.reference[g]+i.reference[p]-h[p]-i.floating[g],S=h[p]-i.reference[p],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let R=I?I[_]:0;(!R||!await(a.isElement==null?void 0:a.isElement(I)))&&(R=s.floating[_]||i.floating[g]);const D=x/2-S/2,P=R/2-f[g]/2-1,G=Et(m[y],P),H=Et(m[v],P),j=G,J=R-f[g]-H,N=R/2-f[g]/2+D,Y=Xo(j,N,J),M=!c.arrow&&mn(o)!=null&&N!=Y&&i.reference[g]/2-(N<j?G:H)-f[g]/2<0,X=M?N<j?N-j:N-J:0;return{[p]:h[p]+X,data:{[p]:Y,centerOffset:N-Y-X,...M&&{alignmentOffset:X}},reset:M}}}),V2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:f=!0,...w}=ht(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=pt(o),v=pt(s)===s,_=await(c.isRTL==null?void 0:c.isRTL(l.floating)),x=h||(v||!f?[Cr(s)]:O2(s));!h&&g!=="none"&&x.push(...N2(s,f,g,_));const S=[s,...x],I=await An(t,w),R=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&R.push(I[y]),m){const j=P2(o,a,_);R.push(I[j[0]],I[j[1]])}if(D=[...D,{placement:o,overflows:R}],!R.every(j=>j<=0)){var P,G;const j=(((P=i.flip)==null?void 0:P.index)||0)+1,J=S[j];if(J)return{data:{index:j,overflows:D},reset:{placement:J}};let N=(G=D.filter(Y=>Y.overflows[0]<=0).sort((Y,M)=>Y.overflows[1]-M.overflows[1])[0])==null?void 0:G.placement;if(!N)switch(p){case"bestFit":{var H;const Y=(H=D.map(M=>[M.placement,M.overflows.filter(X=>X>0).reduce((X,ge)=>X+ge,0)]).sort((M,X)=>M[1]-X[1])[0])==null?void 0:H[0];Y&&(N=Y);break}case"initialPlacement":N=s;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function bs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ws(e){return T2.some(t=>e[t]>=0)}const B2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ht(e,t);switch(r){case"referenceHidden":{const i=await An(t,{...o,elementContext:"reference"}),a=bs(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ws(a)}}}case"escaped":{const i=await An(t,{...o,altBoundary:!0}),a=bs(i,n.floating);return{data:{escapedOffsets:a,escaped:ws(a)}}}default:return{}}}}};async function H2(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=pt(n),s=mn(n),c=gn(n)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,m=ht(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),c?{x:p*u,y:h*l}:{x:h*l,y:p*u}}const j2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await H2(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},G2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:w=>{let{x:y,y:v}=w;return{x:y,y:v}}},...c}=ht(e,t),l={x:n,y:r},u=await An(t,c),m=gn(pt(o)),h=Ti(m);let p=l[h],g=l[m];if(i){const w=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=p+u[w],_=p-u[y];p=Xo(v,p,_)}if(a){const w=m==="y"?"top":"left",y=m==="y"?"bottom":"right",v=g+u[w],_=g-u[y];g=Xo(v,g,_)}const f=s.fn({...t,[h]:p,[m]:g});return{...f,data:{x:f.x-n,y:f.y-r}}}}},W2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ht(e,t),u={x:n,y:r},m=gn(o),h=Ti(m);let p=u[h],g=u[m];const f=ht(s,t),w=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const _=h==="y"?"height":"width",x=i.reference[h]-i.floating[_]+w.mainAxis,S=i.reference[h]+i.reference[_]-w.mainAxis;p<x?p=x:p>S&&(p=S)}if(l){var y,v;const _=h==="y"?"width":"height",x=["top","left"].includes(pt(o)),S=i.reference[m]-i.floating[_]+(x&&((y=a.offset)==null?void 0:y[m])||0)+(x?0:w.crossAxis),I=i.reference[m]+i.reference[_]+(x?0:((v=a.offset)==null?void 0:v[m])||0)-(x?w.crossAxis:0);g<S?g=S:g>I&&(g=I)}return{[h]:p,[m]:g}}}},K2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=ht(e,t),c=await An(t,s),l=pt(n),u=mn(n),m=gn(n)==="y",{width:h,height:p}=r.floating;let g,f;l==="top"||l==="bottom"?(g=l,f=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(f=l,g=u==="end"?"top":"bottom");const w=p-c[g],y=h-c[f],v=!t.middlewareData.shift;let _=w,x=y;if(m){const I=h-c.left-c.right;x=u||v?Et(y,I):I}else{const I=p-c.top-c.bottom;_=u||v?Et(w,I):I}if(v&&!u){const I=ze(c.left,0),R=ze(c.right,0),D=ze(c.top,0),P=ze(c.bottom,0);m?x=h-2*(I!==0||R!==0?I+R:ze(c.left,c.right)):_=p-2*(D!==0||P!==0?D+P:ze(c.top,c.bottom))}await a({...t,availableWidth:x,availableHeight:_});const S=await o.getDimensions(i.floating);return h!==S.width||p!==S.height?{reset:{rects:!0}}:{}}}};function It(e){return Gl(e)?(e.nodeName||"").toLowerCase():"#document"}function Le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vt(e){var t;return(t=(Gl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Gl(e){return e instanceof Node||e instanceof Le(e).Node}function mt(e){return e instanceof Element||e instanceof Le(e).Element}function it(e){return e instanceof HTMLElement||e instanceof Le(e).HTMLElement}function vs(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Le(e).ShadowRoot}function Un(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Be(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Z2(e){return["table","td","th"].includes(It(e))}function Pi(e){const t=Oi(),n=Be(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Y2(e){let t=ln(e);for(;it(t)&&!Zr(t);){if(Pi(t))return t;t=ln(t)}return null}function Oi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Zr(e){return["html","body","#document"].includes(It(e))}function Be(e){return Le(e).getComputedStyle(e)}function Yr(e){return mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ln(e){if(It(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vs(e)&&e.host||vt(e);return vs(t)?t.host:t}function Wl(e){const t=ln(e);return Zr(t)?e.ownerDocument?e.ownerDocument.body:e.body:it(t)&&Un(t)?t:Wl(t)}function Tn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wl(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Le(o);return i?t.concat(a,a.visualViewport||[],Un(o)?o:[],a.frameElement&&n?Tn(a.frameElement):[]):t.concat(o,Tn(o,[],n))}function Kl(e){const t=Be(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=it(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=xr(n)!==i||xr(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Mi(e){return mt(e)?e:e.contextElement}function rn(e){const t=Mi(e);if(!it(t))return $t(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Kl(t);let a=(i?xr(n.width):n.width)/r,s=(i?xr(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const J2=$t(0);function Zl(e){const t=Le(e);return!Oi()||!t.visualViewport?J2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function X2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Le(e)?!1:t}function Mt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Mi(e);let a=$t(1);t&&(r?mt(r)&&(a=rn(r)):a=rn(e));const s=X2(i,n,r)?Zl(i):$t(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,m=o.height/a.y;if(i){const h=Le(i),p=r&&mt(r)?Le(r):r;let g=h.frameElement;for(;g&&r&&p!==h;){const f=rn(g),w=g.getBoundingClientRect(),y=Be(g),v=w.left+(g.clientLeft+parseFloat(y.paddingLeft))*f.x,_=w.top+(g.clientTop+parseFloat(y.paddingTop))*f.y;c*=f.x,l*=f.y,u*=f.x,m*=f.y,c+=v,l+=_,g=Le(g).frameElement}}return kr({width:u,height:m,x:c,y:l})}function Q2(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=it(n),i=vt(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=$t(1);const c=$t(0);if((o||!o&&r!=="fixed")&&((It(n)!=="body"||Un(i))&&(a=Yr(n)),it(n))){const l=Mt(n);s=rn(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function ev(e){return Array.from(e.getClientRects())}function Yl(e){return Mt(vt(e)).left+Yr(e).scrollLeft}function tv(e){const t=vt(e),n=Yr(e),r=e.ownerDocument.body,o=ze(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ze(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Yl(e);const s=-n.scrollTop;return Be(r).direction==="rtl"&&(a+=ze(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function nv(e,t){const n=Le(e),r=vt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const l=Oi();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function rv(e,t){const n=Mt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=it(e)?rn(e):$t(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:a,height:s,x:c,y:l}}function _s(e,t,n){let r;if(t==="viewport")r=nv(e,n);else if(t==="document")r=tv(vt(e));else if(mt(t))r=rv(t,n);else{const o=Zl(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return kr(r)}function Jl(e,t){const n=ln(e);return n===t||!mt(n)||Zr(n)?!1:Be(n).position==="fixed"||Jl(n,t)}function ov(e,t){const n=t.get(e);if(n)return n;let r=Tn(e,[],!1).filter(s=>mt(s)&&It(s)!=="body"),o=null;const i=Be(e).position==="fixed";let a=i?ln(e):e;for(;mt(a)&&!Zr(a);){const s=Be(a),c=Pi(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&o&&["absolute","fixed"].includes(o.position)||Un(a)&&!c&&Jl(e,a))?r=r.filter(l=>l!==a):o=s,a=ln(a)}return t.set(e,r),r}function iv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?ov(t,this._c):[].concat(n),r],a=i[0],s=i.reduce((c,l)=>{const u=_s(t,l,o);return c.top=ze(u.top,c.top),c.right=Et(u.right,c.right),c.bottom=Et(u.bottom,c.bottom),c.left=ze(u.left,c.left),c},_s(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function av(e){return Kl(e)}function sv(e,t,n){const r=it(t),o=vt(t),i=n==="fixed",a=Mt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=$t(0);if(r||!r&&!i)if((It(t)!=="body"||Un(o))&&(s=Yr(t)),r){const l=Mt(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=Yl(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function ys(e,t){return!it(e)||Be(e).position==="fixed"?null:t?t(e):e.offsetParent}function Xl(e,t){const n=Le(e);if(!it(e))return n;let r=ys(e,t);for(;r&&Z2(r)&&Be(r).position==="static";)r=ys(r,t);return r&&(It(r)==="html"||It(r)==="body"&&Be(r).position==="static"&&!Pi(r))?n:r||Y2(e)||n}const cv=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Xl,i=this.getDimensions;return{reference:sv(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function lv(e){return Be(e).direction==="rtl"}const dv={convertOffsetParentRelativeRectToViewportRelativeRect:Q2,getDocumentElement:vt,getClippingRect:iv,getOffsetParent:Xl,getElementRects:cv,getClientRects:ev,getDimensions:av,getScale:rn,isElement:mt,isRTL:lv};function uv(e,t){let n=null,r;const o=vt(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:m,height:h}=e.getBoundingClientRect();if(s||t(),!m||!h)return;const p=nr(u),g=nr(o.clientWidth-(l+m)),f=nr(o.clientHeight-(u+h)),w=nr(l),y={rootMargin:-p+"px "+-g+"px "+-f+"px "+-w+"px",threshold:ze(0,Et(1,c))||1};let v=!0;function _(x){const S=x[0].intersectionRatio;if(S!==c){if(!v)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(_,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,y)}n.observe(e)}return a(!0),i}function fv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Mi(e),u=o||i?[...l?Tn(l):[],...Tn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const m=l&&s?uv(l,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(y=>{let[v]=y;v&&v.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let g,f=c?Mt(e):null;c&&w();function w(){const y=Mt(e);f&&(y.x!==f.x||y.y!==f.y||y.width!==f.width||y.height!==f.height)&&n(),f=y,g=requestAnimationFrame(w)}return n(),()=>{u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),m&&m(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const hv=(e,t,n)=>{const r=new Map,o={platform:dv,...n},i={...o.platform,_c:r};return F2(e,t,{...o,platform:i})},pv=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?gs({element:r.current,padding:o}).fn(n):{}:r?gs({element:r,padding:o}).fn(n):{}}}};var dr=typeof document<"u"?d.useLayoutEffect:d.useEffect;function Sr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Sr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Sr(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ql(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xs(e,t){const n=Ql(e);return Math.round(t*n)/n}function Cs(e){const t=d.useRef(e);return dr(()=>{t.current=e}),t}function mv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,m]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=d.useState(r);Sr(h,r)||p(r);const[g,f]=d.useState(null),[w,y]=d.useState(null),v=d.useCallback(M=>{M!=I.current&&(I.current=M,f(M))},[f]),_=d.useCallback(M=>{M!==R.current&&(R.current=M,y(M))},[y]),x=i||g,S=a||w,I=d.useRef(null),R=d.useRef(null),D=d.useRef(u),P=Cs(c),G=Cs(o),H=d.useCallback(()=>{if(!I.current||!R.current)return;const M={placement:t,strategy:n,middleware:h};G.current&&(M.platform=G.current),hv(I.current,R.current,M).then(X=>{const ge={...X,isPositioned:!0};j.current&&!Sr(D.current,ge)&&(D.current=ge,un.flushSync(()=>{m(ge)}))})},[h,t,n,G]);dr(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,m(M=>({...M,isPositioned:!1})))},[l]);const j=d.useRef(!1);dr(()=>(j.current=!0,()=>{j.current=!1}),[]),dr(()=>{if(x&&(I.current=x),S&&(R.current=S),x&&S){if(P.current)return P.current(x,S,H);H()}},[x,S,H,P]);const J=d.useMemo(()=>({reference:I,floating:R,setReference:v,setFloating:_}),[v,_]),N=d.useMemo(()=>({reference:x,floating:S}),[x,S]),Y=d.useMemo(()=>{const M={position:n,left:0,top:0};if(!N.floating)return M;const X=xs(N.floating,u.x),ge=xs(N.floating,u.y);return s?{...M,transform:"translate("+X+"px, "+ge+"px)",...Ql(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:ge}},[n,s,N.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:H,refs:J,elements:N,floatingStyles:Y}),[u,H,J,N,Y])}const ed="Popper",[td,nd]=wt(ed),[gv,rd]=td(ed),bv=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return d.createElement(gv,{scope:t,anchor:r,onAnchorChange:o},n)},wv="PopperAnchor",vv=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=rd(wv,n),a=d.useRef(null),s=Ce(t,a);return d.useEffect(()=>{i.onAnchorChange(r?.current||a.current)}),r?null:d.createElement(_e.div,Z({},o,{ref:s}))}),od="PopperContent",[_v,jy]=td(od),yv=d.forwardRef((e,t)=>{var n,r,o,i,a,s,c,l;const{__scopePopper:u,side:m="bottom",sideOffset:h=0,align:p="center",alignOffset:g=0,arrowPadding:f=0,collisionBoundary:w=[],collisionPadding:y=0,sticky:v="partial",hideWhenDetached:_=!1,avoidCollisions:x=!0,onPlaced:S,...I}=e,R=rd(od,u),[D,P]=d.useState(null),G=Ce(t,Se=>P(Se)),[H,j]=d.useState(null),J=Zw(H),N=(n=J?.width)!==null&&n!==void 0?n:0,Y=(r=J?.height)!==null&&r!==void 0?r:0,M=m+(p!=="center"?"-"+p:""),X=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},ge=Array.isArray(w)?w:[w],E=ge.length>0,k={padding:X,boundary:ge.filter(xv),altBoundary:E},{refs:$,floatingStyles:O,placement:z,isPositioned:F,middlewareData:ne}=mv({strategy:"fixed",placement:M,whileElementsMounted:fv,elements:{reference:R.anchor},middleware:[j2({mainAxis:h+Y,alignmentAxis:g}),x&&G2({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?W2():void 0,...k}),x&&V2({...k}),K2({...k,apply:({elements:Se,rects:qt,availableWidth:at,availableHeight:Dt})=>{const{width:yn,height:no}=qt.reference,At=Se.floating.style;At.setProperty("--radix-popper-available-width",`${at}px`),At.setProperty("--radix-popper-available-height",`${Dt}px`),At.setProperty("--radix-popper-anchor-width",`${yn}px`),At.setProperty("--radix-popper-anchor-height",`${no}px`)}}),H&&pv({element:H,padding:f}),Cv({arrowWidth:N,arrowHeight:Y}),_&&B2({strategy:"referenceHidden"})]}),[ce,L]=id(z),K=ot(S);Pe(()=>{F&&K?.()},[F,K]);const le=(o=ne.arrow)===null||o===void 0?void 0:o.x,W=(i=ne.arrow)===null||i===void 0?void 0:i.y,ee=((a=ne.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[fe,Re]=d.useState();return Pe(()=>{D&&Re(window.getComputedStyle(D).zIndex)},[D]),d.createElement("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:F?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(s=ne.transformOrigin)===null||s===void 0?void 0:s.x,(c=ne.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},d.createElement(_v,{scope:u,placedSide:ce,onArrowChange:j,arrowX:le,arrowY:W,shouldHideArrow:ee},d.createElement(_e.div,Z({"data-side":ce,"data-align":L},I,{ref:G,style:{...I.style,animation:F?void 0:"none",opacity:(l=ne.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))});function xv(e){return e!==null}const Cv=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:c,middlewareData:l}=t,u=((n=l.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[p,g]=id(s),f={start:"0%",center:"50%",end:"100%"}[g],w=((r=(o=l.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+m/2,y=((i=(a=l.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let v="",_="";return p==="bottom"?(v=u?f:`${w}px`,_=`${-h}px`):p==="top"?(v=u?f:`${w}px`,_=`${c.floating.height+h}px`):p==="right"?(v=`${-h}px`,_=u?f:`${y}px`):p==="left"&&(v=`${c.floating.width+h}px`,_=u?f:`${y}px`),{data:{x:v,y:_}}}});function id(e){const[t,n="center"]=e.split("-");return[t,n]}const kv=bv,Sv=vv,Ev=yv,$v=d.forwardRef((e,t)=>d.createElement(_e.span,Z({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),Iv=[" ","Enter","ArrowUp","ArrowDown"],Rv=[" ","Enter"],Jr="Select",[Xr,Qr,qv]=Ai(Jr),[bn,Gy]=wt(Jr,[qv,nd]),Ni=nd(),[Dv,Ht]=bn(Jr),[Av,Tv]=bn(Jr),zv=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:m,disabled:h,required:p}=e,g=Ni(t),[f,w]=d.useState(null),[y,v]=d.useState(null),[_,x]=d.useState(!1),S=Gr(l),[I=!1,R]=cn({prop:r,defaultProp:o,onChange:i}),[D,P]=cn({prop:a,defaultProp:s,onChange:c}),G=d.useRef(null),H=f?!!f.closest("form"):!0,[j,J]=d.useState(new Set),N=Array.from(j).map(Y=>Y.props.value).join(";");return d.createElement(kv,g,d.createElement(Dv,{required:p,scope:t,trigger:f,onTriggerChange:w,valueNode:y,onValueNodeChange:v,valueNodeHasChildren:_,onValueNodeHasChildrenChange:x,contentId:Mn(),value:D,onValueChange:P,open:I,onOpenChange:R,dir:S,triggerPointerDownPosRef:G,disabled:h},d.createElement(Xr.Provider,{scope:t},d.createElement(Av,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(Y=>{J(M=>new Set(M).add(Y))},[]),onNativeOptionRemove:d.useCallback(Y=>{J(M=>{const X=new Set(M);return X.delete(Y),X})},[])},n)),H?d.createElement(ld,{key:N,"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:m,value:D,onChange:Y=>P(Y.target.value),disabled:h},D===void 0?d.createElement("option",{value:""}):null,Array.from(j)):null))},Lv="SelectTrigger",Pv=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ni(n),a=Ht(Lv,n),s=a.disabled||r,c=Ce(t,a.onTriggerChange),l=Qr(n),[u,m,h]=dd(g=>{const f=l().filter(v=>!v.disabled),w=f.find(v=>v.value===a.value),y=ud(f,g,w);y!==void 0&&a.onValueChange(y.value)}),p=()=>{s||(a.onOpenChange(!0),h())};return d.createElement(Sv,Z({asChild:!0},i),d.createElement(_e.button,Z({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":a.value===void 0?"":void 0},o,{ref:c,onClick:de(o.onClick,g=>{g.currentTarget.focus()}),onPointerDown:de(o.onPointerDown,g=>{const f=g.target;f.hasPointerCapture(g.pointerId)&&f.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)},g.preventDefault())}),onKeyDown:de(o.onKeyDown,g=>{const f=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&m(g.key),!(f&&g.key===" ")&&Iv.includes(g.key)&&(p(),g.preventDefault())})})))}),Ov="SelectValue",Mv=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Ht(Ov,n),{onValueNodeHasChildrenChange:l}=c,u=i!==void 0,m=Ce(t,c.onValueNodeChange);return Pe(()=>{l(u)},[l,u]),d.createElement(_e.span,Z({},s,{ref:m,style:{pointerEvents:"none"}}),c.value===void 0&&a!==void 0?a:i)}),dn="SelectContent",Nv=d.forwardRef((e,t)=>{const n=Ht(dn,e.__scopeSelect),[r,o]=d.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?un.createPortal(d.createElement(ad,{scope:e.__scopeSelect},d.createElement(Xr.Slot,{scope:e.__scopeSelect},d.createElement("div",null,e.children))),i):null}return d.createElement(Uv,Z({},e,{ref:t}))}),lt=10,[ad,wn]=bn(dn),Uv=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:f,avoidCollisions:w,...y}=e,v=Ht(dn,n),[_,x]=d.useState(null),[S,I]=d.useState(null),R=Ce(t,L=>x(L)),[D,P]=d.useState(null),[G,H]=d.useState(null),j=Qr(n),[J,N]=d.useState(!1),Y=d.useRef(!1);d.useEffect(()=>{if(_)return Gw(_)},[_]),cw();const M=d.useCallback(L=>{const[K,...le]=j().map(fe=>fe.ref.current),[W]=le.slice(-1),ee=document.activeElement;for(const fe of L)if(fe===ee||(fe?.scrollIntoView({block:"nearest"}),fe===K&&S&&(S.scrollTop=0),fe===W&&S&&(S.scrollTop=S.scrollHeight),fe?.focus(),document.activeElement!==ee))return},[j,S]),X=d.useCallback(()=>M([D,_]),[M,D,_]);d.useEffect(()=>{J&&X()},[J,X]);const{onOpenChange:ge,triggerPointerDownPosRef:E}=v;d.useEffect(()=>{if(_){let L={x:0,y:0};const K=W=>{var ee,fe,Re,Se;L={x:Math.abs(Math.round(W.pageX)-((ee=(fe=E.current)===null||fe===void 0?void 0:fe.x)!==null&&ee!==void 0?ee:0)),y:Math.abs(Math.round(W.pageY)-((Re=(Se=E.current)===null||Se===void 0?void 0:Se.y)!==null&&Re!==void 0?Re:0))}},le=W=>{L.x<=10&&L.y<=10?W.preventDefault():_.contains(W.target)||ge(!1),document.removeEventListener("pointermove",K),E.current=null};return E.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",le,{capture:!0})}}},[_,ge,E]),d.useEffect(()=>{const L=()=>ge(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[ge]);const[k,$]=dd(L=>{const K=j().filter(ee=>!ee.disabled),le=K.find(ee=>ee.ref.current===document.activeElement),W=ud(K,L,le);W&&setTimeout(()=>W.ref.current.focus())}),O=d.useCallback((L,K,le)=>{const W=!Y.current&&!le;(v.value!==void 0&&v.value===K||W)&&(P(L),W&&(Y.current=!0))},[v.value]),z=d.useCallback(()=>_?.focus(),[_]),F=d.useCallback((L,K,le)=>{const W=!Y.current&&!le;(v.value!==void 0&&v.value===K||W)&&H(L)},[v.value]),ne=r==="popper"?ks:Fv,ce=ne===ks?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:f,avoidCollisions:w}:{};return d.createElement(ad,{scope:n,content:_,viewport:S,onViewportChange:I,itemRefCallback:O,selectedItem:D,onItemLeave:z,itemTextRefCallback:F,focusSelectedItem:X,selectedItemText:G,position:r,isPositioned:J,searchRef:k},d.createElement(Ol,{as:Dn,allowPinchZoom:!0},d.createElement(E2,{asChild:!0,trapped:v.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:de(o,L=>{var K;(K=v.trigger)===null||K===void 0||K.focus({preventScroll:!0}),L.preventDefault()})},d.createElement(C2,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>v.onOpenChange(!1)},d.createElement(ne,Z({role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:L=>L.preventDefault()},y,ce,{onPlaced:()=>N(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:de(y.onKeyDown,L=>{const K=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!K&&L.key.length===1&&$(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let le=j().filter(W=>!W.disabled).map(W=>W.ref.current);if(["ArrowUp","End"].includes(L.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const W=L.target,ee=le.indexOf(W);le=le.slice(ee+1)}setTimeout(()=>M(le)),L.preventDefault()}})}))))))}),Fv=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Ht(dn,n),a=wn(dn,n),[s,c]=d.useState(null),[l,u]=d.useState(null),m=Ce(t,R=>u(R)),h=Qr(n),p=d.useRef(!1),g=d.useRef(!0),{viewport:f,selectedItem:w,selectedItemText:y,focusSelectedItem:v}=a,_=d.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&l&&f&&w&&y){const R=i.trigger.getBoundingClientRect(),D=l.getBoundingClientRect(),P=i.valueNode.getBoundingClientRect(),G=y.getBoundingClientRect();if(i.dir!=="rtl"){const W=G.left-D.left,ee=P.left-W,fe=R.left-ee,Re=R.width+fe,Se=Math.max(Re,D.width),qt=window.innerWidth-lt,at=cs(ee,[lt,qt-Se]);s.style.minWidth=Re+"px",s.style.left=at+"px"}else{const W=D.right-G.right,ee=window.innerWidth-P.right-W,fe=window.innerWidth-R.right-ee,Re=R.width+fe,Se=Math.max(Re,D.width),qt=window.innerWidth-lt,at=cs(ee,[lt,qt-Se]);s.style.minWidth=Re+"px",s.style.right=at+"px"}const H=h(),j=window.innerHeight-lt*2,J=f.scrollHeight,N=window.getComputedStyle(l),Y=parseInt(N.borderTopWidth,10),M=parseInt(N.paddingTop,10),X=parseInt(N.borderBottomWidth,10),ge=parseInt(N.paddingBottom,10),E=Y+M+J+ge+X,k=Math.min(w.offsetHeight*5,E),$=window.getComputedStyle(f),O=parseInt($.paddingTop,10),z=parseInt($.paddingBottom,10),F=R.top+R.height/2-lt,ne=j-F,ce=w.offsetHeight/2,L=w.offsetTop+ce,K=Y+M+L,le=E-K;if(K<=F){const W=w===H[H.length-1].ref.current;s.style.bottom="0px";const ee=l.clientHeight-f.offsetTop-f.offsetHeight,fe=Math.max(ne,ce+(W?z:0)+ee+X),Re=K+fe;s.style.height=Re+"px"}else{const W=w===H[0].ref.current;s.style.top="0px";const ee=Math.max(F,Y+f.offsetTop+(W?O:0)+ce)+le;s.style.height=ee+"px",f.scrollTop=K-F+f.offsetTop}s.style.margin=`${lt}px 0`,s.style.minHeight=k+"px",s.style.maxHeight=j+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,i.trigger,i.valueNode,s,l,f,w,y,i.dir,r]);Pe(()=>_(),[_]);const[x,S]=d.useState();Pe(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]);const I=d.useCallback(R=>{R&&g.current===!0&&(_(),v?.(),g.current=!1)},[_,v]);return d.createElement(Vv,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:I},d.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x}},d.createElement(_e.div,Z({},o,{ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),ks=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=lt,...i}=e,a=Ni(n);return d.createElement(Ev,Z({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[Vv,sd]=bn(dn,{}),Ss="SelectViewport",Bv=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=wn(Ss,n),i=sd(Ss,n),a=Ce(t,o.onViewportChange),s=d.useRef(0);return d.createElement(d.Fragment,null,d.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),d.createElement(Xr.Slot,{scope:n},d.createElement(_e.div,Z({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:de(r.onScroll,c=>{const l=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:m}=i;if(m!=null&&m.current&&u){const h=Math.abs(s.current-l.scrollTop);if(h>0){const p=window.innerHeight-lt*2,g=parseFloat(u.style.minHeight),f=parseFloat(u.style.height),w=Math.max(g,f);if(w<p){const y=w+h,v=Math.min(p,y),_=y-v;u.style.height=v+"px",u.style.bottom==="0px"&&(l.scrollTop=_>0?_:0,u.style.justifyContent="flex-end")}}}s.current=l.scrollTop})}))))}),Hv="SelectGroup",[jv,Wy]=bn(Hv),Gv=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Mn();return d.createElement(jv,{scope:n,id:o},d.createElement(_e.div,Z({role:"group","aria-labelledby":o},r,{ref:t})))}),ei="SelectItem",[Wv,cd]=bn(ei),Kv=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Ht(ei,n),c=wn(ei,n),l=s.value===r,[u,m]=d.useState(i??""),[h,p]=d.useState(!1),g=Ce(t,y=>{var v;return(v=c.itemRefCallback)===null||v===void 0?void 0:v.call(c,y,r,o)}),f=Mn(),w=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return d.createElement(Wv,{scope:n,value:r,disabled:o,textId:f,isSelected:l,onItemTextChange:d.useCallback(y=>{m(v=>{var _;return v||((_=y?.textContent)!==null&&_!==void 0?_:"").trim()})},[])},d.createElement(Xr.ItemSlot,{scope:n,value:r,disabled:o,textValue:u},d.createElement(_e.div,Z({role:"option","aria-labelledby":f,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:g,onFocus:de(a.onFocus,()=>p(!0)),onBlur:de(a.onBlur,()=>p(!1)),onPointerUp:de(a.onPointerUp,w),onPointerMove:de(a.onPointerMove,y=>{if(o){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}else y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:de(a.onPointerLeave,y=>{if(y.currentTarget===document.activeElement){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}}),onKeyDown:de(a.onKeyDown,y=>{var v;((v=c.searchRef)===null||v===void 0?void 0:v.current)!==""&&y.key===" "||(Rv.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})}))))}),rr="SelectItemText",Zv=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Ht(rr,n),s=wn(rr,n),c=cd(rr,n),l=Tv(rr,n),[u,m]=d.useState(null),h=Ce(t,y=>m(y),c.onItemTextChange,y=>{var v;return(v=s.itemTextRefCallback)===null||v===void 0?void 0:v.call(s,y,c.value,c.disabled)}),p=u?.textContent,g=d.useMemo(()=>d.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p),[c.disabled,c.value,p]),{onNativeOptionAdd:f,onNativeOptionRemove:w}=l;return Pe(()=>(f(g),()=>w(g)),[f,w,g]),d.createElement(d.Fragment,null,d.createElement(_e.span,Z({id:c.textId},i,{ref:h})),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?un.createPortal(i.children,a.valueNode):null)}),Yv="SelectItemIndicator",Jv=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return cd(Yv,n).isSelected?d.createElement(_e.span,Z({"aria-hidden":!0},r,{ref:t})):null}),Es="SelectScrollDownButton",Xv=d.forwardRef((e,t)=>{const n=wn(Es,e.__scopeSelect),r=sd(Es,e.__scopeSelect),[o,i]=d.useState(!1),a=Ce(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;i(u)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?d.createElement(Qv,Z({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),Qv=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=wn("SelectScrollButton",n),a=d.useRef(null),s=Qr(n),c=d.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),Pe(()=>{var l;const u=s().find(m=>m.ref.current===document.activeElement);u==null||(l=u.ref.current)===null||l===void 0||l.scrollIntoView({block:"nearest"})},[s]),d.createElement(_e.div,Z({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:de(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:de(o.onPointerMove,()=>{var l;(l=i.onItemLeave)===null||l===void 0||l.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:de(o.onPointerLeave,()=>{c()})}))}),ld=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=d.useRef(null),i=Ce(t,o),a=Kw(n);return d.useEffect(()=>{const s=o.current,c=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&l){const u=new Event("change",{bubbles:!0});l.call(s,n),s.dispatchEvent(u)}},[a,n]),d.createElement($v,{asChild:!0},d.createElement("select",Z({},r,{ref:i,defaultValue:n})))});ld.displayName="BubbleSelect";function dd(e){const t=ot(e),n=d.useRef(""),r=d.useRef(0),o=d.useCallback(a=>{const s=n.current+a;t(s),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),i=d.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function ud(e,t,n){const r=t.length>1&&Array.from(t).every(s=>s===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=e_(e,Math.max(o,0));r.length===1&&(i=i.filter(s=>s!==n));const a=i.find(s=>s.textValue.toLowerCase().startsWith(r.toLowerCase()));return a!==n?a:void 0}function e_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const t_=zv,n_=Pv,r_=Mv,o_=Nv,i_=Bv,a_=Gv,s_=Kv,c_=Zv,l_=Jv,d_=Xv;var u_="_1wo163v0",f_="_1wo163v1",h_="_1wo163v2",p_="_1wo163v3",m_="_1wo163v4",g_="_1wo163v5",b_="_1wo163v6",w_="_1wo163v7";const v_=({label:e,items:t,defaultValue:n,onChange:r,className:o,contentProps:i,disabled:a=!1})=>{const[s,c]=d.useState(n),l=d.useCallback(u=>{c(u),r(u)},[r]);return b.jsx("div",{className:"sid-dropdown",children:b.jsxs(t_,{disabled:a,onValueChange:l,defaultValue:n,children:[b.jsxs(n_,{className:te("sid-dropdown__trigger",u_,o),children:[b.jsx("label",{className:te("sid-dropdown__trigger__label",f_),children:e}),b.jsx("div",{className:te("sid-dropdown__trigger__input",h_),children:b.jsx(r_,{})}),b.jsx(bl,{className:te("sid-dropdown__trigger__icon",b_)})]}),b.jsxs(o_,{...i,className:te("sid-dropdown__popover",p_,i?.className),children:[b.jsx(i_,{className:te("sid-dropdown__viewport",m_),children:b.jsx(a_,{children:t.map(u=>b.jsxs(s_,{className:te("sid-dropdown__item",u.value===s&&"sid-dropdown__item--selected",g_),value:u.value,textValue:u.textValue,children:[b.jsx(c_,{children:u.label}),b.jsx(l_,{className:w_,children:b.jsx(Eb,{className:"sid-dropdown__item--selected__icon"})})]},u.value))})}),b.jsx(d_,{})]})]})})},$o="rovingFocusGroup.onEntryFocus",__={bubbles:!1,cancelable:!0},Ui="RovingFocusGroup",[ti,fd,y_]=Ai(Ui),[x_,hd]=wt(Ui,[y_]),[C_,k_]=x_(Ui),S_=d.forwardRef((e,t)=>d.createElement(ti.Provider,{scope:e.__scopeRovingFocusGroup},d.createElement(ti.Slot,{scope:e.__scopeRovingFocusGroup},d.createElement(E_,Z({},e,{ref:t}))))),E_=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,...u}=e,m=d.useRef(null),h=Ce(t,m),p=Gr(i),[g=null,f]=cn({prop:a,defaultProp:s,onChange:c}),[w,y]=d.useState(!1),v=ot(l),_=fd(n),x=d.useRef(!1),[S,I]=d.useState(0);return d.useEffect(()=>{const R=m.current;if(R)return R.addEventListener($o,v),()=>R.removeEventListener($o,v)},[v]),d.createElement(C_,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:g,onItemFocus:d.useCallback(R=>f(R),[f]),onItemShiftTab:d.useCallback(()=>y(!0),[]),onFocusableItemAdd:d.useCallback(()=>I(R=>R+1),[]),onFocusableItemRemove:d.useCallback(()=>I(R=>R-1),[])},d.createElement(_e.div,Z({tabIndex:w||S===0?-1:0,"data-orientation":r},u,{ref:h,style:{outline:"none",...e.style},onMouseDown:de(e.onMouseDown,()=>{x.current=!0}),onFocus:de(e.onFocus,R=>{const D=!x.current;if(R.target===R.currentTarget&&D&&!w){const P=new CustomEvent($o,__);if(R.currentTarget.dispatchEvent(P),!P.defaultPrevented){const G=_().filter(N=>N.focusable),H=G.find(N=>N.active),j=G.find(N=>N.id===g),J=[H,j,...G].filter(Boolean).map(N=>N.ref.current);pd(J)}}x.current=!1}),onBlur:de(e.onBlur,()=>y(!1))})))}),$_="RovingFocusGroupItem",I_=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Mn(),c=i||s,l=k_($_,n),u=l.currentTabStopId===c,m=fd(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=l;return d.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),d.createElement(ti.ItemSlot,{scope:n,id:c,focusable:r,active:o},d.createElement(_e.span,Z({tabIndex:u?0:-1,"data-orientation":l.orientation},a,{ref:t,onMouseDown:de(e.onMouseDown,g=>{r?l.onItemFocus(c):g.preventDefault()}),onFocus:de(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:de(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const f=D_(g,l.orientation,l.dir);if(f!==void 0){g.preventDefault();let w=m().filter(y=>y.focusable).map(y=>y.ref.current);if(f==="last")w.reverse();else if(f==="prev"||f==="next"){f==="prev"&&w.reverse();const y=w.indexOf(g.currentTarget);w=l.loop?A_(w,y+1):w.slice(y+1)}setTimeout(()=>pd(w))}})})))}),R_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function q_(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function D_(e,t,n){const r=q_(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return R_[r]}function pd(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function A_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const T_=S_,z_=I_,md="Tabs",[L_,Ky]=wt(md,[hd]),gd=hd(),[P_,Fi]=L_(md),O_=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:c="automatic",...l}=e,u=Gr(s),[m,h]=cn({prop:r,onChange:o,defaultProp:i});return d.createElement(P_,{scope:n,baseId:Mn(),value:m,onValueChange:h,orientation:a,dir:u,activationMode:c},d.createElement(_e.div,Z({dir:u,"data-orientation":a},l,{ref:t})))}),M_="TabsList",N_=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=Fi(M_,n),a=gd(n);return d.createElement(T_,Z({asChild:!0},a,{orientation:i.orientation,dir:i.dir,loop:r}),d.createElement(_e.div,Z({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))}),U_="TabsTrigger",F_=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=Fi(U_,n),s=gd(n),c=bd(a.baseId,r),l=wd(a.baseId,r),u=r===a.value;return d.createElement(z_,Z({asChild:!0},s,{focusable:!o,active:u}),d.createElement(_e.button,Z({type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c},i,{ref:t,onMouseDown:de(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?a.onValueChange(r):m.preventDefault()}),onKeyDown:de(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&a.onValueChange(r)}),onFocus:de(e.onFocus,()=>{const m=a.activationMode!=="manual";!u&&!o&&m&&a.onValueChange(r)})})))}),V_="TabsContent",B_=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=Fi(V_,n),c=bd(s.baseId,r),l=wd(s.baseId,r),u=r===s.value,m=d.useRef(u);return d.useEffect(()=>{const h=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(h)},[]),d.createElement(Cl,{present:o||u},({present:h})=>d.createElement(_e.div,Z({"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:l,tabIndex:0},a,{ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0}}),h&&i))});function bd(e,t){return`${e}-trigger-${t}`}function wd(e,t){return`${e}-content-${t}`}const H_=O_,j_=N_,G_=F_,W_=B_;var K_="_1bc2uou0",Z_="_1bc2uou1";const Y_=({className:e,tabs:t,defaultValue:n,testId:r})=>{var o;return t.length?b.jsxs(H_,{"data-testid":r,className:te("sid-tabs",e),defaultValue:n??((o=t[0])==null?void 0:o.id),children:[b.jsx(j_,{className:K_,"aria-label":"SlashID Tabs",children:t.map(({id:i,title:a})=>b.jsx(G_,{"data-testid":`sid-tabs-trigger-${i}`,className:Z_,value:i,children:a},i))}),t.map(({id:i,content:a})=>b.jsx(W_,{value:i,children:a},i))]}):null},J_=e=>{const t=globalThis.document.getElementById(e);if(t!==null)return t;const n=document.createElement("div");return n.id=e,document.body.appendChild(n),n},X_=({to:e,children:t,renderKey:n})=>{const r=J_(e);return b.jsx(b.Fragment,{children:un.createPortal(t,r,n)})},Q_=["--sid-color-background","--sid-color-mute","--sid-color-panel","--sid-color-foreground","--sid-color-contrast","--sid-color-secondary","--sid-color-tertiary","--sid-color-placeholder","--sid-color-smooth","--sid-color-subtle","--sid-color-soft","--sid-color-offset","--sid-color-primary","--sid-color-primary-hover","--sid-color-transparent","--sid-color-error","--sid-color-auxiliary","--sid-color-success","--sid-color-foreground-success","--sid-color-background-success","--sid-color-failure","--sid-color-foreground-failure","--sid-color-background-failure","--sid-font-family","--sid-border-width-panel","--sid-input-border-radius","--sid-input-border-color","--sid-input-label-color","--sid-button-border-radius","--sid-form-border-radius","--sid-form-logo-width"];var e9={exports:{}};(function(e){var t=function(n){var r=Object.prototype,o=r.hasOwnProperty,i=Object.defineProperty||function(E,k,$){E[k]=$.value},a,s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function m(E,k,$){return Object.defineProperty(E,k,{value:$,enumerable:!0,configurable:!0,writable:!0}),E[k]}try{m({},"")}catch{m=function(E,k,$){return E[k]=$}}function h(E,k,$,O){var z=k&&k.prototype instanceof _?k:_,F=Object.create(z.prototype),ne=new M(O||[]);return i(F,"_invoke",{value:j(E,$,ne)}),F}n.wrap=h;function p(E,k,$){try{return{type:"normal",arg:E.call(k,$)}}catch(O){return{type:"throw",arg:O}}}var g="suspendedStart",f="suspendedYield",w="executing",y="completed",v={};function _(){}function x(){}function S(){}var I={};m(I,c,function(){return this});var R=Object.getPrototypeOf,D=R&&R(R(X([])));D&&D!==r&&o.call(D,c)&&(I=D);var P=S.prototype=_.prototype=Object.create(I);x.prototype=S,i(P,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:x,configurable:!0}),x.displayName=m(S,u,"GeneratorFunction");function G(E){["next","throw","return"].forEach(function(k){m(E,k,function($){return this._invoke(k,$)})})}n.isGeneratorFunction=function(E){var k=typeof E=="function"&&E.constructor;return k?k===x||(k.displayName||k.name)==="GeneratorFunction":!1},n.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,S):(E.__proto__=S,m(E,u,"GeneratorFunction")),E.prototype=Object.create(P),E},n.awrap=function(E){return{__await:E}};function H(E,k){function $(F,ne,ce,L){var K=p(E[F],E,ne);if(K.type==="throw")L(K.arg);else{var le=K.arg,W=le.value;return W&&typeof W=="object"&&o.call(W,"__await")?k.resolve(W.__await).then(function(ee){$("next",ee,ce,L)},function(ee){$("throw",ee,ce,L)}):k.resolve(W).then(function(ee){le.value=ee,ce(le)},function(ee){return $("throw",ee,ce,L)})}}var O;function z(F,ne){function ce(){return new k(function(L,K){$(F,ne,L,K)})}return O=O?O.then(ce,ce):ce()}i(this,"_invoke",{value:z})}G(H.prototype),m(H.prototype,l,function(){return this}),n.AsyncIterator=H,n.async=function(E,k,$,O,z){z===void 0&&(z=Promise);var F=new H(h(E,k,$,O),z);return n.isGeneratorFunction(k)?F:F.next().then(function(ne){return ne.done?ne.value:F.next()})};function j(E,k,$){var O=g;return function(z,F){if(O===w)throw new Error("Generator is already running");if(O===y){if(z==="throw")throw F;return ge()}for($.method=z,$.arg=F;;){var ne=$.delegate;if(ne){var ce=J(ne,$);if(ce){if(ce===v)continue;return ce}}if($.method==="next")$.sent=$._sent=$.arg;else if($.method==="throw"){if(O===g)throw O=y,$.arg;$.dispatchException($.arg)}else $.method==="return"&&$.abrupt("return",$.arg);O=w;var L=p(E,k,$);if(L.type==="normal"){if(O=$.done?y:f,L.arg===v)continue;return{value:L.arg,done:$.done}}else L.type==="throw"&&(O=y,$.method="throw",$.arg=L.arg)}}}function J(E,k){var $=k.method,O=E.iterator[$];if(O===a)return k.delegate=null,$==="throw"&&E.iterator.return&&(k.method="return",k.arg=a,J(E,k),k.method==="throw")||$!=="return"&&(k.method="throw",k.arg=new TypeError("The iterator does not provide a '"+$+"' method")),v;var z=p(O,E.iterator,k.arg);if(z.type==="throw")return k.method="throw",k.arg=z.arg,k.delegate=null,v;var F=z.arg;if(!F)return k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,v;if(F.done)k[E.resultName]=F.value,k.next=E.nextLoc,k.method!=="return"&&(k.method="next",k.arg=a);else return F;return k.delegate=null,v}G(P),m(P,u,"Generator"),m(P,c,function(){return this}),m(P,"toString",function(){return"[object Generator]"});function N(E){var k={tryLoc:E[0]};1 in E&&(k.catchLoc=E[1]),2 in E&&(k.finallyLoc=E[2],k.afterLoc=E[3]),this.tryEntries.push(k)}function Y(E){var k=E.completion||{};k.type="normal",delete k.arg,E.completion=k}function M(E){this.tryEntries=[{tryLoc:"root"}],E.forEach(N,this),this.reset(!0)}n.keys=function(E){var k=Object(E),$=[];for(var O in k)$.push(O);return $.reverse(),function z(){for(;$.length;){var F=$.pop();if(F in k)return z.value=F,z.done=!1,z}return z.done=!0,z}};function X(E){if(E){var k=E[c];if(k)return k.call(E);if(typeof E.next=="function")return E;if(!isNaN(E.length)){var $=-1,O=function z(){for(;++$<E.length;)if(o.call(E,$))return z.value=E[$],z.done=!1,z;return z.value=a,z.done=!0,z};return O.next=O}}return{next:ge}}n.values=X;function ge(){return{value:a,done:!0}}return M.prototype={constructor:M,reset:function(E){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(Y),!E)for(var k in this)k.charAt(0)==="t"&&o.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=a)},stop:function(){this.done=!0;var E=this.tryEntries[0],k=E.completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(E){if(this.done)throw E;var k=this;function $(L,K){return F.type="throw",F.arg=E,k.next=L,K&&(k.method="next",k.arg=a),!!K}for(var O=this.tryEntries.length-1;O>=0;--O){var z=this.tryEntries[O],F=z.completion;if(z.tryLoc==="root")return $("end");if(z.tryLoc<=this.prev){var ne=o.call(z,"catchLoc"),ce=o.call(z,"finallyLoc");if(ne&&ce){if(this.prev<z.catchLoc)return $(z.catchLoc,!0);if(this.prev<z.finallyLoc)return $(z.finallyLoc)}else if(ne){if(this.prev<z.catchLoc)return $(z.catchLoc,!0)}else if(ce){if(this.prev<z.finallyLoc)return $(z.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(E,k){for(var $=this.tryEntries.length-1;$>=0;--$){var O=this.tryEntries[$];if(O.tryLoc<=this.prev&&o.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var z=O;break}}z&&(E==="break"||E==="continue")&&z.tryLoc<=k&&k<=z.finallyLoc&&(z=null);var F=z?z.completion:{};return F.type=E,F.arg=k,z?(this.method="next",this.next=z.finallyLoc,v):this.complete(F)},complete:function(E,k){if(E.type==="throw")throw E.arg;return E.type==="break"||E.type==="continue"?this.next=E.arg:E.type==="return"?(this.rval=this.arg=E.arg,this.method="return",this.next="end"):E.type==="normal"&&k&&(this.next=k),v},finish:function(E){for(var k=this.tryEntries.length-1;k>=0;--k){var $=this.tryEntries[k];if($.finallyLoc===E)return this.complete($.completion,$.afterLoc),Y($),v}},catch:function(E){for(var k=this.tryEntries.length-1;k>=0;--k){var $=this.tryEntries[k];if($.tryLoc===E){var O=$.completion;if(O.type==="throw"){var z=O.arg;Y($)}return z}}throw new Error("illegal catch attempt")},delegateYield:function(E,k,$){return this.delegate={iterator:X(E),resultName:k,nextLoc:$},this.method==="next"&&(this.arg=a),v}},n}(e.exports);try{regeneratorRuntime=t}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}})(e9);const t9={sid:void 0,user:void 0,anonymousUser:void 0,sdkState:"initial",logOut:()=>{},logIn:()=>Promise.reject("NYI"),mfa:()=>Promise.reject("NYI"),recover:()=>Promise.reject("NYI"),validateToken:async()=>!1,__switchOrganizationInContext:async()=>{},__syncExternalState:async()=>{}},n9=d.createContext(t9);n9.displayName="SlashIDContext";const r9=["email_address","phone_number","username"],o9=["webauthn","otp_via_email","email_link","password","totp"],i9=["otp_via_sms","sms_link","password"],a9=["password"],s9=["oidc","saml"];function c9(e){return"allowedHandleTypes"in e?e.allowedHandleTypes.every(t=>r9.includes(t)):!1}function Io(e,t){return c9(e)?e.allowedHandleTypes.includes(t):t!=="username"}function l9(e){const t=new Set;return o9.includes(e.method)&&Io(e,"email_address")&&t.add("email_address"),i9.includes(e.method)&&Io(e,"phone_number")&&t.add("phone_number"),a9.includes(e.method)&&Io(e,"username")&&t.add("username"),t}function Vi(e){const t=new Set;return e.forEach(n=>{l9(n).forEach(r=>t.add(r))}),Array.from(t)}function d9(e,t){return e.filter(n=>Vi([n]).includes(t))}function vd(e){return e.method==="oidc"}function ni(e){return s9.includes(e.method)}function Bi(e){return e.method!=="oidc"}function u9(e){return e.some(ni)&&e.some(t=>!ni(t))}function or(e,t){if(!(!e||e.type!==t))return e.value}function f9(e){for(const t of Di())if(e.startsWith(t.dial_code))return{dialCode:t.dial_code,number:e.substring(t.dial_code.length).trim(),countryCode:vl(t.dial_code).code}}const Er=e=>b.jsx(v2,{...e}),h9={"":"NYI","footer.branding":"Top-tier security by SlashID","initial.title":"Welcome to SlashID","initial.subtitle":"Sign in to your account","initial.oidc":"Sign in with","initial.sso":"Sign in with","initial.authenticationMethod":"Authentication method","initial.handle.email":"Email","initial.handle.phone":"Phone","initial.handle.username":"Username","initial.handle.email.placeholder":"Type your email","initial.handle.phone.placeholder":"Type your phone number","initial.handle.username.placeholder":"Type your username","initial.submit":"Continue","initial.divider":"or","resolving_factors.title":"Loading configuration...","resolving_factors.subtitle":"We're fetching authentication methods for your account, it may take a while","resolved_factors.title":"Sign in","resolved_factors.subtitle":"Choose one of the authentication methods below","authenticating.subtitle":"","authenticating.password.label":"Password","authenticating.password.placeholder":"Type your password","authenticating.passwordConfirm.label":"Confirm password","authenticating.retryPrompt":"Didn’t receive the message?","authenticating.retry":"Resend","authenticating.back":"Back","authenticating.initial.password.title":"Log in with a password.","authenticating.initial.password.message.email":"If you are using a password for the first time, you will receive an email to verify your email address.","authenticating.initial.password.message.phone":"If you are using a password for the first time, you will receive a message to verify your phone number.","authenticating.setPassword.title":"Create your password","authenticating.setPassword.message":"Define a secure password to sign up.","authenticating.setPassword.validation.required":"Password is required","authenticating.setPassword.validation.mismatch":"Passwords should match","authenticating.setPassword.validation.incorrect":"Incorrect handle or password","authenticating.setPassword.validation.length":"8-256 characters required","authenticating.setPassword.validation.password_variants":"Contains word 'password'","authenticating.setPassword.validation.admin_variants":"Contains word 'admin'","authenticating.setPassword.validation.user_variants":"Contains word 'user'","authenticating.setPassword.validation.alphanumeric_sequences_1":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","authenticating.setPassword.validation.alphanumeric_sequences_2":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","authenticating.setPassword.validation.numeric_sequences_ascending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","authenticating.setPassword.validation.numeric_subsequences_ascending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","authenticating.setPassword.validation.numeric_sequences_descending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","authenticating.setPassword.validation.numeric_subsequences_descending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","authenticating.setPassword.validation.common_password_xkcd":"Common password","authenticating.verifyPassword.title":"Enter your password","authenticating.verifyPassword.message":"Type your password to sign in.","authenticating.verifyPassword.recover.prompt":"Forgot password?","authenticating.verifyPassword.recover.cta":"Reset","authenticating.recoverPassword.title.email":"Check your email","authenticating.recoverPassword.message.email":"We have sent an email to {{EMAIL_ADDRESS}} with instructions for resetting your password. This email can take a few minutes to arrive, make sure to check your spam.","authenticating.recoverPassword.title.phone":"Check your phone","authenticating.recoverPassword.message.phone":"We have sent a message to {{PHONE_NUMBER}} with instructions for resetting your password. This message can take a few minutes to arrive, make sure to check your spam.","authenticating.password.submit":"Continue","authenticating.submitting.password.title":"Logging you in...","authenticating.submitting.password.message":"This may take some time.","authenticating.initial.totp.title":"Log in with TOTP","authenticating.initial.totp.message":"If this is your first time logging with TOTP, we will generate a secret for your Authenticator app.","authenticating.registerAuthenticator.totp.title":"Set up One Time Password","authenticating.registerAuthenticator.totp.message":"Scan the QR code with an authenticator app to set up your One Time Password.","authenticating.registerAuthenticator.totp.prompt":"Can't scan?","authenticating.registerAuthenticator.totp.cta":"Set up with a code","authenticating.input.totp.cta":"Use recovery code","authenticating.input.totp.title":"Enter authentication code","authenticating.input.totp.message":"Enter the 6-digit code displayed in your authenticator app.","authenticating.saveRecoveryCodes.totp.title":"Save your recovery codes","authenticating.saveRecoveryCodes.totp.message":"Use these codes to authenticate if you lose access to your device. Store them somewhere safe.","authenticating.continue":"Continue","authenticating.confirm":"Confirm","authenticating.downloadCodes":"Download codes","authenticating.message.webauthn":"If you are registering for the first time, you will receive an email at {{EMAIL_ADDRESS}} to verify your email address.","authenticating.title.webauthn":"You'll be prompted to validate your login via your device","authenticating.message.emailLink":"We have sent you a link via email to {{EMAIL_ADDRESS}}. Follow the link provided to complete your authentication.","authenticating.title.emailLink":"Check your email","authenticating.message.smsLink":"We have sent you a link via text to {{PHONE_NUMBER}}. Follow the link provided to complete your authentication.","authenticating.title.smsLink":"Check your phone","authenticating.message.emailOtp":"We have sent you a code via email to {{EMAIL_ADDRESS}}. Please insert it here.","authenticating.title.emailOtp":"Check your email","authenticating.submitting.message.emailOtp":"We are verifying the code.","authenticating.submitting.title.emailOtp":"Please wait","authenticating.retry.message.emailOtp":"We are resending the OTP code to {{EMAIL_ADDRESS}}...","authenticating.retry.title.emailOtp":"Please wait","authenticating.message.smsOtp":"We have sent you a code via text to {{PHONE_NUMBER}}. Please insert it here.","authenticating.title.smsOtp":"Check your phone","authenticating.submitting.message.smsOtp":"We are verifying the code.","authenticating.submitting.title.smsOtp":"Please wait","authenticating.retry.message.smsOtp":"We are resending the OTP code to {{PHONE_NUMBER}}...","authenticating.retry.title.smsOtp":"Please wait","authenticating.message.oidc":"Please follow the instructions in the login screen from your SSO provider.","authenticating.title.oidc":"Sign in with ","authenticating.otpInput":"OTP","authenticating.otpInput.submit":"Submit","authenticating.otpInput.submit.error":"Please enter a valid code","success.title":"You are now authenticated!","success.subtitle":"You can now close this page.","error.title":"Something went wrong...","error.subtitle":"There has been an error while submitting your form. Please try again.","error.title.rateLimit":"Too many attempts...","error.subtitle.rateLimit":"Your request has been rate limited. Please try again later.","error.title.recoverNonReachableHandleType":"Cannot reset password","error.subtitle.recoverNonReachableHandleType":"Please use an email address or a phone number to reset your password.","error.title.noPasswordSet":"No password set","error.subtitle.noPasswordSet":"Contact support to set a password or log in with your email or phone number.","error.title.authenticationExpired":"Log in expired","error.title.selfRegistrationNotAllowed":"Cannot register","error.title.signUpAwaitingApproval":"Awaiting approval","error.title.signInAwaitingApproval":"Awaiting approval","error.subtitle.selfRegistrationNotAllowed":"Self-registration is disabled for this organization. Please reach out to the organization admin in order to create your account.","error.subtitle.signUpAwaitingApproval":"Your account has been created. The organization administrator needs to approve your registration before you can sign in.","error.subtitle.signInAwaitingApproval":"The organization administrator needs to approve your registration before you can sign in.","error.subtitle.authenticationExpired":"Your attempt to login took too long, try again to continue.","error.title.invalidEmailAddressFormat":"Invalid email format","error.subtitle.invalidEmailAddressFormat":"{{EMAIL_ADDRESS}} is not a valid email address. Please go back to login and check the address for errors.","error.retry.invalidEmailAddressFormat":"Go back to login","error.title.invalidPhoneNumberFormat":"Invalid phone number format","error.subtitle.invalidPhoneNumberFormat":"{{PHONE_NUMBER}} is not a valid phone number. Please go back to login and check the number for errors.","error.retry.invalidPhoneNumberFormat":"Go back to login","error.retry":"Try again","error.retry.rateLimit":"Try again","error.retry.noPasswordSet":"Go back to login","error.retry.recoverNonReachableHandleType":"Go back to login","error.retry.authenticationExpired":"Try again","error.retry.selfRegistrationNotAllowed":"Go back to login","error.retry.signUpAwaitingApproval":"Go back to login","error.retry.signInAwaitingApproval":"Go back to login","error.contactSupport.prompt":"Need help?","error.contactSupport.cta":"Contact support","error.divider":"or","factor.webauthn":"Passkeys","factor.otpViaSms":"OTP via SMS","factor.otpViaEmail":"OTP via email","factor.emailLink":"Email link","factor.smsLink":"SMS link","factor.password":"Password","validationError.otp":"Please enter the OTP code.","validationError.email":"Please enter your email address.","validationError.phoneNumber":"Please enter your phone number.","validationError.username":"Please enter a valid username.","kyc.mobile.end.title":"Upload was successful.","kyc.mobile.end.description":"Please return to desktop.","kyc.mobile.failure.generic.title":"Something went wrong","kyc.mobile.failure.generic.description":"Please try again","kyc.mobile.failure.upload_not_supported.title":"Upload not supported","kyc.mobile.failure.upload_not_supported.description":"Please try with a different browser or device","kyc.mobile.failure.invalid_state.title":"Invalid State","kyc.mobile.failure.invalid_state.description":"Cannot render anything due to inconsistent state","kyc.upload.mobile.empty.id_card.front":"Upload the front side of your ID card","kyc.upload.mobile.empty.id_card.back":"Upload the back side of your ID card","kyc.upload.mobile.empty.driver_license.front":"Upload the front side of your driver license","kyc.upload.mobile.empty.driver_license.back":"Upload the back side of your driver license","kyc.upload.mobile.empty.passport.front":"Upload the front side of your passport","kyc.upload.mobile.empty.passport.back":"Upload the back side of your passport","kyc.upload.mobile.empty.cta":"Upload","kyc.upload.mobile.loading.message":"Checking image quality","kyc.upload.mobile.failure.generic.title":"Cannot load image","kyc.upload.mobile.failure.generic.description":"Please try with a different image","kyc.upload.mobile.failure.quality.title":"Invalid Image","kyc.upload.mobile.failure.quality.description":"Please try with a different image","kyc.upload.mobile.failure.quality.detect_blur.title":"Image is too blurry","kyc.upload.mobile.failure.quality.detect_blur.description":"Please try with a different image","kyc.upload.mobile.failure.quality.detect_cutoff.title":"Document is not entirely visible","kyc.upload.mobile.failure.quality.detect_cutoff.description":"Please try with a different image","kyc.upload.mobile.failure.quality.document_detection.title":"Document not found","kyc.upload.mobile.failure.quality.document_detection.description":"Please try with a different image","kyc.upload.mobile.success.title":"Image looks good","kyc.upload.mobile.upload.cta.continue":"Continue","kyc.upload.mobile.upload.cta.again":"Upload again","kyc.upload.mobile.title":"Your document","kyc.upload.mobile.subtitle":"Upload the required images of your documents","kyc.livephoto.mobile.upload.cta.continue":"Continue","kyc.livephoto.mobile.upload.cta.again":"Upload again","kyc.livephoto.mobile.empty":"Upload a selfie picture.","kyc.livephoto.mobile.empty.cta":"Upload","kyc.livephoto.mobile.loading.message":"Validating picture","kyc.livephoto.mobile.failure.generic.title":"Cannot load image","kyc.livephoto.mobile.failure.generic.description":"Please try with a different image","kyc.livephoto.mobile.failure.validation.title":"An error occurred","kyc.livephoto.mobile.failure.validation.description":"Please try with a different image","kyc.livephoto.mobile.failure.validation.face_detection.title":"Face not detected","kyc.livephoto.mobile.failure.validation.face_detection.description":"Please try with a different image","kyc.livephoto.mobile.success.title":"Image looks good","kyc.livephoto.mobile.title":"Selfie Check","kyc.livephoto.mobile.subtitle":"Upload a selfie picture to confirm your identity.","org.switcher.label":"Organization","gdpr.dialog.title":"We value your privacy","gdpr.dialog.subtitle":"We use cookies to improve your experience. Learn more in our Cookie policy.","gdpr.consent.necessary.title":"Necessary cookies","gdpr.consent.necessary.description":"Cookies that are essential to provide the service you have requested or which are required to comply with legal requirements, like data protection laws.","gdpr.consent.analytics.title":"Analytics","gdpr.consent.analytics.description":"Cookies that are used for analytics or performance measurement purposes, like counting the number of unique visitors to our site, how long you stay on the site, and what parts of our site you visit.","gdpr.consent.marketing.title":"Marketing","gdpr.consent.marketing.description":"Cookies that are used to display advertising personalised to you (whether on or off our site) based on your browsing and profile.","gdpr.consent.retargeting.title":"Retargeting","gdpr.consent.retargeting.description":"Cookies that are used to display advertising personalised to you (whether on or off our site) based on your browsing and profile.","gdpr.consent.tracking.title":"Tracking","gdpr.consent.tracking.description":"Cookies that track your online behaviour, such as clicks, preferences, device specifications, location, and search history. This data helps in targeted advertising and gathering website analytics.","gdpr.dialog.error.title":"Oops!","gdpr.dialog.error.subtitle":"Looks like something went wrong...","delayedPrompt.timeRemaining.singular":"in {{TIME_REMAINING}} second","delayedPrompt.timeRemaining.plural":"in {{TIME_REMAINING}} seconds","initial.handle.phone.email":""},Hi=/([0-9]+)px$/,ji=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,eo=/(?:['"]?([\\\w\d\- ]+)['"]?(?:,\s*)?)/g,_d=new Set(["Open Sans","Inter"]),yd=["sans-serif",..._d],xd=(e,t)=>{const n=e.toString().match(t);if(!n)return null;const[r]=n;return t.test(r)?r:null},ir=e=>Array.isArray(e)?null:xd(e,Hi),Sn=e=>Array.isArray(e)?null:xd(e,ji),Cd=e=>e.map(t=>t.replaceAll(",","").trim()).filter(t=>{for(const n of yd)if(t===n||t===`'${n}'`||t===`"${n}"`)return!0;return!1}),p9=e=>{const t=e.toString().match(eo);if(!t)return null;const n=Cd(t);return n.length?n.join(", "):null},Gi=(e,t)=>{const n=e.toString().match(t);if(!n)return!1;const[r]=n;return!!t.test(r)},m9=e=>Gi(e,Hi),g9=e=>Gi(e,ji),b9=e=>t=>!(Array.isArray(t)||!e.some(n=>n===t)),w9=e=>{const t=e.toString().match(eo);return!(!t||Cd(t).length!==t.length)},v9=e=>{try{return new URL(e),!0}catch{return!1}},_9=Object.freeze(Object.defineProperty({__proto__:null,exactValidator:b9,fontFamilyRegExp:eo,fontFamilyValidator:w9,hexValidator:g9,hexValueRegExp:ji,pixelValueRegExp:Hi,pxValidator:m9,supportedFonts:yd,urlValidator:v9,validate:Gi},Symbol.toStringTag,{value:"Module"})),y9={text:h9,factors:[{method:"webauthn"},{method:"email_link"}],logo:b.jsx(wl,{}),storeLastHandle:!1,storeLastFactor:!1,showBanner:!0,defaultCountryCode:"US",supportURL:void 0},kd=d.createContext(y9);kd.displayName="SlashIDConfigurationContext";function Fe(){return V.useContext(kd)}const to=()=>d.useContext(eb),x9=new RegExp("(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[-\b\v\f-!#-[]-]|\\[- \v\f-])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[-\b\v\f-!-ZS-]|\\[- \v\f-])+)\\])"),C9=e=>!(typeof e!="string"||e===""),k9=e=>typeof e!="string"||e===""?!1:x9.test(e),S9=e=>typeof e!="string"||e===""?!1:e.length<=128;var E9="_1xl24760";const $9=({name:e})=>{const{errors:t}=to(),n=t[e];return n?b.jsx("span",{"data-testid":"sid-form-error-message",className:E9,children:n.message}):null},I9=V.createContext({flowState:null,lastHandle:void 0,lastFactor:void 0,submitPayloadRef:{current:{}},handleSubmit:()=>null,selectedFactor:void 0,setSelectedFactor:()=>null}),vn=()=>V.useContext(I9);var R9="_4i40i60",q9="_4i40i61";function D9(e){var t,n;if(((t=e.context.config.handle)==null?void 0:t.type)==="email_address")return{EMAIL_ADDRESS:e.context.config.handle.value};if(((n=e.context.config.handle)==null?void 0:n.type)==="phone_number")return{PHONE_NUMBER:e.context.config.handle.value}}const A9=({variant:e="red"})=>b.jsx(i2,{variant:e,shouldAnimate:!1,className:"sid-form-error-icon",children:b.jsx($b,{})}),T9=["selfRegistrationNotAllowed","signUpAwaitingApproval","signInAwaitingApproval"];async function z9(e){return Ve.isTimeoutError(e)?"timeout":Ve.isInvalidEmailAddressFormatError(e)?"invalidEmailAddressFormat":Ve.isInvalidPhoneNumberFormatError(e)?"invalidPhoneNumberFormat":Ve.isAPIResponseError(e)?"response":Ve.isRateLimitError(e)?"rateLimit":Ve.isNonReachableHandleTypeError(e)?"recoverNonReachableHandleType":Ve.isNoPasswordSetError(e)?"noPasswordSet":Ve.isSelfRegistrationNotAllowedError(e)?"selfRegistrationNotAllowed":Ve.isSignUpAwaitingApprovalError(e)?"signUpAwaitingApproval":Ve.isSignInAwaitingApprovalError(e)?"signInAwaitingApproval":"unknown"}function L9(e){switch(e){case"timeout":return{title:"error.title.authenticationExpired",description:"error.subtitle.authenticationExpired",retry:"error.retry.authenticationExpired"};case"rateLimit":return{title:"error.title.rateLimit",description:"error.subtitle.rateLimit",retry:"error.retry.rateLimit"};case"recoverNonReachableHandleType":return{title:"error.title.recoverNonReachableHandleType",description:"error.subtitle.recoverNonReachableHandleType",retry:"error.retry.recoverNonReachableHandleType"};case"noPasswordSet":return{title:"error.title.noPasswordSet",description:"error.subtitle.noPasswordSet",retry:"error.retry.noPasswordSet"};case"selfRegistrationNotAllowed":return{title:"error.title.selfRegistrationNotAllowed",description:"error.subtitle.selfRegistrationNotAllowed",retry:"error.retry.selfRegistrationNotAllowed"};case"signUpAwaitingApproval":return{title:"error.title.signUpAwaitingApproval",description:"error.subtitle.signUpAwaitingApproval",retry:"error.retry.signUpAwaitingApproval"};case"signInAwaitingApproval":return{title:"error.title.signInAwaitingApproval",description:"error.subtitle.signInAwaitingApproval",retry:"error.retry.signInAwaitingApproval"};case"invalidEmailAddressFormat":return{title:"error.title.invalidEmailAddressFormat",description:"error.subtitle.invalidEmailAddressFormat",retry:"error.retry.invalidEmailAddressFormat"};case"invalidPhoneNumberFormat":return{title:"error.title.invalidPhoneNumberFormat",description:"error.subtitle.invalidPhoneNumberFormat",retry:"error.retry.invalidPhoneNumberFormat"};default:return{title:"error.title",description:"error.subtitle",retry:"error.retry"}}}function P9(e){switch(e){case"recoverNonReachableHandleType":case"noPasswordSet":case"selfRegistrationNotAllowed":case"signUpAwaitingApproval":case"signInAwaitingApproval":case"invalidEmailAddressFormat":case"invalidPhoneNumberFormat":return"reset";case"timeout":case"rateLimit":default:return"retry"}}function O9(){const{text:e,supportURL:t}=Fe();return t?b.jsxs(b.Fragment,{children:[b.jsx(yl,{children:e["error.divider"]}),b.jsx("div",{className:te("sid-form-error-contact-support",R9),"data-testid":"sid-form-error-support-prompt",children:b.jsx("a",{className:q9,target:"_blank",href:t,rel:"noreferrer",children:b.jsx(Bt,{variant:"secondary",children:e["error.contactSupport.cta"]})})})]}):null}const M9=({children:e})=>{const{flowState:t}=vn();return t?.status!=="error"?null:typeof e=="function"?b.jsx("div",{"data-testid":"sid-form-error-function",children:e({context:t.context,retry:t.retry,cancel:t.cancel})}):d.Children.count(e)>0?b.jsx("div",{"data-testid":"sid-form-error-children",children:e}):b.jsx(N9,{flowState:t})};M9.displayName="Form.Error";const N9=({flowState:e})=>{const{text:t}=Fe(),[n,r]=d.useState(null);if(d.useEffect(()=>{r(null),(async()=>{const l=await z9(e.context.error);r(l)})()},[e.context.error]),!n)return b.jsx(b.Fragment,{});const{title:o,description:i,retry:a}=L9(n),s=P9(n),c=T9.includes(n);return b.jsxs("article",{"data-testid":"sid-form-error-state",children:[b.jsx(lb,{className:ut({marginBottom:"4"}),testId:"sid-form-authenticating-cancel-button",variant:"back",onClick:()=>e.cancel(),children:t["authenticating.back"]}),b.jsx(Er,{as:"h1",t:o,variant:{size:"2xl-title",weight:"bold"}}),b.jsx(Er,{as:"h2",t:i,tokens:D9(e),variant:{color:"contrast",weight:"semibold"}}),b.jsx(A9,{variant:c?"grey":"red"}),b.jsx(Bt,{type:"submit",variant:"primary",testId:"sid-form-error-retry-button",onClick:()=>e.retry(s),children:t[a]}),b.jsx(O9,{})]})};var U9="_1xoz4760",F9="_1xoz4761",V9="_1xoz4762",Ro="_1xoz4763",B9="_1xoz4764",H9="_1xoz4765",$s="_1xoz4766";const j9=({logo:e})=>{if(typeof e=="string"&&e)return b.jsx("div",{className:te("sid-logo","sid-logo--image",Ro),children:b.jsx("div",{children:b.jsx("img",{className:Ro,src:e,alt:"Company logo"})})});const t=e||b.jsx(wl,{});return e||console.info("SlashID: No logo provided. Using default logo."),b.jsx("div",{className:te("sid-logo","sid-logo--component",Ro),children:t})},Wi=({children:e})=>{const{logo:t}=Fe();return typeof e!="function"?b.jsx(j9,{logo:t}):b.jsx(b.Fragment,{children:e({logo:t})})};Wi.displayName="Logo";const G9={email_link:"factor.emailLink",otp_via_sms:"factor.otpViaSms",otp_via_email:"factor.otpViaEmail",sms_link:"factor.smsLink",webauthn:"factor.webauthn",password:"factor.password",oidc:"",saml:"",totp:""},on={email:"email",phone:"phone",username:"username"},W9={phone_number:on.phone,email_address:on.email,username:on.username},Fn=({children:e})=>{const{factors:t,text:n}=Fe(),{handleSubmit:r,submitPayloadRef:o,selectedFactor:i}=vn(),{registerSubmit:a}=to(),s=d.useMemo(()=>t.filter(u=>Bi(u)),[t]),c=d.useMemo(()=>Vi(t),[t]);if(s.length===0)return null;const l=u=>{if(u.preventDefault(),!o.current.handleType||!o.current.handleValue||!i)return;const{handleType:m,handleValue:h,flag:p}=o.current;m==="phone_number"&&!p||r(i,{type:m,value:m==="phone_number"?`${p.dial_code}${h}`:h})};return typeof e=="function"?b.jsx("div",{"data-testid":"sid-form-initial-function",children:e({handleSubmit:r,factors:s,handleTypes:c,text:n})}):d.Children.count(e)>0?b.jsx("form",{"data-testid":"sid-form-initial-children",onSubmit:a(l),noValidate:!0,children:e}):b.jsxs("form",{"data-testid":"sid-form-initial-default",onSubmit:a(l),noValidate:!0,children:[b.jsx(Ki,{}),b.jsx(Zi,{})]})},Ki=({children:e})=>{const{lastHandle:t}=vn(),{factors:n,text:r}=Fe(),o=d.useMemo(()=>n.filter(a=>Bi(a)),[n]),i=d.useMemo(()=>Vi(n),[n]);return typeof e=="function"?b.jsx(b.Fragment,{children:e({factors:o,handleTypes:i})}):d.Children.count(e)>0?b.jsx(b.Fragment,{children:e}):i.length===1?b.jsx(b.Fragment,{children:b.jsx(ar,{factors:o,handleType:i[0],defaultValue:or(t,i[0])})}):b.jsx(Y_,{testId:"sid-handle-type-tabs",className:ut({marginY:"6"}),defaultValue:W9[t?.type??"email_address"],tabs:[...i.includes("email_address")?[{id:on.email,title:r["initial.handle.email"],content:b.jsx(ar,{factors:o,handleType:"email_address",defaultValue:or(t,"email_address")})}]:[],...i.includes("phone_number")?[{id:on.phone,title:r["initial.handle.phone"],content:b.jsx(ar,{factors:o,handleType:"phone_number",defaultValue:or(t,"phone_number")})}]:[],...i.includes("username")?[{id:on.username,title:r["initial.handle.username"],content:b.jsx(ar,{factors:o,handleType:"username",defaultValue:or(t,"username")})}]:[]]})};Ki.displayName="Input";const Zi=({children:e})=>{const{text:t}=Fe(),{status:n}=to();return typeof e=="function"?b.jsx(b.Fragment,{children:e({text:t,status:n})}):d.Children.count(e)>0?b.jsx(b.Fragment,{children:e}):b.jsx(Bt,{className:ut({marginTop:"6"}),type:"submit",variant:"primary",testId:"sid-form-initial-submit-button",disabled:n==="invalid",children:t["initial.submit"]})};Zi.displayName="Submit";const ar=({handleType:e,factors:t,defaultValue:n})=>{const{setSelectedFactor:r,submitPayloadRef:o,lastFactor:i}=vn(),a=d.useMemo(()=>d9(t,e).filter(v=>!vd(v)),[t,e]),{text:s,defaultCountryCode:c}=Fe(),{registerField:l,values:u,resetForm:m}=to(),h=a.length>1,p=f9(n??""),[g,f]=d.useState(qi(p?.countryCode??c)),w=d.useMemo(()=>i&&Bi(i)&&a.find(({method:v})=>i.method===v)?i:a[0],[a,i]);d.useEffect(()=>{r(w)},[w,r]),d.useEffect(()=>m,[m]),d.useEffect(()=>{o.current.flag=g},[g,o]),d.useEffect(()=>{const v=u[e];o.current={...o.current,handleType:e,handleValue:v}},[e,o,u]);const y=d.useMemo(()=>e==="phone_number"?b.jsx(Pb,{className:ut({marginTop:"4"}),id:`sid-input-${e}`,name:e,type:"tel",label:s["initial.handle.phone"],placeholder:s["initial.handle.phone.placeholder"],value:u[e]??"",flag:g,onChange:l(e,{defaultValue:p?.number,validator:v=>{if(!C9(v))return{message:s["validationError.phoneNumber"]}}}),onFlagChange:f}):e==="username"?b.jsx(Xa,{className:ut({marginTop:"4"}),id:`sid-input-${e}`,name:e,type:"text",label:s["initial.handle.username"],placeholder:s["initial.handle.username.placeholder"],value:u[e]??"",onChange:l(e,{defaultValue:n,validator:v=>{if(!S9(v))return{message:s["validationError.username"]}}})}):b.jsx(Xa,{className:ut({marginTop:"4"}),id:`sid-input-${e}`,name:e,type:"email",label:s["initial.handle.email"],placeholder:s["initial.handle.phone.email"]||s["initial.handle.email.placeholder"],value:u[e]??"",onChange:l(e,{defaultValue:n,validator:v=>{if(!k9(v))return{message:s["validationError.email"]}}})}),[g,e,s,l,u,n,p]);return b.jsxs(b.Fragment,{children:[h&&b.jsx(v_,{defaultValue:w.method,className:ut({marginBottom:"3",marginTop:"6"}),label:s["initial.authenticationMethod"],items:a.map(v=>({label:s[G9[v.method]],value:v.method})),onChange:v=>{const _=a.find(x=>x.method===v);r(_)},contentProps:{className:H9,position:"popper"}}),y,b.jsx($9,{name:e})]})};Fn.displayName="Controls";Fn.Input=Ki;Fn.Submit=Zi;const Yi=({children:e})=>{const{text:t}=Fe(),n=V.useMemo(()=>b.jsxs("div",{className:B9,children:[b.jsx(Er,{as:"h1",variant:{size:"2xl-title",weight:"bold"},t:"initial.title"}),b.jsx(Er,{variant:{color:"contrast",weight:"semibold"},as:"h2",t:"initial.subtitle"})]}),[]);return typeof e=="function"?b.jsx(b.Fragment,{children:e({text:t})}):V.Children.count(e)>0?b.jsx(b.Fragment,{children:e}):n};Yi.displayName="Header";const K9={google:b.jsx(Cb,{}),facebook:b.jsx(_b,{}),github:b.jsx(yb,{}),gitlab:b.jsx(xb,{}),line:b.jsx(kb,{}),bitbucket:b.jsx(vb,{}),azuread:b.jsx(wb,{}),okta:b.jsx(Sb,{}),apple:b.jsx(bb,{})},Z9={google:"Google",facebook:"Facebook",github:"GitHub",gitlab:"GitLab",line:"LINE",bitbucket:"Bitbucket",azuread:"Azure AD",okta:"Okta",apple:"Apple"};function Y9({provider:e,handleClick:t}){var n;const{text:r}=Fe();return(n=e.options)!=null&&n.provider_credentials_id?b.jsxs(Bt,{onClick:()=>t({method:"saml",options:e.options}),variant:"secondary",icon:b.jsx(J9,{logo:e.logo,id:e.options.provider_credentials_id}),className:te("sid-saml--button"),children:[r["initial.sso"],b.jsx("span",{className:F9,children:e.label||"SAML"})]}):null}function J9({logo:e,id:t}){return e?typeof e=="string"?b.jsx("img",{className:te("sid-sso-logo",`sid-sso-logo--${t}`,$s),src:e,alt:"SSO provider logo"}):b.jsx("div",{className:te("sid-sso-logo",`sid-sso-logo--${t}`,$s),children:e}):null}function X9({provider:e,handleClick:t}){var n,r,o;const{text:i}=Fe();return(n=e.options)!=null&&n.provider?b.jsxs(Bt,{onClick:()=>t({method:"oidc",options:e.options}),variant:"secondary",icon:K9[(r=e.options)==null?void 0:r.provider],className:te("sid-oidc--button"),children:[i["initial.oidc"],b.jsx("span",{className:U9,children:e.label||Z9[(o=e.options)==null?void 0:o.provider]})]}):null}function Sd({providers:e,handleClick:t}){return e.length?b.jsx("div",{className:te("sid-form-sso",ut({marginTop:"4"}),V9),children:e.map(n=>{var r,o;switch(n.method){case"oidc":return b.jsx(X9,{provider:n,handleClick:t},(r=n.options)==null?void 0:r.client_id);case"saml":return b.jsx(Y9,{provider:n,handleClick:t},(o=n.options)==null?void 0:o.provider_credentials_id);default:throw new Error("unsupported SSO method")}})}):null}const Ed=()=>{const{factors:e,text:t}=Fe(),n=d.useMemo(()=>u9(e),[e]);return b.jsx(b.Fragment,{children:n&&b.jsx(yl,{children:t["initial.divider"]})})},$d=({children:e})=>{const{factors:t}=Fe(),{handleSubmit:n}=vn(),r=t.filter(vd),o=V.useMemo(()=>b.jsx(Sd,{providers:r,handleClick:n}),[n,r]);return typeof e=="function"?b.jsx(b.Fragment,{children:e({factors:r,handleClick:n})}):V.Children.count(e)>0?b.jsx(b.Fragment,{children:e}):o};$d.displayName="OIDC";const Ji=({children:e})=>{const{factors:t}=Fe(),{handleSubmit:n}=vn(),r=t.filter(ni),o=V.useMemo(()=>b.jsx(Sd,{providers:r,handleClick:n}),[n,r]);return typeof e=="function"?b.jsx(b.Fragment,{children:e({factors:r,handleClick:n})}):V.Children.count(e)>0?b.jsx(b.Fragment,{children:e}):o};Ji.displayName="SSO";const _n=()=>b.jsxs("article",{"data-testid":"sid-form-initial-state",children:[b.jsx(Wi,{}),b.jsx(Yi,{}),b.jsx(Fn,{}),b.jsx(Ed,{}),b.jsx(Ji,{})]});_n.Logo=Wi;_n.Header=Yi;_n.Controls=Fn;_n.Divider=Ed;_n.OIDC=$d;_n.SSO=Ji;var Q9="sluhu72";const ey=d.forwardRef(({buttonClassName:e,...t},n)=>b.jsx(X_,{to:"sid-cookie-button",children:b.jsx(Bt,{...t,ref:n,testId:"sid-gdpr-consent-dialog-trigger",variant:"neutralMd",className:te("sid-gdpr-consent-dialog-trigger",Q9,e),children:b.jsx(Ib,{})})}));ey.displayName="TriggerButton";ut({marginBottom:"3",marginTop:"5"});const ty=e=>Object.entries(e),ny=new Set(Q_),ry={"--sid-color-primary":Sn,"--sid-color-primary-hover":Sn,"--sid-font-family":p9,"--sid-form-logo-width":ir,"--sid-form-border-radius":ir,"--sid-button-border-radius":ir,"--sid-color-foreground":Sn,"--sid-input-border-radius":ir,"--sid-input-border-color":Sn,"--sid-input-label-color":Sn},oy=e=>ty(e).filter(t=>ny.has(t[0])).reduce((t,[n,r])=>{if(r===void 0)return t;const o=ry[n](r);return o===null||(t[n]=o),t},{}),iy=e=>{const t=e.toString().match(eo);if(!t)return[];const n=t.map(r=>r.replaceAll(",","").replaceAll("'","").replaceAll('"',"").trim()).filter(r=>_d.has(r)).map(r=>`<link href="https://fonts.googleapis.com/css2?family=${r.replace(" ","+")}:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">`);return n.length?['<link rel="preconnect" href="https://fonts.googleapis.com">','<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>',...n.join(`
|
|
96
|
+
`)]:[]},ay={sanitiseCssVariableCustomisationConfig:oy,getGoogleFontImports:iy,..._9},Nt=e=>C.jsx(Ko,{...e});var sy="_1vg0oop0",cy="_1vg0oop1",ly="_1vg0oop2",Is="_1vg0oop3";function dy(){const{logo:e}=On();return C.jsx("div",{className:Is,children:typeof e=="string"?C.jsx("img",{src:e,alt:"logo",className:Is}):e})}function uy(){return C.jsx(Nt,{t:"footer.text",variant:{size:"xs",weight:"semibold",color:"placeholder"}})}function Id({children:e,className:t,header:n=C.jsx(dy,{}),footer:r=C.jsx(uy,{}),style:o}){return C.jsxs("article",{style:o,className:Ge(sy,t),children:[n&&C.jsx("header",{className:cy,children:n}),C.jsx("div",{children:e}),r&&C.jsx("footer",{className:ly,children:r})]})}const fy={"--sid-color-primary":"#DCDDE5"};function hy({type:e}){return e==="neutral"?C.jsx("div",{style:fy,children:C.jsx(qn,{variant:"primary",shouldAnimate:!1,children:C.jsx(Ga,{})})}):C.jsx(qn,{variant:e==="warning"?"blue":"red",shouldAnimate:!1,children:C.jsx(Ga,{})})}const py=e=>{switch(e){case"authentication_expired":return"error.title.authentication_expired";case"registration_already_completed":return"error.title.registration_already_completed"}return"error.title"},my=e=>{switch(e){case"authentication_expired":return"error.detail.authentication_expired";case"registration_already_completed":return"error.detail.registration_already_completed"}return"error.detail"};function ri({errorCode:e,type:t,redirectUri:n}){n&&window.location.replace(n);const r=py(e),o=my(e);return C.jsxs(C.Fragment,{children:[C.jsxs(Ei,{space:"0.25",children:[C.jsx(Nt,{as:"h1",t:r,variant:{size:"2xl-title",weight:"bold"}}),C.jsx(Nt,{as:"h2",t:o,variant:{color:"contrast",weight:"semibold"}})]}),C.jsx(hy,{type:t})]})}var gy="_8vopmj0",by="_8vopmj2";function wy(){const{language:e}=On();return d.useMemo(()=>J0(e),[e])}function vy(e){return`recover.password.validation.${e.failedRules[0].name}`}function _y({errorEvent:e,password:t}){const n=e.failedRules[0];let r="";if(n.matchType==="must_not_match"){const o=n.regexp.exec(t);r=o!==null?o[0]:""}return r?{ILLEGAL_SEQUENCE:r}:{}}function yy({message:e}){return C.jsx("span",{className:by,children:e})}function xy(){const e=wy(),{sdk:t}=On(),[n,r]=d.useState(""),[o,i]=d.useState(""),[a,s]=d.useState(null),[c,l]=d.useState("initial");d.useEffect(()=>{const p=g=>{s(ll(e(vy(g)),_y({errorEvent:g,password:n}))),l("initial")};return t?.subscribe("invalidPasswordSubmitted",p),()=>{t?.unsubscribe("invalidPasswordSubmitted",p)}},[e,t,n,s]);const u=p=>{if(p.preventDefault(),!!t){if(!n||n!==o){s(e("recover.password.validation.passwordsDoNotMatch"));return}t.publish("passwordSubmitted",n),l("submitting")}},m=p=>{r(p.target.value),s(null)},h=p=>{i(p.target.value),s(null)};return C.jsxs(C.Fragment,{children:[C.jsxs(Ei,{space:"0.25",children:[C.jsx(Ko,{as:"h1",variant:{size:"2xl-title",weight:"bold"},t:"recover.password.title"}),C.jsx(Ko,{variant:{color:"contrast",weight:"semibold"},as:"h2",t:"recover.password.details"})]}),C.jsxs("form",{onSubmit:u,children:[C.jsxs("div",{className:gy,children:[C.jsx(Wa,{id:"password-input",label:e("recover.password.input.password.label"),placeholder:e("recover.password.input.placeholder"),name:"password",value:n??"",onChange:m,error:!!a,autoComplete:"new-password"}),C.jsx(Wa,{id:"password-input-confirm",label:e("recover.password.input.confirmPassword.label"),placeholder:e("recover.password.input.placeholder"),name:"passwordConfirm",value:o??"",onChange:h,className:cl({marginTop:"4"}),error:!!a,autoComplete:"new-password"}),a&&C.jsx(yy,{message:a})]}),C.jsx(il,{type:"submit",variant:"primary",testId:"sid-form-initial-submit-button",disabled:c==="submitting",loading:c==="submitting",children:e("recover.password.submit")})]})]})}const Rs={sdkURL:"https://jump.slashid.local/sdk.html",baseURL:"https://api.slashid.local",environment:"local",sentryDSN:"https://6435e8a20ba8b61404fb4621d2aedd4a@o4505317722619904.ingest.sentry.io/4506275681075200",sentryEnabled:!1};async function Rd(e,t){const n=qd(e);{console.error(n),t&&console.log(`Error context: ${JSON.stringify(t)}`);return}}function qd(e){if(e instanceof Error)return e;let t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch{}return new Error(`This value was thrown as is, not through an Error: ${t}`)}function Cy(){return C.jsx(qn,{variant:"primary",children:C.jsx(ki,{})})}function ky({onSuccess:e,onError:t,flowType:n,onRedirectDiscovered:r}){const{sdk:o}=On(),i=d.useRef(!1);return d.useEffect(()=>{if(o)return r&&o?.subscribe("redirectUriDiscovered",r),()=>{r&&o.unsubscribe("redirectUriDiscovered",r)}},[o]),d.useEffect(()=>{if(i.current)return;async function a(){try{i.current=!0,await o?.getUserFromURL(),e()}catch(s){await Rd(s);const c=qd(s);t({error:c})}}a()},[o,t,e]),n==="password-recovery"?C.jsx(xy,{}):C.jsxs(C.Fragment,{children:[C.jsxs(Ei,{space:"0.25",children:[C.jsx(Nt,{as:"h1",variant:{size:"2xl-title",weight:"bold"},t:"initial.title"}),C.jsx(Nt,{variant:{color:"contrast",weight:"semibold"},as:"h2",t:"initial.details"})]}),C.jsx(Cy,{})]})}const Sy=()=>C.jsx(qn,{variant:"primary",children:C.jsx("svg",{width:"21",height:"18",viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.8505 0.705985C20.6342 1.38283 20.7209 2.56684 20.044 3.35055L8.16908 17.1005C7.80192 17.5256 7.2635 17.7637 6.70195 17.7493C6.1404 17.7349 5.61489 17.4695 5.27002 17.0261L0.895049 11.4011C0.259296 10.5837 0.406547 9.4057 1.22394 8.76995C2.04134 8.13419 3.21935 8.28145 3.8551 9.09884L6.82592 12.9185L17.2059 0.89949C17.8828 0.115778 19.0668 0.0291434 19.8505 0.705985Z",fill:"white"})})}),Ey=4e3;function $y({redirectUri:e,autoClose:t=!1}={}){const[n,r]=d.useState(t?"autoclose":"default");return e&&window.location.replace(e),d.useEffect(()=>{if(t){const o=setTimeout(()=>{try{window.close()}catch{}finally{r("failed-autoclose")}},Ey);return()=>{clearTimeout(o)}}},[t]),C.jsxs("article",{"data-testid":"sid-form-success-state",children:[C.jsx(Nt,{as:"h1",t:"success.title",variant:{size:"2xl-title",weight:"bold"}}),C.jsx(Nt,{as:"h2",t:n==="autoclose"?"success.details.autoclose":"success.details.default",variant:{color:"contrast",weight:"semibold"}}),C.jsx(Sy,{})]})}const Iy={"--sid-color-primary":"#DCDDE5"};function qs(){return C.jsx("div",{style:Iy,children:C.jsx(qn,{variant:"primary",children:C.jsx(ki,{})})})}const Ry=async e=>{if(await Ve.isPersonExistsError(e.error))return"registration_already_completed";if(await Ve.isTimeoutError(e.error))return"authentication_expired"};function qy(e){return e.some(t=>t.type==="password_reset")}function Dy(e){const t=e.find(n=>n.type==="ui_customization");if(t)return t}function Ay(e){return e.options?.authn_redirect_page_ui_config}function Ty(e){return qy(e)?"password-recovery":"catch-all"}function zy(e){if(!e||!e["--sid-font-family"])return;const t=ay.getGoogleFontImports(e["--sid-font-family"]);t.length&&document.head.insertAdjacentHTML("beforeend",t.join(""))}function Ly(){const[e,t]=d.useState({state:"initial"}),[n,r]=d.useState(void 0),{sdk:o,state:i,setLogo:a}=On();d.useEffect(()=>{if(e.state!=="initial")return;async function v(){if(!o)return;t({state:"parsing-url"});let _=[];try{_=await o.getChallengesFromURL()}catch(I){Rd(I)}if(!_||_.length===0){t({state:"no-challenges",challenges:null});return}const x=Dy(_);if(x){const I=Ay(x);I&&(zy(I.themeVars),r(I),I.logoUrl&&a(I.logoUrl))}const S=Ty(_);t({state:"progress",challenges:_,flowType:S})}v()},[i,e.state,o]);const s=d.useCallback(()=>{e.state==="progress"&&t({state:"success",challenges:e.challenges,flowType:e.flowType})},[e]),c=d.useCallback(({error:v})=>{e.state==="progress"&&t({state:"error",challenges:e.challenges,flowType:e.flowType,error:v})},[e]),[l,u]=d.useState(void 0),m=v=>{u(v.redirectUri)},[h,p]=d.useState(null);d.useEffect(()=>{(async()=>{if(i==="ready")switch(e.state){case"no-challenges":case"progress":case"success":{p(void 0);break}case"error":{p(await Ry(e));break}}})()},[i,e.state]);const g=h!==null,w=d.useMemo(()=>["success","error"].includes(e.state),[e.state])&&!g,y=d.useCallback(({children:v=C.jsx(C.Fragment,{})})=>C.jsx(Id,{style:{...n?.themeVars&&n.themeVars},...n?.showBadge===!1&&{footer:C.jsx(C.Fragment,{})},children:v}),[n]);return i!=="ready"||e.state==="initial"?C.jsx(qs,{}):e.state==="no-challenges"?C.jsx("div",{style:{textAlign:"center"},children:C.jsx(ri,{type:"neutral"})}):e.state==="parsing-url"?C.jsx(qs,{}):e.state==="progress"||w?C.jsx(y,{children:C.jsx(ky,{onSuccess:s,onError:c,flowType:e.flowType,onRedirectDiscovered:m})}):e.state==="success"?C.jsx(y,{children:C.jsx($y,{redirectUri:l,autoClose:n?.autoClose})}):e.state==="error"&&g?C.jsx(y,{children:C.jsx(ri,{type:"error",errorCode:h,redirectUri:l})}):C.jsx(y,{})}var Py="d0vxn40";function Zy(){const e=nl(),[t,n]=d.useState("initial"),[r,o]=d.useState(C.jsx(al,{})),i=d.useRef(void 0);d.useEffect(()=>{t==="initial"&&(i.current=new br({analyticsEnabled:!1,sdkURL:Rs.sdkURL,baseURL:Rs.baseURL}),n("ready"))},[t]);const a=d.useMemo(()=>!e||t=="initial"?ul:{logo:r,language:Y0(),state:t,sdk:i.current,setLogo:o},[t,e,r]);return C.jsx(p0,{theme:"light",children:C.jsx(Ci,{fallback:C.jsx(Id,{children:C.jsx(ri,{type:"error"})}),children:C.jsx(fl.Provider,{value:a,children:C.jsx(K0,{text:dl[a.language],children:C.jsx("main",{className:Py,children:C.jsx(Ly,{})})})})})})}export{Zy as App};
|