authhero 4.40.0 → 4.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/u/js/client.js +1 -1
- package/dist/assets/u/widget/authhero-widget.esm.js +1 -1
- package/dist/assets/u/widget/index.esm.js +1 -1
- package/dist/assets/u/widget/p-a4fd5f18.entry.js +1 -0
- package/dist/assets/u/widget/p-df99a4ad.entry.js +1 -0
- package/dist/authhero.cjs +192 -72
- package/dist/authhero.d.ts +2750 -247
- package/dist/authhero.mjs +16055 -14898
- package/dist/client.js +1 -1
- package/dist/stats.html +34 -33
- package/package.json +4 -4
- package/dist/assets/u/widget/p-1107d60e.entry.js +0 -1
- package/dist/assets/u/widget/p-5e699de4.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var Ke={Stringify:1},b=(e,t)=>{const n=new String(e);return n.isEscaped=!0,n.callbacks=t,n},We=/[&<>'"]/,Ue=async(e,t)=>{let n="";t||=[];const r=await Promise.all(e);for(let a=r.length-1;n+=r[a],a--,!(a<0);a--){let i=r[a];typeof i=="object"&&t.push(...i.callbacks||[]);const s=i.isEscaped;if(i=await(typeof i=="object"?i.toString():i),typeof i=="object"&&t.push(...i.callbacks||[]),i.isEscaped??s)n+=i;else{const o=[n];A(i,o),n=o[0]}}return b(n,t)},A=(e,t)=>{const n=e.search(We);if(n===-1){t[0]+=e;return}let r,a,i=0;for(a=n;a<e.length;a++){switch(e.charCodeAt(a)){case 34:r=""";break;case 39:r="'";break;case 38:r="&";break;case 60:r="<";break;case 62:r=">";break;default:continue}t[0]+=e.substring(i,a)+r,i=a+1}t[0]+=e.substring(i,a)},Ve=e=>{const t=e.callbacks;if(!t?.length)return e;const n=[e],r={};return t.forEach(a=>a({phase:Ke.Stringify,buffer:n,context:r})),n[0]},ee=Symbol("RENDERER"),G=Symbol("ERROR_HANDLER"),v=Symbol("STASH"),Ie=Symbol("INTERNAL"),Ze=Symbol("MEMO"),F=Symbol("PERMALINK"),fe=e=>(e[Ie]=!0,e),Te=e=>({value:t,children:n})=>{if(!n)return;const r={children:[{tag:fe(()=>{e.push(t)}),props:{}}]};Array.isArray(n)?r.children.push(...n.flat()):r.children.push(n),r.children.push({tag:fe(()=>{e.pop()}),props:{}});const a={tag:"",props:r,type:""};return a[G]=i=>{throw e.pop(),i},a},Le=e=>{const t=[e],n=Te(t);return n.values=t,n.Provider=n,C.push(n),n},C=[],Pe=e=>{const t=[e],n=(r=>{t.push(r.value);let a;try{a=r.children?(Array.isArray(r.children)?new $e("",{},r.children):r.children).toString():""}catch(i){throw t.pop(),i}return a instanceof Promise?a.finally(()=>t.pop()).then(i=>b(i,i.callbacks)):(t.pop(),b(a))});return n.values=t,n.Provider=n,n[ee]=Te(t),C.push(n),n},T=e=>e.values.at(-1),x={title:[],script:["src"],style:["data-href"],link:["href"],meta:["name","httpEquiv","charset","itemProp"]},Y={},_="data-precedence",M=e=>Array.isArray(e)?e:[e],ue=new WeakMap,de=(e,t,n,r)=>({buffer:a,context:i})=>{if(!a)return;const s=ue.get(i)||{};ue.set(i,s);const o=s[e]||=[];let u=!1;const l=x[e];if(l.length>0){e:for(const[,f]of o)for(const c of l)if((f?.[c]??null)===n?.[c]){u=!0;break e}}if(u?a[0]=a[0].replaceAll(t,""):l.length>0?o.push([t,n,r]):o.unshift([t,n,r]),a[0].indexOf("</head>")!==-1){let f;if(r===void 0)f=o.map(([c])=>c);else{const c=[];f=o.map(([d,,p])=>{let y=c.indexOf(p);return y===-1&&(c.push(p),y=c.length-1),[d,y]}).sort((d,p)=>d[1]-p[1]).map(([d])=>d)}f.forEach(c=>{a[0]=a[0].replaceAll(c,"")}),a[0]=a[0].replace(/(?=<\/head>)/,f.join(""))}},D=(e,t,n)=>b(new w(e,n,M(t??[])).toString()),$=(e,t,n,r)=>{if("itemProp"in n)return D(e,t,n);let{precedence:a,blocking:i,...s}=n;a=r?a??"":void 0,r&&(s[_]=a);const o=new w(e,s,M(t||[])).toString();return o instanceof Promise?o.then(u=>b(o,[...u.callbacks||[],de(e,u,s,a)])):b(o,[de(e,o,s,a)])},ze=({children:e,...t})=>{const n=te();if(n){const r=T(n);if(r==="svg"||r==="head")return new w("title",t,M(e??[]))}return $("title",e,t,!1)},Je=({children:e,...t})=>{const n=te();return["src","async"].some(r=>!t[r])||n&&T(n)==="head"?D("script",e,t):$("script",e,t,!1)},Xe=({children:e,...t})=>["href","precedence"].every(n=>n in t)?(t["data-href"]=t.href,delete t.href,$("style",e,t,!0)):D("style",e,t),Ge=({children:e,...t})=>["onLoad","onError"].some(n=>n in t)||t.rel==="stylesheet"&&(!("precedence"in t)||"disabled"in t)?D("link",e,t):$("link",e,t,"precedence"in t),Ye=({children:e,...t})=>{const n=te();return n&&T(n)==="head"?D("meta",e,t):$("meta",e,t,!1)},Ne=(e,{children:t,...n})=>new w(e,n,M(t??[])),Qe=e=>(typeof e.action=="function"&&(e.action=F in e.action?e.action[F]:void 0),Ne("form",e)),Me=(e,t)=>(typeof t.formAction=="function"&&(t.formAction=F in t.formAction?t.formAction[F]:void 0),Ne(e,t)),et=e=>Me("input",e),tt=e=>Me("button",e);const V=Object.freeze(Object.defineProperty({__proto__:null,button:tt,form:Qe,input:et,link:Ge,meta:Ye,script:Je,style:Xe,title:ze},Symbol.toStringTag,{value:"Module"}));var nt=new Map([["className","class"],["htmlFor","for"],["crossOrigin","crossorigin"],["httpEquiv","http-equiv"],["itemProp","itemprop"],["fetchPriority","fetchpriority"],["noModule","nomodule"],["formAction","formaction"]]),q=e=>nt.get(e)||e,De=(e,t)=>{for(const[n,r]of Object.entries(e)){const a=n[0]==="-"||!/[A-Z]/.test(n)?n:n.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`);t(a,r==null?null:typeof r=="number"?a.match(/^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/)?`${r}`:`${r}px`:r)}},P=void 0,te=()=>P,rt=e=>/[A-Z]/.test(e)&&e.match(/^(?:al|basel|clip(?:Path|Rule)$|co|do|fill|fl|fo|gl|let|lig|i|marker[EMS]|o|pai|pointe|sh|st[or]|text[^L]|tr|u|ve|w)/)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e,at=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],it=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],ne=(e,t)=>{for(let n=0,r=e.length;n<r;n++){const a=e[n];if(typeof a=="string")A(a,t);else{if(typeof a=="boolean"||a===null||a===void 0)continue;a instanceof w?a.toStringToBuffer(t):typeof a=="number"||a.isEscaped?t[0]+=a:a instanceof Promise?t.unshift("",a):ne(a,t)}}},w=class{tag;props;key;children;isEscaped=!0;localContexts;constructor(e,t,n){this.tag=e,this.props=t,this.children=n}get type(){return this.tag}get ref(){return this.props.ref||null}toString(){const e=[""];this.localContexts?.forEach(([t,n])=>{t.values.push(n)});try{this.toStringToBuffer(e)}finally{this.localContexts?.forEach(([t])=>{t.values.pop()})}return e.length===1?"callbacks"in e?Ve(b(e[0],e.callbacks)).toString():e[0]:Ue(e,e.callbacks)}toStringToBuffer(e){const t=this.tag,n=this.props;let{children:r}=this;e[0]+=`<${t}`;const a=P&&T(P)==="svg"?i=>rt(q(i)):i=>q(i);for(let[i,s]of Object.entries(n))if(i=a(i),i!=="children"){if(i==="style"&&typeof s=="object"){let o="";De(s,(u,l)=>{l!=null&&(o+=`${o?";":""}${u}:${l}`)}),e[0]+=' style="',A(o,e),e[0]+='"'}else if(typeof s=="string")e[0]+=` ${i}="`,A(s,e),e[0]+='"';else if(s!=null)if(typeof s=="number"||s.isEscaped)e[0]+=` ${i}="${s}"`;else if(typeof s=="boolean"&&it.includes(i))s&&(e[0]+=` ${i}=""`);else if(i==="dangerouslySetInnerHTML"){if(r.length>0)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");r=[b(s.__html)]}else if(s instanceof Promise)e[0]+=` ${i}="`,e.unshift('"',s);else if(typeof s=="function"){if(!i.startsWith("on")&&i!=="ref")throw new Error(`Invalid prop '${i}' of type 'function' supplied to '${t}'.`)}else e[0]+=` ${i}="`,A(s.toString(),e),e[0]+='"'}if(at.includes(t)&&r.length===0){e[0]+="/>";return}e[0]+=">",ne(r,e),e[0]+=`</${t}>`}},Z=class extends w{toStringToBuffer(e){const{children:t}=this,n={...this.props};t.length&&(n.children=t.length===1?t[0]:t);const r=this.tag.call(null,n);if(!(typeof r=="boolean"||r==null))if(r instanceof Promise)if(C.length===0)e.unshift("",r);else{const a=C.map(i=>[i,i.values.at(-1)]);e.unshift("",r.then(i=>(i instanceof w&&(i.localContexts=a),i)))}else r instanceof w?r.toStringToBuffer(e):typeof r=="number"||r.isEscaped?(e[0]+=r,r.callbacks&&(e.callbacks||=[],e.callbacks.push(...r.callbacks))):A(r,e)}},$e=class extends w{toStringToBuffer(e){ne(this.children,e)}},ve=!1,z=(e,t,n)=>{if(!ve){for(const r in Y)V[r][ee]=Y[r];ve=!0}return typeof e=="function"?new Z(e,t,n):V[e]?new Z(V[e],t,n):e==="svg"||e==="head"?(P||=Pe(""),new w(e,t,[new Z(P,{value:e},n)])):new w(e,t,n)},st=({children:e})=>new $e("",{children:e},Array.isArray(e)?e:e?[e]:[]);function O(e,t,n){let r;if(!t||!("children"in t))r=z(e,t,[]);else{const a=t.children;r=Array.isArray(a)?z(e,t,a):z(e,t,[a])}return r.key=n,r}var N="_hp",ot={Change:"Input",DoubleClick:"DblClick"},lt={svg:"2000/svg",math:"1998/Math/MathML"},k=[],Q=new WeakMap,I=void 0,ct=()=>I,S=e=>"t"in e,J={onClick:["click",!1]},pe=e=>{if(!e.startsWith("on"))return;if(J[e])return J[e];const t=e.match(/^on([A-Z][a-zA-Z]+?(?:PointerCapture)?)(Capture)?$/);if(t){const[,n,r]=t;return J[e]=[(ot[n]||n).toLowerCase(),!!r]}},he=(e,t)=>I&&e instanceof SVGElement&&/[A-Z]/.test(t)&&(t in e.style||t.match(/^(?:o|pai|str|u|ve)/))?t.replace(/([A-Z])/g,"-$1").toLowerCase():t,ft=(e,t,n)=>{t||={};for(let r in t){const a=t[r];if(r!=="children"&&(!n||n[r]!==a)){r=q(r);const i=pe(r);if(i){if(n?.[r]!==a&&(n&&e.removeEventListener(i[0],n[r],i[1]),a!=null)){if(typeof a!="function")throw new Error(`Event handler for "${r}" is not a function`);e.addEventListener(i[0],a,i[1])}}else if(r==="dangerouslySetInnerHTML"&&a)e.innerHTML=a.__html;else if(r==="ref"){let s;typeof a=="function"?s=a(e)||(()=>a(null)):a&&"current"in a&&(a.current=e,s=()=>a.current=null),Q.set(e,s)}else if(r==="style"){const s=e.style;typeof a=="string"?s.cssText=a:(s.cssText="",a!=null&&De(a,s.setProperty.bind(s)))}else{if(r==="value"){const o=e.nodeName;if(o==="INPUT"||o==="TEXTAREA"||o==="SELECT"){if(e.value=a==null||a===!1?null:a,o==="TEXTAREA"){e.textContent=a;continue}else if(o==="SELECT"){e.selectedIndex===-1&&(e.selectedIndex=0);continue}}}else(r==="checked"&&e.nodeName==="INPUT"||r==="selected"&&e.nodeName==="OPTION")&&(e[r]=a);const s=he(e,r);a==null||a===!1?e.removeAttribute(s):a===!0?e.setAttribute(s,""):typeof a=="string"||typeof a=="number"?e.setAttribute(s,a):e.setAttribute(s,a.toString())}}}if(n)for(let r in n){const a=n[r];if(r!=="children"&&!(r in t)){r=q(r);const i=pe(r);i?e.removeEventListener(i[0],a,i[1]):r==="ref"?Q.get(e)?.():e.removeAttribute(he(e,r))}}},ut=(e,t)=>{t[v][0]=0,k.push([e,t]);const n=t.tag[ee]||t.tag,r=n.defaultProps?{...n.defaultProps,...t.props}:t.props;try{return[n.call(null,r)]}finally{k.pop()}},Re=(e,t,n,r,a)=>{e.vR?.length&&(r.push(...e.vR),delete e.vR),typeof e.tag=="function"&&e[v][1][ae]?.forEach(i=>a.push(i)),e.vC.forEach(i=>{if(S(i))n.push(i);else if(typeof i.tag=="function"||i.tag===""){i.c=t;const s=n.length;if(Re(i,t,n,r,a),i.s){for(let o=s;o<n.length;o++)n[o].s=!0;i.s=!1}}else n.push(i),i.vR?.length&&(r.push(...i.vR),delete i.vR)})},dt=e=>{for(;e&&(e.tag===N||!e.e);)e=e.tag===N||!e.vC?.[0]?e.nN:e.vC[0];return e?.e},Oe=e=>{S(e)||(e[v]?.[1][ae]?.forEach(t=>t[2]?.()),Q.get(e.e)?.(),e.p===2&&e.vC?.forEach(t=>t.p=2),e.vC?.forEach(Oe)),e.p||(e.e?.remove(),delete e.e),typeof e.tag=="function"&&(L.delete(e),B.delete(e),delete e[v][3],e.a=!0)},re=(e,t,n)=>{e.c=t,xe(e,t,n)},ge=(e,t)=>{if(t){for(let n=0,r=e.length;n<r;n++)if(e[n]===t)return n}},me=Symbol(),xe=(e,t,n)=>{const r=[],a=[],i=[];Re(e,t,r,a,i),a.forEach(Oe);const s=n?void 0:t.childNodes;let o,u=null;if(n)o=-1;else if(!s.length)o=0;else{const l=ge(s,dt(e.nN));l!==void 0?(u=s[l],o=l):o=ge(s,r.find(f=>f.tag!==N&&f.e)?.e)??-1,o===-1&&(n=!0)}for(let l=0,f=r.length;l<f;l++,o++){const c=r[l];let d;if(c.s&&c.e)d=c.e,c.s=!1;else{const p=n||!c.e;S(c)?(c.e&&c.d&&(c.e.textContent=c.t),c.d=!1,d=c.e||=document.createTextNode(c.t)):(d=c.e||=c.n?document.createElementNS(c.n,c.tag):document.createElement(c.tag),ft(d,c.props,c.pP),xe(c,d,p))}c.tag===N?o--:n?d.parentNode||t.appendChild(d):s[o]!==d&&s[o-1]!==d&&(s[o+1]===d?t.appendChild(s[o]):t.insertBefore(d,u||s[o]||null))}if(e.pP&&(e.pP=void 0),i.length){const l=[],f=[];i.forEach(([,c,,d,p])=>{c&&l.push(c),d&&f.push(d),p?.()}),l.forEach(c=>c()),f.length&&requestAnimationFrame(()=>{f.forEach(c=>c())})}},vt=(e,t)=>!!(e&&e.length===t.length&&e.every((n,r)=>n[1]===t[r][1])),B=new WeakMap,K=(e,t,n)=>{const r=!n&&t.pC;n&&(t.pC||=t.vC);let a;try{n||=typeof t.tag=="function"?ut(e,t):M(t.props.children),n[0]?.tag===""&&n[0][G]&&(a=n[0][G],e[5].push([e,a,t]));const i=r?[...t.pC]:t.vC?[...t.vC]:void 0,s=[];let o;for(let u=0;u<n.length;u++){Array.isArray(n[u])&&n.splice(u,1,...n[u].flat());let l=_e(n[u]);if(l){typeof l.tag=="function"&&!l.tag[Ie]&&(C.length>0&&(l[v][2]=C.map(c=>[c,c.values.at(-1)])),e[5]?.length&&(l[v][3]=e[5].at(-1)));let f;if(i&&i.length){const c=i.findIndex(S(l)?d=>S(d):l.key!==void 0?d=>d.key===l.key&&d.tag===l.tag:d=>d.tag===l.tag);c!==-1&&(f=i[c],i.splice(c,1))}if(f)if(S(l))f.t!==l.t&&(f.t=l.t,f.d=!0),l=f;else{const c=f.pP=f.props;if(f.props=l.props,f.f||=l.f||t.f,typeof l.tag=="function"){const d=f[v][2];f[v][2]=l[v][2]||[],f[v][3]=l[v][3],!f.f&&((f.o||f)===l.o||f.tag[Ze]?.(c,f.props))&&vt(d,f[v][2])&&(f.s=!0)}l=f}else if(!S(l)&&I){const c=T(I);c&&(l.n=c)}if(!S(l)&&!l.s&&(K(e,l),delete l.f),s.push(l),o&&!o.s&&!l.s)for(let c=o;c&&!S(c);c=c.vC?.at(-1))c.nN=l;o=l}}t.vR=r?[...t.vC,...i||[]]:i||[],t.vC=s,r&&delete t.pC}catch(i){if(t.f=!0,i===me){if(a)return;throw i}const[s,o,u]=t[v]?.[3]||[];if(o){const l=()=>H([0,!1,e[2]],u),f=B.get(u)||[];f.push(l),B.set(u,f);const c=o(i,()=>{const d=B.get(u);if(d){const p=d.indexOf(l);if(p!==-1)return d.splice(p,1),l()}});if(c){if(e[0]===1)e[1]=!0;else if(K(e,u,[c]),(o.length===1||e!==s)&&u.c){re(u,u.c,!1);return}throw me}}throw i}finally{a&&e[5].pop()}},_e=e=>{if(!(e==null||typeof e=="boolean")){if(typeof e=="string"||typeof e=="number")return{t:e.toString(),d:!0};if("vR"in e&&(e={tag:e.tag,props:e.props,key:e.key,f:e.f,type:e.tag,ref:e.props.ref,o:e.o||e}),typeof e.tag=="function")e[v]=[0,[]];else{const t=lt[e.tag];t&&(I||=Le(""),e.props.children=[{tag:I,props:{value:e.n=`http://www.w3.org/${t}`,children:e.props.children}}])}return e}},Be=(e,t,n)=>{e.c===t&&(e.c=n,e.vC.forEach(r=>Be(r,t,n)))},ye=(e,t)=>{t[v][2]?.forEach(([n,r])=>{n.values.push(r)});try{K(e,t,void 0)}catch{return}if(t.a){delete t.a;return}t[v][2]?.forEach(([n])=>{n.values.pop()}),(e[0]!==1||!e[1])&&re(t,t.c,!1)},L=new WeakMap,Ee=[],H=async(e,t)=>{e[5]||=[];const n=L.get(t);n&&n[0](void 0);let r;const a=new Promise(i=>r=i);if(L.set(t,[r,()=>{e[2]?e[2](e,t,i=>{ye(i,t)}).then(()=>r(t)):(ye(e,t),r(t))}]),Ee.length)Ee.at(-1).add(t);else{await Promise.resolve();const i=L.get(t);i&&(L.delete(t),i[1]())}return a},pt=(e,t)=>{const n=[];n[5]=[],n[4]=!0,K(n,e,void 0),n[4]=!1;const r=document.createDocumentFragment();re(e,r,!0),Be(e,r,t),t.replaceChildren(r)},ht=(e,t,n)=>({tag:N,props:{children:e},key:n,e:t,p:1}),gt=0,ae=1,mt=2,yt=3,X=new WeakMap,ie=(e,t)=>!e||!t||e.length!==t.length||t.some((n,r)=>n!==e[r]),Et=void 0,we=[],He=e=>{const t=()=>typeof e=="function"?e():e,n=k.at(-1);if(!n)return[t(),()=>{}];const[,r]=n,a=r[v][1][gt]||=[],i=r[v][0]++;return a[i]||=[t(),s=>{const o=Et,u=a[i];if(typeof s=="function"&&(s=s(u[0])),!Object.is(s,u[0]))if(u[0]=s,we.length){const[l,f]=we.at(-1);Promise.all([l===3?r:H([l,!1,o],r),f]).then(([c])=>{if(!c||!(l===2||l===3))return;const d=c.vC;requestAnimationFrame(()=>{setTimeout(()=>{d===c.vC&&H([l===3?1:0,!1,o],c)})})})}else H([0,!1,o],r)}]},wt=(e,t,n)=>{const r=k.at(-1);if(!r)return;const[,a]=r,i=a[v][1][ae]||=[],s=a[v][0]++,[o,,u]=i[s]||=[];if(ie(o,n)){u&&u();const l=()=>{f[e]=void 0,f[2]=t()},f=[n,void 0,void 0,void 0,void 0];f[e]=l,i[s]=f}},je=(e,t)=>wt(3,e,t),se=(e,t)=>{const n=k.at(-1);if(!n)return e;const[,r]=n,a=r[v][1][mt]||=[],i=r[v][0]++,s=a[i];return ie(s?.[1],t)?a[i]=[e,t]:e=a[i][0],e},St=e=>{const t=X.get(e);if(t){if(t.length===2)throw t[1];return t[0]}throw e.then(n=>X.set(e,[n]),n=>X.set(e,[void 0,n])),e},bt=(e,t)=>{const n=k.at(-1);if(!n)return e();const[,r]=n,a=r[v][1][yt]||=[],i=r[v][0]++,s=a[i];return ie(s?.[1],t)&&(a[i]=[e(),t]),a[i][0]},At=Le({pending:!1,data:null,method:null,action:null}),Se=new Set,Ct=e=>{Se.add(e),e.finally(()=>Se.delete(e))},oe=(e,t)=>bt(()=>n=>{let r;e&&(typeof e=="function"?r=e(n)||(()=>{e(null)}):e&&"current"in e&&(e.current=n,r=()=>{e.current=null}));const a=t(n);return()=>{a?.(),r?.()}},[e]),be=Object.create(null),Ae=Object.create(null),R=(e,t,n,r,a)=>{if(t?.itemProp)return{tag:e,props:t,type:e,ref:t.ref};const i=document.head;let{onLoad:s,onError:o,precedence:u,blocking:l,...f}=t,c=null,d=!1;const p=x[e];let y;if(p.length>0){const g=i.querySelectorAll(e);e:for(const m of g)for(const h of x[e])if(m.getAttribute(h)===t[h]){c=m;break e}if(!c){const m=p.reduce((h,E)=>t[E]===void 0?h:`${h}-${E}-${t[E]}`,e);d=!Ae[m],c=Ae[m]||=(()=>{const h=document.createElement(e);for(const E of p)t[E]!==void 0&&h.setAttribute(E,t[E]),t.rel&&h.setAttribute("rel",t.rel);return h})()}}else y=i.querySelectorAll(e);u=r?u??"":void 0,r&&(f[_]=u);const le=se(g=>{if(p.length>0){let m=!1;for(const h of i.querySelectorAll(e)){if(m&&h.getAttribute(_)!==u){i.insertBefore(g,h);return}h.getAttribute(_)===u&&(m=!0)}i.appendChild(g)}else if(y){let m=!1;for(const h of y)if(h===g){m=!0;break}m||i.insertBefore(g,i.contains(y[0])?y[0]:i.querySelector(e)),y=void 0}},[u]),ce=oe(t.ref,g=>{const m=p[0];if(n===2&&(g.innerHTML=""),(d||y)&&le(g),!o&&!s)return;let h=be[g.getAttribute(m)]||=new Promise((E,U)=>{g.addEventListener("load",E),g.addEventListener("error",U)});s&&(h=h.then(s)),o&&(h=h.catch(o)),h.catch(()=>{})});if(a&&l==="render"){const g=x[e][0];if(t[g]){const m=t[g],h=be[m]||=new Promise((E,U)=>{le(c),c.addEventListener("load",E),c.addEventListener("error",U)});St(h)}}const W={tag:e,type:e,props:{...f,ref:ce},ref:ce};return W.p=n,c&&(W.e=c),ht(W,i)},kt=e=>{const t=ct();return(t&&T(t))?.endsWith("svg")?{tag:"title",props:e,type:"title",ref:e.ref}:R("title",e,void 0,!1,!1)},It=e=>!e||["src","async"].some(t=>!e[t])?{tag:"script",props:e,type:"script",ref:e.ref}:R("script",e,1,!1,!0),Tt=e=>!e||!["href","precedence"].every(t=>t in e)?{tag:"style",props:e,type:"style",ref:e.ref}:(e["data-href"]=e.href,delete e.href,R("style",e,2,!0,!0)),Lt=e=>!e||["onLoad","onError"].some(t=>t in e)||e.rel==="stylesheet"&&(!("precedence"in e)||"disabled"in e)?{tag:"link",props:e,type:"link",ref:e.ref}:R("link",e,1,"precedence"in e,!0),Pt=e=>R("meta",e,void 0,!1,!1),Fe=Symbol(),Nt=e=>{const{action:t,...n}=e;typeof t!="function"&&(n.action=t);const[r,a]=He([null,!1]),i=se(async l=>{const f=l.isTrusted?t:l.detail[Fe];if(typeof f!="function")return;l.preventDefault();const c=new FormData(l.target);a([c,!0]);const d=f(c);d instanceof Promise&&(Ct(d),await d),a([null,!0])},[]),s=oe(e.ref,l=>(l.addEventListener("submit",i),()=>{l.removeEventListener("submit",i)})),[o,u]=r;return r[1]=!1,{tag:At,props:{value:{pending:o!==null,data:o,method:o?"post":null,action:o?t:null},children:{tag:"form",props:{...n,ref:s},type:"form",ref:s}},f:u}},qe=(e,{formAction:t,...n})=>{if(typeof t=="function"){const r=se(a=>{a.preventDefault(),a.currentTarget.form.dispatchEvent(new CustomEvent("submit",{detail:{[Fe]:t}}))},[]);n.ref=oe(n.ref,a=>(a.addEventListener("click",r),()=>{a.removeEventListener("click",r)}))}return{tag:e,props:n,type:e,ref:n.ref}},Mt=e=>qe("input",e),Dt=e=>qe("button",e);Object.assign(Y,{title:kt,script:It,style:Tt,link:Lt,meta:Pt,form:Nt,input:Mt,button:Dt});Pe(null);new TextEncoder;var $t=(e,t={})=>{let n;return Object.keys(t).length>0&&console.warn("createRoot options are not supported yet"),{render(r){if(n===null)throw new Error("Cannot update an unmounted root");n?n(r):pt(_e({tag:()=>{const[a,i]=He(r);return n=i,a},props:{}}),e)},unmount(){n?.(null),n=null}}},Rt=(e,t,n={})=>{const r=$t(e,n);return r.render(t),r};function Ot(){return je(()=>{const e=document.querySelectorAll("form"),t=[];return e.forEach(n=>{const r=i=>{if(i.defaultPrevented)return;const s=i.submitter;s&&s.type==="submit"&&(s.classList.add("is-loading"),s.disabled=!0)};n.addEventListener("submit",r);const a=i=>{i.persisted&&n.querySelectorAll("button[type=submit]").forEach(o=>{o.classList.remove("is-loading"),o.disabled=!1})};window.addEventListener("pageshow",a),t.push(()=>{n.removeEventListener("submit",r),window.removeEventListener("pageshow",a)})}),()=>{t.forEach(n=>n())}},[]),null}function xt(){return je(()=>{const e=document.querySelectorAll("[data-password-toggle]"),t=[];return e.forEach(n=>{const r=n.querySelector("input[type='password'], input[data-password-input]"),a=n.querySelector("[data-password-toggle-btn]"),i=a?.querySelector("[data-show-icon]"),s=a?.querySelector("[data-hide-icon]");if(!r||!a||!i||!s)return;const o=l=>{l?(r.type="text",r.setAttribute("data-password-input","text"),i.classList.add("hidden"),s.classList.remove("hidden")):(r.type="password",r.setAttribute("data-password-input","password"),s.classList.add("hidden"),i.classList.remove("hidden"))},u=l=>{l.preventDefault();const f=r.type==="password";o(f)};a.addEventListener("click",u),t.push(()=>{a.removeEventListener("click",u)})}),()=>{t.forEach(n=>n())}},[]),null}function _t(){return document.querySelectorAll("[data-input-otp-container]").forEach(t=>{const n=Array.from(t.querySelectorAll("[data-input-otp-slot]"));if(!n.length)return;const r=t.closest("form");let a=null;if(r&&n.length>0){const o=n[0]?.getAttribute("name");o&&(a=r.querySelector(`input[name="${o}"][type="hidden"]`),a||(a=document.createElement("input"),a.type="hidden",a.name=o,r.appendChild(a)),n.forEach(u=>u.removeAttribute("name")))}const i=()=>{if(a){const s=n.map(o=>o.value).join("");a.value=s,s.length===n.length&&r&&setTimeout(()=>{r.requestSubmit()},100)}};n.forEach((s,o)=>{s.addEventListener("input",u=>{const l=u.target;let f=l.value;f=f.replace(/[^0-9]/g,""),f.length>1&&(f=f.charAt(0)),l.value=f,f&&o<n.length-1&&n[o+1]?.focus(),i()}),s.addEventListener("paste",u=>{u.preventDefault();const f=(u.clipboardData?.getData("text")||"").replace(/[^0-9]/g,"");for(let d=0;d<Math.min(f.length,n.length-o);d++){const p=n[o+d],y=f.charAt(d);p&&y&&(p.value=y)}const c=n.findIndex((d,p)=>p>=o&&!d.value);c!==-1?n[c]?.focus():n[Math.min(o+f.length,n.length-1)]?.focus(),i()}),s.addEventListener("keydown",u=>{if(u.key==="Backspace"){const l=u.target;if(!l.value&&o>0){u.preventDefault();const f=n[o-1];f&&(f.value="",f.focus()),i()}else l.value&&setTimeout(()=>i(),0)}else u.key==="ArrowLeft"&&o>0?(u.preventDefault(),n[o-1]?.focus()):u.key==="ArrowRight"&&o<n.length-1&&(u.preventDefault(),n[o+1]?.focus())}),s.addEventListener("focus",()=>{s.select()})}),i()}),null}const j="authhero_incognito_mode",Bt="https://unpkg.com/detectincognitojs@1.6.2";async function Ht(){return window.detectIncognito?window.detectIncognito:new Promise((e,t)=>{const n=document.createElement("script");n.src=Bt,n.type="text/javascript",n.crossOrigin="anonymous",n.onload=()=>{let r=window.detectIncognito;!r&&window.__detectIncognito&&(r=window.__detectIncognito),!r&&window.module&&window.module.exports&&(r=window.module.exports),r&&typeof r=="function"?e(r):r&&r.detectIncognito?e(r.detectIncognito):typeof r=="object"&&r.default?e(r.default):t(new Error("detectIncognito not found after loading script"))},n.onerror=()=>{t(new Error("Failed to load detectincognitojs script"))},document.head.appendChild(n)})}function jt(){try{const e=sessionStorage.getItem(j);return e===null?void 0:e==="true"}catch{return}}async function Ft(){try{const e=sessionStorage.getItem(j);if(e!==null)return e==="true";const t=await Ht(),{isPrivate:n}=await t();return sessionStorage.setItem(j,n.toString()),n}catch{try{sessionStorage.setItem(j,"false")}catch{}return!1}}const qt=()=>{const e=jt();if(e!==void 0){e&&Ce();return}Ft().then(t=>{t&&Ce()}).catch(()=>{})};function Ce(){const e=document.getElementById("incognito-warning-container");e&&e.classList.remove("hidden")}qt();const ke=document.getElementById("client-root");ke&&Rt(ke,O(st,{children:[O(Ot,{}),O(xt,{}),O(_t,{})]}));
|
|
1
|
+
var Ke={Stringify:1},b=(e,t)=>{const n=new String(e);return n.isEscaped=!0,n.callbacks=t,n},We=/[&<>'"]/,Ue=async(e,t)=>{let n="";t||=[];const r=await Promise.all(e);for(let a=r.length-1;n+=r[a],a--,!(a<0);a--){let i=r[a];typeof i=="object"&&t.push(...i.callbacks||[]);const s=i.isEscaped;if(i=await(typeof i=="object"?i.toString():i),typeof i=="object"&&t.push(...i.callbacks||[]),i.isEscaped??s)n+=i;else{const o=[n];A(i,o),n=o[0]}}return b(n,t)},A=(e,t)=>{const n=e.search(We);if(n===-1){t[0]+=e;return}let r,a,i=0;for(a=n;a<e.length;a++){switch(e.charCodeAt(a)){case 34:r=""";break;case 39:r="'";break;case 38:r="&";break;case 60:r="<";break;case 62:r=">";break;default:continue}t[0]+=e.substring(i,a)+r,i=a+1}t[0]+=e.substring(i,a)},Ve=e=>{const t=e.callbacks;if(!t?.length)return e;const n=[e],r={};return t.forEach(a=>a({phase:Ke.Stringify,buffer:n,context:r})),n[0]},ee=Symbol("RENDERER"),G=Symbol("ERROR_HANDLER"),v=Symbol("STASH"),Ie=Symbol("INTERNAL"),Ze=Symbol("MEMO"),F=Symbol("PERMALINK"),fe=e=>(e[Ie]=!0,e),Te=e=>({value:t,children:n})=>{if(!n)return;const r={children:[{tag:fe(()=>{e.push(t)}),props:{}}]};Array.isArray(n)?r.children.push(...n.flat()):r.children.push(n),r.children.push({tag:fe(()=>{e.pop()}),props:{}});const a={tag:"",props:r,type:""};return a[G]=i=>{throw e.pop(),i},a},Le=e=>{const t=[e],n=Te(t);return n.values=t,n.Provider=n,C.push(n),n},C=[],Pe=e=>{const t=[e],n=(r=>{t.push(r.value);let a;try{a=r.children?(Array.isArray(r.children)?new $e("",{},r.children):r.children).toString():""}catch(i){throw t.pop(),i}return a instanceof Promise?a.finally(()=>t.pop()).then(i=>b(i,i.callbacks)):(t.pop(),b(a))});return n.values=t,n.Provider=n,n[ee]=Te(t),C.push(n),n},T=e=>e.values.at(-1),x={title:[],script:["src"],style:["data-href"],link:["href"],meta:["name","httpEquiv","charset","itemProp"]},Y={},_="data-precedence",M=e=>Array.isArray(e)?e:[e],ue=new WeakMap,de=(e,t,n,r)=>({buffer:a,context:i})=>{if(!a)return;const s=ue.get(i)||{};ue.set(i,s);const o=s[e]||=[];let u=!1;const l=x[e];if(l.length>0){e:for(const[,f]of o)for(const c of l)if((f?.[c]??null)===n?.[c]){u=!0;break e}}if(u?a[0]=a[0].replaceAll(t,""):l.length>0?o.push([t,n,r]):o.unshift([t,n,r]),a[0].indexOf("</head>")!==-1){let f;if(r===void 0)f=o.map(([c])=>c);else{const c=[];f=o.map(([d,,p])=>{let y=c.indexOf(p);return y===-1&&(c.push(p),y=c.length-1),[d,y]}).sort((d,p)=>d[1]-p[1]).map(([d])=>d)}f.forEach(c=>{a[0]=a[0].replaceAll(c,"")}),a[0]=a[0].replace(/(?=<\/head>)/,f.join(""))}},D=(e,t,n)=>b(new w(e,n,M(t??[])).toString()),$=(e,t,n,r)=>{if("itemProp"in n)return D(e,t,n);let{precedence:a,blocking:i,...s}=n;a=r?a??"":void 0,r&&(s[_]=a);const o=new w(e,s,M(t||[])).toString();return o instanceof Promise?o.then(u=>b(o,[...u.callbacks||[],de(e,u,s,a)])):b(o,[de(e,o,s,a)])},ze=({children:e,...t})=>{const n=te();if(n){const r=T(n);if(r==="svg"||r==="head")return new w("title",t,M(e??[]))}return $("title",e,t,!1)},Je=({children:e,...t})=>{const n=te();return["src","async"].some(r=>!t[r])||n&&T(n)==="head"?D("script",e,t):$("script",e,t,!1)},Xe=({children:e,...t})=>["href","precedence"].every(n=>n in t)?(t["data-href"]=t.href,delete t.href,$("style",e,t,!0)):D("style",e,t),Ge=({children:e,...t})=>["onLoad","onError"].some(n=>n in t)||t.rel==="stylesheet"&&(!("precedence"in t)||"disabled"in t)?D("link",e,t):$("link",e,t,"precedence"in t),Ye=({children:e,...t})=>{const n=te();return n&&T(n)==="head"?D("meta",e,t):$("meta",e,t,!1)},Ne=(e,{children:t,...n})=>new w(e,n,M(t??[])),Qe=e=>(typeof e.action=="function"&&(e.action=F in e.action?e.action[F]:void 0),Ne("form",e)),Me=(e,t)=>(typeof t.formAction=="function"&&(t.formAction=F in t.formAction?t.formAction[F]:void 0),Ne(e,t)),et=e=>Me("input",e),tt=e=>Me("button",e);const V=Object.freeze(Object.defineProperty({__proto__:null,button:tt,form:Qe,input:et,link:Ge,meta:Ye,script:Je,style:Xe,title:ze},Symbol.toStringTag,{value:"Module"}));var nt=new Map([["className","class"],["htmlFor","for"],["crossOrigin","crossorigin"],["httpEquiv","http-equiv"],["itemProp","itemprop"],["fetchPriority","fetchpriority"],["noModule","nomodule"],["formAction","formaction"]]),q=e=>nt.get(e)||e,De=(e,t)=>{for(const[n,r]of Object.entries(e)){const a=n[0]==="-"||!/[A-Z]/.test(n)?n:n.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`);t(a,r==null?null:typeof r=="number"?a.match(/^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/)?`${r}`:`${r}px`:r)}},P=void 0,te=()=>P,rt=e=>/[A-Z]/.test(e)&&e.match(/^(?:al|basel|clip(?:Path|Rule)$|co|do|fill|fl|fo|gl|let|lig|i|marker[EMS]|o|pai|pointe|sh|st[or]|text[^L]|tr|u|ve|w)/)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e,at=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],it=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],ne=(e,t)=>{for(let n=0,r=e.length;n<r;n++){const a=e[n];if(typeof a=="string")A(a,t);else{if(typeof a=="boolean"||a===null||a===void 0)continue;a instanceof w?a.toStringToBuffer(t):typeof a=="number"||a.isEscaped?t[0]+=a:a instanceof Promise?t.unshift("",a):ne(a,t)}}},w=class{tag;props;key;children;isEscaped=!0;localContexts;constructor(e,t,n){this.tag=e,this.props=t,this.children=n}get type(){return this.tag}get ref(){return this.props.ref||null}toString(){const e=[""];this.localContexts?.forEach(([t,n])=>{t.values.push(n)});try{this.toStringToBuffer(e)}finally{this.localContexts?.forEach(([t])=>{t.values.pop()})}return e.length===1?"callbacks"in e?Ve(b(e[0],e.callbacks)).toString():e[0]:Ue(e,e.callbacks)}toStringToBuffer(e){const t=this.tag,n=this.props;let{children:r}=this;e[0]+=`<${t}`;const a=P&&T(P)==="svg"?i=>rt(q(i)):i=>q(i);for(let[i,s]of Object.entries(n))if(i=a(i),i!=="children"){if(i==="style"&&typeof s=="object"){let o="";De(s,(u,l)=>{l!=null&&(o+=`${o?";":""}${u}:${l}`)}),e[0]+=' style="',A(o,e),e[0]+='"'}else if(typeof s=="string")e[0]+=` ${i}="`,A(s,e),e[0]+='"';else if(s!=null)if(typeof s=="number"||s.isEscaped)e[0]+=` ${i}="${s}"`;else if(typeof s=="boolean"&&it.includes(i))s&&(e[0]+=` ${i}=""`);else if(i==="dangerouslySetInnerHTML"){if(r.length>0)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");r=[b(s.__html)]}else if(s instanceof Promise)e[0]+=` ${i}="`,e.unshift('"',s);else if(typeof s=="function"){if(!i.startsWith("on")&&i!=="ref")throw new Error(`Invalid prop '${i}' of type 'function' supplied to '${t}'.`)}else e[0]+=` ${i}="`,A(s.toString(),e),e[0]+='"'}if(at.includes(t)&&r.length===0){e[0]+="/>";return}e[0]+=">",ne(r,e),e[0]+=`</${t}>`}},Z=class extends w{toStringToBuffer(e){const{children:t}=this,n={...this.props};t.length&&(n.children=t.length===1?t[0]:t);const r=this.tag.call(null,n);if(!(typeof r=="boolean"||r==null))if(r instanceof Promise)if(C.length===0)e.unshift("",r);else{const a=C.map(i=>[i,i.values.at(-1)]);e.unshift("",r.then(i=>(i instanceof w&&(i.localContexts=a),i)))}else r instanceof w?r.toStringToBuffer(e):typeof r=="number"||r.isEscaped?(e[0]+=r,r.callbacks&&(e.callbacks||=[],e.callbacks.push(...r.callbacks))):A(r,e)}},$e=class extends w{toStringToBuffer(e){ne(this.children,e)}},ve=!1,z=(e,t,n)=>{if(!ve){for(const r in Y)V[r][ee]=Y[r];ve=!0}return typeof e=="function"?new Z(e,t,n):V[e]?new Z(V[e],t,n):e==="svg"||e==="head"?(P||=Pe(""),new w(e,t,[new Z(P,{value:e},n)])):new w(e,t,n)},st=({children:e})=>new $e("",{children:e},Array.isArray(e)?e:e?[e]:[]);function O(e,t,n){let r;if(!t||!("children"in t))r=z(e,t,[]);else{const a=t.children;r=Array.isArray(a)?z(e,t,a):z(e,t,[a])}return r.key=n,r}var N="_hp",ot={Change:"Input",DoubleClick:"DblClick"},lt={svg:"2000/svg",math:"1998/Math/MathML"},k=[],Q=new WeakMap,I=void 0,ct=()=>I,S=e=>"t"in e,J={onClick:["click",!1]},pe=e=>{if(!e.startsWith("on"))return;if(J[e])return J[e];const t=e.match(/^on([A-Z][a-zA-Z]+?(?:PointerCapture)?)(Capture)?$/);if(t){const[,n,r]=t;return J[e]=[(ot[n]||n).toLowerCase(),!!r]}},he=(e,t)=>I&&e instanceof SVGElement&&/[A-Z]/.test(t)&&(t in e.style||t.match(/^(?:o|pai|str|u|ve)/))?t.replace(/([A-Z])/g,"-$1").toLowerCase():t,ft=(e,t,n)=>{t||={};for(let r in t){const a=t[r];if(r!=="children"&&(!n||n[r]!==a)){r=q(r);const i=pe(r);if(i){if(n?.[r]!==a&&(n&&e.removeEventListener(i[0],n[r],i[1]),a!=null)){if(typeof a!="function")throw new Error(`Event handler for "${r}" is not a function`);e.addEventListener(i[0],a,i[1])}}else if(r==="dangerouslySetInnerHTML"&&a)e.innerHTML=a.__html;else if(r==="ref"){let s;typeof a=="function"?s=a(e)||(()=>a(null)):a&&"current"in a&&(a.current=e,s=()=>a.current=null),Q.set(e,s)}else if(r==="style"){const s=e.style;typeof a=="string"?s.cssText=a:(s.cssText="",a!=null&&De(a,s.setProperty.bind(s)))}else{if(r==="value"){const o=e.nodeName;if(o==="INPUT"||o==="TEXTAREA"||o==="SELECT"){if(e.value=a==null||a===!1?null:a,o==="TEXTAREA"){e.textContent=a;continue}else if(o==="SELECT"){e.selectedIndex===-1&&(e.selectedIndex=0);continue}}}else(r==="checked"&&e.nodeName==="INPUT"||r==="selected"&&e.nodeName==="OPTION")&&(e[r]=a);const s=he(e,r);a==null||a===!1?e.removeAttribute(s):a===!0?e.setAttribute(s,""):typeof a=="string"||typeof a=="number"?e.setAttribute(s,a):e.setAttribute(s,a.toString())}}}if(n)for(let r in n){const a=n[r];if(r!=="children"&&!(r in t)){r=q(r);const i=pe(r);i?e.removeEventListener(i[0],a,i[1]):r==="ref"?Q.get(e)?.():e.removeAttribute(he(e,r))}}},ut=(e,t)=>{t[v][0]=0,k.push([e,t]);const n=t.tag[ee]||t.tag,r=n.defaultProps?{...n.defaultProps,...t.props}:t.props;try{return[n.call(null,r)]}finally{k.pop()}},Re=(e,t,n,r,a)=>{e.vR?.length&&(r.push(...e.vR),delete e.vR),typeof e.tag=="function"&&e[v][1][ae]?.forEach(i=>a.push(i)),e.vC.forEach(i=>{if(S(i))n.push(i);else if(typeof i.tag=="function"||i.tag===""){i.c=t;const s=n.length;if(Re(i,t,n,r,a),i.s){for(let o=s;o<n.length;o++)n[o].s=!0;i.s=!1}}else n.push(i),i.vR?.length&&(r.push(...i.vR),delete i.vR)})},dt=e=>{for(;e&&(e.tag===N||!e.e);)e=e.tag===N||!e.vC?.[0]?e.nN:e.vC[0];return e?.e},Oe=e=>{S(e)||(e[v]?.[1][ae]?.forEach(t=>t[2]?.()),Q.get(e.e)?.(),e.p===2&&e.vC?.forEach(t=>t.p=2),e.vC?.forEach(Oe)),e.p||(e.e?.remove(),delete e.e),typeof e.tag=="function"&&(L.delete(e),B.delete(e),delete e[v][3],e.a=!0)},re=(e,t,n)=>{e.c=t,xe(e,t,n)},ge=(e,t)=>{if(t){for(let n=0,r=e.length;n<r;n++)if(e[n]===t)return n}},me=Symbol(),xe=(e,t,n)=>{const r=[],a=[],i=[];Re(e,t,r,a,i),a.forEach(Oe);const s=n?void 0:t.childNodes;let o,u=null;if(n)o=-1;else if(!s.length)o=0;else{const l=ge(s,dt(e.nN));l!==void 0?(u=s[l],o=l):o=ge(s,r.find(f=>f.tag!==N&&f.e)?.e)??-1,o===-1&&(n=!0)}for(let l=0,f=r.length;l<f;l++,o++){const c=r[l];let d;if(c.s&&c.e)d=c.e,c.s=!1;else{const p=n||!c.e;S(c)?(c.e&&c.d&&(c.e.textContent=c.t),c.d=!1,d=c.e||=document.createTextNode(c.t)):(d=c.e||=c.n?document.createElementNS(c.n,c.tag):document.createElement(c.tag),ft(d,c.props,c.pP),xe(c,d,p))}c.tag===N?o--:n?d.parentNode||t.appendChild(d):s[o]!==d&&s[o-1]!==d&&(s[o+1]===d?t.appendChild(s[o]):t.insertBefore(d,u||s[o]||null))}if(e.pP&&(e.pP=void 0),i.length){const l=[],f=[];i.forEach(([,c,,d,p])=>{c&&l.push(c),d&&f.push(d),p?.()}),l.forEach(c=>c()),f.length&&requestAnimationFrame(()=>{f.forEach(c=>c())})}},vt=(e,t)=>!!(e&&e.length===t.length&&e.every((n,r)=>n[1]===t[r][1])),B=new WeakMap,K=(e,t,n)=>{const r=!n&&t.pC;n&&(t.pC||=t.vC);let a;try{n||=typeof t.tag=="function"?ut(e,t):M(t.props.children),n[0]?.tag===""&&n[0][G]&&(a=n[0][G],e[5].push([e,a,t]));const i=r?[...t.pC]:t.vC?[...t.vC]:void 0,s=[];let o;for(let u=0;u<n.length;u++){if(Array.isArray(n[u])){n.splice(u,1,...n[u].flat(1/0)),u--;continue}let l=_e(n[u]);if(l){typeof l.tag=="function"&&!l.tag[Ie]&&(C.length>0&&(l[v][2]=C.map(c=>[c,c.values.at(-1)])),e[5]?.length&&(l[v][3]=e[5].at(-1)));let f;if(i&&i.length){const c=i.findIndex(S(l)?d=>S(d):l.key!==void 0?d=>d.key===l.key&&d.tag===l.tag:d=>d.tag===l.tag);c!==-1&&(f=i[c],i.splice(c,1))}if(f)if(S(l))f.t!==l.t&&(f.t=l.t,f.d=!0),l=f;else{const c=f.pP=f.props;if(f.props=l.props,f.f||=l.f||t.f,typeof l.tag=="function"){const d=f[v][2];f[v][2]=l[v][2]||[],f[v][3]=l[v][3],!f.f&&((f.o||f)===l.o||f.tag[Ze]?.(c,f.props))&&vt(d,f[v][2])&&(f.s=!0)}l=f}else if(!S(l)&&I){const c=T(I);c&&(l.n=c)}if(!S(l)&&!l.s&&(K(e,l),delete l.f),s.push(l),o&&!o.s&&!l.s)for(let c=o;c&&!S(c);c=c.vC?.at(-1))c.nN=l;o=l}}t.vR=r?[...t.vC,...i||[]]:i||[],t.vC=s,r&&delete t.pC}catch(i){if(t.f=!0,i===me){if(a)return;throw i}const[s,o,u]=t[v]?.[3]||[];if(o){const l=()=>H([0,!1,e[2]],u),f=B.get(u)||[];f.push(l),B.set(u,f);const c=o(i,()=>{const d=B.get(u);if(d){const p=d.indexOf(l);if(p!==-1)return d.splice(p,1),l()}});if(c){if(e[0]===1)e[1]=!0;else if(K(e,u,[c]),(o.length===1||e!==s)&&u.c){re(u,u.c,!1);return}throw me}}throw i}finally{a&&e[5].pop()}},_e=e=>{if(!(e==null||typeof e=="boolean")){if(typeof e=="string"||typeof e=="number")return{t:e.toString(),d:!0};if("vR"in e&&(e={tag:e.tag,props:e.props,key:e.key,f:e.f,type:e.tag,ref:e.props.ref,o:e.o||e}),typeof e.tag=="function")e[v]=[0,[]];else{const t=lt[e.tag];t&&(I||=Le(""),e.props.children=[{tag:I,props:{value:e.n=`http://www.w3.org/${t}`,children:e.props.children}}])}return e}},Be=(e,t,n)=>{e.c===t&&(e.c=n,e.vC.forEach(r=>Be(r,t,n)))},ye=(e,t)=>{t[v][2]?.forEach(([n,r])=>{n.values.push(r)});try{K(e,t,void 0)}catch{return}if(t.a){delete t.a;return}t[v][2]?.forEach(([n])=>{n.values.pop()}),(e[0]!==1||!e[1])&&re(t,t.c,!1)},L=new WeakMap,Ee=[],H=async(e,t)=>{e[5]||=[];const n=L.get(t);n&&n[0](void 0);let r;const a=new Promise(i=>r=i);if(L.set(t,[r,()=>{e[2]?e[2](e,t,i=>{ye(i,t)}).then(()=>r(t)):(ye(e,t),r(t))}]),Ee.length)Ee.at(-1).add(t);else{await Promise.resolve();const i=L.get(t);i&&(L.delete(t),i[1]())}return a},pt=(e,t)=>{const n=[];n[5]=[],n[4]=!0,K(n,e,void 0),n[4]=!1;const r=document.createDocumentFragment();re(e,r,!0),Be(e,r,t),t.replaceChildren(r)},ht=(e,t,n)=>({tag:N,props:{children:e},key:n,e:t,p:1}),gt=0,ae=1,mt=2,yt=3,X=new WeakMap,ie=(e,t)=>!e||!t||e.length!==t.length||t.some((n,r)=>n!==e[r]),Et=void 0,we=[],He=e=>{const t=()=>typeof e=="function"?e():e,n=k.at(-1);if(!n)return[t(),()=>{}];const[,r]=n,a=r[v][1][gt]||=[],i=r[v][0]++;return a[i]||=[t(),s=>{const o=Et,u=a[i];if(typeof s=="function"&&(s=s(u[0])),!Object.is(s,u[0]))if(u[0]=s,we.length){const[l,f]=we.at(-1);Promise.all([l===3?r:H([l,!1,o],r),f]).then(([c])=>{if(!c||!(l===2||l===3))return;const d=c.vC;requestAnimationFrame(()=>{setTimeout(()=>{d===c.vC&&H([l===3?1:0,!1,o],c)})})})}else H([0,!1,o],r)}]},wt=(e,t,n)=>{const r=k.at(-1);if(!r)return;const[,a]=r,i=a[v][1][ae]||=[],s=a[v][0]++,[o,,u]=i[s]||=[];if(ie(o,n)){u&&u();const l=()=>{f[e]=void 0,f[2]=t()},f=[n,void 0,void 0,void 0,void 0];f[e]=l,i[s]=f}},je=(e,t)=>wt(3,e,t),se=(e,t)=>{const n=k.at(-1);if(!n)return e;const[,r]=n,a=r[v][1][mt]||=[],i=r[v][0]++,s=a[i];return ie(s?.[1],t)?a[i]=[e,t]:e=a[i][0],e},St=e=>{const t=X.get(e);if(t){if(t.length===2)throw t[1];return t[0]}throw e.then(n=>X.set(e,[n]),n=>X.set(e,[void 0,n])),e},bt=(e,t)=>{const n=k.at(-1);if(!n)return e();const[,r]=n,a=r[v][1][yt]||=[],i=r[v][0]++,s=a[i];return ie(s?.[1],t)&&(a[i]=[e(),t]),a[i][0]},At=Le({pending:!1,data:null,method:null,action:null}),Se=new Set,Ct=e=>{Se.add(e),e.finally(()=>Se.delete(e))},oe=(e,t)=>bt(()=>n=>{let r;e&&(typeof e=="function"?r=e(n)||(()=>{e(null)}):e&&"current"in e&&(e.current=n,r=()=>{e.current=null}));const a=t(n);return()=>{a?.(),r?.()}},[e]),be=Object.create(null),Ae=Object.create(null),R=(e,t,n,r,a)=>{if(t?.itemProp)return{tag:e,props:t,type:e,ref:t.ref};const i=document.head;let{onLoad:s,onError:o,precedence:u,blocking:l,...f}=t,c=null,d=!1;const p=x[e];let y;if(p.length>0){const g=i.querySelectorAll(e);e:for(const m of g)for(const h of x[e])if(m.getAttribute(h)===t[h]){c=m;break e}if(!c){const m=p.reduce((h,E)=>t[E]===void 0?h:`${h}-${E}-${t[E]}`,e);d=!Ae[m],c=Ae[m]||=(()=>{const h=document.createElement(e);for(const E of p)t[E]!==void 0&&h.setAttribute(E,t[E]),t.rel&&h.setAttribute("rel",t.rel);return h})()}}else y=i.querySelectorAll(e);u=r?u??"":void 0,r&&(f[_]=u);const le=se(g=>{if(p.length>0){let m=!1;for(const h of i.querySelectorAll(e)){if(m&&h.getAttribute(_)!==u){i.insertBefore(g,h);return}h.getAttribute(_)===u&&(m=!0)}i.appendChild(g)}else if(y){let m=!1;for(const h of y)if(h===g){m=!0;break}m||i.insertBefore(g,i.contains(y[0])?y[0]:i.querySelector(e)),y=void 0}},[u]),ce=oe(t.ref,g=>{const m=p[0];if(n===2&&(g.innerHTML=""),(d||y)&&le(g),!o&&!s)return;let h=be[g.getAttribute(m)]||=new Promise((E,U)=>{g.addEventListener("load",E),g.addEventListener("error",U)});s&&(h=h.then(s)),o&&(h=h.catch(o)),h.catch(()=>{})});if(a&&l==="render"){const g=x[e][0];if(t[g]){const m=t[g],h=be[m]||=new Promise((E,U)=>{le(c),c.addEventListener("load",E),c.addEventListener("error",U)});St(h)}}const W={tag:e,type:e,props:{...f,ref:ce},ref:ce};return W.p=n,c&&(W.e=c),ht(W,i)},kt=e=>{const t=ct();return(t&&T(t))?.endsWith("svg")?{tag:"title",props:e,type:"title",ref:e.ref}:R("title",e,void 0,!1,!1)},It=e=>!e||["src","async"].some(t=>!e[t])?{tag:"script",props:e,type:"script",ref:e.ref}:R("script",e,1,!1,!0),Tt=e=>!e||!["href","precedence"].every(t=>t in e)?{tag:"style",props:e,type:"style",ref:e.ref}:(e["data-href"]=e.href,delete e.href,R("style",e,2,!0,!0)),Lt=e=>!e||["onLoad","onError"].some(t=>t in e)||e.rel==="stylesheet"&&(!("precedence"in e)||"disabled"in e)?{tag:"link",props:e,type:"link",ref:e.ref}:R("link",e,1,"precedence"in e,!0),Pt=e=>R("meta",e,void 0,!1,!1),Fe=Symbol(),Nt=e=>{const{action:t,...n}=e;typeof t!="function"&&(n.action=t);const[r,a]=He([null,!1]),i=se(async l=>{const f=l.isTrusted?t:l.detail[Fe];if(typeof f!="function")return;l.preventDefault();const c=new FormData(l.target);a([c,!0]);const d=f(c);d instanceof Promise&&(Ct(d),await d),a([null,!0])},[]),s=oe(e.ref,l=>(l.addEventListener("submit",i),()=>{l.removeEventListener("submit",i)})),[o,u]=r;return r[1]=!1,{tag:At,props:{value:{pending:o!==null,data:o,method:o?"post":null,action:o?t:null},children:{tag:"form",props:{...n,ref:s},type:"form",ref:s}},f:u}},qe=(e,{formAction:t,...n})=>{if(typeof t=="function"){const r=se(a=>{a.preventDefault(),a.currentTarget.form.dispatchEvent(new CustomEvent("submit",{detail:{[Fe]:t}}))},[]);n.ref=oe(n.ref,a=>(a.addEventListener("click",r),()=>{a.removeEventListener("click",r)}))}return{tag:e,props:n,type:e,ref:n.ref}},Mt=e=>qe("input",e),Dt=e=>qe("button",e);Object.assign(Y,{title:kt,script:It,style:Tt,link:Lt,meta:Pt,form:Nt,input:Mt,button:Dt});Pe(null);new TextEncoder;var $t=(e,t={})=>{let n;return Object.keys(t).length>0&&console.warn("createRoot options are not supported yet"),{render(r){if(n===null)throw new Error("Cannot update an unmounted root");n?n(r):pt(_e({tag:()=>{const[a,i]=He(r);return n=i,a},props:{}}),e)},unmount(){n?.(null),n=null}}},Rt=(e,t,n={})=>{const r=$t(e,n);return r.render(t),r};function Ot(){return je(()=>{const e=document.querySelectorAll("form"),t=[];return e.forEach(n=>{const r=i=>{if(i.defaultPrevented)return;const s=i.submitter;s&&s.type==="submit"&&(s.classList.add("is-loading"),s.disabled=!0)};n.addEventListener("submit",r);const a=i=>{i.persisted&&n.querySelectorAll("button[type=submit]").forEach(o=>{o.classList.remove("is-loading"),o.disabled=!1})};window.addEventListener("pageshow",a),t.push(()=>{n.removeEventListener("submit",r),window.removeEventListener("pageshow",a)})}),()=>{t.forEach(n=>n())}},[]),null}function xt(){return je(()=>{const e=document.querySelectorAll("[data-password-toggle]"),t=[];return e.forEach(n=>{const r=n.querySelector("input[type='password'], input[data-password-input]"),a=n.querySelector("[data-password-toggle-btn]"),i=a?.querySelector("[data-show-icon]"),s=a?.querySelector("[data-hide-icon]");if(!r||!a||!i||!s)return;const o=l=>{l?(r.type="text",r.setAttribute("data-password-input","text"),i.classList.add("hidden"),s.classList.remove("hidden")):(r.type="password",r.setAttribute("data-password-input","password"),s.classList.add("hidden"),i.classList.remove("hidden"))},u=l=>{l.preventDefault();const f=r.type==="password";o(f)};a.addEventListener("click",u),t.push(()=>{a.removeEventListener("click",u)})}),()=>{t.forEach(n=>n())}},[]),null}function _t(){return document.querySelectorAll("[data-input-otp-container]").forEach(t=>{const n=Array.from(t.querySelectorAll("[data-input-otp-slot]"));if(!n.length)return;const r=t.closest("form");let a=null;if(r&&n.length>0){const o=n[0]?.getAttribute("name");o&&(a=r.querySelector(`input[name="${o}"][type="hidden"]`),a||(a=document.createElement("input"),a.type="hidden",a.name=o,r.appendChild(a)),n.forEach(u=>u.removeAttribute("name")))}const i=()=>{if(a){const s=n.map(o=>o.value).join("");a.value=s,s.length===n.length&&r&&setTimeout(()=>{r.requestSubmit()},100)}};n.forEach((s,o)=>{s.addEventListener("input",u=>{const l=u.target;let f=l.value;f=f.replace(/[^0-9]/g,""),f.length>1&&(f=f.charAt(0)),l.value=f,f&&o<n.length-1&&n[o+1]?.focus(),i()}),s.addEventListener("paste",u=>{u.preventDefault();const f=(u.clipboardData?.getData("text")||"").replace(/[^0-9]/g,"");for(let d=0;d<Math.min(f.length,n.length-o);d++){const p=n[o+d],y=f.charAt(d);p&&y&&(p.value=y)}const c=n.findIndex((d,p)=>p>=o&&!d.value);c!==-1?n[c]?.focus():n[Math.min(o+f.length,n.length-1)]?.focus(),i()}),s.addEventListener("keydown",u=>{if(u.key==="Backspace"){const l=u.target;if(!l.value&&o>0){u.preventDefault();const f=n[o-1];f&&(f.value="",f.focus()),i()}else l.value&&setTimeout(()=>i(),0)}else u.key==="ArrowLeft"&&o>0?(u.preventDefault(),n[o-1]?.focus()):u.key==="ArrowRight"&&o<n.length-1&&(u.preventDefault(),n[o+1]?.focus())}),s.addEventListener("focus",()=>{s.select()})}),i()}),null}const j="authhero_incognito_mode",Bt="https://unpkg.com/detectincognitojs@1.6.2";async function Ht(){return window.detectIncognito?window.detectIncognito:new Promise((e,t)=>{const n=document.createElement("script");n.src=Bt,n.type="text/javascript",n.crossOrigin="anonymous",n.onload=()=>{let r=window.detectIncognito;!r&&window.__detectIncognito&&(r=window.__detectIncognito),!r&&window.module&&window.module.exports&&(r=window.module.exports),r&&typeof r=="function"?e(r):r&&r.detectIncognito?e(r.detectIncognito):typeof r=="object"&&r.default?e(r.default):t(new Error("detectIncognito not found after loading script"))},n.onerror=()=>{t(new Error("Failed to load detectincognitojs script"))},document.head.appendChild(n)})}function jt(){try{const e=sessionStorage.getItem(j);return e===null?void 0:e==="true"}catch{return}}async function Ft(){try{const e=sessionStorage.getItem(j);if(e!==null)return e==="true";const t=await Ht(),{isPrivate:n}=await t();return sessionStorage.setItem(j,n.toString()),n}catch{try{sessionStorage.setItem(j,"false")}catch{}return!1}}const qt=()=>{const e=jt();if(e!==void 0){e&&Ce();return}Ft().then(t=>{t&&Ce()}).catch(()=>{})};function Ce(){const e=document.getElementById("incognito-warning-container");e&&e.classList.remove("hidden")}qt();const ke=document.getElementById("client-root");ke&&Rt(ke,O(st,{children:[O(Ot,{}),O(xt,{}),O(_t,{})]}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as a,b as e}from"./p-5hZ8Vbm9.js";export{s as setNonce}from"./p-5hZ8Vbm9.js";import{g as t}from"./p-DQuL1Twl.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),a(t)})().then((async a=>(await t(),e([["p-df99a4ad",[[513,"authhero-node",{component:[16],value:[1],disabled:[4],passwordVisible:[32]}]]],["p-a4fd5f18",[[513,"authhero-widget",{screen:[1],apiUrl:[1,"api-url"],baseUrl:[1,"base-url"],state:[1025],screenId:[1025,"screen-id"],authParams:[1,"auth-params"],statePersistence:[1,"state-persistence"],storageKey:[1,"storage-key"],branding:[1],theme:[1],loading:[1028],autoSubmit:[4,"auto-submit"],autoNavigate:[4,"auto-navigate"],_screen:[32],_authParams:[32],_branding:[32],_theme:[32],formData:[32]},null,{screenId:[{watchScreenId:0}],screen:[{watchScreen:0}],branding:[{watchBranding:0}],theme:[{watchTheme:0}],authParams:[{watchAuthParams:0}]}]]]],a))));
|