@atproto/oauth-provider-ui 0.5.2 → 0.6.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/account-page-BWF2SB1c.js +20 -0
- package/dist/account-page-BWF2SB1c.js.map +1 -0
- package/dist/{admonition-CynrBtB4.js → admonition-yRjCycmU.js} +14 -14
- package/dist/admonition-yRjCycmU.js.map +1 -0
- package/dist/authorization-page-CVdjW3kW.js +6 -0
- package/dist/authorization-page-CVdjW3kW.js.map +1 -0
- package/dist/bundle-manifest.json +101 -101
- package/dist/{cookie-error-page-BaAfiN7q.js → cookie-error-page-Bkn1GFNn.js} +2 -2
- package/dist/cookie-error-page-Bkn1GFNn.js.map +1 -0
- package/dist/did-document-YkmTdTdF.js +60 -0
- package/dist/did-document-YkmTdTdF.js.map +1 -0
- package/dist/{error-page-BJWyhSsa.js → error-page-BNXmA0-7.js} +2 -2
- package/dist/{error-page-BJWyhSsa.js.map → error-page-BNXmA0-7.js.map} +1 -1
- package/dist/error-view-C10M9k8v.js +2 -0
- package/dist/{error-view-Bn_MnV68.js.map → error-view-C10M9k8v.js.map} +1 -1
- package/dist/{form-card-BodfR5wP.js → form-card-CGJ-DqBg.js} +2 -2
- package/dist/{form-card-BodfR5wP.js.map → form-card-CGJ-DqBg.js.map} +1 -1
- package/package.json +9 -9
- package/dist/account-page-Do28ZzQf.js +0 -20
- package/dist/account-page-Do28ZzQf.js.map +0 -1
- package/dist/admonition-CynrBtB4.js.map +0 -1
- package/dist/authorization-page-XxpDhuMt.js +0 -6
- package/dist/authorization-page-XxpDhuMt.js.map +0 -1
- package/dist/cookie-error-page-BaAfiN7q.js.map +0 -1
- package/dist/error-view-Bn_MnV68.js +0 -2
- package/dist/index-BtIdBUOA.js +0 -60
- package/dist/index-BtIdBUOA.js.map +0 -1
package/dist/index-BtIdBUOA.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import{m as Fu,n as Vu,r as u,p as Ie,j as g,R as ot,o as Li,c as te,u as oe,f as Yu,L as Hu,T as Z,B as Se,q as Gu,A as Ui,b as Ca,s as Kr}from"./admonition-CynrBtB4.js";import{A as zu,U as Wu,a as qu,b as Ku,S as Xu,I as Ju}from"./error-view-Bn_MnV68.js";import{F as $i,u as Qu}from"./form-card-BodfR5wP.js";var Ia=Vu();const el=Fu(Ia),Bi=u.createContext(null),Rr={didCatch:!1,error:null};class dm extends u.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Rr}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:s,reason:"imperative-api"}),this.setState(Rr)}}componentDidCatch(t,n){var r,a;(r=(a=this.props).onError)===null||r===void 0||r.call(a,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:a}=this.props;if(r&&n.error!==null&&tl(t.resetKeys,a)){var s,i;(s=(i=this.props).onReset)===null||s===void 0||s.call(i,{next:a,prev:t.resetKeys,reason:"keys"}),this.setState(Rr)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:a}=this.props,{didCatch:s,error:i}=this.state;let c=t;if(s){const l={error:i,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")c=n(l);else if(r)c=u.createElement(r,l);else if(a!==void 0)c=a;else throw i}return u.createElement(Bi.Provider,{value:{didCatch:s,error:i,resetErrorBoundary:this.resetErrorBoundary}},c)}}function tl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function nl(e){if(e==null||typeof e.didCatch!="boolean"||typeof e.resetErrorBoundary!="function")throw new Error("ErrorBoundaryContext not found")}function rl(){const e=u.useContext(Bi);nl(e);const[t,n]=u.useState({error:null,hasError:!1}),r=u.useMemo(()=>({resetBoundary:()=>{e.resetErrorBoundary(),n({error:null,hasError:!1})},showBoundary:a=>n({error:a,hasError:!0})}),[e.resetErrorBoundary]);if(t.hasError)throw t.error;return r}const al=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,20a108,108,0,0,0,0,216c22.27,0,45.69-6.73,62.64-18a12,12,0,1,0-13.29-20c-13,8.63-31.89,14-49.35,14a84,84,0,1,1,84-84c0,9.29-1.67,17.08-4.69,21.95-2.64,4.24-6,6.05-11.31,6.05s-8.67-1.81-11.31-6.05c-3-4.87-4.69-12.66-4.69-21.95V88a12,12,0,0,0-23.49-3.46,52,52,0,1,0,8.86,79.57C172.3,174.3,182.81,180,196,180c24.67,0,40-19.92,40-52A108.12,108.12,0,0,0,128,20Zm0,136a28,28,0,1,1,28-28A28,28,0,0,1,128,156Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),u.createElement("path",{d:"M128,24a104,104,0,0,0,0,208c21.51,0,44.1-6.48,60.43-17.33a8,8,0,0,0-8.86-13.33C166,210.38,146.21,216,128,216a88,88,0,1,1,88-88c0,26.45-10.88,32-20,32s-20-5.55-20-32V88a8,8,0,0,0-16,0v4.26a48,48,0,1,0,5.93,65.1c6,12,16.35,18.64,30.07,18.64,22.54,0,36-17.94,36-48A104.11,104.11,0,0,0,128,24Zm0,136a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M232,128c0,.51,0,1,0,1.52-.34,14.26-5.63,30.48-28,30.48-23.14,0-28-17.4-28-32V88a8,8,0,0,0-8.53-8A8.17,8.17,0,0,0,160,88.27v4a48,48,0,1,0,6.73,64.05,40.19,40.19,0,0,0,3.38,5C175.48,168,185.71,176,204,176a54.81,54.81,0,0,0,9.22-.75,4,4,0,0,1,4.09,6A104.05,104.05,0,0,1,125.91,232C71.13,230.9,26.2,186.86,24.08,132.11A104,104,0,1,1,232,128ZM96,128a32,32,0,1,0,32-32A32,32,0,0,0,96,128Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,26a102,102,0,0,0,0,204c21.13,0,43.31-6.35,59.32-17a6,6,0,0,0-6.65-10c-13.9,9.25-34.09,15-52.67,15a90,90,0,1,1,90-90c0,29.58-13.78,34-22,34s-22-4.42-22-34V88a6,6,0,0,0-12,0v9a46,46,0,1,0,4.34,56.32C171.76,166.6,182,174,196,174c21.29,0,34-17.2,34-46A102.12,102.12,0,0,0,128,26Zm0,136a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,24a104,104,0,0,0,0,208c21.51,0,44.1-6.48,60.43-17.33a8,8,0,0,0-8.86-13.33C166,210.38,146.21,216,128,216a88,88,0,1,1,88-88c0,26.45-10.88,32-20,32s-20-5.55-20-32V88a8,8,0,0,0-16,0v4.26a48,48,0,1,0,5.93,65.1c6,12,16.35,18.64,30.07,18.64,22.54,0,36-17.94,36-48A104.11,104.11,0,0,0,128,24Zm0,136a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,28a100,100,0,0,0,0,200c20.76,0,42.52-6.23,58.21-16.66a4,4,0,1,0-4.43-6.67C167.35,214.27,147.24,220,128,220a92,92,0,1,1,92-92c0,31.32-15,36-24,36s-24-4.68-24-36V88a4,4,0,0,0-8,0v14.75a44,44,0,1,0,2.82,45.94C171.46,163.58,181.66,172,196,172c20,0,32-16.45,32-44A100.11,100.11,0,0,0,128,28Zm0,136a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),sl=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),u.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),il=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),u.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),ol=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),u.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),cl=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),u.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z"}))]]),ul=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M196,76a16,16,0,1,1-16-16A16,16,0,0,1,196,76Zm48,22.74A84.3,84.3,0,0,1,160.11,180H160a83.52,83.52,0,0,1-23.65-3.38l-7.86,7.87A12,12,0,0,1,120,188H108v12a12,12,0,0,1-12,12H84v12a12,12,0,0,1-12,12H40a20,20,0,0,1-20-20V187.31a19.86,19.86,0,0,1,5.86-14.14l53.52-53.52A84,84,0,1,1,244,98.74ZM202.43,53.57A59.48,59.48,0,0,0,158,36c-32,1-58,27.89-58,59.89a59.69,59.69,0,0,0,4.2,22.19,12,12,0,0,1-2.55,13.21L44,189v23H60V200a12,12,0,0,1,12-12H84V176a12,12,0,0,1,12-12h19l9.65-9.65a12,12,0,0,1,13.22-2.55A59.58,59.58,0,0,0,160,156h.08c32,0,58.87-26.07,59.89-58A59.55,59.55,0,0,0,202.43,53.57Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M232,98.36C230.73,136.92,198.67,168,160.09,168a71.68,71.68,0,0,1-26.92-5.17h0L120,176H96v24H72v24H40a8,8,0,0,1-8-8V187.31a8,8,0,0,1,2.34-5.65l58.83-58.83h0A71.68,71.68,0,0,1,88,95.91c0-38.58,31.08-70.64,69.64-71.87A72,72,0,0,1,232,98.36Z",opacity:"0.2"}),u.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM180,92a16,16,0,1,1,16-16A16,16,0,0,1,180,92Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M215.15,40.85A78,78,0,0,0,86.2,121.31l-56.1,56.1a13.94,13.94,0,0,0-4.1,9.9V216a14,14,0,0,0,14,14H72a6,6,0,0,0,6-6V206H96a6,6,0,0,0,6-6V182h18a6,6,0,0,0,4.24-1.76l10.45-10.44A77.59,77.59,0,0,0,160,174h.1A78,78,0,0,0,215.15,40.85ZM226,98.16c-1.12,35.16-30.67,63.8-65.88,63.84a65.93,65.93,0,0,1-24.51-4.67,6,6,0,0,0-6.64,1.26L117.51,170H96a6,6,0,0,0-6,6v18H72a6,6,0,0,0-6,6v18H40a2,2,0,0,1-2-2V187.31a2,2,0,0,1,.58-1.41l58.83-58.83a6,6,0,0,0,1.26-6.64A65.61,65.61,0,0,1,94,95.92C94,60.71,122.68,31.16,157.83,30A66,66,0,0,1,226,98.16ZM190,76a10,10,0,1,1-10-10A10,10,0,0,1,190,76Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M213.74,42.26A76,76,0,0,0,88.51,121.84l-57,57A11.93,11.93,0,0,0,28,187.31V216a12,12,0,0,0,12,12H72a4,4,0,0,0,4-4V204H96a4,4,0,0,0,4-4V180h20a4,4,0,0,0,2.83-1.17l11.33-11.34A75.72,75.72,0,0,0,160,172h.1A76,76,0,0,0,213.74,42.26Zm14.22,56c-1.15,36.22-31.6,65.72-67.87,65.77H160a67.52,67.52,0,0,1-25.21-4.83,4,4,0,0,0-4.45.83l-12,12H96a4,4,0,0,0-4,4v20H72a4,4,0,0,0-4,4v20H40a4,4,0,0,1-4-4V187.31a4.06,4.06,0,0,1,1.17-2.83L96,125.66a4,4,0,0,0,.83-4.45A67.51,67.51,0,0,1,92,95.91C92,59.64,121.55,29.19,157.77,28A68,68,0,0,1,228,98.23ZM188,76a8,8,0,1,1-8-8A8,8,0,0,1,188,76Z"}))]]),ll=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M84,48A20,20,0,1,1,64,28,20,20,0,0,1,84,48Zm44-20a20,20,0,1,0,20,20A20,20,0,0,0,128,28Zm64,40a20,20,0,1,0-20-20A20,20,0,0,0,192,68ZM64,84a20,20,0,1,0,20,20A20,20,0,0,0,64,84Zm64,0a20,20,0,1,0,20,20A20,20,0,0,0,128,84Zm64,0a20,20,0,1,0,20,20A20,20,0,0,0,192,84ZM64,140a20,20,0,1,0,20,20A20,20,0,0,0,64,140Zm64,0a20,20,0,1,0,20,20A20,20,0,0,0,128,140Zm0,56a20,20,0,1,0,20,20A20,20,0,0,0,128,196Zm64-56a20,20,0,1,0,20,20A20,20,0,0,0,192,140Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M192,48V200a16,16,0,0,1-16,16H80a16,16,0,0,1-16-16V48Z",opacity:"0.2"}),u.createElement("path",{d:"M80,48A16,16,0,1,1,64,32,16,16,0,0,1,80,48Zm48-16a16,16,0,1,0,16,16A16,16,0,0,0,128,32Zm64,32a16,16,0,1,0-16-16A16,16,0,0,0,192,64ZM64,88a16,16,0,1,0,16,16A16,16,0,0,0,64,88Zm64,0a16,16,0,1,0,16,16A16,16,0,0,0,128,88Zm64,0a16,16,0,1,0,16,16A16,16,0,0,0,192,88ZM64,144a16,16,0,1,0,16,16A16,16,0,0,0,64,144Zm64,0a16,16,0,1,0,16,16A16,16,0,0,0,128,144Zm0,56a16,16,0,1,0,16,16A16,16,0,0,0,128,200Zm64-56a16,16,0,1,0,16,16A16,16,0,0,0,192,144Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M200,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24ZM80,164a12,12,0,1,1,12-12A12,12,0,0,1,80,164Zm0-40a12,12,0,1,1,12-12A12,12,0,0,1,80,124Zm0-40A12,12,0,1,1,92,72,12,12,0,0,1,80,84Zm48,120a12,12,0,1,1,12-12A12,12,0,0,1,128,204Zm0-40a12,12,0,1,1,12-12A12,12,0,0,1,128,164Zm0-40a12,12,0,1,1,12-12A12,12,0,0,1,128,124Zm0-40a12,12,0,1,1,12-12A12,12,0,0,1,128,84Zm48,80a12,12,0,1,1,12-12A12,12,0,0,1,176,164Zm0-40a12,12,0,1,1,12-12A12,12,0,0,1,176,124Zm0-40a12,12,0,1,1,12-12A12,12,0,0,1,176,84Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M78,48A14,14,0,1,1,64,34,14,14,0,0,1,78,48Zm50-14a14,14,0,1,0,14,14A14,14,0,0,0,128,34Zm64,28a14,14,0,1,0-14-14A14,14,0,0,0,192,62ZM64,90a14,14,0,1,0,14,14A14,14,0,0,0,64,90Zm64,0a14,14,0,1,0,14,14A14,14,0,0,0,128,90Zm64,0a14,14,0,1,0,14,14A14,14,0,0,0,192,90ZM64,146a14,14,0,1,0,14,14A14,14,0,0,0,64,146Zm64,0a14,14,0,1,0,14,14A14,14,0,0,0,128,146Zm0,56a14,14,0,1,0,14,14A14,14,0,0,0,128,202Zm64-56a14,14,0,1,0,14,14A14,14,0,0,0,192,146Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M80,48A16,16,0,1,1,64,32,16,16,0,0,1,80,48Zm48-16a16,16,0,1,0,16,16A16,16,0,0,0,128,32Zm64,32a16,16,0,1,0-16-16A16,16,0,0,0,192,64ZM64,88a16,16,0,1,0,16,16A16,16,0,0,0,64,88Zm64,0a16,16,0,1,0,16,16A16,16,0,0,0,128,88Zm64,0a16,16,0,1,0,16,16A16,16,0,0,0,192,88ZM64,144a16,16,0,1,0,16,16A16,16,0,0,0,64,144Zm64,0a16,16,0,1,0,16,16A16,16,0,0,0,128,144Zm0,56a16,16,0,1,0,16,16A16,16,0,0,0,128,200Zm64-56a16,16,0,1,0,16,16A16,16,0,0,0,192,144Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M76,48A12,12,0,1,1,64,36,12,12,0,0,1,76,48Zm52-12a12,12,0,1,0,12,12A12,12,0,0,0,128,36Zm64,24a12,12,0,1,0-12-12A12,12,0,0,0,192,60ZM64,92a12,12,0,1,0,12,12A12,12,0,0,0,64,92Zm64,0a12,12,0,1,0,12,12A12,12,0,0,0,128,92Zm64,0a12,12,0,1,0,12,12A12,12,0,0,0,192,92ZM64,148a12,12,0,1,0,12,12A12,12,0,0,0,64,148Zm64,0a12,12,0,1,0,12,12A12,12,0,0,0,128,148Zm0,56a12,12,0,1,0,12,12A12,12,0,0,0,128,204Zm64-56a12,12,0,1,0,12,12A12,12,0,0,0,192,148Z"}))]]),dl=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M144,180a16,16,0,1,1-16-16A16,16,0,0,1,144,180Zm92-52A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128ZM128,64c-24.26,0-44,17.94-44,40v4a12,12,0,0,0,24,0v-4c0-8.82,9-16,20-16s20,7.18,20,16-9,16-20,16a12,12,0,0,0-12,12v8a12,12,0,0,0,23.73,2.56C158.31,137.88,172,122.37,172,104,172,81.94,152.26,64,128,64Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),u.createElement("path",{d:"M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,168a12,12,0,1,1,12-12A12,12,0,0,1,128,192Zm8-48.72V144a8,8,0,0,1-16,0v-8a8,8,0,0,1,8-8c13.23,0,24-9,24-20s-10.77-20-24-20-24,9-24,20v4a8,8,0,0,1-16,0v-4c0-19.85,17.94-36,40-36s40,16.15,40,36C168,125.38,154.24,139.93,136,143.28Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M138,180a10,10,0,1,1-10-10A10,10,0,0,1,138,180ZM128,74c-21,0-38,15.25-38,34v4a6,6,0,0,0,12,0v-4c0-12.13,11.66-22,26-22s26,9.87,26,22-11.66,22-26,22a6,6,0,0,0-6,6v8a6,6,0,0,0,12,0v-2.42c18.11-2.58,32-16.66,32-33.58C166,89.25,149,74,128,74Zm102,54A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M136,180a8,8,0,1,1-8-8A8,8,0,0,1,136,180ZM128,76c-19.85,0-36,14.36-36,32v4a4,4,0,0,0,8,0v-4c0-13.23,12.56-24,28-24s28,10.77,28,24-12.56,24-28,24a4,4,0,0,0-4,4v8a4,4,0,0,0,8,0v-4.2c18-1.77,32-15.36,32-31.8C164,90.36,147.85,76,128,76Zm100,52A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),fl=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M232,108a12,12,0,0,0,12-12V64a20,20,0,0,0-20-20H32A20,20,0,0,0,12,64V96a12,12,0,0,0,12,12,20,20,0,0,1,0,40,12,12,0,0,0-12,12v32a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V160a12,12,0,0,0-12-12,20,20,0,0,1,0-40ZM36,170.34a44,44,0,0,0,0-84.68V68H88V188H36Zm184,0V188H112V68H220V85.66a44,44,0,0,0,0,84.68Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M200,128a32,32,0,0,0,32,32v32a8,8,0,0,1-8,8H96V56H224a8,8,0,0,1,8,8V96A32,32,0,0,0,200,128Z",opacity:"0.2"}),u.createElement("path",{d:"M232,104a8,8,0,0,0,8-8V64a16,16,0,0,0-16-16H32A16,16,0,0,0,16,64V96a8,8,0,0,0,8,8,24,24,0,0,1,0,48,8,8,0,0,0-8,8v32a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V160a8,8,0,0,0-8-8,24,24,0,0,1,0-48ZM32,167.2a40,40,0,0,0,0-78.4V64H88V192H32Zm192,0V192H104V64H224V88.8a40,40,0,0,0,0,78.4Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M232,104a8,8,0,0,0,8-8V64a16,16,0,0,0-16-16H32A16,16,0,0,0,16,64V96a8,8,0,0,0,8,8,24,24,0,0,1,0,48,8,8,0,0,0-8,8v32a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V160a8,8,0,0,0-8-8,24,24,0,0,1,0-48ZM32,167.2a40,40,0,0,0,0-78.4V64H88V192H32Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M232,102a6,6,0,0,0,6-6V64a14,14,0,0,0-14-14H32A14,14,0,0,0,18,64V96a6,6,0,0,0,6,6,26,26,0,0,1,0,52,6,6,0,0,0-6,6v32a14,14,0,0,0,14,14H224a14,14,0,0,0,14-14V160a6,6,0,0,0-6-6,26,26,0,0,1,0-52ZM30,192V165.53a38,38,0,0,0,0-75.06V64a2,2,0,0,1,2-2H90V194H32A2,2,0,0,1,30,192Zm196-26.47V192a2,2,0,0,1-2,2H102V62H224a2,2,0,0,1,2,2V90.47a38,38,0,0,0,0,75.06Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M232,104a8,8,0,0,0,8-8V64a16,16,0,0,0-16-16H32A16,16,0,0,0,16,64V96a8,8,0,0,0,8,8,24,24,0,0,1,0,48,8,8,0,0,0-8,8v32a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V160a8,8,0,0,0-8-8,24,24,0,0,1,0-48ZM32,167.2a40,40,0,0,0,0-78.4V64H88V192H32Zm192,0V192H104V64H224V88.8a40,40,0,0,0,0,78.4Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M232,100a4,4,0,0,0,4-4V64a12,12,0,0,0-12-12H32A12,12,0,0,0,20,64V96a4,4,0,0,0,4,4,28,28,0,0,1,0,56,4,4,0,0,0-4,4v32a12,12,0,0,0,12,12H224a12,12,0,0,0,12-12V160a4,4,0,0,0-4-4,28,28,0,0,1,0-56ZM28,192V163.78a36,36,0,0,0,0-71.56V64a4,4,0,0,1,4-4H92V196H32A4,4,0,0,1,28,192Zm168-64a36.06,36.06,0,0,0,32,35.78V192a4,4,0,0,1-4,4H100V60H224a4,4,0,0,1,4,4V92.22A36.06,36.06,0,0,0,196,128Z"}))]]),hl=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M234.38,210a123.36,123.36,0,0,0-60.78-53.23,76,76,0,1,0-91.2,0A123.36,123.36,0,0,0,21.62,210a12,12,0,1,0,20.77,12c18.12-31.32,50.12-50,85.61-50s67.49,18.69,85.61,50a12,12,0,0,0,20.77-12ZM76,96a52,52,0,1,1,52,52A52.06,52.06,0,0,1,76,96Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M192,96a64,64,0,1,1-64-64A64,64,0,0,1,192,96Z",opacity:"0.2"}),u.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M230.93,220a8,8,0,0,1-6.93,4H32a8,8,0,0,1-6.92-12c15.23-26.33,38.7-45.21,66.09-54.16a72,72,0,1,1,73.66,0c27.39,8.95,50.86,27.83,66.09,54.16A8,8,0,0,1,230.93,220Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M229.19,213c-15.81-27.32-40.63-46.49-69.47-54.62a70,70,0,1,0-63.44,0C67.44,166.5,42.62,185.67,26.81,213a6,6,0,1,0,10.38,6C56.4,185.81,90.34,166,128,166s71.6,19.81,90.81,53a6,6,0,1,0,10.38-6ZM70,96a58,58,0,1,1,58,58A58.07,58.07,0,0,1,70,96Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M227.46,214c-16.52-28.56-43-48.06-73.68-55.09a68,68,0,1,0-51.56,0c-30.64,7-57.16,26.53-73.68,55.09a4,4,0,0,0,6.92,4C55,184.19,89.62,164,128,164s73,20.19,92.54,54a4,4,0,0,0,3.46,2,3.93,3.93,0,0,0,2-.54A4,4,0,0,0,227.46,214ZM68,96a60,60,0,1,1,60,60A60.07,60.07,0,0,1,68,96Z"}))]]),pl=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),u.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),Ut=u.forwardRef((e,t)=>u.createElement(Ie,{ref:t,...e,weights:al}));Ut.displayName="AtIcon";const Xr=u.forwardRef((e,t)=>u.createElement(Ie,{ref:t,...e,weights:sl}));Xr.displayName="CaretRightIcon";const Fi=u.forwardRef((e,t)=>u.createElement(Ie,{ref:t,...e,weights:il}));Fi.displayName="CheckIcon";const Vi=u.forwardRef((e,t)=>u.createElement(Ie,{ref:t,...e,weights:ol}));Vi.displayName="EyeIcon";const Yi=u.forwardRef((e,t)=>u.createElement(Ie,{ref:t,...e,weights:cl}));Yi.displayName="EyeSlashIcon";const Hi=u.forwardRef((e,t)=>u.createElement(Ie,{ref:t,...e,weights:ul}));Hi.displayName="KeyIcon";const Gi=u.forwardRef((e,t)=>u.createElement(Ie,{ref:t,...e,weights:ll}));Gi.displayName="NumpadIcon";const ml=u.forwardRef((e,t)=>u.createElement(Ie,{ref:t,...e,weights:dl}));ml.displayName="QuestionIcon";const zi=u.forwardRef((e,t)=>u.createElement(Ie,{ref:t,...e,weights:fl}));zi.displayName="TicketIcon";const Wi=u.forwardRef((e,t)=>u.createElement(Ie,{ref:t,...e,weights:hl}));Wi.displayName="UserIcon";const Ra=u.forwardRef((e,t)=>u.createElement(Ie,{ref:t,...e,weights:pl}));Ra.displayName="XIcon";function me(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function _s(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qi(...e){return t=>{let n=!1;const r=e.map(a=>{const s=_s(a,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let a=0;a<r.length;a++){const s=r[a];typeof s=="function"?s():_s(e[a],null)}}}}function Qe(...e){return u.useCallback(qi(...e),e)}function fm(e,t){const n=u.createContext(t),r=s=>{const{children:i,...c}=s,l=u.useMemo(()=>c,Object.values(c));return g.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function a(s){const i=u.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,a]}function Ki(e,t=[]){let n=[];function r(s,i){const c=u.createContext(i),l=n.length;n=[...n,i];const d=p=>{var I;const{scope:_,children:v,...w}=p,T=((I=_==null?void 0:_[e])==null?void 0:I[l])||c,x=u.useMemo(()=>w,Object.values(w));return g.jsx(T.Provider,{value:x,children:v})};d.displayName=s+"Provider";function f(p,_){var T;const v=((T=_==null?void 0:_[e])==null?void 0:T[l])||c,w=u.useContext(v);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[d,f]}const a=()=>{const s=n.map(i=>u.createContext(i));return function(c){const l=(c==null?void 0:c[e])||s;return u.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return a.scopeName=e,[r,_l(a,...t)]}function _l(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const i=r.reduce((c,{useScope:l,scopeName:d})=>{const p=l(s)[`__scope${d}`];return{...c,...p}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Jr(e){const t=gl(e),n=u.forwardRef((r,a)=>{const{children:s,...i}=r,c=u.Children.toArray(s),l=c.find(yl);if(l){const d=l.props.children,f=c.map(p=>p===l?u.Children.count(d)>1?u.Children.only(null):u.isValidElement(d)?d.props.children:null:p);return g.jsx(t,{...i,ref:a,children:u.isValidElement(d)?u.cloneElement(d,void 0,f):null})}return g.jsx(t,{...i,ref:a,children:s})});return n.displayName=`${e}.Slot`,n}function gl(e){const t=u.forwardRef((n,r)=>{const{children:a,...s}=n;if(u.isValidElement(a)){const i=El(a),c=bl(s,a.props);return a.type!==u.Fragment&&(c.ref=r?qi(r,i):i),u.cloneElement(a,c)}return u.Children.count(a)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vl=Symbol("radix.slottable");function yl(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vl}function bl(e,t){const n={...t};for(const r in t){const a=e[r],s=t[r];/^on[A-Z]/.test(r)?a&&s?n[r]=(...c)=>{const l=s(...c);return a(...c),l}:a&&(n[r]=a):r==="style"?n[r]={...a,...s}:r==="className"&&(n[r]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function El(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function xl(e){const t=e+"CollectionProvider",[n,r]=Ki(t),[a,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=T=>{const{scope:x,children:I}=T,R=ot.useRef(null),D=ot.useRef(new Map).current;return g.jsx(a,{scope:x,itemMap:D,collectionRef:R,children:I})};i.displayName=t;const c=e+"CollectionSlot",l=Jr(c),d=ot.forwardRef((T,x)=>{const{scope:I,children:R}=T,D=s(c,I),C=Qe(x,D.collectionRef);return g.jsx(l,{ref:C,children:R})});d.displayName=c;const f=e+"CollectionItemSlot",p="data-radix-collection-item",_=Jr(f),v=ot.forwardRef((T,x)=>{const{scope:I,children:R,...D}=T,C=ot.useRef(null),j=Qe(x,C),O=s(f,I);return ot.useEffect(()=>(O.itemMap.set(C,{ref:C,...D}),()=>void O.itemMap.delete(C))),g.jsx(_,{[p]:"",ref:j,children:R})});v.displayName=f;function w(T){const x=s(e+"CollectionConsumer",T);return ot.useCallback(()=>{const R=x.collectionRef.current;if(!R)return[];const D=Array.from(R.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((O,L)=>D.indexOf(O.ref.current)-D.indexOf(L.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:d,ItemSlot:v},w,r]}var Tl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Re=Tl.reduce((e,t)=>{const n=Jr(`Primitive.${t}`),r=u.forwardRef((a,s)=>{const{asChild:i,...c}=a,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Xi(e,t){e&&Ia.flushSync(()=>e.dispatchEvent(t))}function Ye(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function wl(e,t=globalThis==null?void 0:globalThis.document){const n=Ye(e);u.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Sl="DismissableLayer",Qr="dismissableLayer.update",Cl="dismissableLayer.pointerDownOutside",Il="dismissableLayer.focusOutside",gs,Ji=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qi=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...l}=e,d=u.useContext(Ji),[f,p]=u.useState(null),_=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=u.useState({}),w=Qe(t,L=>p(L)),T=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),I=T.indexOf(x),R=f?T.indexOf(f):-1,D=d.layersWithOutsidePointerEventsDisabled.size>0,C=R>=I,j=Al(L=>{const H=L.target,q=[...d.branches].some(B=>B.contains(H));!C||q||(a==null||a(L),i==null||i(L),L.defaultPrevented||c==null||c())},_),O=Dl(L=>{const H=L.target;[...d.branches].some(B=>B.contains(H))||(s==null||s(L),i==null||i(L),L.defaultPrevented||c==null||c())},_);return wl(L=>{R===d.layers.size-1&&(r==null||r(L),!L.defaultPrevented&&c&&(L.preventDefault(),c()))},_),u.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(gs=_.body.style.pointerEvents,_.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),vs(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(_.body.style.pointerEvents=gs)}},[f,_,n,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),vs())},[f,d]),u.useEffect(()=>{const L=()=>v({});return document.addEventListener(Qr,L),()=>document.removeEventListener(Qr,L)},[]),g.jsx(Re.div,{...l,ref:w,style:{pointerEvents:D?C?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,O.onFocusCapture),onBlurCapture:me(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,j.onPointerDownCapture)})});Qi.displayName=Sl;var Rl="DismissableLayerBranch",eo=u.forwardRef((e,t)=>{const n=u.useContext(Ji),r=u.useRef(null),a=Qe(t,r);return u.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),g.jsx(Re.div,{...e,ref:a})});eo.displayName=Rl;function Al(e,t=globalThis==null?void 0:globalThis.document){const n=Ye(e),r=u.useRef(!1),a=u.useRef(()=>{});return u.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let l=function(){to(Cl,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=l,t.addEventListener("click",a.current,{once:!0})):l()}else t.removeEventListener("click",a.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Dl(e,t=globalThis==null?void 0:globalThis.document){const n=Ye(e),r=u.useRef(!1);return u.useEffect(()=>{const a=s=>{s.target&&!r.current&&to(Il,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function vs(){const e=new CustomEvent(Qr);document.dispatchEvent(e)}function to(e,t,n,{discrete:r}){const a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Xi(a,s):a.dispatchEvent(s)}var Nl=Qi,kl=eo,kt=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},Pl="Portal",no=u.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[a,s]=u.useState(!1);kt(()=>s(!0),[]);const i=n||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?el.createPortal(g.jsx(Re.div,{...r,ref:t}),i):null});no.displayName=Pl;function jl(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var ro=e=>{const{present:t,children:n}=e,r=Ol(t),a=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),s=Qe(r.ref,Zl(a));return typeof n=="function"||r.isPresent?u.cloneElement(a,{ref:s}):null};ro.displayName="Presence";function Ol(e){const[t,n]=u.useState(),r=u.useRef(null),a=u.useRef(e),s=u.useRef("none"),i=e?"mounted":"unmounted",[c,l]=jl(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const d=Cn(r.current);s.current=c==="mounted"?d:"none"},[c]),kt(()=>{const d=r.current,f=a.current;if(f!==e){const _=s.current,v=Cn(d);e?l("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(f&&_!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),kt(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=v=>{const T=Cn(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&T&&(l("ANIMATION_END"),!a.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},_=v=>{v.target===t&&(s.current=Cn(r.current))};return t.addEventListener("animationstart",_),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",_),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:u.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Cn(e){return(e==null?void 0:e.animationName)||"none"}function Zl(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ml=Li[" useInsertionEffect ".trim().toString()]||kt;function Ll({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,s,i]=Ul({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:a;{const f=u.useRef(e!==void 0);u.useEffect(()=>{const p=f.current;p!==c&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=c},[c,r])}const d=u.useCallback(f=>{var p;if(c){const _=$l(f)?f(e):f;_!==e&&((p=i.current)==null||p.call(i,_))}else s(f)},[c,e,s,i]);return[l,d]}function Ul({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),a=u.useRef(n),s=u.useRef(t);return Ml(()=>{s.current=t},[t]),u.useEffect(()=>{var i;a.current!==n&&((i=s.current)==null||i.call(s,n),a.current=n)},[n,a]),[n,r,s]}function $l(e){return typeof e=="function"}var Bl=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Fl="VisuallyHidden",Aa=u.forwardRef((e,t)=>g.jsx(Re.span,{...e,ref:t,style:{...Bl,...e.style}}));Aa.displayName=Fl;var Da="ToastProvider",[Na,Vl,Yl]=xl("Toast"),[ao,hm]=Ki("Toast",[Yl]),[Hl,or]=ao(Da),so=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:s=50,children:i}=e,[c,l]=u.useState(null),[d,f]=u.useState(0),p=u.useRef(!1),_=u.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Da}\`. Expected non-empty \`string\`.`),g.jsx(Na.Provider,{scope:t,children:g.jsx(Hl,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:s,toastCount:d,viewport:c,onViewportChange:l,onToastAdd:u.useCallback(()=>f(v=>v+1),[]),onToastRemove:u.useCallback(()=>f(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:_,children:i})})};so.displayName=Da;var io="ToastViewport",Gl=["F8"],ea="toast.viewportPause",ta="toast.viewportResume",oo=u.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=Gl,label:a="Notifications ({hotkey})",...s}=e,i=or(io,n),c=Vl(n),l=u.useRef(null),d=u.useRef(null),f=u.useRef(null),p=u.useRef(null),_=Qe(t,p,i.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=i.toastCount>0;u.useEffect(()=>{const x=I=>{var D;r.length!==0&&r.every(C=>I[C]||I.code===C)&&((D=p.current)==null||D.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),u.useEffect(()=>{const x=l.current,I=p.current;if(w&&x&&I){const R=()=>{if(!i.isClosePausedRef.current){const O=new CustomEvent(ea);I.dispatchEvent(O),i.isClosePausedRef.current=!0}},D=()=>{if(i.isClosePausedRef.current){const O=new CustomEvent(ta);I.dispatchEvent(O),i.isClosePausedRef.current=!1}},C=O=>{!x.contains(O.relatedTarget)&&D()},j=()=>{x.contains(document.activeElement)||D()};return x.addEventListener("focusin",R),x.addEventListener("focusout",C),x.addEventListener("pointermove",R),x.addEventListener("pointerleave",j),window.addEventListener("blur",R),window.addEventListener("focus",D),()=>{x.removeEventListener("focusin",R),x.removeEventListener("focusout",C),x.removeEventListener("pointermove",R),x.removeEventListener("pointerleave",j),window.removeEventListener("blur",R),window.removeEventListener("focus",D)}}},[w,i.isClosePausedRef]);const T=u.useCallback(({tabbingDirection:x})=>{const R=c().map(D=>{const C=D.ref.current,j=[C,...id(C)];return x==="forwards"?j:j.reverse()});return(x==="forwards"?R.reverse():R).flat()},[c]);return u.useEffect(()=>{const x=p.current;if(x){const I=R=>{var j,O,L;const D=R.altKey||R.ctrlKey||R.metaKey;if(R.key==="Tab"&&!D){const H=document.activeElement,q=R.shiftKey;if(R.target===x&&q){(j=d.current)==null||j.focus();return}const z=T({tabbingDirection:q?"backwards":"forwards"}),ue=z.findIndex(Y=>Y===H);Ar(z.slice(ue+1))?R.preventDefault():q?(O=d.current)==null||O.focus():(L=f.current)==null||L.focus()}};return x.addEventListener("keydown",I),()=>x.removeEventListener("keydown",I)}},[c,T]),g.jsxs(kl,{ref:l,role:"region","aria-label":a.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&g.jsx(na,{ref:d,onFocusFromOutsideViewport:()=>{const x=T({tabbingDirection:"forwards"});Ar(x)}}),g.jsx(Na.Slot,{scope:n,children:g.jsx(Re.ol,{tabIndex:-1,...s,ref:_})}),w&&g.jsx(na,{ref:f,onFocusFromOutsideViewport:()=>{const x=T({tabbingDirection:"backwards"});Ar(x)}})]})});oo.displayName=io;var co="ToastFocusProxy",na=u.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,s=or(co,n);return g.jsx(Aa,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:i=>{var d;const c=i.relatedTarget;!((d=s.viewport)!=null&&d.contains(c))&&r()}})});na.displayName=co;var fn="Toast",zl="toast.swipeStart",Wl="toast.swipeMove",ql="toast.swipeCancel",Kl="toast.swipeEnd",uo=u.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:s,...i}=e,[c,l]=Ll({prop:r,defaultProp:a??!0,onChange:s,caller:fn});return g.jsx(ro,{present:n||c,children:g.jsx(Ql,{open:c,...i,ref:t,onClose:()=>l(!1),onPause:Ye(e.onPause),onResume:Ye(e.onResume),onSwipeStart:me(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:me(e.onSwipeMove,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:me(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:me(e.onSwipeEnd,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),l(!1)})})})});uo.displayName=fn;var[Xl,Jl]=ao(fn,{onClose(){}}),Ql=u.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:a,open:s,onClose:i,onEscapeKeyDown:c,onPause:l,onResume:d,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:_,onSwipeEnd:v,...w}=e,T=or(fn,n),[x,I]=u.useState(null),R=Qe(t,Y=>I(Y)),D=u.useRef(null),C=u.useRef(null),j=a||T.duration,O=u.useRef(0),L=u.useRef(j),H=u.useRef(0),{onToastAdd:q,onToastRemove:B}=T,$=Ye(()=>{var ne;(x==null?void 0:x.contains(document.activeElement))&&((ne=T.viewport)==null||ne.focus()),i()}),z=u.useCallback(Y=>{!Y||Y===1/0||(window.clearTimeout(H.current),O.current=new Date().getTime(),H.current=window.setTimeout($,Y))},[$]);u.useEffect(()=>{const Y=T.viewport;if(Y){const ne=()=>{z(L.current),d==null||d()},X=()=>{const Q=new Date().getTime()-O.current;L.current=L.current-Q,window.clearTimeout(H.current),l==null||l()};return Y.addEventListener(ea,X),Y.addEventListener(ta,ne),()=>{Y.removeEventListener(ea,X),Y.removeEventListener(ta,ne)}}},[T.viewport,j,l,d,z]),u.useEffect(()=>{s&&!T.isClosePausedRef.current&&z(j)},[s,j,T.isClosePausedRef,z]),u.useEffect(()=>(q(),()=>B()),[q,B]);const ue=u.useMemo(()=>x?_o(x):null,[x]);return T.viewport?g.jsxs(g.Fragment,{children:[ue&&g.jsx(ed,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:ue}),g.jsx(Xl,{scope:n,onClose:$,children:Ia.createPortal(g.jsx(Na.ItemSlot,{scope:n,children:g.jsx(Nl,{asChild:!0,onEscapeKeyDown:me(c,()=>{T.isFocusedToastEscapeKeyDownRef.current||$(),T.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(Re.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":T.swipeDirection,...w,ref:R,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:me(e.onKeyDown,Y=>{Y.key==="Escape"&&(c==null||c(Y.nativeEvent),Y.nativeEvent.defaultPrevented||(T.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:me(e.onPointerDown,Y=>{Y.button===0&&(D.current={x:Y.clientX,y:Y.clientY})}),onPointerMove:me(e.onPointerMove,Y=>{if(!D.current)return;const ne=Y.clientX-D.current.x,X=Y.clientY-D.current.y,Q=!!C.current,rt=["left","right"].includes(T.swipeDirection),gt=["left","up"].includes(T.swipeDirection)?Math.min:Math.max,wr=rt?gt(0,ne):0,fe=rt?0:gt(0,X),Yt=Y.pointerType==="touch"?10:2,he={x:wr,y:fe},be={originalEvent:Y,delta:he};Q?(C.current=he,In(Wl,p,be,{discrete:!1})):ys(he,T.swipeDirection,Yt)?(C.current=he,In(zl,f,be,{discrete:!1}),Y.target.setPointerCapture(Y.pointerId)):(Math.abs(ne)>Yt||Math.abs(X)>Yt)&&(D.current=null)}),onPointerUp:me(e.onPointerUp,Y=>{const ne=C.current,X=Y.target;if(X.hasPointerCapture(Y.pointerId)&&X.releasePointerCapture(Y.pointerId),C.current=null,D.current=null,ne){const Q=Y.currentTarget,rt={originalEvent:Y,delta:ne};ys(ne,T.swipeDirection,T.swipeThreshold)?In(Kl,v,rt,{discrete:!0}):In(ql,_,rt,{discrete:!0}),Q.addEventListener("click",gt=>gt.preventDefault(),{once:!0})}})})})}),T.viewport)})]}):null}),ed=e=>{const{__scopeToast:t,children:n,...r}=e,a=or(fn,t),[s,i]=u.useState(!1),[c,l]=u.useState(!1);return ad(()=>i(!0)),u.useEffect(()=>{const d=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:g.jsx(no,{asChild:!0,children:g.jsx(Aa,{...r,children:s&&g.jsxs(g.Fragment,{children:[a.label," ",n]})})})},td="ToastTitle",lo=u.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return g.jsx(Re.div,{...r,ref:t})});lo.displayName=td;var nd="ToastDescription",fo=u.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return g.jsx(Re.div,{...r,ref:t})});fo.displayName=nd;var ho="ToastAction",rd=u.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?g.jsx(mo,{altText:n,asChild:!0,children:g.jsx(ka,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ho}\`. Expected non-empty \`string\`.`),null)});rd.displayName=ho;var po="ToastClose",ka=u.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=Jl(po,n);return g.jsx(mo,{asChild:!0,children:g.jsx(Re.button,{type:"button",...r,ref:t,onClick:me(e.onClick,a.onClose)})})});ka.displayName=po;var mo=u.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return g.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function _o(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),sd(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!a)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(..._o(r))}}),t}function In(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Xi(a,s):a.dispatchEvent(s)}var ys=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),s=r>a;return t==="left"||t==="right"?s&&r>n:!s&&a>n};function ad(e=()=>{}){const t=Ye(e);kt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function sd(e){return e.nodeType===e.ELEMENT_NODE}function id(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ar(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var od=so,cd=oo,ud=uo,ld=lo,dd=fo,fd=ka;const Pa=u.createContext({notify:e=>(console.warn("Notification triggered without a provider:",e),{update(){},close(){}})});Pa.displayName="NotificationsContext";const hd={success:"border-success-200 dark:border-success-900",warning:"border-warning-200 dark:border-warning-900",error:"border-error-200 dark:border-error-900",info:"border-info-200 dark:border-info-900"},pd={success:"bg-success-50 dark:bg-success-975",warning:"bg-warning-100 dark:bg-warning-975",error:"bg-error-50 dark:bg-error-975",info:"bg-info-50 dark:bg-info-975"},Dr={success:"text-success-900 dark:text-success-400",warning:"text-warning-800 dark:text-warning-400",error:"text-error-800 dark:text-error-50",info:"text-info-900 dark:text-info-400"};function pm({children:e,duration:t=5e3,swipeDirection:n="down",...r}){const[a,s]=u.useState([]),i=u.useRef(0),c=u.useMemo(()=>({notify:l=>{const d=i.current++,f={update(_){s(v=>v.map(w=>w.id===d?{...w,options:{...w.options,..._}}:w)),_.duration!=null&&(clearTimeout(p),p=setTimeout(f.close,_.duration))},close:()=>{clearTimeout(p),s(_=>_.filter(v=>v.id!==d))}};let p=setTimeout(f.close,l.duration??t);return s(_=>[..._,{id:d,handler:f,options:l}]),f}}),[]);return g.jsxs(od,{swipeDirection:n,duration:0,...r,children:[g.jsx(Pa,{value:c,children:e}),a.map(({id:l,handler:d,options:{description:f,title:p,variant:_}})=>g.jsxs(ud,{className:te("relative mb-4 rounded-2xl border py-3 pl-6 pr-8 shadow-lg","shadow-contrast-900/15 dark:shadow-contrast-0/60",hd[_],pd[_]),children:[g.jsx(ld,{className:te("text-sm font-semibold leading-snug",Dr[_]),children:p}),f&&g.jsx(dd,{className:te(Dr[_]),children:f}),g.jsx(fd,{className:"absolute right-4 top-1/2 -translate-y-1/2",onClick:d.close,children:g.jsx(Ra,{className:te("size-5",Dr[_])})})]},l)),g.jsx(cd,{className:"fixed bottom-0 left-6 right-6 mx-auto max-w-[400px] pt-8"})]})}function md(){return u.useContext(Pa)}function _d(e,t,n){if(!e)return[t];const r=e.findIndex(n);return r===-1?[...e,t]:[...e.slice(0,r),t,...e.slice(r+1)]}const ja=u.createContext(null);ja.displayName="SessionContext";var mm=function(e){return e[e.First=0]="First",e[e.Only=1]="Only",e}({});function _m({children:e,initialSessions:t,initialSelected:n}){const{i18n:r,_:a}=oe(),s=Yu(),{showBoundary:i}=rl(),{notify:c}=md(),[l,d]=u.useState(()=>{var B;return n===0?((B=t[0])==null?void 0:B.account.sub)??null:n===1?t.length===1?t[0].account.sub:null:t.some($=>$.account.sub===n)?n:null}),[f,p]=u.useState(t),_=u.useMemo(()=>l?f.find(B=>B.account.sub===l)??null:null,[f,l]),v=u.useCallback(B=>{d(B&&f.some($=>$.account.sub===B.account.sub)?B.account.sub:null)},[f,d]),w=u.useCallback(({account:B,ephemeralToken:$,consentRequired:z=!0,loginRequired:ue=!1})=>{p(Y=>_d(Y,{account:B,ephemeralToken:$,loginRequired:ue,consentRequired:z},ne=>ne.account.sub===B.sub)),d(B.sub)},[d,p]),T=u.useCallback(B=>{p($=>$.filter(z=>z.account.sub!==B)),d($=>$===B?null:$)},[]),x=u.useMemo(()=>new zu({onFetchError(B){throw B instanceof Wu&&i(B),B instanceof qu&&(_&&T(_.account.sub),c({variant:"error",title:r._({id:"dA/8If"}),description:r._({id:"Z3PAZP"})})),B},headers:_!=null&&_.ephemeralToken?()=>({Authorization:`Bearer ${_.ephemeralToken}`}):void 0}),[_,i,d,c,a]),I=u.useCallback(async B=>{const $=await x.fetch("POST","/sign-in",{...B,locale:s});w($)},[x,s,w]),R=u.useCallback(async B=>{await x.fetch("POST","/reset-password-request",{...B,locale:s})},[x,s]),D=u.useCallback(async B=>{await x.fetch("POST","/reset-password-confirm",B)},[x]),C=u.useCallback(async B=>{await x.fetch("POST","/verify-handle-availability",B)},[x]),j=u.useCallback(async B=>{const $=await x.fetch("POST","/sign-up",{...B,locale:s});w($)},[x,s,w]),O=u.useCallback(async({sub:B})=>{await x.fetch("POST","/sign-out",{sub:B}),p($=>$.filter(z=>z.account.sub!==B)),d($=>$===B?null:$)},[x]),L=u.useCallback(async(B,$)=>x.fetch("POST","/consent",{sub:B,scope:$}),[x,f]),H=u.useCallback(async()=>x.fetch("POST","/reject",{}),[x]),q=u.useMemo(()=>({api:x,sessions:f,session:_,setSession:v,doSignIn:I,doSignOut:O,doInitiatePasswordReset:R,doConfirmResetPassword:D,doValidateNewHandle:C,doSignUp:j,doConsent:L,doReject:H}),[x,f,_,v,I,O,R,D,C,j,L,H]);return g.jsx(ja,{value:q,children:e})}function go(){const e=u.useContext(ja);if(e)return e;throw new Error("useSessionContext must be used within a SessionProvider")}function gm(){const{api:e}=go();return e}var Nr=0;function vm(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bs()),document.body.insertAdjacentElement("beforeend",e[1]??bs()),Nr++,()=>{Nr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Nr--}},[])}function bs(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var kr="focusScope.autoFocusOnMount",Pr="focusScope.autoFocusOnUnmount",Es={bubbles:!1,cancelable:!0},gd="FocusScope",vd=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...i}=e,[c,l]=u.useState(null),d=Ye(a),f=Ye(s),p=u.useRef(null),_=Qe(t,T=>l(T)),v=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let T=function(D){if(v.paused||!c)return;const C=D.target;c.contains(C)?p.current=C:qe(p.current,{select:!0})},x=function(D){if(v.paused||!c)return;const C=D.relatedTarget;C!==null&&(c.contains(C)||qe(p.current,{select:!0}))},I=function(D){if(document.activeElement===document.body)for(const j of D)j.removedNodes.length>0&&qe(c)};document.addEventListener("focusin",T),document.addEventListener("focusout",x);const R=new MutationObserver(I);return c&&R.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",T),document.removeEventListener("focusout",x),R.disconnect()}}},[r,c,v.paused]),u.useEffect(()=>{if(c){Ts.add(v);const T=document.activeElement;if(!c.contains(T)){const I=new CustomEvent(kr,Es);c.addEventListener(kr,d),c.dispatchEvent(I),I.defaultPrevented||(yd(wd(vo(c)),{select:!0}),document.activeElement===T&&qe(c))}return()=>{c.removeEventListener(kr,d),setTimeout(()=>{const I=new CustomEvent(Pr,Es);c.addEventListener(Pr,f),c.dispatchEvent(I),I.defaultPrevented||qe(T??document.body,{select:!0}),c.removeEventListener(Pr,f),Ts.remove(v)},0)}}},[c,d,f,v]);const w=u.useCallback(T=>{if(!n&&!r||v.paused)return;const x=T.key==="Tab"&&!T.altKey&&!T.ctrlKey&&!T.metaKey,I=document.activeElement;if(x&&I){const R=T.currentTarget,[D,C]=bd(R);D&&C?!T.shiftKey&&I===C?(T.preventDefault(),n&&qe(D,{select:!0})):T.shiftKey&&I===D&&(T.preventDefault(),n&&qe(C,{select:!0})):I===R&&T.preventDefault()}},[n,r,v.paused]);return g.jsx(Re.div,{tabIndex:-1,...i,ref:_,onKeyDown:w})});vd.displayName=gd;function yd(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(qe(r,{select:t}),document.activeElement!==n)return}function bd(e){const t=vo(e),n=xs(t,e),r=xs(t.reverse(),e);return[n,r]}function vo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xs(e,t){for(const n of e)if(!Ed(n,{upTo:t}))return n}function Ed(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 xd(e){return e instanceof HTMLInputElement&&"select"in e}function qe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xd(e)&&t&&e.select()}}var Ts=Td();function Td(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ws(e,t),e.unshift(t)},remove(t){var n;e=ws(e,t),(n=e[0])==null||n.resume()}}}function ws(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function wd(e){return e.filter(t=>t.tagName!=="A")}var Sd=Li[" useId ".trim().toString()]||(()=>{}),Cd=0;function ym(e){const[t,n]=u.useState(Sd());return kt(()=>{n(r=>r??String(Cd++))},[e]),e||(t?`radix-${t}`:"")}var Id=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xt=new WeakMap,Rn=new WeakMap,An={},jr=0,yo=function(e){return e&&(e.host||yo(e.parentNode))},Rd=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=yo(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})},Ad=function(e,t,n,r){var a=Rd(t,Array.isArray(e)?e:[e]);An[n]||(An[n]=new WeakMap);var s=An[n],i=[],c=new Set,l=new Set(a),d=function(p){!p||c.has(p)||(c.add(p),d(p.parentNode))};a.forEach(d);var f=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(_){if(c.has(_))f(_);else try{var v=_.getAttribute(r),w=v!==null&&v!=="false",T=(xt.get(_)||0)+1,x=(s.get(_)||0)+1;xt.set(_,T),s.set(_,x),i.push(_),T===1&&w&&Rn.set(_,!0),x===1&&_.setAttribute(n,"true"),w||_.setAttribute(r,"true")}catch(I){console.error("aria-hidden: cannot operate on ",_,I)}})};return f(t),c.clear(),jr++,function(){i.forEach(function(p){var _=xt.get(p)-1,v=s.get(p)-1;xt.set(p,_),s.set(p,v),_||(Rn.has(p)||p.removeAttribute(r),Rn.delete(p)),v||p.removeAttribute(n)}),jr--,jr||(xt=new WeakMap,xt=new WeakMap,Rn=new WeakMap,An={})}},bm=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Id(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),Ad(r,a,n,"aria-hidden")):function(){return null}},ra=function(e,t){return ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},ra(e,t)};function bo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ra(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ve=function(){return ve=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ve.apply(this,arguments)};function cr(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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function Eo(e,t,n,r){var a=arguments.length,s=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(i=e[c])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s}function xo(e,t){return function(n,r){t(n,r,e)}}function To(e,t,n,r,a,s){function i(I){if(I!==void 0&&typeof I!="function")throw new TypeError("Function expected");return I}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,_=!1,v=n.length-1;v>=0;v--){var w={};for(var T in r)w[T]=T==="access"?{}:r[T];for(var T in r.access)w.access[T]=r.access[T];w.addInitializer=function(I){if(_)throw new TypeError("Cannot add initializers after decoration has completed");s.push(i(I||null))};var x=(0,n[v])(c==="accessor"?{get:f.get,set:f.set}:f[l],w);if(c==="accessor"){if(x===void 0)continue;if(x===null||typeof x!="object")throw new TypeError("Object expected");(p=i(x.get))&&(f.get=p),(p=i(x.set))&&(f.set=p),(p=i(x.init))&&a.unshift(p)}else(p=i(x))&&(c==="field"?a.unshift(p):f[l]=p)}d&&Object.defineProperty(d,r.name,f),_=!0}function wo(e,t,n){for(var r=arguments.length>2,a=0;a<t.length;a++)n=r?t[a].call(e,n):t[a].call(e);return r?n:void 0}function So(e){return typeof e=="symbol"?e:"".concat(e)}function Co(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function Io(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Ro(e,t,n,r){function a(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function c(f){try{d(r.next(f))}catch(p){i(p)}}function l(f){try{d(r.throw(f))}catch(p){i(p)}}function d(f){f.done?s(f.value):a(f.value).then(c,l)}d((r=r.apply(e,t||[])).next())})}function Ao(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,a,s,i=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(d){return function(f){return l([d,f])}}function l(d){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,d[0]&&(n=0)),n;)try{if(r=1,a&&(s=d[0]&2?a.return:d[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,d[1])).done)return s;switch(a=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,a=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){n.label=d[1];break}if(d[0]===6&&n.label<s[1]){n.label=s[1],s=d;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(d);break}s[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(f){d=[6,f],a=0}finally{r=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}var ur=Object.create?function(e,t,n,r){r===void 0&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};function Do(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ur(t,e,n)}function nr(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Oa(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),a,s=[],i;try{for(;(t===void 0||t-- >0)&&!(a=r.next()).done;)s.push(a.value)}catch(c){i={error:c}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function No(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Oa(arguments[t]));return e}function ko(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),a=0,t=0;t<n;t++)for(var s=arguments[t],i=0,c=s.length;i<c;i++,a++)r[a]=s[i];return r}function Za(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,s;r<a;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function Pt(e){return this instanceof Pt?(this.v=e,this):new Pt(e)}function Po(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),a,s=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),c("next"),c("throw"),c("return",i),a[Symbol.asyncIterator]=function(){return this},a;function i(v){return function(w){return Promise.resolve(w).then(v,p)}}function c(v,w){r[v]&&(a[v]=function(T){return new Promise(function(x,I){s.push([v,T,x,I])>1||l(v,T)})},w&&(a[v]=w(a[v])))}function l(v,w){try{d(r[v](w))}catch(T){_(s[0][3],T)}}function d(v){v.value instanceof Pt?Promise.resolve(v.value.v).then(f,p):_(s[0][2],v)}function f(v){l("next",v)}function p(v){l("throw",v)}function _(v,w){v(w),s.shift(),s.length&&l(s[0][0],s[0][1])}}function jo(e){var t,n;return t={},r("next"),r("throw",function(a){throw a}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(a,s){t[a]=e[a]?function(i){return(n=!n)?{value:Pt(e[a](i)),done:!1}:s?s(i):i}:s}}function Oo(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof nr=="function"?nr(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(i){return new Promise(function(c,l){i=e[s](i),a(c,l,i.done,i.value)})}}function a(s,i,c,l){Promise.resolve(l).then(function(d){s({value:d,done:c})},i)}}function Zo(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Dd=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},aa=function(e){return aa=Object.getOwnPropertyNames||function(t){var n=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[n.length]=r);return n},aa(e)};function Mo(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=aa(e),r=0;r<n.length;r++)n[r]!=="default"&&ur(t,e,n[r]);return Dd(t,e),t}function Lo(e){return e&&e.__esModule?e:{default:e}}function Uo(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function $o(e,t,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(e,n):a?a.value=n:t.set(e,n),n}function Bo(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Fo(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,a;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(a=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");a&&(r=function(){try{a.call(this)}catch(s){return Promise.reject(s)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var Nd=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function Vo(e){function t(s){e.error=e.hasError?new Nd(s,e.error,"An error was suppressed during disposal."):s,e.hasError=!0}var n,r=0;function a(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(a);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(s).then(a,function(i){return t(i),a()})}else r|=1}catch(i){t(i)}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return a()}function Yo(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,a,s,i){return r?t?".jsx":".js":a&&(!s||!i)?n:a+s+"."+i.toLowerCase()+"js"}):e}const kd={__extends:bo,__assign:ve,__rest:cr,__decorate:Eo,__param:xo,__esDecorate:To,__runInitializers:wo,__propKey:So,__setFunctionName:Co,__metadata:Io,__awaiter:Ro,__generator:Ao,__createBinding:ur,__exportStar:Do,__values:nr,__read:Oa,__spread:No,__spreadArrays:ko,__spreadArray:Za,__await:Pt,__asyncGenerator:Po,__asyncDelegator:jo,__asyncValues:Oo,__makeTemplateObject:Zo,__importStar:Mo,__importDefault:Lo,__classPrivateFieldGet:Uo,__classPrivateFieldSet:$o,__classPrivateFieldIn:Bo,__addDisposableResource:Fo,__disposeResources:Vo,__rewriteRelativeImportExtension:Yo},Em=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Fo,get __assign(){return ve},__asyncDelegator:jo,__asyncGenerator:Po,__asyncValues:Oo,__await:Pt,__awaiter:Ro,__classPrivateFieldGet:Uo,__classPrivateFieldIn:Bo,__classPrivateFieldSet:$o,__createBinding:ur,__decorate:Eo,__disposeResources:Vo,__esDecorate:To,__exportStar:Do,__extends:bo,__generator:Ao,__importDefault:Lo,__importStar:Mo,__makeTemplateObject:Zo,__metadata:Io,__param:xo,__propKey:So,__read:Oa,__rest:cr,__rewriteRelativeImportExtension:Yo,__runInitializers:wo,__setFunctionName:Co,__spread:No,__spreadArray:Za,__spreadArrays:ko,__values:nr,default:kd},Symbol.toStringTag,{value:"Module"}));var Kn="right-scroll-bar-position",Xn="width-before-scroll-bar",Pd="with-scroll-bars-hidden",jd="--removed-body-scroll-bar-size";function Or(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Od(e,t){var n=u.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var Zd=typeof window<"u"?u.useLayoutEffect:u.useEffect,Ss=new WeakMap;function Md(e,t){var n=Od(null,function(r){return e.forEach(function(a){return Or(a,r)})});return Zd(function(){var r=Ss.get(n);if(r){var a=new Set(r),s=new Set(e),i=n.current;a.forEach(function(c){s.has(c)||Or(c,null)}),s.forEach(function(c){a.has(c)||Or(c,i)})}Ss.set(n,e)},[e]),n}function Ld(e){return e}function Ud(e,t){t===void 0&&(t=Ld);var n=[],r=!1,a={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(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(s),i=n}var l=function(){var f=i;i=[],f.forEach(s)},d=function(){return Promise.resolve().then(l)};d(),n={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),n}}}};return a}function $d(e){e===void 0&&(e={});var t=Ud(null);return t.options=ve({async:!0,ssr:!1},e),t}var Ho=function(e){var t=e.sideCar,n=cr(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 u.createElement(r,ve({},n))};Ho.isSideCarExport=!0;function Bd(e,t){return e.useMedium(t),Ho}var Go=$d(),Zr=function(){},lr=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:Zr,onWheelCapture:Zr,onTouchMoveCapture:Zr}),a=r[0],s=r[1],i=e.forwardProps,c=e.children,l=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,_=e.sideCar,v=e.noIsolation,w=e.inert,T=e.allowPinchZoom,x=e.as,I=x===void 0?"div":x,R=e.gapMode,D=cr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=_,j=Md([n,t]),O=ve(ve({},D),a);return u.createElement(u.Fragment,null,f&&u.createElement(C,{sideCar:Go,removeScrollBar:d,shards:p,noIsolation:v,inert:w,setCallbacks:s,allowPinchZoom:!!T,lockRef:n,gapMode:R}),i?u.cloneElement(u.Children.only(c),ve(ve({},O),{ref:j})):u.createElement(I,ve({},O,{className:l,ref:j}),c))});lr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lr.classNames={fullWidth:Xn,zeroRight:Kn};var Fd=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Vd(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Fd();return t&&e.setAttribute("nonce",t),e}function Yd(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hd(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Gd=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Vd())&&(Yd(t,n),Hd(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zd=function(){var e=Gd();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zo=function(){var e=zd(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},Wd={left:0,top:0,right:0,gap:0},Mr=function(e){return parseInt(e||"",10)||0},qd=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Mr(n),Mr(r),Mr(a)]},Kd=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wd;var t=qd(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])}},Xd=zo(),At="data-scroll-locked",Jd=function(e,t,n,r){var a=e.left,s=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(Pd,` {
|
|
3
|
-
overflow: hidden `).concat(r,`;
|
|
4
|
-
padding-right: `).concat(c,"px ").concat(r,`;
|
|
5
|
-
}
|
|
6
|
-
body[`).concat(At,`] {
|
|
7
|
-
overflow: hidden `).concat(r,`;
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
-
padding-left: `.concat(a,`px;
|
|
11
|
-
padding-top: `).concat(s,`px;
|
|
12
|
-
padding-right: `).concat(i,`px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
16
|
-
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.`).concat(Kn,` {
|
|
20
|
-
right: `).concat(c,"px ").concat(r,`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.`).concat(Xn,` {
|
|
24
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.`).concat(Kn," .").concat(Kn,` {
|
|
28
|
-
right: 0 `).concat(r,`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.`).concat(Xn," .").concat(Xn,` {
|
|
32
|
-
margin-right: 0 `).concat(r,`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[`).concat(At,`] {
|
|
36
|
-
`).concat(jd,": ").concat(c,`px;
|
|
37
|
-
}
|
|
38
|
-
`)},Cs=function(){var e=parseInt(document.body.getAttribute(At)||"0",10);return isFinite(e)?e:0},Qd=function(){u.useEffect(function(){return document.body.setAttribute(At,(Cs()+1).toString()),function(){var e=Cs()-1;e<=0?document.body.removeAttribute(At):document.body.setAttribute(At,e.toString())}},[])},ef=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;Qd();var s=u.useMemo(function(){return Kd(a)},[a]);return u.createElement(Xd,{styles:Jd(s,!t,a,n?"":"!important")})},sa=!1;if(typeof window<"u")try{var Dn=Object.defineProperty({},"passive",{get:function(){return sa=!0,!0}});window.addEventListener("test",Dn,Dn),window.removeEventListener("test",Dn,Dn)}catch{sa=!1}var Tt=sa?{passive:!1}:!1,tf=function(e){return e.tagName==="TEXTAREA"},Wo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!tf(e)&&n[t]==="visible")},nf=function(e){return Wo(e,"overflowY")},rf=function(e){return Wo(e,"overflowX")},Is=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=qo(e,r);if(a){var s=Ko(e,r),i=s[1],c=s[2];if(i>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},af=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},sf=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qo=function(e,t){return e==="v"?nf(t):rf(t)},Ko=function(e,t){return e==="v"?af(t):sf(t)},of=function(e,t){return e==="h"&&t==="rtl"?-1:1},cf=function(e,t,n,r,a){var s=of(e,window.getComputedStyle(t).direction),i=s*r,c=n.target,l=t.contains(c),d=!1,f=i>0,p=0,_=0;do{var v=Ko(e,c),w=v[0],T=v[1],x=v[2],I=T-x-s*w;(w||I)&&qo(e,c)&&(p+=I,_+=w),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(f&&Math.abs(p)<1||!f&&Math.abs(_)<1)&&(d=!0),d},Nn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rs=function(e){return[e.deltaX,e.deltaY]},As=function(e){return e&&"current"in e?e.current:e},uf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},lf=function(e){return`
|
|
39
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},df=0,wt=[];function ff(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),a=u.useState(df++)[0],s=u.useState(zo)[0],i=u.useRef(e);u.useEffect(function(){i.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var T=Za([e.lockRef.current],(e.shards||[]).map(As),!0).filter(Boolean);return T.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),T.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=u.useCallback(function(T,x){if("touches"in T&&T.touches.length===2||T.type==="wheel"&&T.ctrlKey)return!i.current.allowPinchZoom;var I=Nn(T),R=n.current,D="deltaX"in T?T.deltaX:R[0]-I[0],C="deltaY"in T?T.deltaY:R[1]-I[1],j,O=T.target,L=Math.abs(D)>Math.abs(C)?"h":"v";if("touches"in T&&L==="h"&&O.type==="range")return!1;var H=Is(L,O);if(!H)return!0;if(H?j=L:(j=L==="v"?"h":"v",H=Is(L,O)),!H)return!1;if(!r.current&&"changedTouches"in T&&(D||C)&&(r.current=j),!j)return!0;var q=r.current||j;return cf(q,x,T,q==="h"?D:C)},[]),l=u.useCallback(function(T){var x=T;if(!(!wt.length||wt[wt.length-1]!==s)){var I="deltaY"in x?Rs(x):Nn(x),R=t.current.filter(function(j){return j.name===x.type&&(j.target===x.target||x.target===j.shadowParent)&&uf(j.delta,I)})[0];if(R&&R.should){x.cancelable&&x.preventDefault();return}if(!R){var D=(i.current.shards||[]).map(As).filter(Boolean).filter(function(j){return j.contains(x.target)}),C=D.length>0?c(x,D[0]):!i.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),d=u.useCallback(function(T,x,I,R){var D={name:T,delta:x,target:I,should:R,shadowParent:hf(I)};t.current.push(D),setTimeout(function(){t.current=t.current.filter(function(C){return C!==D})},1)},[]),f=u.useCallback(function(T){n.current=Nn(T),r.current=void 0},[]),p=u.useCallback(function(T){d(T.type,Rs(T),T.target,c(T,e.lockRef.current))},[]),_=u.useCallback(function(T){d(T.type,Nn(T),T.target,c(T,e.lockRef.current))},[]);u.useEffect(function(){return wt.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:_}),document.addEventListener("wheel",l,Tt),document.addEventListener("touchmove",l,Tt),document.addEventListener("touchstart",f,Tt),function(){wt=wt.filter(function(T){return T!==s}),document.removeEventListener("wheel",l,Tt),document.removeEventListener("touchmove",l,Tt),document.removeEventListener("touchstart",f,Tt)}},[]);var v=e.removeScrollBar,w=e.inert;return u.createElement(u.Fragment,null,w?u.createElement(s,{styles:lf(a)}):null,v?u.createElement(ef,{gapMode:e.gapMode}):null)}function hf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const pf=Bd(Go,ff);var mf=u.forwardRef(function(e,t){return u.createElement(lr,ve({},e,{ref:t,sideCar:pf}))});mf.classNames=lr.classNames;function _f({onSignUp:e,onSignIn:t,onCancel:n}){return g.jsx(Hu,{title:{id:"fHQh98"},children:g.jsxs("div",{className:"md:bg-contrast-0 flex w-full max-w-md flex-col items-center px-6 pb-8 pt-12 md:rounded-lg md:border md:border-slate-200 md:px-8 md:shadow-md md:dark:border-slate-700 md:dark:shadow-xl",children:[g.jsxs("div",{className:"mb-8 text-center",children:[g.jsx("h2",{className:"text-text-default mb-3 text-2xl font-light dark:text-white",children:g.jsx(Z,{id:"6jfS51"})}),g.jsx("p",{className:"text-text-light",children:g.jsx(Z,{id:"azHATD"})})]}),g.jsxs("div",{className:"flex w-full flex-col gap-3",children:[e&&g.jsx(Se,{className:"w-full",color:t?"primary":"darkGrey",onClick:e,children:g.jsx(Z,{id:"mpt9T+"})}),t&&g.jsx(Se,{className:"w-full",color:e?"darkGrey":"primary",onClick:t,children:g.jsx(Z,{id:"yKDCQ1"})}),n&&g.jsxs(g.Fragment,{children:[g.jsx("hr",{className:"my-2 border-slate-200 dark:border-slate-700"}),g.jsx(Se,{className:"w-full",color:"darkGrey",onClick:n,children:g.jsx(Z,{id:"dEgA5A"})})]})]})]})})}function Fe({title:e,subtitle:t,className:n,children:r,...a}){const{_:s}=oe(),i=typeof e=="string"?e:e?s(e):void 0;return g.jsxs("div",{...a,className:te(n,"flex flex-col items-center","md:flex md:flex-row md:items-center md:justify-stretch","min-w-screen min-h-screen"),children:[g.jsxs("div",{className:te("px-6 pt-4","w-full","md:max-w-lg","flex flex-row items-center","md:flex-col md:items-end","md:self-stretch","md:max-w-fix md:w-1/2","md:px-4 md:py-2","md:text-right","md:dark:border-r md:dark:border-slate-700","md:bg-contrast-25"),children:[g.jsxs("div",{className:"grid grow content-center md:justify-items-end",children:[i&&g.jsxs("h1",{className:"text-primary text-xl font-semibold md:my-4 md:text-2xl lg:text-5xl",children:[g.jsx("title",{children:i}),i]},"title"),t&&g.jsx("p",{className:"text-text-light hidden max-w-xs md:block",children:t},"subtitle")]}),g.jsx(Gu,{className:"mr-auto text-sm"},"localeSelector")]}),g.jsx("main",{className:"w-full p-6 md:max-h-screen md:max-w-3xl md:overflow-y-auto md:px-12",children:r})]})}function gf(e,{ref:t,onLoading:n,onError:r}={}){const[a,s]=u.useState(!1),[i,c]=u.useState(),l=u.useCallback(v=>{c(v),r==null||r(v)},[r]),d=u.useCallback(v=>{s(v),n==null||n(v)},[n]),f=u.useRef(null),p=u.useRef(null);u.useEffect(()=>(p.current=()=>{var v;(v=f.current)==null||v.abort(),f.current=null,l(void 0),d(!1)},()=>{p.current=null}),[l,d]),u.useImperativeHandle(t,()=>({reset:()=>{var v;return(v=p.current)==null?void 0:v.call(p)}}),[]),u.useEffect(()=>()=>{var v;(v=f.current)==null||v.abort(),f.current=null},[]);const _=u.useCallback(async()=>{var T;(T=f.current)==null||T.abort(),d(!0),l(void 0);const v=new AbortController,{signal:w}=v;f.current=v;try{await e(w)}catch(x){v===f.current?l(x instanceof Error?x:new Error(String(x))):vf(w,x)||console.warn("Async action error after abort",x)}finally{v===f.current&&(f.current=null,d(!1)),v.abort()}},[e,d,l]);return{loading:a,error:i,run:_}}function vf(e,t){return e.aborted&&(e.reason===t||e.reason===(t==null?void 0:t.cause)||t instanceof DOMException&&t.name==="AbortError")}function $t({invalid:e,disabled:t,onSubmit:n,submitLabel:r=g.jsx(Z,{id:"hQRttt"}),onCancel:a=void 0,cancelLabel:s=g.jsx(Z,{id:"dEgA5A"}),errorRender:i=Ku,ref:c,onLoading:l,onError:d,children:f,actions:p,append:_,...v}){const{run:w,loading:T,error:x}=gf(n,{ref:c,onError:d,onLoading:l}),I=u.useCallback(R=>{R.preventDefault(),R.currentTarget.reportValidity()&&!t&&!e&&w()},[t,e,w]);return g.jsx($i,{...v,onSubmit:I,disabled:t||T,append:[_,x!=null?i({error:x}):void 0],cancel:a&&g.jsx(Se,{onClick:a,children:s}),actions:g.jsxs(g.Fragment,{children:[g.jsx(Se,{color:"primary",type:"submit",loading:T,disabled:t,children:r}),p]}),children:f})}const Xo="ABCDEFGHIJKLMNOPQRSTUVWXYZ",yf=Xo.toLowerCase(),bf="0123456789",Ef=`${Xo}${yf}${bf}`;function Jo(e){const[t,n]=u.useState(()=>Ds(e));return u.useEffect(()=>{n(Ds(e))},[e==null?void 0:e.length,e==null?void 0:e.alphabet]),`${(e==null?void 0:e.prefix)??""}${t}${(e==null?void 0:e.suffix)??""}`}function Ds({length:e=16,alphabet:t=Ef}={}){return Array.from({length:e},()=>xf(t)).join("")}function xf(e){return e.charAt(Math.random()*e.length|0)}const dr=u.createContext({disabled:!1});dr.displayName="FieldsetContext";function Ve({label:e,children:t,disabled:n=!1,...r}){const a=Jo({prefix:"form-field-"}),i=Qu().disabled||n,c=u.useMemo(()=>({disabled:i,labelId:e?a:void 0}),[i,e,a]);return g.jsxs("fieldset",{...r,"aria-labelledby":a,disabled:i,children:[e&&g.jsx("legend",{id:a,className:"text-text-light mb-1 text-sm font-medium",children:e},"title"),g.jsx("div",{className:"flex flex-col space-y-4",children:g.jsx(dr,{value:c,children:t})})]})}const Ue=8,Tf=/(\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/,kn=/[A-Z]/,Pn=/[a-z]/,jn=/[0-9]/,On=/[^a-zA-Z0-9]/;var pt=function(e){return e[e.weak=1]="weak",e[e.moderate=2]="moderate",e[e.strong=3]="strong",e[e.extra=4]="extra",e}({});function Qo(e){return e.length<Ue?1:e.length>=Ue+12?4:e.length>=Ue+8?Me(e,[On])||Me(e,[kn,Pn,jn],2)?4:3:e.length>=Ue&&Me(e,[Tf])?3:e.length>=Ue+6?Me(e,[On])||Me(e,[kn,Pn,jn],2)?3:2:e.length>=Ue+4?Me(e,[On])||Me(e,[kn,Pn,jn],2)?2:1:e.length>=Ue&&(Me(e,[On])||Me(e,[kn,Pn,jn]))?2:1}function Me(e,t,n=t.length){if(n<1||n>t.length)throw new TypeError("Invalid regexpsCountToMatch");for(const r of t)if(r.test(e)&&(n--,n===0))return!0;return!1}function wf({password:e,...t}){const{i18n:n,_:r}=oe(),a=Qo(e);return g.jsx("span",{...t,"aria-label":n._({id:"osAB4a"}),children:a===pt.extra?g.jsx(Z,{id:"/Ltc/k"}):a===pt.strong?g.jsx(Z,{id:"LLx/nr"}):a===pt.moderate?g.jsx(Z,{id:"dvYuhh"}):e?g.jsx(Z,{id:"9ls/Vs"}):g.jsx(Z,{id:"VU3Nrn"})})}function Sf({password:e,className:t,...n}){const{i18n:r,_:a}=oe(),s=e?Qo(e):0,i="bg-gray-300 dark:bg-slate-500",c=s===pt.extra||s===pt.strong?"bg-success":s===pt.moderate?"bg-warning":"bg-error";return g.jsx("div",{...n,className:te("flex h-1 w-full space-x-2",t),role:"meter","aria-label":r._({id:"xfNKwI"}),"aria-valuemin":0,"aria-valuemax":pt.extra,"aria-valuenow":s,children:Array.from({length:4},(l,d)=>g.jsx("div",{className:`h-1 w-1/4 rounded-sm ${s>d?c:i}`},d))})}function Cf(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function nt(e){return t=>{for(const n of e)n&&Cf(n,t)}}function If({visible:e,toggleVisible:t,onClick:n,...r}){const{i18n:a,_:s}=oe();return g.jsx(Se,{...r,shape:"padded",onClick:i=>{n==null||n(i),i.defaultPrevented||t()},"aria-label":e?a._({id:"vLyv1R"}):a._({id:"huXYDE"}),children:e?g.jsx(Vi,{"aria-hidden":!0,weight:"regular",className:"size-5"}):g.jsx(Yi,{"aria-hidden":!0,weight:"regular",className:"size-5"})})}function fr({icon:e,append:t,bellow:n,actionable:r,transparent:a,onAction:s,className:i,children:c,onFocus:l,onBlur:d,onClick:f,onKeyDown:p,tabIndex:_,...v}){const[w,T]=u.useState(!1);return r??(r=s!=null||f!=null),_??(_=r?0:-1),g.jsxs("div",{...v,onFocus:x=>{l==null||l(x),x.defaultPrevented||T(!0)},onBlur:x=>{d==null||d(x),x.defaultPrevented||T(!1)},onKeyDown:x=>{p==null||p(x),s&&!x.defaultPrevented&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(s==null||s(x))},onClick:x=>{f==null||f(x),s&&!x.defaultPrevented&&(s==null||s(x))},tabIndex:_,role:r?"button":void 0,className:te("min-h-12","max-w-full","overflow-hidden","rounded-lg","transition duration-300 ease-in-out","outline-none",'has-[input[type="text"]:focus,input[type="password"]:focus]:ring-primary','has-[input[type="text"]:focus,input[type="password"]:focus]:ring-2','has-[input[type="text"]:focus,input[type="password"]:focus]:ring-offset-1','has-[input[type="text"]:focus,input[type="password"]:focus]:ring-offset-white','dark:has-[input[type="text"]:focus,input[type="password"]:focus]:ring-offset-black',_!==-1&&["cursor-pointer","focus:ring-primary","focus:ring-2","focus:ring-offset-1","focus:ring-offset-white","dark:focus:ring-offset-black"],a?"bg-transparent":"bg-gray-100 dark:bg-gray-800",_!==-1&&"hover:bg-gray-200 dark:hover:bg-gray-700",i),children:[g.jsxs("div",{className:te("px-1","min-h-12 w-full","flex items-center justify-stretch","rounded-lg",n?"rounded-bl-none rounded-br-none":void 0,"text-text-default"),children:[e&&g.jsx("div",{className:te("flex shrink-0 grow-0 items-center justify-center","mx-2 size-5",w?"text-primary":"text-text-light"),children:e}),c,g.jsx("div",{className:"ml-1 flex shrink-0 grow-0 items-center",children:t})]}),n&&g.jsx("div",{className:te("space-x-2 px-3 py-2","flex flex-row items-center gap-1","rounded-br-2 rounded-bl-2","bg-gray-200 dark:bg-slate-700","text-text-light","text-sm italic"),children:n})]})}function Bt({icon:e,append:t,bellow:n,className:r,onFocus:a,onBlur:s,ref:i,disabled:c,title:l,"aria-label":d=l,"aria-labelledby":f,placeholder:p=d,..._}){const v=u.useContext(dr),w=c??v.disabled,T=u.useRef(null),x=u.useRef(!1);return g.jsx(fr,{icon:e,append:t,bellow:n,className:te("cursor-text",r),tabIndex:-1,actionable:!1,onClick:I=>{var R;T.current!==I.target&&(I.preventDefault(),I.stopPropagation(),(R=T.current)==null||R.focus())},onMouseDown:I=>{x.current&&I.target!==T.current&&(I.preventDefault(),I.stopPropagation())},children:g.jsx("input",{..._,disabled:w,title:l,placeholder:p,"aria-label":d,"aria-labelledby":f??v.labelId,ref:nt([i,T]),className:te("outline-hidden w-full text-ellipsis bg-transparent bg-clip-padding text-base text-inherit dark:placeholder-gray-400",w?"opacity-60":"inert:opacity-60"),onFocus:I=>{a==null||a(I),I.defaultPrevented||(x.current=!0)},onBlur:I=>{s==null||s(I),I.defaultPrevented||(x.current=!1)}})})}function ec({autoHide:e=!0,onBlur:t,onChange:n,append:r,autoComplete:a="current-password",icon:s=g.jsx(Hi,{className:"w-5",weight:"bold"}),value:i,defaultValue:c=i,ref:l,title:d,dir:f="auto",autoCapitalize:p="none",autoCorrect:_="off",spellCheck:v="false",...w}){const{i18n:T,_:x}=oe(),I=u.useRef(null),[R,D]=u.useState(!1),[C,j]=u.useState(typeof c=="string"?c:""),O=u.useCallback(L=>{n==null||n(L),j(L.target.value)},[n]);return g.jsx(Bt,{...w,title:d??T._({id:"8ZsakT"}),ref:nt([l,I]),dir:f,autoCapitalize:p,autoCorrect:_,spellCheck:v,icon:s,onBlur:e?L=>{t==null||t(L),L.defaultPrevented||D(!1)}:t,value:C,onChange:O,type:R?"text":"password",autoComplete:a,append:g.jsxs(g.Fragment,{children:[g.jsx(If,{className:"m-1",color:"darkGrey",visible:R,toggleVisible:()=>{var L;D(H=>!H),(L=I.current)==null||L.focus()}}),r]})})}function tc({password:e="",onPassword:t,onChange:n,autoComplete:r="new-password",minLength:a=Ue,...s}){const{i18n:i,_:c}=oe(),[l,d]=u.useState(e),f=u.useCallback(p=>{const{value:_}=p.target;n==null||n(p),!p.defaultPrevented&&(d(_),t==null||t(p.target.validity.valid?_:void 0))},[n,t]);return g.jsx(ec,{...s,placeholder:i._({id:"3tOlz6"}),"aria-label":i._({id:"0StR7t"}),title:i._({id:"5CqSPX",values:{MIN_PASSWORD_LENGTH:Ue}}),minLength:a,onChange:f,value:l,autoComplete:r,bellow:g.jsxs(g.Fragment,{children:[g.jsx(Sf,{password:l}),g.jsx(wf,{className:"grow-1 text-text-light min-w-max text-xs",password:l})]})})}const Rf="XXXXX-XXXXX";function nc({example:e=Rf,onToken:t,icon:n=g.jsx(zi,{className:"w-5",weight:"bold"}),title:r=e,onChange:a,value:s,defaultValue:i=s,...c}){const[l,d]=u.useState(typeof i=="string"?i:"");return g.jsx(Bt,{...c,type:"text",autoCapitalize:"characters",autoCorrect:"off",autoComplete:"one-time-code",spellCheck:"false",minLength:11,maxLength:11,dir:"auto",icon:n,pattern:"^[A-Z2-7]{5}-[A-Z2-7]{5}$",placeholder:e,title:r,value:l,onChange:f=>{const{value:p,selectionEnd:_,selectionStart:v}=f.currentTarget,w=Ns(p);f.currentTarget.value=w;const T=_??v;if(T!=null){const x=Ns(p.slice(0,T));f.currentTarget.selectionStart=f.currentTarget.selectionEnd=x.length}d(w),a==null||a(f),f.isDefaultPrevented()||t==null||t(w.length===11?w:null)}})}function Ns(e){const t=e.toUpperCase().replaceAll(/[^A-Z2-7]/g,"");return t.length<=5?t:`${t.slice(0,5)}-${t.slice(5,10)}`}function Af({onSubmit:e,invalid:t,...n}){const r=u.useRef(null),[a,s]=u.useState(null),[i,c]=u.useState(void 0);return g.jsxs($t,{...n,onSubmit:async l=>{if(a&&i)return e({token:a,password:i},l);throw new Error("Token and password are required")},invalid:t||!a||!i,children:[g.jsx(Ve,{label:g.jsx(Z,{id:"vJgYMA"}),children:g.jsx(nc,{name:"code",enterKeyHint:"next",required:!0,autoFocus:!0,onToken:l=>{var d;s(l),l&&((d=r.current)==null||d.focus())}})}),g.jsx(Ve,{label:g.jsx(Z,{id:"/nT6AE"}),children:g.jsx(tc,{ref:r,name:"password",enterKeyHint:"done",required:!0,password:i,onPassword:c})})]})}function rc({onEmail:e,autoCapitalize:t="none",autoComplete:n="email",autoCorrect:r="off",dir:a="auto",icon:s=g.jsx(Ut,{"aria-hidden":!0,weight:"bold",className:"w-5"}),onBlur:i,onChange:c,pattern:l="^[^@]+@[^@]+\\.[^@]+$",spellCheck:d="false",value:f,defaultValue:p=f,title:_,...v}){const{i18n:w,_:T}=oe(),[x,I]=u.useState(typeof p=="string"?p:""),R=u.useCallback(D=>{const C=D.target.value.toLowerCase();I(C),c==null||c(D),e==null||e(D.target.validity.valid?C:void 0)},[c,e]);return g.jsx(Bt,{...v,title:_??w._({id:"ATGYL1"}),type:"email",autoCapitalize:t,autoCorrect:r,dir:a,spellCheck:d,icon:s,pattern:l,autoComplete:n,value:x,onChange:R,onBlur:i})}function Df({emailDefault:e,onSubmit:t,invalid:n,ref:r,...a}){const{i18n:s,_:i}=oe(),[c,l]=u.useState(e),d=u.useRef(null),f=u.useCallback(p=>{if(c)return t({email:c},p)},[c,t]);return g.jsx($t,{...a,ref:nt([r,d]),invalid:n||!c,onSubmit:f,children:g.jsx(Ve,{label:g.jsx(Z,{id:"ATGYL1"}),children:g.jsx(rc,{name:"email",placeholder:s._({id:"xRPn3U"}),title:s._({id:"ATGYL1"}),required:!0,autoFocus:!0,value:c,onEmail:p=>{var _;(_=d.current)==null||_.reset(),l(p)}})})})}function Nf({emailDefault:e,onResetPasswordRequest:t,onResetPasswordConfirm:n,onBack:r}){const{i18n:a,_:s}=oe(),[i,c]=u.useState(0);if(i===0)return g.jsxs(Fe,{title:a._({id:"dn8X5t"}),subtitle:g.jsx(Z,{id:"Esfg1M"}),children:[g.jsx("p",{className:"mb-4",children:g.jsx(Z,{id:"cHrOqs"})}),g.jsx(Df,{emailDefault:e,submitLabel:g.jsx(Z,{id:"hXzOVo"}),onSubmit:async(l,d)=>{await t(l,d),d.aborted||c(1)},cancelLabel:g.jsx(Z,{id:"iH8pgl"}),onCancel:r}),g.jsx("hr",{className:"my-5 border-gray-300 dark:border-gray-700"}),g.jsx("center",{children:g.jsx(Se,{transparent:!0,onClick:()=>c(1),children:g.jsx(Z,{id:"FTT4a4"})})})]});if(i===1)return g.jsxs(Fe,{title:{id:"KbS2K9"},subtitle:g.jsx(Z,{id:"xg/UcZ"}),children:[g.jsx("p",{className:"mb-4",children:g.jsx(Z,{id:"imRJNy"})}),g.jsx(Af,{submitLabel:g.jsx(Z,{id:"hXzOVo"}),onSubmit:async(l,d)=>{await n(l,d),d.aborted||c(2)},cancelLabel:g.jsx(Z,{id:"iH8pgl"}),onCancel:()=>c(0)})]});if(i===2)return g.jsx(Fe,{title:{id:"fSy6T1"},subtitle:g.jsx(Z,{id:"+qGdcW"}),children:g.jsxs("center",{children:[g.jsx("h2",{className:"pb-2 text-xl font-bold",children:g.jsx(Z,{id:"DKeVgZ"})}),g.jsx("p",{className:"pb-4",children:g.jsx(Z,{id:"67nRLM"})}),r&&g.jsx(Se,{color:"primary",onClick:()=>r(),children:g.jsx(Z,{id:"UaXeX3"})})]})});throw new Error(`Invalid view: ${i}`)}const ac=u.forwardRef(({className:e,invalid:t,disabled:n,...r},a)=>g.jsx("input",{...r,type:"checkbox",ref:a,disabled:n,className:te(["block size-4 rounded-md border-2","accent-primary","transition duration-300 ease-in-out","outline-none","focus:ring-primary focus:ring-2 focus:ring-offset-1 focus:ring-offset-white dark:focus:ring-offset-black",t&&"accent-error focus:border-error",n&&"bg-contrast-50 text-contrast-500 cursor-not-allowed",e])}));ac.displayName="Checkbox";function kf({className:e,children:t,id:n,ref:r,disabled:a,title:s,"aria-label":i=s,"aria-labelledby":c,...l}){const d=Jo("input-checkbox-"),f=u.useRef(null),p=u.useRef(null),_=u.useContext(dr),v=n??d,w=a??_.disabled;return g.jsx(fr,{className:te("cursor-pointer",e),icon:g.jsx(ac,{...l,className:"size-4",disabled:w,title:s,"aria-label":i,"aria-labelledby":t?void 0:c??_.labelId,ref:nt([r,p]),id:v}),tabIndex:-1,onClick:T=>{var x,I;T.target!==f.current&&T.target!==p.current&&((x=p.current)==null||x.click(),(I=p.current)==null||I.focus())},children:t&&g.jsx("label",{ref:f,htmlFor:v,className:"block w-full cursor-pointer select-none leading-[1.6]",children:t})})}const Pf=18,sc=3,ic=30,oc=e=>sc+e.length<=ic&&e.startsWith(".")&&!e.endsWith(".");function Zn({usernameDefault:e="",usernameReadonly:t=!1,rememberDefault:n=!1,disableRemember:r=!1,domains:a=[],onSubmit:s,onBack:i,backLabel:c,onForgotPassword:l,ref:d,invalid:f,children:p,..._}){const{i18n:v,_:w}=oe(),T=a.filter(oc),[x,I]=u.useState(e),[R,D]=u.useState(""),[C,j]=u.useState(n),[O,L]=u.useState(null),[H,q]=u.useState(null),[B,$]=u.useState(!1),z=u.useRef(null),ue=u.useCallback(()=>{L(null),q(null)},[L,q]),Y=u.useCallback(()=>{var X;ue(),(X=z.current)==null||X.reset()},[ue,z]),ne=u.useCallback(async X=>{try{await s({username:x,password:R,remember:!r&&C,...H?{[H.type]:O}:{}},X)}catch(Q){if(X.aborted)return;if(Q instanceof Xu){q(Q);return}throw Q instanceof Ju&&ue(),Q}},[x,R,C,H,O,s]);return g.jsxs($t,{..._,ref:nt([d,z]),onLoading:$,onCancel:i,cancelLabel:c??v._({id:"iH8pgl"}),append:p,invalid:f||!x||!R||H!=null&&!O,submitLabel:H?g.jsx(Z,{id:"UwGV9B"}):g.jsx(Z,{id:"yKDCQ1"}),onSubmit:ne,children:[g.jsx(Ve,{disabled:B,label:g.jsx(Z,{id:"sJGljQ"}),children:g.jsx(Bt,{icon:g.jsx(Ut,{"aria-hidden":!0,weight:"bold",className:"w-5"}),name:"username",type:"text",title:v._({id:"nZx9mr"}),autoCapitalize:"none",autoCorrect:"off",autoComplete:"username",spellCheck:"false",dir:"auto",enterKeyHint:"next",required:!0,readOnly:t,disabled:t,autoFocus:!t,pattern:"([^@]+@[^@]+|[^.@]+(\\.[^.@]+)+)|did:[a-z0-9]+:.+",value:x,onChange:X=>{Y(),I(X.target.value)},onBlur:X=>{if(t)return;let Q=X.target.value.trim().toLowerCase();Q.startsWith("@")&&(Q=Q.slice(1)),Q.length>0&&!Q.startsWith("did:")&&!Q.includes("@")&&!Q.includes(".")&&T.length>0&&I(`${Q}${T[0]}`)}})}),g.jsx(Ve,{disabled:B,label:g.jsx(Z,{id:"8ZsakT"}),children:g.jsx(ec,{name:"password",onChange:X=>{Y(),D(X.target.value)},append:l&&g.jsx(Se,{className:"text-sm",type:"button",color:"darkGrey",onClick:()=>{l(x!=null&&x.includes("@")?x:void 0)},"aria-label":v._({id:"slOprG"}),children:g.jsx(Z,{id:"F4OP4y"})}),enterKeyHint:H?"next":"done",disabled:B,autoFocus:t,required:!0})}),g.jsx(Ui,{role:"note",title:g.jsx(Z,{id:"r6y+jM"}),children:g.jsx(Z,{id:"TePUFC"})}),!r&&g.jsx(kf,{name:"remember",title:v._({id:"1TxdLU"}),enterKeyHint:H?"next":"done",checked:C,onChange:X=>j(X.target.checked),children:g.jsx(Z,{id:"1TxdLU"})}),H&&g.jsx(Ve,{disabled:B,label:g.jsx(Z,{id:"4blS0m"}),children:g.jsxs("div",{children:[g.jsx(nc,{title:v._({id:"ioZOzk"}),enterKeyHint:"done",required:!0,autoFocus:!0,value:O??"",onToken:L}),g.jsx("p",{className:"text-text-light text-sm",children:g.jsx(Z,{id:"B+Yy3b",values:{0:H.hint}})})]})},"2fa")]})}function jf({account:e,...t}){const{i18n:n,_:r}=oe();return g.jsx("span",{...t,"aria-label":n._({id:"kce6cL"}),children:e.preferred_username?g.jsxs(g.Fragment,{children:[g.jsx(Ut,{weight:"bold",className:"inline-block","aria-hidden":!0}),e.preferred_username]}):e.sub})}const ks={sm:"size-5",md:"size-6",lg:"size-8",xl:"size-12","2xl":"size-16","3xl":"size-24"};function Of({className:e="",account:t,size:n="md"}){const[r,a]=u.useState(!1),{i18n:s,_:i}=oe(),c=t==null?void 0:t.picture;return u.useEffect(()=>{a(!1)},[c]),c&&!r?g.jsx("img",{"aria-hidden":!0,src:c,alt:s._({id:"ehmMI/"}),className:te("rounded-full",ks[n],e),onError:()=>a(!0)}):g.jsx("div",{"aria-hidden":!0,className:te("bg-primary border-primary overflow-hidden rounded-full border-2 border-solid text-white",ks[n],e),children:g.jsx(Wi,{className:"size-full"})})}function cc(e){return Mf(e==null?void 0:e.preferred_username)}function Zf(e){return e==="handle.invalid"}function Mf(e){if(e)return Zf(e)?"⚠Invalid Handle":e.startsWith("@")?e:`@${e}`}function Lf({account:e,...t}){const{i18n:n,_:r}=oe();return g.jsx("span",{...t,"aria-label":n._({id:"F9cvwz"}),children:e.name||cc(e)||e.sub})}function Uf({account:e,...t}){return g.jsx(fr,{icon:g.jsx(Of,{account:e}),...t,children:g.jsxs("div",{className:"min-w-0 flex-1",children:[e.name&&g.jsx(Lf,{account:e,className:"block truncate font-medium"}),g.jsx(jf,{account:e,className:"block truncate text-sm text-neutral-500 dark:text-neutral-400"})]})},e.sub)}function $f({sessions:e,onSession:t,onOther:n=void 0,onBack:r,onSignUp:a,backLabel:s,children:i,...c}){const{i18n:l,_:d}=oe();return g.jsxs($i,{...c,append:i,actions:a&&g.jsx(Se,{onClick:a,color:"primary",transparent:!0,children:g.jsx(Z,{id:"e+RpCP"})}),cancel:r&&g.jsx(Se,{onClick:r,children:s||g.jsx(Z,{id:"iH8pgl"})}),children:[g.jsx("p",{className:"text-text-light text-sm font-medium",children:g.jsx(Z,{id:"FT1MVS"})}),e.map(f=>g.jsx(Uf,{account:f.account,append:g.jsx(Xr,{"aria-hidden":!0,className:"h-4"}),onAction:p=>{p.preventDefault(),p.stopPropagation(),t(f)},"aria-label":l._({id:"N9o7n5",values:{0:f.account.name??cc(f.account)??f.account.sub}})},f.account.sub)),n&&g.jsx(fr,{onAction:n,"aria-label":l._({id:"cR9UpQ"}),append:g.jsx(Xr,{"aria-hidden":!0,className:"h-4"}),icon:g.jsx(Ut,{"aria-hidden":!0,weight:"bold",className:"h-4 w-6"}),children:g.jsx("span",{className:"text-text-light flex-1 truncate",children:g.jsx(Z,{id:"+TaG50"})})},"other")]})}function Bf({disableRemember:e,forcedIdentifier:t,sessions:n,session:r,setSession:a,onSignIn:s,onSignUp:i,onForgotPassword:c,onBack:l,backLabel:d}){const f=u.useCallback(()=>a(null),[a]),{availableUserDomains:p=[]}=Ca(),[_,v]=u.useState(n.length===0),w={id:"1L25jn"};return u.useEffect(()=>{r&&v(!1)},[r]),r?g.jsx(Fe,{title:w,subtitle:g.jsx(Z,{id:"HaGV2g"}),children:g.jsx(Zn,{domains:p,disableRemember:e,onSubmit:s,onForgotPassword:c,onBack:f,usernameDefault:r.account.preferred_username||r.account.sub,usernameReadonly:!0,rememberDefault:!0})}):t?g.jsx(Fe,{title:w,subtitle:g.jsx(Z,{id:"NgaR6B"}),children:g.jsx(Zn,{domains:p,disableRemember:e,onSubmit:s,onForgotPassword:c,onBack:l,backLabel:d,usernameDefault:t,usernameReadonly:!0})}):n.length===0?g.jsx(Fe,{title:w,subtitle:g.jsx(Z,{id:"T0KLp4"}),children:g.jsx(Zn,{domains:p,disableRemember:e,onSubmit:s,onForgotPassword:c,onBack:l,backLabel:d})}):_?g.jsx(Fe,{title:w,subtitle:g.jsx(Z,{id:"T0KLp4"}),children:g.jsx(Zn,{domains:p,disableRemember:e,onSubmit:s,onForgotPassword:c,onBack:()=>v(!1)})}):g.jsx(Fe,{title:w,subtitle:g.jsx(Z,{id:"o3dwub"}),children:g.jsx($f,{sessions:n,onSession:a,onOther:()=>v(!0),onBack:l,backLabel:d,onSignUp:i})})}const $e=e=>e!=null&&e!==!1,Ff=e=>$e(e)&&e.invalid===!0,Vf=e=>!$e(e)||e.invalid===!1;function Yf(e){const t=e.findIndex($e),n=e.findLastIndex($e),r=e.findIndex(Ff),[a,s]=u.useState(t),i=u.useCallback(D=>D!==-1&&e[D]?(s(D),!0):!1,[e.map($e).join()]),c=e.findLastIndex((D,C)=>$e(D)&&C<a),l=e.findIndex((D,C)=>$e(D)&&C>a),d=u.useCallback(()=>i(t),[i,t]),f=u.useCallback(()=>i(n),[i,n]),p=u.useCallback(()=>i(c),[i,c]),_=u.useCallback(()=>i(l),[i,l]),v=u.useCallback(()=>i(r),[i,r]),w=a+1+e.reduce((D,C,j)=>j>=a||$e(C)?D:D-1,0),T=e.filter($e).length,x=e.every(Vf),I=a===-1||!e[a]?void 0:e[a],R=a===-1;return u.useEffect(()=>{R&&d()},[R]),{current:I,currentPosition:w,count:T,completed:x,atFirst:w===1,atLast:w===T,toFirst:d,toLast:f,toPrev:p,toNext:_,toRequired:v}}function Hf({prevLabel:e,nextLabel:t,onBack:n,backLabel:r,onDone:a,doneLabel:s,steps:i,className:c,...l}){var O,L;const{atFirst:d,atLast:f,count:p,current:_,currentPosition:v,completed:w,toNext:T,toPrev:x,toRequired:I}=Yf(i),R=u.useCallback(()=>{T()||I()},[T,I]),D={current:!0,invalid:_?_.invalid:!1,prevLabel:d&&r||e||g.jsx(Z,{id:"iH8pgl"}),prev:d?n:x,nextLabel:f&&s||t||g.jsx(Z,{id:"hXzOVo"}),next:f&&w?a:R},C=(O=_==null?void 0:_.titleRender)==null?void 0:O.call(_,D),j=(L=_==null?void 0:_.contentRender)==null?void 0:L.call(_,D);return g.jsxs("div",{className:te(c,"flex flex-col"),...l,children:[g.jsx("p",{className:"text-contrast-500",children:g.jsx(Z,{id:"BEx8rG",values:{currentPosition:v,count:p}})}),C&&g.jsx("h2",{className:"mb-4 text-xl font-medium",children:C}),j]})}function Gf({inviteCodeRequired:e=!0,credentials:t,onCredentials:n,onNext:r,nextLabel:a,onPrev:s,prevLabel:i,children:c,ref:l,invalid:d,...f}){const{i18n:p,_}=oe(),[v,w]=u.useState(t==null?void 0:t.email),[T,x]=u.useState(t==null?void 0:t.password),[I,R]=u.useState(t==null?void 0:t.inviteCode),D=u.useRef(null),C=()=>{var O;return(O=D.current)==null?void 0:O.reset()},j=u.useMemo(()=>v&&T&&(!e||I)?{email:v,password:T,inviteCode:e?I:void 0}:void 0,[v,T,I,e]);return u.useEffect(()=>{n==null||n(j)},[j,n]),g.jsxs($t,{...f,ref:nt([l,D]),invalid:d||!j,onCancel:s,cancelLabel:i,onSubmit:r,submitLabel:a,append:c,children:[e&&g.jsx(Ve,{label:g.jsx(Z,{id:"6KlkHI"}),children:g.jsx(Bt,{icon:g.jsx(Gi,{className:"w-5"}),autoFocus:!0,name:"inviteCode",title:p._({id:"6KlkHI"}),placeholder:p._({id:"jxqcgY"}),required:!0,value:I||"",onChange:O=>{R(O.target.value||void 0),C()},enterKeyHint:"next"})}),g.jsx(Ve,{label:g.jsx(Z,{id:"O3oNi5"}),children:g.jsx(rc,{autoFocus:!e,name:"email",enterKeyHint:"next",required:!0,defaultValue:v,onEmail:O=>{w(O),C()}})}),g.jsx(Ve,{label:g.jsx(Z,{id:"8ZsakT"}),children:g.jsx(tc,{name:"password",enterKeyHint:"next",required:!0,password:T,onPassword:O=>{x(O),C()}})})]})}function Lr({links:e,className:t,...n}){const r=e==null?void 0:e.find(s=>s.rel==="terms-of-service"),a=e==null?void 0:e.find(s=>s.rel==="privacy-policy");return g.jsx("p",{className:te("text-text-light text-sm",t),...n,children:g.jsx(Z,{id:"mBUXx0",values:{0:r?g.jsx(Kr,{className:"text-primary underline",link:r,children:g.jsx(Z,{id:"xowcRf"})}):g.jsx(Z,{id:"xowcRf"}),1:a?g.jsx(Kr,{className:"text-primary underline",link:a,children:g.jsx(Z,{id:"LcET2C"})}):g.jsx(Z,{id:"LcET2C"})}})})}function zf(e){const t=sc,n=Math.min(Pf,ic-e.length),r=u.useCallback(a=>{const s=a.length>=t&&a.length<=n,i=/^[a-z0-9][a-z0-9-]+[a-z0-9]$/g.test(a);return{validLength:s,validCharset:i,valid:s&&i}},[n,t]);return{minLength:t,maxLength:n,validateSegment:r}}function Wf({domains:e,onNext:t,nextLabel:n,onPrev:r,prevLabel:a,handle:s,onHandle:i,invalid:c,children:l,ref:d,...f}){const{i18n:p,_}=oe(),v=e.filter(oc),w=u.useRef(null),[T,x]=u.useState(()=>{const $=v.findIndex(z=>s==null?void 0:s.endsWith(z));return $===-1?0:$}),[I,R]=u.useState(()=>(s==null?void 0:s.split(".")[0])||"");u.useEffect(()=>{x($=>Math.min($,v.length-1))},[v.length]);const D=v[T]||v[0]||null,{minLength:C,maxLength:j,validateSegment:O}=zf(D),L=O(I),H=D&&L.valid?`${I}${D}`:void 0;u.useEffect(()=>{var $;($=w.current)==null||$.reset(),i==null||i(H)},[i,H]);const q=u.useRef(null),B=`@${I}${D}`;return g.jsxs($t,{...f,ref:nt([d,w]),onCancel:r,cancelLabel:a,onSubmit:t,submitLabel:n,invalid:c||!H,append:l,children:[g.jsxs("div",{children:[g.jsx(Ps,{hasValue:!!I,valid:L.validLength,children:g.jsx(Z,{id:"4Rgp24",values:{minLength:C,maxLength:j}})}),g.jsx(Ps,{hasValue:!!I,valid:L.validCharset,children:g.jsx(Z,{id:"yDlXDJ"})})]}),g.jsx(Bt,{ref:q,icon:g.jsx(Ut,{"aria-hidden":!0,weight:"bold",className:"size-5"}),name:"handle",type:"text",title:p._({id:"LX2sHe"}),pattern:"[a-z0-9][a-z0-9\\-]+[a-z0-9]",minLength:C,maxLength:j,autoCapitalize:"none",autoCorrect:"off",autoComplete:"off",dir:"auto",enterKeyHint:"done",autoFocus:!0,required:!0,value:I,onChange:$=>{const z=$.target.value.toLowerCase(),ue=$.target.selectionStart,Y=$.target.selectionEnd;$.target.value=z,$.target.setSelectionRange(ue,Y),R(z)},append:v.length>1&&g.jsx("select",{onClick:$=>$.stopPropagation(),onMouseDown:$=>$.stopPropagation(),value:T,"aria-label":p._({id:"HB+TbB"}),onChange:$=>{var z;x(Number($.target.value)),(z=q.current)==null||z.focus()},className:te("block w-full","rounded-lg","p-2 pr-1","text-sm","cursor-pointer","transition duration-300 ease-in-out","outline-none","focus:ring-primary focus:ring-2 focus:ring-offset-1 focus:ring-offset-white dark:focus:ring-offset-black","accent-primary","text-text-light","hover:bg-gray-300 dark:hover:bg-gray-600","bg-gray-200 dark:bg-gray-700"),children:v.map(($,z)=>g.jsx("option",{value:z,children:$},$))}),bellow:g.jsx(Z,{id:"r/b/p8",values:{0:I.length?g.jsx("strong",{className:"text-text-default",children:B}):g.jsx("span",{"aria-hidden":!0,className:"bg-text-light w-24 rounded-md p-2"})}})}),g.jsx(Ui,{role:"note",children:g.jsx(Z,{id:"B9VwbO"})})]})}function Ps({valid:e,hasValue:t,children:n,className:r,...a}){const{i18n:s,_:i}=oe();return g.jsxs("div",{...a,className:te("flex flex-row items-center gap-2",r),children:[t?g.jsx(g.Fragment,{children:e?g.jsx(Fi,{className:"text-success inline-block h-4 w-4","aria-label":s._({id:"nfagfM"})}):g.jsx(Ra,{className:"text-error inline-block h-4 w-4","aria-label":s._({id:"JHB/Ky"})})}):g.jsx("div",{"aria-hidden":!0,className:"flex h-4 w-4 items-center justify-center",children:g.jsx("div",{className:"h-2 w-2 rounded-full bg-gray-300 dark:bg-slate-600"})}),g.jsx("div",{className:"text-sm",children:n})]})}function _e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ia(e,t){return ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},ia(e,t)}function qf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ia(e,t)}var uc=Object.defineProperty,Kf=Object.defineProperties,Xf=Object.getOwnPropertyDescriptors,rr=Object.getOwnPropertySymbols,lc=Object.prototype.hasOwnProperty,dc=Object.prototype.propertyIsEnumerable,js=(e,t,n)=>t in e?uc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A=(e,t)=>{for(var n in t||(t={}))lc.call(t,n)&&js(e,n,t[n]);if(rr)for(var n of rr(t))dc.call(t,n)&&js(e,n,t[n]);return e},G=(e,t)=>Kf(e,Xf(t)),Jf=(e,t)=>{var n={};for(var r in e)lc.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&rr)for(var r of rr(e))t.indexOf(r)<0&&dc.call(e,r)&&(n[r]=e[r]);return n},fc=(e,t)=>{for(var n in t)uc(e,n,{get:t[n],enumerable:!0})},Ma=(e,t,n)=>new Promise((r,a)=>{var s=l=>{try{c(n.next(l))}catch(d){a(d)}},i=l=>{try{c(n.throw(l))}catch(d){a(d)}},c=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,i);c((n=n.apply(e,t)).next())});function Qf(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function hc(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function pc(e){return e||document.head}var eh="hCaptcha-script",Jn="hCaptchaOnLoad",oa="script-error",It="@hCaptcha/loader",mc=Object.prototype.toString;function _c(e){switch(mc.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return He(e,Error)}}function Ft(e,t){return mc.call(e)===`[object ${t}]`}function La(e){return Ft(e,"ErrorEvent")}function Os(e){return Ft(e,"DOMError")}function th(e){return Ft(e,"DOMException")}function et(e){return Ft(e,"String")}function gc(e){return e===null||typeof e!="object"&&typeof e!="function"}function jt(e){return Ft(e,"Object")}function hr(e){return typeof Event<"u"&&He(e,Event)}function nh(e){return typeof Element<"u"&&He(e,Element)}function rh(e){return Ft(e,"RegExp")}function Ua(e){return!!(e&&e.then&&typeof e.then=="function")}function ah(e){return jt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function vc(e){return typeof e=="number"&&e!==e}function He(e,t){try{return e instanceof t}catch{return!1}}function yc(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Dt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Zs(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let a=e[r];try{yc(a)?n.push("[VueViewModel]"):n.push(String(a))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function sh(e,t,n=!1){return et(e)?rh(t)?t.test(e):et(t)?n?e===t:e.includes(t):!1:!1}function hn(e,t=[],n=!1){return t.some(r=>sh(e,r,n))}function ih(e,t,n=250,r,a,s,i){if(!s.exception||!s.exception.values||!i||!He(i.originalException,Error))return;let c=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;c&&(s.exception.values=oh(ca(e,t,a,i.originalException,r,s.exception.values,c,0),n))}function ca(e,t,n,r,a,s,i,c){if(s.length>=n+1)return s;let l=[...s];if(He(r[a],Error)){Ms(i,c);let d=e(t,r[a]),f=l.length;Ls(d,a,f,c),l=ca(e,t,n,r[a],a,[d,...l],d,f)}return Array.isArray(r.errors)&&r.errors.forEach((d,f)=>{if(He(d,Error)){Ms(i,c);let p=e(t,d),_=l.length;Ls(p,`errors[${f}]`,_,c),l=ca(e,t,n,d,a,[p,...l],p,_)}}),l}function Ms(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=G(A({},e.mechanism),{is_exception_group:!0,exception_id:t})}function Ls(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=G(A({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}function oh(e,t){return e.map(n=>(n.value&&(n.value=Dt(n.value,t)),n))}function Mn(e){return e&&e.Math==Math?e:void 0}var ae=typeof globalThis=="object"&&Mn(globalThis)||typeof window=="object"&&Mn(window)||typeof self=="object"&&Mn(self)||typeof global=="object"&&Mn(global)||function(){return this}()||{};function pn(){return ae}function bc(e,t,n){let r=n||ae,a=r.__SENTRY__=r.__SENTRY__||{};return a[e]||(a[e]=t())}var Qn=pn(),ch=80;function Ot(e,t={}){try{let n=e,r=5,a=[],s=0,i=0,c=" > ",l=c.length,d,f=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||ch;for(;n&&s++<r&&(d=uh(n,f),!(d==="html"||s>1&&i+a.length*l+d.length>=p));)a.push(d),i+=d.length,n=n.parentNode;return a.reverse().join(c)}catch{return"<unknown>"}}function uh(e,t){let n=e,r=[],a,s,i,c,l;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let d=t&&t.length?t.filter(p=>n.getAttribute(p)).map(p=>[p,n.getAttribute(p)]):null;if(d&&d.length)d.forEach(p=>{r.push(`[${p[0]}="${p[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&et(a))for(s=a.split(/\s+/),l=0;l<s.length;l++)r.push(`.${s[l]}`);let f=["aria-label","type","name","title","alt"];for(l=0;l<f.length;l++)i=f[l],c=n.getAttribute(i),c&&r.push(`[${i}="${c}"]`);return r.join("")}function lh(){try{return Qn.document.location.href}catch{return""}}function dh(e){return Qn.document&&Qn.document.querySelector?Qn.document.querySelector(e):null}var fh="Sentry Logger ",ua=["debug","info","warn","error","log","assert","trace"],ar={};function Ec(e){if(!("console"in ae))return e();let t=ae.console,n={},r=Object.keys(ar);r.forEach(a=>{let s=ar[a];n[a]=t[a],t[a]=s});try{return e()}finally{r.forEach(a=>{t[a]=n[a]})}}function hh(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?ua.forEach(n=>{t[n]=(...r)=>{e&&Ec(()=>{ae.console[n](`${fh}[${n}]:`,...r)})}}):ua.forEach(n=>{t[n]=()=>{}}),t}var P=hh(),ph=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function mh(e){return e==="http"||e==="https"}function pr(e,t=!1){let{host:n,path:r,pass:a,port:s,projectId:i,protocol:c,publicKey:l}=e;return`${c}://${l}${t&&a?`:${a}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${i}`}function _h(e){let t=ph.exec(e);if(!t){console.error(`Invalid Sentry Dsn: ${e}`);return}let[n,r,a="",s,i="",c]=t.slice(1),l="",d=c,f=d.split("/");if(f.length>1&&(l=f.slice(0,-1).join("/"),d=f.pop()),d){let p=d.match(/^\d+/);p&&(d=p[0])}return xc({host:s,pass:a,path:l,projectId:d,port:i,protocol:n,publicKey:r})}function xc(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function gh(e){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(a=>e[a]?!1:(P.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:n.match(/^\d+$/)?mh(r)?t&&isNaN(parseInt(t,10))?(P.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(P.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(P.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function vh(e){let t=typeof e=="string"?_h(e):xc(e);if(!(!t||!gh(t)))return t}var Pe=class extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}};function ce(e,t,n){if(!(t in e))return;let r=e[t],a=n(r);typeof a=="function"&&Tc(a,r),e[t]=a}function $a(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Tc(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,$a(e,"__sentry_original__",t)}catch{}}function Ba(e){return e.__sentry_original__}function yh(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function wc(e){if(_c(e))return A({message:e.message,name:e.name,stack:e.stack},$s(e));if(hr(e)){let t=A({type:e.type,target:Us(e.target),currentTarget:Us(e.currentTarget)},$s(e));return typeof CustomEvent<"u"&&He(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Us(e){try{return nh(e)?Ot(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function $s(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function bh(e,t=40){let n=Object.keys(wc(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Dt(n[0],t);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>t))return r===n.length?a:Dt(a,t)}return""}function Je(e){return la(e,new Map)}function la(e,t){if(jt(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let a of Object.keys(e))typeof e[a]<"u"&&(r[a]=la(e[a],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(a=>{r.push(la(a,t))}),r}return e}var Sc=50,Bs=/\(error: (.*)\)/,Fs=/captureMessage|captureException/;function Eh(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[],s=n.split(`
|
|
42
|
-
`);for(let i=r;i<s.length;i++){let c=s[i];if(c.length>1024)continue;let l=Bs.test(c)?c.replace(Bs,"$1"):c;if(!l.match(/\S*Error: /)){for(let d of t){let f=d(l);if(f){a.push(f);break}}if(a.length>=Sc)break}}return xh(a)}}function xh(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),Fs.test(t[t.length-1].function||"")&&(t.pop(),Fs.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,Sc).map(n=>G(A({},n),{filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}var Ur="<anonymous>";function tt(e){try{return!e||typeof e!="function"?Ur:e.name||Ur}catch{return Ur}}var da=pn();function Th(){if(!("fetch"in da))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function fa(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function wh(){if(!Th())return!1;if(fa(da.fetch))return!0;let e=!1,t=da.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=fa(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}var Ln=pn();function Sh(){let e=Ln.chrome,t=e&&e.app&&e.app.runtime,n="history"in Ln&&!!Ln.history.pushState&&!!Ln.history.replaceState;return!t&&n}var ie=pn(),Rt="__sentry_xhr_v2__",un={},Vs={};function Ch(e){if(!Vs[e])switch(Vs[e]=!0,e){case"console":Ih();break;case"dom":Oh();break;case"xhr":Dh();break;case"fetch":Rh();break;case"history":Nh();break;case"error":Zh();break;case"unhandledrejection":Mh();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn("unknown instrumentation type:",e);return}}function ye(e,t){un[e]=un[e]||[],un[e].push(t),Ch(e)}function Ce(e,t){if(!(!e||!un[e]))for(let n of un[e]||[])try{n(t)}catch(r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.error(`Error while triggering instrumentation handler.
|
|
43
|
-
Type: ${e}
|
|
44
|
-
Name: ${tt(n)}
|
|
45
|
-
Error:`,r)}}function Ih(){"console"in ae&&ua.forEach(function(e){e in ae.console&&ce(ae.console,e,function(t){return ar[e]=t,function(...n){Ce("console",{args:n,level:e});let r=ar[e];r&&r.apply(ae.console,n)}})})}function Rh(){wh()&&ce(ae,"fetch",function(e){return function(...t){let{method:n,url:r}=Ah(t),a={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return Ce("fetch",A({},a)),e.apply(ae,t).then(s=>(Ce("fetch",G(A({},a),{endTimestamp:Date.now(),response:s})),s),s=>{throw Ce("fetch",G(A({},a),{endTimestamp:Date.now(),error:s})),s})}})}function ha(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Ys(e){return typeof e=="string"?e:e?ha(e,"url")?e.url:e.toString?e.toString():"":""}function Ah(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:Ys(n),method:ha(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:Ys(t),method:ha(t,"method")?String(t.method).toUpperCase():"GET"}}function Dh(){if(!ie.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;ce(e,"open",function(t){return function(...n){let r=n[1],a=this[Rt]={method:et(n[0])?n[0].toUpperCase():n[0],url:n[1],request_headers:{}};et(r)&&a.method==="POST"&&r.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let i=this[Rt];if(i&&this.readyState===4){try{i.status_code=this.status}catch{}Ce("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?ce(this,"onreadystatechange",function(i){return function(...c){return s(),i.apply(this,c)}}):this.addEventListener("readystatechange",s),ce(this,"setRequestHeader",function(i){return function(...c){let[l,d]=c,f=this[Rt];return f&&(f.request_headers[l.toLowerCase()]=d),i.apply(this,c)}}),t.apply(this,n)}}),ce(e,"send",function(t){return function(...n){let r=this[Rt];return r&&n[0]!==void 0&&(r.body=n[0]),Ce("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),t.apply(this,n)}})}var Un;function Nh(){if(!Sh())return;let e=ie.onpopstate;ie.onpopstate=function(...n){let r=ie.location.href,a=Un;if(Un=r,Ce("history",{from:a,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let a=r.length>2?r[2]:void 0;if(a){let s=Un,i=String(a);Un=i,Ce("history",{from:s,to:i})}return n.apply(this,r)}}ce(ie.history,"pushState",t),ce(ie.history,"replaceState",t)}var kh=1e3,$n,Bn;function Ph(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch{}return!1}function jh(e){if(e.type!=="keypress")return!1;try{let t=e.target;if(!t||!t.tagName)return!0;if(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)return!1}catch{}return!0}function Hs(e,t=!1){return n=>{if(!n||Bn===n||jh(n))return;let r=n.type==="keypress"?"input":n.type;$n===void 0?(e({event:n,name:r,global:t}),Bn=n):Ph(Bn,n)&&(e({event:n,name:r,global:t}),Bn=n),clearTimeout($n),$n=ie.setTimeout(()=>{$n=void 0},kh)}}function Oh(){if(!ie.document)return;let e=Ce.bind(null,"dom"),t=Hs(e,!0);ie.document.addEventListener("click",t,!1),ie.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=ie[n]&&ie[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(ce(r,"addEventListener",function(a){return function(s,i,c){if(s==="click"||s=="keypress")try{let l=this,d=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},f=d[s]=d[s]||{refCount:0};if(!f.handler){let p=Hs(e);f.handler=p,a.call(this,s,p,c)}f.refCount++}catch{}return a.call(this,s,i,c)}}),ce(r,"removeEventListener",function(a){return function(s,i,c){if(s==="click"||s=="keypress")try{let l=this,d=l.__sentry_instrumentation_handlers__||{},f=d[s];f&&(f.refCount--,f.refCount<=0&&(a.call(this,s,f.handler,c),f.handler=void 0,delete d[s]),Object.keys(d).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return a.call(this,s,i,c)}}))})}var Fn=null;function Zh(){Fn=ie.onerror,ie.onerror=function(e,t,n,r,a){return Ce("error",{column:r,error:a,line:n,msg:e,url:t}),Fn&&!Fn.__SENTRY_LOADER__?Fn.apply(this,arguments):!1},ie.onerror.__SENTRY_INSTRUMENTED__=!0}var Vn=null;function Mh(){Vn=ie.onunhandledrejection,ie.onunhandledrejection=function(e){return Ce("unhandledrejection",e),Vn&&!Vn.__SENTRY_LOADER__?Vn.apply(this,arguments):!0},ie.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Lh(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let s=0;s<t.length;s++)if(t[s]===a)return!0;return t.push(a),!1}function r(a){if(e)t.delete(a);else for(let s=0;s<t.length;s++)if(t[s]===a){t.splice(s,1);break}}return[n,r]}function de(){let e=ae,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>t.getRandomValues(new Uint8Array(1))[0])}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function Cc(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Xe(e){let{message:t,event_id:n}=e;if(t)return t;let r=Cc(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function pa(e,t,n){let r=e.exception=e.exception||{},a=r.values=r.values||[],s=a[0]=a[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function dn(e,t){let n=Cc(e);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism=A(A(A({},r),a),t),t&&"data"in t){let s=A(A({},a&&a.data),t.data);n.mechanism.data=s}}function Gs(e){if(e&&e.__sentry_captured__)return!0;try{$a(e,"__sentry_captured__",!0)}catch{}return!1}function Uh(e){return Array.isArray(e)?e:[e]}function $h(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Bh(){return"npm"}function Fh(){return!$h()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Vh(e,t){return e.require(t)}function Ke(e,t=100,n=1/0){try{return ma("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ic(e,t=3,n=100*1024){let r=Ke(e,t);return zh(r)>n?Ic(e,t-1,n):r}function ma(e,t,n=1/0,r=1/0,a=Lh()){let[s,i]=a;if(t==null||["number","boolean","string"].includes(typeof t)&&!vc(t))return t;let c=Yh(e,t);if(!c.startsWith("[object "))return c;if(t.__sentry_skip_normalization__)return t;let l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return c.replace("object ","");if(s(t))return"[Circular ~]";let d=t;if(d&&typeof d.toJSON=="function")try{let v=d.toJSON();return ma("",v,l-1,r,a)}catch{}let f=Array.isArray(t)?[]:{},p=0,_=wc(t);for(let v in _){if(!Object.prototype.hasOwnProperty.call(_,v))continue;if(p>=r){f[v]="[MaxProperties ~]";break}let w=_[v];f[v]=ma(v,w,l-1,r,a),p++}return i(t),f}function Yh(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(yc(t))return"[VueViewModel]";if(ah(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${tt(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=Hh(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Hh(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Gh(e){return~-encodeURI(e).split(/%..|./).length}function zh(e){return Gh(JSON.stringify(e))}var Be;(function(e){e[e.PENDING=0]="PENDING";let t=1;e[e.RESOLVED=t]="RESOLVED";let n=2;e[e.REJECTED=n]="REJECTED"})(Be||(Be={}));function mt(e){return new ge(t=>{t(e)})}function Fa(e){return new ge((t,n)=>{n(e)})}var ge=class{constructor(e){ge.prototype.__init.call(this),ge.prototype.__init2.call(this),ge.prototype.__init3.call(this),ge.prototype.__init4.call(this),this._state=Be.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new ge((n,r)=>{this._handlers.push([!1,a=>{if(!e)n(a);else try{n(e(a))}catch(s){r(s)}},a=>{if(!t)r(a);else try{n(t(a))}catch(s){r(s)}}]),this._executeHandlers()})}catch(e){return this.then(t=>t,e)}finally(e){return new ge((t,n)=>{let r,a;return this.then(s=>{a=!1,r=s,e&&e()},s=>{a=!0,r=s,e&&e()}).then(()=>{if(a){n(r);return}t(r)})})}__init(){this._resolve=e=>{this._setResult(Be.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Be.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===Be.PENDING){if(Ua(t)){t.then(this._resolve,this._reject);return}this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Be.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(t=>{t[0]||(this._state===Be.RESOLVED&&t[1](this._value),this._state===Be.REJECTED&&t[2](this._value),t[0]=!0)})}}};function Wh(e){let t=[];function n(){return e===void 0||t.length<e}function r(i){return t.splice(t.indexOf(i),1)[0]}function a(i){if(!n())return Fa(new Pe("Not adding Promise because buffer limit was reached."));let c=i();return t.indexOf(c)===-1&&t.push(c),c.then(()=>r(c)).then(null,()=>r(c).then(null,()=>{})),c}function s(i){return new ge((c,l)=>{let d=t.length;if(!d)return c(!0);let f=setTimeout(()=>{i&&i>0&&c(!1)},i);t.forEach(p=>{mt(p).then(()=>{--d||(clearTimeout(f),c(!0))},l)})})}return{$:t,add:a,drain:s}}function $r(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let 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}}var qh=["fatal","error","warning","log","info","debug"];function Kh(e){return e==="warn"?"warning":qh.includes(e)?e:"log"}var Rc=pn(),_a={nowSeconds:()=>Date.now()/1e3};function Xh(){let{performance:e}=Rc;if(!e||!e.now)return;let t=Date.now()-e.now();return{now:()=>e.now(),timeOrigin:t}}function Jh(){try{return Vh(module,"perf_hooks").performance}catch{return}}var Br=Fh()?Jh():Xh(),zs=Br===void 0?_a:{nowSeconds:()=>(Br.timeOrigin+Br.now())/1e3},mr=_a.nowSeconds.bind(_a),_t=zs.nowSeconds.bind(zs),je=(()=>{let{performance:e}=Rc;if(!e||!e.now)return;let t=3600*1e3,n=e.now(),r=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=a<t,i=e.timing&&e.timing.navigationStart,c=typeof i=="number"?Math.abs(i+n-r):t,l=c<t;return s||l?a<=c?e.timeOrigin:i:r})(),ga="baggage",Ac="sentry-",Qh=/^sentry-/,ep=8192;function tp(e){if(!et(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((r,a)=>{let s=Ws(a);return A(A({},r),s)},{});else{if(!e)return;t=Ws(e)}let n=Object.entries(t).reduce((r,[a,s])=>{if(a.match(Qh)){let i=a.slice(Ac.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function va(e){if(!e)return;let t=Object.entries(e).reduce((n,[r,a])=>(a&&(n[`${Ac}${r}`]=a),n),{});return np(t)}function Ws(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function np(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],a)=>{let s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=a===0?s:`${t},${s}`;return i.length>ep?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}var rp=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ap(e){if(!e)return;let t=e.match(rp);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function sp(e,t){let n=ap(e),r=tp(t),{traceId:a,parentSpanId:s,parentSampled:i}=n||{},c={traceId:a||de(),spanId:de().substring(16),sampled:i};return s&&(c.parentSpanId=s),r&&(c.dsc=r),{traceparentData:n,dynamicSamplingContext:r,propagationContext:c}}function Va(e=de(),t=de().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function mn(e,t=[]){return[e,t]}function ip(e,t){let[n,r]=e;return[n,[...r,t]]}function qs(e,t){let n=e[1];for(let r of n){let a=r[0].type;if(t(r,a))return!0}return!1}function ya(e,t){return(t||new TextEncoder).encode(e)}function op(e,t){let[n,r]=e,a=JSON.stringify(n);function s(i){typeof a=="string"?a=typeof i=="string"?a+i:[ya(a,t),i]:a.push(typeof i=="string"?ya(i,t):i)}for(let i of r){let[c,l]=i;if(s(`
|
|
46
|
-
${JSON.stringify(c)}
|
|
47
|
-
`),typeof l=="string"||l instanceof Uint8Array)s(l);else{let d;try{d=JSON.stringify(l)}catch{d=JSON.stringify(Ke(l))}s(d)}}return typeof a=="string"?a:cp(a)}function cp(e){let t=e.reduce((a,s)=>a+s.length,0),n=new Uint8Array(t),r=0;for(let a of e)n.set(a,r),r+=a.length;return n}function up(e,t){let n=typeof e.data=="string"?ya(e.data,t):e.data;return[Je({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var lp={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function Ks(e){return lp[e]}function Dc(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function dp(e,t,n,r){let a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return A(A(A({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:pr(r)}),a&&{trace:Je(A({},a))})}function fp(e,t,n){let r=[{type:"client_report"},{timestamp:mr(),discarded_events:e}];return mn(t?{dsn:t}:{},[r])}function hp(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function pp(e,t){return e[t]||e.all||0}function mp(e,t,n=Date.now()){return pp(e,t)>n}function _p(e,{statusCode:t,headers:n},r=Date.now()){let a=A({},e),s=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(s)for(let c of s.trim().split(",")){let[l,d]=c.split(":",2),f=parseInt(l,10),p=(isNaN(f)?60:f)*1e3;if(!d)a.all=r+p;else for(let _ of d.split(";"))a[_]=r+p}else i?a.all=r+hp(i,r):t===429&&(a.all=r+60*1e3);return a}var Ya="production";function Ha(){return bc("globalEventProcessors",()=>[])}function gp(e){Ha().push(e)}function sr(e,t,n,r=0){return new ge((a,s)=>{let i=e[r];if(t===null||typeof i!="function")a(t);else{let c=i(A({},t),n);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&i.id&&c===null&&P.log(`Event processor "${i.id}" dropped event`),Ua(c)?c.then(l=>sr(e,l,n,r+1).then(a)).then(null,s):sr(e,c,n,r+1).then(a).then(null,s)}})}function vp(e){let t=_t(),n={sid:de(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>bp(n)};return e&&Zt(n,e),n}function Zt(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||_t(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:de()),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{let 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 yp(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Zt(e,n)}function bp(e){return Je({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,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var Ep=100,Nt=class{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Xs()}static clone(e){let t=new Nt;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags=A({},e._tags),t._extra=A({},e._extra),t._contexts=A({},e._contexts),t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata=A({},e._sdkProcessingMetadata),t._propagationContext=A({},e._propagationContext)),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&Zt(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=A(A({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,t){return this._tags=G(A({},this._tags),{[e]:t}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=A(A({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,t){return this._extra=G(A({},this._extra),{[e]:t}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let t=e(this);return t instanceof Nt?t:this}return e instanceof Nt?(this._tags=A(A({},this._tags),e._tags),this._extra=A(A({},this._extra),e._extra),this._contexts=A(A({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):jt(e)&&(e=e,this._tags=A(A({},this._tags),e.tags),this._extra=A(A({},this._extra),e.extra),this._contexts=A(A({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),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=Xs(),this}addBreadcrumb(e,t){let n=typeof t=="number"?t:Ep;if(n<=0)return this;let r=A({timestamp:mr()},e),a=this._breadcrumbs;return a.push(r),this._breadcrumbs=a.length>n?a.slice(-n):a,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={},n){if(this._extra&&Object.keys(this._extra).length&&(e.extra=A(A({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=A(A({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=A(A({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=A(A({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=A({trace:this._span.getTraceContext()},e.contexts);let s=this._span.transaction;if(s){e.sdkProcessingMetadata=A({dynamicSamplingContext:s.getDynamicSamplingContext()},e.sdkProcessingMetadata);let i=s.name;i&&(e.tags=A({transaction:i},e.tags))}}this._applyFingerprint(e);let r=this._getBreadcrumbs(),a=[...e.breadcrumbs||[],...r];return e.breadcrumbs=a.length>0?a:void 0,e.sdkProcessingMetadata=G(A(A({},e.sdkProcessingMetadata),this._sdkProcessingMetadata),{propagationContext:this._propagationContext}),sr([...n||[],...Ha(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=A(A({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Uh(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function Xs(){return{traceId:de(),spanId:de().substring(16)}}var Nc=4,xp=100,Ga=class{constructor(e,t=new Nt,n=Nc){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){let t=this.getStackTop();t.client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){let e=Nt.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(e){let t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){let n=this._lastEventId=t&&t.event_id?t.event_id:de(),r=new Error("Sentry syntheticException");return this._withClient((a,s)=>{a.captureException(e,G(A({originalException:e,syntheticException:r},t),{event_id:n}),s)}),n}captureMessage(e,t,n){let r=this._lastEventId=n&&n.event_id?n.event_id:de(),a=new Error(e);return this._withClient((s,i)=>{s.captureMessage(e,t,G(A({originalException:e,syntheticException:a},n),{event_id:r}),i)}),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:de();return e.type||(this._lastEventId=n),this._withClient((r,a)=>{r.captureEvent(e,G(A({},t),{event_id:n}),a)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){let{scope:n,client:r}=this.getStackTop();if(!r)return;let{beforeBreadcrumb:a=null,maxBreadcrumbs:s=xp}=r.getOptions&&r.getOptions()||{};if(s<=0)return;let i=mr(),c=A({timestamp:i},e),l=a?Ec(()=>a(c,t)):c;l!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",l,t),n.addBreadcrumb(l,s))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t)}configureScope(e){let{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){let t=Js(this);try{e(this)}finally{Js(t)}}getIntegration(e){let t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){let n=this._callExtensionMethod("startTransaction",e,t);if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&!n){let r=this.getClient();console.warn(r?`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
48
|
-
Sentry.addTracingExtensions();
|
|
49
|
-
Sentry.init({...});
|
|
50
|
-
`:"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop().scope,t=e.getSession();t&&yp(t),this._sendSessionUpdate(),e.setSession()}startSession(e){let{scope:t,client:n}=this.getStackTop(),{release:r,environment:a=Ya}=n&&n.getOptions()||{},{userAgent:s}=ae.navigator||{},i=vp(A(A({release:r,environment:a,user:t.getUser()},s&&{userAgent:s}),e)),c=t.getSession&&t.getSession();return c&&c.status==="ok"&&Zt(c,{status:"exited"}),this.endSession(),t.setSession(i),i}shouldSendDefaultPii(){let e=this.getClient(),t=e&&e.getOptions();return!!(t&&t.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){let{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){let n=_n().__SENTRY__;if(n&&n.extensions&&typeof n.extensions[e]=="function")return n.extensions[e].apply(this,t);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function _n(){return ae.__SENTRY__=ae.__SENTRY__||{extensions:{},hub:void 0},ae}function Js(e){let t=_n(),n=ba(t);return kc(t,e),n}function se(){let e=_n();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return Tp(e)}function Tp(e=_n()){return(!wp(e)||ba(e).isOlderThan(Nc))&&kc(e,new Ga),ba(e)}function wp(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function ba(e){return bc("hub",()=>new Ga,e)}function kc(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function za(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=se().getClient(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function gn(e){return se().getScope().getTransaction()}var Qs=!1;function Sp(){Qs||(Qs=!0,ye("error",Ea),ye("unhandledrejection",Ea))}function Ea(){let e=gn();if(e){let t="internal_error";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}Ea.tag="sentry_tracingErrorCallback";var Pc=class{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}},jc=class{constructor(e={}){this.traceId=e.traceId||de(),this.spanId=e.spanId||de().substring(16),this.startTimestamp=e.startTimestamp||_t(),this.tags=e.tags||{},this.data=e.data||{},this.instrumenter=e.instrumenter||"sentry",this.origin=e.origin||"manual",e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.name&&(this.description=e.name),e.status&&(this.status=e.status),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}get name(){return this.description||""}set name(e){this.setName(e)}startChild(e){let t=new jc(G(A({},e),{parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId}));if(t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t),t.transaction=this.transaction,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&t.transaction){let n=e&&e.op||"< unknown op >",r=t.transaction.name||"< unknown name >",a=t.transaction.spanId,s=`[Tracing] Starting '${n}' span on transaction '${r}' (${a}).`;t.transaction.metadata.spanMetadata[t.spanId]={logMessage:s},P.log(s)}return t}setTag(e,t){return this.tags=G(A({},this.tags),{[e]:t}),this}setData(e,t){return this.data=G(A({},this.data),{[e]:t}),this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e)),this.setData("http.response.status_code",e);let t=Cp(e);return t!=="unknown_error"&&this.setStatus(t),this}setName(e){this.description=e}isSuccess(){return this.status==="ok"}finish(e){if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){let{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId];t&&P.log(t.replace("Starting","Finishing"))}this.endTimestamp=typeof e=="number"?e:_t()}toTraceparent(){return Va(this.traceId,this.spanId,this.sampled)}toContext(){return Je({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return Je({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return Je({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId,origin:this.origin})}};function Cp(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function _r(e,t,n){let r=t.getOptions(),{publicKey:a}=t.getDsn()||{},{segment:s}=n&&n.getUser()||{},i=Je({environment:r.environment||Ya,release:r.release,user_segment:s,public_key:a,trace_id:e});return t.emit&&t.emit("createDsc",i),i}var Oc=class extends jc{constructor(e,t){super(e),delete this.description,this._measurements={},this._contexts={},this._hub=t||se(),this._name=e.name||"",this.metadata=G(A({source:"custom"},e.metadata),{spanMetadata:{}}),this._trimEnd=e.trimEnd,this.transaction=this;let n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext=A({},n))}get name(){return this._name}set name(e){this.setName(e)}setName(e,t="custom"){this._name=e,this.metadata.source=t}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new Pc(e)),this.spanRecorder.add(this)}setContext(e,t){t===null?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this.metadata=A(A({},this.metadata),e)}finish(e){let t=this._finishTransaction(e);if(t)return this._hub.captureEvent(t)}toContext(){let e=super.toContext();return Je(G(A({},e),{name:this.name,trimEnd:this._trimEnd}))}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;let e=this._hub||se(),t=e.getClient();if(!t)return{};let n=e.getScope(),r=_r(this.traceId,t,n),a=this.metadata.sampleRate;a!==void 0&&(r.sample_rate=`${a}`);let s=this.metadata.source;return s&&s!=="url"&&(r.transaction=this.name),this.sampled!==void 0&&(r.sampled=String(this.sampled)),r}setHub(e){this._hub=e}_finishTransaction(e){if(this.endTimestamp!==void 0)return;this.name||((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e);let t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),this.sampled!==!0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","transaction");return}let n=this.spanRecorder?this.spanRecorder.spans.filter(s=>s!==this&&s.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((s,i)=>s.endTimestamp&&i.endTimestamp?s.endTimestamp>i.endTimestamp?s:i:s).endTimestamp);let r=this.metadata,a=A({contexts:G(A({},this._contexts),{trace:this.getTraceContext()}),spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:G(A({},r),{dynamicSamplingContext:this.getDynamicSamplingContext()})},r.source&&{transaction_info:{source:r.source}});return Object.keys(this._measurements).length>0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),a.measurements=this._measurements),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),a}},er={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Ip="finishReason",St=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],Rp=class extends Pc{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){e.spanId!==this.transactionSpanId&&(e.finish=t=>{e.endTimestamp=typeof t=="number"?t:_t(),this._popActivity(e.spanId)},e.endTimestamp===void 0&&this._pushActivity(e.spanId)),super.add(e)}},Ap=class extends Oc{constructor(e,t,n=er.idleTimeout,r=er.finalTimeout,a=er.heartbeatInterval,s=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=a,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=St[4],s&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),t.configureScope(i=>i.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=St[3],this.finish())},this._finalTimeout)}finish(e=_t()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(Ip,this._finishReason),this.spanRecorder){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Tracing] finishing IdleTransaction",new Date(e*1e3).toISOString(),this.op);for(let t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(t=>{if(t.spanId===this.spanId)return!0;t.endTimestamp||(t.endTimestamp=e,t.setStatus("cancelled"),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));let n=t.startTimestamp<e,r=(this._finalTimeout+this._idleTimeout)/1e3,a=t.endTimestamp-this.startTimestamp<r;if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let s=JSON.stringify(t,void 0,2);n?a||P.log("[Tracing] discarding Span since it finished after Transaction final timeout",s):P.log("[Tracing] discarding Span since it happened after Transaction was finished",s)}return n&&a}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Tracing] flushing IdleTransaction")}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Tracing] No active IdleTransaction");if(this._onScope){let t=this._idleHub.getScope();t.getTransaction()===this&&t.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){let t=r=>{this._finished||this._pushActivity(r)},n=r=>{this._finished||this._popActivity(r)};this.spanRecorder=new Rp(t,n,this.spanId,e),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=t===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=St[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=St[1],this.finish(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`[Tracing] popActivity ${e}`),delete this.activities[e],(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let t=_t();this._idleTimeoutCanceledPermanently?(this._finishReason=St[5],this.finish(t)):this._restartIdleTimeout(t+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=St[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function Dp(){let e=this.getScope().getSpan();return e?{"sentry-trace":e.toTraceparent()}:{}}function Zc(e,t,n){if(!za(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setMetadata({sampleRate:Number(r)})):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setMetadata({sampleRate:Number(r)})):(r=1,e.setMetadata({sampleRate:r})),Np(r)?r?(e.sampled=Math.random()<r,e.sampled?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`[Tracing] starting ${e.op} transaction - ${e.name}`),e):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function Np(e){return vc(e)||!(typeof e=="number"||typeof e=="boolean")?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function kp(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},a=r.instrumenter||"sentry",s=e.instrumenter||"sentry";a!==s&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${a}\` instrumenter.
|
|
51
|
-
The transaction will not be sampled. Please use the ${a} instrumentation to start transactions.`),e.sampled=!1);let i=new Oc(e,this);return i=Zc(i,r,A({parentSampled:e.parentSampled,transactionContext:e},t)),i.sampled&&i.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",i),i}function ei(e,t,n,r,a,s,i){let c=e.getClient(),l=c&&c.getOptions()||{},d=new Ap(t,e,n,r,i,a);return d=Zc(d,l,A({parentSampled:t.parentSampled,transactionContext:t},s)),d.sampled&&d.initSpanRecorder(l._experiments&&l._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",d),d}function Pp(){let e=_n();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=kp),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Dp),Sp())}function jp(e,t){return se().captureException(e,{captureContext:t})}function Op(e){se().withScope(e)}var Zp="7";function Mp(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Lp(e){return`${Mp(e)}${e.projectId}/envelope/`}function Up(e,t){return yh(A({sentry_key:e.publicKey,sentry_version:Zp},t&&{sentry_client:`${t.name}/${t.version}`}))}function $p(e,t={}){let n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${Lp(e)}?${Up(e,r)}`}function Bp(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Fp(e,t,n,r){let a=Dc(n),s=A(A({sent_at:new Date().toISOString()},a&&{sdk:a}),!!r&&t&&{dsn:pr(t)}),i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return mn(s,[i])}function Vp(e,t,n,r){let a=Dc(n),s=e.type&&e.type!=="replay_event"?e.type:"event";Bp(e,n&&n.sdk);let i=dp(e,a,r,t);return delete e.sdkProcessingMetadata,mn(i,[[{type:s},e]])}var ti=[];function Yp(e,t){let n={};return t.forEach(r=>{r&&Mc(e,r,n)}),n}function Mc(e,t,n){if(n[t.name]=t,ti.indexOf(t.name)===-1&&(t.setupOnce(gp,se),ti.push(t.name)),e.on&&typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(a,s)=>r(a,s,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){let r=t.processEvent.bind(t),a=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(a)}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`Integration installed: ${t.name}`)}function Hp(e,t,n,r,a){let{normalizeDepth:s=3,normalizeMaxBreadth:i=1e3}=e,c=G(A({},t),{event_id:t.event_id||n.event_id||de(),timestamp:t.timestamp||mr()}),l=n.integrations||e.integrations.map(_=>_.name);Gp(c,e),qp(c,l),t.type===void 0&&zp(c,e.stackParser);let d=r;n.captureContext&&(d=Nt.clone(d).update(n.captureContext));let f=mt(c),p=a&&a.getEventProcessors?a.getEventProcessors():[];if(d){if(d.getAttachments){let _=[...n.attachments||[],...d.getAttachments()];_.length&&(n.attachments=_)}f=d.applyToEvent(c,n,p)}else f=sr([...p,...Ha()],c,n);return f.then(_=>(_&&Wp(_),typeof s=="number"&&s>0?Kp(_,s,i):_))}function Gp(e,t){let{environment:n,release:r,dist:a,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:Ya),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&a!==void 0&&(e.dist=a),e.message&&(e.message=Dt(e.message,s));let i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=Dt(i.value,s));let c=e.request;c&&c.url&&(c.url=Dt(c.url,s))}var ni=new WeakMap;function zp(e,t){let n=ae._sentryDebugIds;if(!n)return;let r,a=ni.get(t);a?r=a:(r=new Map,ni.set(t,r));let s=Object.keys(n).reduce((i,c)=>{let l,d=r.get(c);d?l=d:(l=t(c),r.set(c,l));for(let f=l.length-1;f>=0;f--){let p=l[f];if(p.filename){i[p.filename]=n[c];break}}return i},{});try{e.exception.values.forEach(i=>{i.stacktrace.frames.forEach(c=>{c.filename&&(c.debug_id=s[c.filename])})})}catch{}}function Wp(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(a=>{a.debug_id&&(a.abs_path?t[a.abs_path]=a.debug_id:a.filename&&(t[a.filename]=a.debug_id),delete a.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function qp(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Kp(e,t,n){if(!e)return null;let r=A(A(A(A(A({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(a=>A(A({},a),a.data&&{data:Ke(a.data,t,n)}))}),e.user&&{user:Ke(e.user,t,n)}),e.contexts&&{contexts:Ke(e.contexts,t,n)}),e.extra&&{extra:Ke(e.extra,t,n)});return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ke(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(a=>(a.data&&(a.data=Ke(a.data,t,n)),a))),r}var ri="Not capturing exception because it's already been captured.",Xp=class{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=vh(e.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn("No DSN provided, client will not send events."),this._dsn){let t=$p(this._dsn,e);this._transport=e.transport(G(A({recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,n){if(Gs(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(ri);return}let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(a=>this._captureEvent(a,t,n)).then(a=>{r=a})),r}captureMessage(e,t,n,r){let a=n&&n.event_id,s=gc(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(s.then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureEvent(e,t,n){if(t&&t.originalException&&Gs(t.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(ri);return}let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then(a=>{r=a})),r}captureSession(e){typeof e.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Zt(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?this._isClientDoneProcessing(e).then(n=>t.flush(e).then(r=>n&&r)):mt(!0)}close(e){return this.flush(e).then(t=>(this.getOptions().enabled=!1,t))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&(this._integrations=Yp(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){Mc(this,e,this._integrations)}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=Vp(e,this._dsn,this._options._metadata,this._options.tunnel);for(let a of t.attachments||[])n=ip(n,up(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));let r=this._sendEnvelope(n);r&&r.then(a=>this.emit("afterSendEvent",e,a),null)}sendSession(e){let t=Fp(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=`${e}:${t}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(n=>n(...t))}_updateSessionFromEvent(e,t){let n=!1,r=!1,a=t.exception&&t.exception.values;if(a){r=!0;for(let i of a){let c=i.mechanism;if(c&&c.handled===!1){n=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&n)&&(Zt(e,G(A({},n&&{status:"crashed"}),{errors:e.errors||Number(r||n)})),this.captureSession(e))}_isClientDoneProcessing(e){return new ge(t=>{let n=0,r=1,a=setInterval(()=>{this._numProcessing==0?(clearInterval(a),t(!0)):(n+=r,e&&n>=e&&(clearInterval(a),t(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n){let r=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit("preprocessEvent",e,t),Hp(r,e,t,n,this).then(s=>{if(s===null)return s;let{propagationContext:i}=s.sdkProcessingMetadata||{};if(!(s.contexts&&s.contexts.trace)&&i){let{traceId:c,spanId:l,parentSpanId:d,dsc:f}=i;s.contexts=A({trace:{trace_id:c,span_id:l,parent_span_id:d}},s.contexts);let p=f||_r(c,this,n);s.sdkProcessingMetadata=A({dynamicSamplingContext:p},s.sdkProcessingMetadata)}return s})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(r=>r.event_id,r=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let a=r;a.logLevel==="log"?P.log(a.message):P.warn(a)}})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:a}=r,s=Uc(e),i=Lc(e),c=e.type||"error",l=`before send for type \`${c}\``;if(i&&typeof a=="number"&&Math.random()>a)return this.recordDroppedEvent("sample_rate","error",e),Fa(new Pe(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));let d=c==="replay_event"?"replay":c;return this._prepareEvent(e,t,n).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",d,e),new Pe("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return f;let p=Qp(r,f,t);return Jp(p,l)}).then(f=>{if(f===null)throw this.recordDroppedEvent("before_send",d,e),new Pe(`${l} returned \`null\`, will not send event.`,"log");let p=n&&n.getSession();!s&&p&&this._updateSessionFromEvent(p,f);let _=f.transaction_info;if(s&&_&&f.transaction!==e.transaction){let v="custom";f.transaction_info=G(A({},_),{source:v})}return this.sendEvent(f,t),f}).then(null,f=>{throw f instanceof Pe?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new Pe(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
52
|
-
Reason: ${f}`))})}_process(e){this._numProcessing++,e.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,t=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.error("Error while sending event:",t)});(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{let[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}};function Jp(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Ua(e))return e.then(r=>{if(!jt(r)&&r!==null)throw new Pe(n);return r},r=>{throw new Pe(`${t} rejected with ${r}`)});if(!jt(e)&&e!==null)throw new Pe(n);return e}function Qp(e,t,n){let{beforeSend:r,beforeSendTransaction:a}=e;return Lc(t)&&r?r(t,n):Uc(t)&&a?a(t,n):t}function Lc(e){return e.type===void 0}function Uc(e){return e.type==="transaction"}var e0=30;function $c(e,t,n=Wh(e.bufferSize||e0)){let r={},a=i=>n.drain(i);function s(i){let c=[];if(qs(i,(p,_)=>{let v=Ks(_);if(mp(r,v)){let w=ai(p,_);e.recordDroppedEvent("ratelimit_backoff",v,w)}else c.push(p)}),c.length===0)return mt();let l=mn(i[0],c),d=p=>{qs(l,(_,v)=>{let w=ai(_,v);e.recordDroppedEvent(p,Ks(v),w)})},f=()=>t({body:op(l,e.textEncoder)}).then(p=>(p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=_p(r,p),p),p=>{throw d("network_error"),p});return n.add(f).then(p=>p,p=>{if(p instanceof Pe)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.error("Skipped sending event because buffer is full."),d("queue_overflow"),mt();throw p})}return s.__sentry__baseTransport__=!0,{send:s,flush:a}}function ai(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}var si="7.73.0",Bc={};fc(Bc,{FunctionToString:()=>Wa,InboundFilters:()=>qa});var ii,Wa=class{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=Wa.id}setupOnce(){ii=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Ba(this)||this;return ii.apply(t,e)}}catch{}}};Wa.__initStatic();var t0=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],n0=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/],qa=class{static __initStatic(){this.id="InboundFilters"}constructor(e={}){this.name=qa.id,this._options=e}setupOnce(e,t){}processEvent(e,t,n){let r=n.getOptions(),a=r0(this._options,r);return a0(e,a)?null:e}};qa.__initStatic();function r0(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:t0],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:n0],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function a0(e,t){return t.ignoreInternal&&l0(e)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`Event dropped due to being internal Sentry Error.
|
|
53
|
-
Event: ${Xe(e)}`),!0):s0(e,t.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
54
|
-
Event: ${Xe(e)}`),!0):i0(e,t.ignoreTransactions)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
55
|
-
Event: ${Xe(e)}`),!0):o0(e,t.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
56
|
-
Event: ${Xe(e)}.
|
|
57
|
-
Url: ${ir(e)}`),!0):c0(e,t.allowUrls)?!1:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
58
|
-
Event: ${Xe(e)}.
|
|
59
|
-
Url: ${ir(e)}`),!0)}function s0(e,t){return e.type||!t||!t.length?!1:u0(e).some(n=>hn(n,t))}function i0(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?hn(n,t):!1}function o0(e,t){if(!t||!t.length)return!1;let n=ir(e);return n?hn(n,t):!1}function c0(e,t){if(!t||!t.length)return!0;let n=ir(e);return n?hn(n,t):!0}function u0(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&t.length===0&&P.error(`Could not extract message for event ${Xe(e)}`),t}function l0(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function d0(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ir(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?d0(t):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.error(`Cannot extract url for event ${Xe(e)}`),null}}var K=ae,xa=0;function Fc(){return xa>0}function f0(){xa++,setTimeout(()=>{xa--})}function Mt(e,t={},n){if(typeof e!="function")return e;try{let a=e.__sentry_wrapped__;if(a)return a;if(Ba(e))return e}catch{return e}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let s=a.map(i=>Mt(i,t));return e.apply(this,s)}catch(s){throw f0(),Op(i=>{i.addEventProcessor(c=>(t.mechanism&&(pa(c,void 0),dn(c,t.mechanism)),c.extra=G(A({},c.extra),{arguments:a}),c)),jp(s)}),s}};try{for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}catch{}Tc(r,e),$a(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Vc(e,t){let n=Ka(e,t),r={type:t&&t.name,value:_0(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function h0(e,t,n,r){let a=se().getClient(),s=a&&a.getOptions().normalizeDepth,i={exception:{values:[{type:hr(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:y0(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Ic(t,s)}};if(n){let c=Ka(e,n);c.length&&(i.exception.values[0].stacktrace={frames:c})}return i}function Fr(e,t){return{exception:{values:[Vc(e,t)]}}}function Ka(e,t){let n=t.stacktrace||t.stack||"",r=m0(t);try{return e(n,r)}catch{}return[]}var p0=/Minified React error #\d+;/i;function m0(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(p0.test(e.message))return 1}return 0}function _0(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function g0(e,t,n,r){let a=n&&n.syntheticException||void 0,s=Xa(e,t,a,r);return dn(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),mt(s)}function v0(e,t,n="info",r,a){let s=r&&r.syntheticException||void 0,i=Ta(e,t,s,a);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),mt(i)}function Xa(e,t,n,r,a){let s;if(La(t)&&t.error)return Fr(e,t.error);if(Os(t)||th(t)){let i=t;if("stack"in t)s=Fr(e,t);else{let c=i.name||(Os(i)?"DOMError":"DOMException"),l=i.message?`${c}: ${i.message}`:c;s=Ta(e,l,n,r),pa(s,l)}return"code"in i&&(s.tags=G(A({},s.tags),{"DOMException.code":`${i.code}`})),s}return _c(t)?Fr(e,t):jt(t)||hr(t)?(s=h0(e,t,n,a),dn(s,{synthetic:!0}),s):(s=Ta(e,t,n,r),pa(s,`${t}`),dn(s,{synthetic:!0}),s)}function Ta(e,t,n,r){let a={message:t};if(r&&n){let s=Ka(e,n);s.length&&(a.exception={values:[{value:t,stacktrace:{frames:s}}]})}return a}function y0(e,{isUnhandledRejection:t}){let n=bh(e),r=t?"promise rejection":"exception";return La(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:hr(e)?`Event \`${b0(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function b0(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function E0(e,{metadata:t,tunnel:n,dsn:r}){let a=A(A({event_id:e.event_id,sent_at:new Date().toISOString()},t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!n&&!!r&&{dsn:pr(r)}),s=x0(e);return mn(a,[s])}function x0(e){return[{type:"user_report"},e]}var T0=class extends Xp{constructor(e){let t=K.SENTRY_SDK_SOURCE||Bh();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${t}:@sentry/browser`,version:si}],version:si},super(e),e.sendClientReports&&K.document&&K.document.addEventListener("visibilitychange",()=>{K.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return g0(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return v0(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn("SDK not enabled, will not capture user feedback.");return}let t=E0(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("Sending outcomes:",e);let t=fp(e,this._options.tunnel&&pr(this._dsn));this._sendEnvelope(t)}},cn;function w0(){if(cn)return cn;if(fa(K.fetch))return cn=K.fetch.bind(K);let e=K.document,t=K.fetch;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return cn=t.bind(K)}function S0(){cn=void 0}function C0(e,t=w0()){let n=0,r=0;function a(s){let i=s.body.length;n+=i,r++;let c=A({body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);try{return t(e.url,c).then(l=>(n-=i,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return S0(),n-=i,r--,Fa(l)}}return $c(e,a)}var I0=4;function R0(e){function t(n){return new ge((r,a)=>{let s=new XMLHttpRequest;s.onerror=a,s.onreadystatechange=()=>{s.readyState===I0&&r({statusCode:s.status,headers:{"x-sentry-rate-limits":s.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":s.getResponseHeader("Retry-After")}})},s.open("POST",e.url);for(let i in e.headers)Object.prototype.hasOwnProperty.call(e.headers,i)&&s.setRequestHeader(i,e.headers[i]);s.send(n.body)})}return $c(e,t)}var gr="?",A0=30,D0=40,N0=50;function Ja(e,t,n,r){let a={filename:e,function:t,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var k0=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,P0=/\((\S*)(?::(\d+))(?::(\d+))\)/,j0=e=>{let t=k0.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let a=P0.exec(t[2]);a&&(t[2]=a[1],t[3]=a[2],t[4]=a[3])}let[n,r]=Yc(t[1]||gr,t[2]);return Ja(r,n,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},O0=[A0,j0],Z0=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,M0=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,L0=e=>{let t=Z0.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let a=M0.exec(t[3]);a&&(t[1]=t[1]||"eval",t[3]=a[1],t[4]=a[2],t[5]="")}let n=t[3],r=t[1]||gr;return[r,n]=Yc(r,n),Ja(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},U0=[N0,L0],$0=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,B0=e=>{let t=$0.exec(e);return t?Ja(t[2],t[1]||gr,+t[3],t[4]?+t[4]:void 0):void 0},F0=[D0,B0],V0=[O0,U0,F0],Y0=Eh(...V0),Yc=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:gr,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Vt=class{static __initStatic(){this.id="GlobalHandlers"}constructor(e){this.name=Vt.id,this._options=A({onerror:!0,onunhandledrejection:!0},e),this._installFunc={onerror:H0,onunhandledrejection:G0}}setupOnce(){Error.stackTraceLimit=50;let e=this._options;for(let t in e){let n=this._installFunc[t];n&&e[t]&&(q0(t),n(),this._installFunc[t]=void 0)}}};Vt.__initStatic();function H0(){ye("error",e=>{let[t,n,r]=zc();if(!t.getIntegration(Vt))return;let{msg:a,url:s,line:i,column:c,error:l}=e;if(Fc()||l&&l.__sentry_own_request__)return;let d=l===void 0&&et(a)?W0(a,s,i,c):Hc(Xa(n,l||a,void 0,r,!1),s,i,c);d.level="error",Gc(t,l,d,"onerror")})}function G0(){ye("unhandledrejection",e=>{let[t,n,r]=zc();if(!t.getIntegration(Vt))return;let a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch{}if(Fc()||a&&a.__sentry_own_request__)return!0;let s=gc(a)?z0(a):Xa(n,a,void 0,r,!0);s.level="error",Gc(t,a,s,"onunhandledrejection")})}function z0(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function W0(e,t,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,s=La(e)?e.message:e,i="Error",c=s.match(a);return c&&(i=c[1],s=c[2]),Hc({exception:{values:[{type:i,value:s}]}},t,n,r)}function Hc(e,t,n,r){let a=e.exception=e.exception||{},s=a.values=a.values||[],i=s[0]=s[0]||{},c=i.stacktrace=i.stacktrace||{},l=c.frames=c.frames||[],d=isNaN(parseInt(r,10))?void 0:r,f=isNaN(parseInt(n,10))?void 0:n,p=et(t)&&t.length>0?t:lh();return l.length===0&&l.push({colno:d,filename:p,function:"?",in_app:!0,lineno:f}),e}function q0(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`Global Handler attached: ${e}`)}function Gc(e,t,n,r){dn(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function zc(){let e=se(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}var K0=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Qa=class{static __initStatic(){this.id="TryCatch"}constructor(e){this.name=Qa.id,this._options=A({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e)}setupOnce(){this._options.setTimeout&&ce(K,"setTimeout",oi),this._options.setInterval&&ce(K,"setInterval",oi),this._options.requestAnimationFrame&&ce(K,"requestAnimationFrame",X0),this._options.XMLHttpRequest&&"XMLHttpRequest"in K&&ce(XMLHttpRequest.prototype,"send",J0);let e=this._options.eventTarget;e&&(Array.isArray(e)?e:K0).forEach(Q0)}};Qa.__initStatic();function oi(e){return function(...t){let n=t[0];return t[0]=Mt(n,{mechanism:{data:{function:tt(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function X0(e){return function(t){return e.apply(this,[Mt(t,{mechanism:{data:{function:"requestAnimationFrame",handler:tt(e)},handled:!1,type:"instrument"}})])}}function J0(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&ce(n,r,function(a){let s={mechanism:{data:{function:r,handler:tt(a)},handled:!1,type:"instrument"}},i=Ba(a);return i&&(s.mechanism.data.handler=tt(i)),Mt(a,s)})}),e.apply(this,t)}}function Q0(e){let t=K,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ce(n,"addEventListener",function(r){return function(a,s,i){try{typeof s.handleEvent=="function"&&(s.handleEvent=Mt(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:tt(s),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[a,Mt(s,{mechanism:{data:{function:"addEventListener",handler:tt(s),target:e},handled:!1,type:"instrument"}}),i])}}),ce(n,"removeEventListener",function(r){return function(a,s,i){let c=s;try{let l=c&&c.__sentry_wrapped__;l&&r.call(this,a,l,i)}catch{}return r.call(this,a,c,i)}}))}var Yn=1024,vr=class{static __initStatic(){this.id="Breadcrumbs"}constructor(e){this.name=vr.id,this.options=A({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e)}setupOnce(){if(this.options.console&&ye("console",n1),this.options.dom&&ye("dom",t1(this.options.dom)),this.options.xhr&&ye("xhr",r1),this.options.fetch&&ye("fetch",a1),this.options.history&&ye("history",s1),this.options.sentry){let e=se().getClient();e&&e.on&&e.on("beforeSendEvent",e1)}}};vr.__initStatic();function e1(e){se().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Xe(e)},{event:e})}function t1(e){function t(n){let r,a=typeof e=="object"?e.serializeAttribute:void 0,s=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;s&&s>Yn&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`\`dom.maxStringLength\` cannot exceed ${Yn}, but a value of ${s} was configured. Sentry will use ${Yn} instead.`),s=Yn),typeof a=="string"&&(a=[a]);try{let i=n.event;r=i1(i)?Ot(i.target,{keyAttrs:a,maxStringLength:s}):Ot(i,{keyAttrs:a,maxStringLength:s})}catch{r="<unknown>"}r.length!==0&&se().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function n1(e){let t={category:"console",data:{arguments:e.args,logger:"console"},level:Kh(e.level),message:Zs(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${Zs(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;se().addBreadcrumb(t,{input:e.args,level:e.level})}function r1(e){let{startTimestamp:t,endTimestamp:n}=e,r=e.xhr[Rt];if(!t||!n||!r)return;let{method:a,url:s,status_code:i,body:c}=r,l={method:a,url:s,status_code:i},d={xhr:e.xhr,input:c,startTimestamp:t,endTimestamp:n};se().addBreadcrumb({category:"xhr",data:l,type:"http"},d)}function a1(e){let{startTimestamp:t,endTimestamp:n}=e;if(n&&!(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"))if(e.error){let r=e.fetchData,a={data:e.error,input:e.args,startTimestamp:t,endTimestamp:n};se().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},a)}else{let r=G(A({},e.fetchData),{status_code:e.response&&e.response.status}),a={input:e.args,response:e.response,startTimestamp:t,endTimestamp:n};se().addBreadcrumb({category:"fetch",data:r,type:"http"},a)}}function s1(e){let t=e.from,n=e.to,r=$r(K.location.href),a=$r(t),s=$r(n);a.path||(a=r),r.protocol===s.protocol&&r.host===s.host&&(n=s.relative),r.protocol===a.protocol&&r.host===a.host&&(t=a.relative),se().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}function i1(e){return!!e&&!!e.target}var o1="cause",c1=5,yr=class{static __initStatic(){this.id="LinkedErrors"}constructor(e={}){this.name=yr.id,this._key=e.key||o1,this._limit=e.limit||c1}setupOnce(){}preprocessEvent(e,t,n){let r=n.getOptions();ih(Vc,r.stackParser,r.maxValueLength,this._key,this._limit,e,t)}};yr.__initStatic();var br=class{static __initStatic(){this.id="HttpContext"}constructor(){this.name=br.id}setupOnce(){}preprocessEvent(e){if(!K.navigator&&!K.location&&!K.document)return;let t=e.request&&e.request.url||K.location&&K.location.href,{referrer:n}=K.document||{},{userAgent:r}=K.navigator||{},a=A(A(A({},e.request&&e.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),s=G(A(A({},e.request),t&&{url:t}),{headers:a});e.request=s}};br.__initStatic();var Er=class{static __initStatic(){this.id="Dedupe"}constructor(){this.name=Er.id}setupOnce(e,t){}processEvent(e){if(e.type)return e;try{if(u1(e,this._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return this._previousEvent=e}};Er.__initStatic();function u1(e,t){return t?!!(l1(e,t)||d1(e,t)):!1}function l1(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!qc(e,t)||!Wc(e,t))}function d1(e,t){let n=ci(t),r=ci(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!qc(e,t)||!Wc(e,t))}function Wc(e,t){let n=ui(e),r=ui(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a<r.length;a++){let s=r[a],i=n[a];if(s.filename!==i.filename||s.lineno!==i.lineno||s.colno!==i.colno||s.function!==i.function)return!1}return!0}function qc(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function ci(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ui(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}var Kc={};fc(Kc,{Breadcrumbs:()=>vr,Dedupe:()=>Er,GlobalHandlers:()=>Vt,HttpContext:()=>br,LinkedErrors:()=>yr,TryCatch:()=>Qa});var W=ae;function f1(){W&&W.document?W.document.addEventListener("visibilitychange",()=>{let e=gn();if(W.document.hidden&&e){let t="cancelled";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${e.op}`),e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.finish()}}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var es=(e,t,n)=>{let r,a;return s=>{t.value>=0&&(s||n)&&(a=t.value-(r||0),(a||r===void 0)&&(r=t.value,t.delta=a,e(t)))}},h1=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`,p1=()=>{let e=W.performance.timing,t=W.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(let r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},Xc=()=>W.__WEB_VITALS_POLYFILL__?W.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||p1()):W.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Jc=()=>{let e=Xc();return e&&e.activationStart||0},ts=(e,t)=>{let n=Xc(),r="navigate";return n&&(W.document.prerendering||Jc()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:h1(),navigationType:r}},vn=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(a=>{t(a.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},xr=(e,t)=>{let n=r=>{(r.type==="pagehide"||W.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},m1=e=>{let t=ts("CLS",0),n,r=0,a=[],s=c=>{c.forEach(l=>{if(!l.hadRecentInput){let d=a[0],f=a[a.length-1];r&&a.length!==0&&l.startTime-f.startTime<1e3&&l.startTime-d.startTime<5e3?(r+=l.value,a.push(l)):(r=l.value,a=[l]),r>t.value&&(t.value=r,t.entries=a,n&&n())}})},i=vn("layout-shift",s);if(i){n=es(e,t);let c=()=>{s(i.takeRecords()),n(!0)};return xr(c),c}},tr=-1,_1=()=>W.document.visibilityState==="hidden"&&!W.document.prerendering?0:1/0,g1=()=>{xr(({timeStamp:e})=>{tr=e},!0)},ns=()=>(tr<0&&(tr=_1(),g1()),{get firstHiddenTime(){return tr}}),v1=e=>{let t=ns(),n=ts("FID"),r,a=c=>{c.startTime<t.firstHiddenTime&&(n.value=c.processingStart-c.startTime,n.entries.push(c),r(!0))},s=c=>{c.forEach(a)},i=vn("first-input",s);r=es(e,n),i&&xr(()=>{s(i.takeRecords()),i.disconnect()},!0)},li={},y1=e=>{let t=ns(),n=ts("LCP"),r,a=i=>{let c=i[i.length-1];if(c){let l=Math.max(c.startTime-Jc(),0);l<t.firstHiddenTime&&(n.value=l,n.entries=[c],r())}},s=vn("largest-contentful-paint",a);if(s){r=es(e,n);let i=()=>{li[n.id]||(a(s.takeRecords()),s.disconnect(),li[n.id]=!0,r(!0))};return["keydown","click"].forEach(c=>{addEventListener(c,i,{once:!0,capture:!0})}),xr(i,!0),i}};function Vr(e){return typeof e=="number"&&isFinite(e)}function Lt(e,t){var n=t,{startTimestamp:r}=n,a=Jf(n,["startTimestamp"]);return r&&e.startTimestamp>r&&(e.startTimestamp=r),e.startChild(A({startTimestamp:r},a))}function re(e){return e/1e3}function Qc(){return W&&W.addEventListener&&W.performance}var di=0,ee={},ke,ln;function b1(){let e=Qc();if(e&&je){e.mark&&W.performance.mark("sentry-tracing-init"),S1();let t=T1(),n=w1();return()=>{t&&t(),n&&n()}}return()=>{}}function E1(){vn("longtask",e=>{for(let t of e){let n=gn();if(!n)return;let r=re(je+t.startTime),a=re(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+a})}})}function x1(){vn("event",e=>{for(let t of e){let n=gn();if(!n)return;if(t.name==="click"){let r=re(je+t.startTime),a=re(t.duration);n.startChild({description:Ot(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+a})}}},{durationThreshold:0})}function T1(){return m1(e=>{let t=e.entries.pop();t&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Measurements] Adding CLS"),ee.cls={value:e.value,unit:""},ln=t)})}function w1(){return y1(e=>{let t=e.entries.pop();t&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Measurements] Adding LCP"),ee.lcp={value:e.value,unit:"millisecond"},ke=t)})}function S1(){v1(e=>{let t=e.entries.pop();if(!t)return;let n=re(je),r=re(t.startTime);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Measurements] Adding FID"),ee.fid={value:e.value,unit:"millisecond"},ee["mark.fid"]={value:n+r,unit:"second"}})}function C1(e){let t=Qc();if(!t||!W.performance.getEntries||!je)return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Tracing] Adding & adjusting spans using Performance API");let n=re(je),r=t.getEntries(),a,s;if(r.slice(di).forEach(i=>{let c=re(i.startTime),l=re(i.duration);if(!(e.op==="navigation"&&n+c<e.startTimestamp))switch(i.entryType){case"navigation":{R1(e,i,n),a=n+re(i.responseStart),s=n+re(i.requestStart);break}case"mark":case"paint":case"measure":{I1(e,i,c,l,n);let d=ns(),f=i.startTime<d.firstHiddenTime;i.name==="first-paint"&&f&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Measurements] Adding FP"),ee.fp={value:i.startTime,unit:"millisecond"}),i.name==="first-contentful-paint"&&f&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Measurements] Adding FCP"),ee.fcp={value:i.startTime,unit:"millisecond"});break}case"resource":{let d=i.name.replace(W.location.origin,"");D1(e,i,d,c,l,n);break}}}),di=Math.max(r.length-1,0),N1(e),e.op==="pageload"){typeof a=="number"&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Measurements] Adding TTFB"),ee.ttfb={value:(a-e.startTimestamp)*1e3,unit:"millisecond"},typeof s=="number"&&s<=a&&(ee["ttfb.requestTime"]={value:(a-s)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(c=>{if(!ee[c]||n>=e.startTimestamp)return;let l=ee[c].value,d=n+re(l),f=Math.abs((d-e.startTimestamp)*1e3),p=f-l;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`[Measurements] Normalized ${c} from ${l} to ${f} (${p})`),ee[c].value=f});let i=ee["mark.fid"];i&&ee.fid&&(Lt(e,{description:"first input delay",endTimestamp:i.value+re(ee.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:i.value}),delete ee["mark.fid"]),"fcp"in ee||delete ee.cls,Object.keys(ee).forEach(c=>{e.setMeasurement(c,ee[c].value,ee[c].unit)}),k1(e)}ke=void 0,ln=void 0,ee={}}function I1(e,t,n,r,a){let s=a+n,i=s+r;return Lt(e,{description:t.name,endTimestamp:i,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:s}),s}function R1(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Hn(e,t,r,n)}),Hn(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),Hn(e,t,"fetch",n,"cache","domainLookupStart"),Hn(e,t,"domainLookup",n,"DNS"),A1(e,t,n)}function Hn(e,t,n,r,a,s){let i=s?t[s]:t[`${n}End`],c=t[`${n}Start`];!c||!i||Lt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:a||n,startTimestamp:r+re(c),endTimestamp:r+re(i)})}function A1(e,t,n){Lt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+re(t.requestStart),endTimestamp:n+re(t.responseEnd)}),Lt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+re(t.responseStart),endTimestamp:n+re(t.responseEnd)})}function D1(e,t,n,r,a,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let i={};"transferSize"in t&&(i["http.response_transfer_size"]=t.transferSize),"encodedBodySize"in t&&(i["http.response_content_length"]=t.encodedBodySize),"decodedBodySize"in t&&(i["http.decoded_response_content_length"]=t.decodedBodySize),"renderBlockingStatus"in t&&(i["resource.render_blocking_status"]=t.renderBlockingStatus);let c=s+r,l=c+a;Lt(e,{description:n,endTimestamp:l,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:i})}function N1(e){let t=W.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Vr(n.rtt)&&(ee["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Vr(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Vr(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function k1(e){ke&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Measurements] Adding LCP Data"),ke.element&&e.setTag("lcp.element",Ot(ke.element)),ke.id&&e.setTag("lcp.id",ke.id),ke.url&&e.setTag("lcp.url",ke.url.trim().slice(0,200)),e.setTag("lcp.size",ke.size)),ln&&ln.sources&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log("[Measurements] Adding CLS Data"),ln.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,Ot(t.node))))}var wa=["localhost",/^\/(?!\/)/],Sa={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:wa,tracePropagationTargets:wa};function P1(e){let{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:a,shouldCreateSpanForRequest:s,enableHTTPTimings:i}=A({traceFetch:Sa.traceFetch,traceXHR:Sa.traceXHR},e),c=typeof s=="function"?s:f=>!0,l=f=>M1(f,r||a),d={};t&&ye("fetch",f=>{let p=L1(f,c,l,d);i&&p&&fi(p)}),n&&ye("xhr",f=>{let p=$1(f,c,l,d);i&&p&&fi(p)})}function j1(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function fi(e){let t=e.data.url,n=new PerformanceObserver(r=>{r.getEntries().forEach(a=>{j1(a)&&a.name.endsWith(t)&&(Z1(a).forEach(s=>e.setData(...s)),n.disconnect())})});n.observe({entryTypes:["resource"]})}function O1(e){let t="unknown",n="unknown",r="";for(let a of e){if(a==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(a))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=a}return r===e&&(t=r),{name:t,version:n}}function Ne(e=0){return((je||performance.timeOrigin)+e)/1e3}function Z1(e){let{name:t,version:n}=O1(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),je?[...r,["http.request.redirect_start",Ne(e.redirectStart)],["http.request.fetch_start",Ne(e.fetchStart)],["http.request.domain_lookup_start",Ne(e.domainLookupStart)],["http.request.domain_lookup_end",Ne(e.domainLookupEnd)],["http.request.connect_start",Ne(e.connectStart)],["http.request.secure_connection_start",Ne(e.secureConnectionStart)],["http.request.connection_end",Ne(e.connectEnd)],["http.request.request_start",Ne(e.requestStart)],["http.request.response_start",Ne(e.responseStart)],["http.request.response_end",Ne(e.responseEnd)]]:r}function M1(e,t){return hn(e,t||wa)}function L1(e,t,n,r){if(!za()||!e.fetchData)return;let a=t(e.fetchData.url);if(e.endTimestamp&&a){let _=e.fetchData.__span;if(!_)return;let v=r[_];if(v){if(e.response){v.setHttpStatus(e.response.status);let w=e.response&&e.response.headers&&e.response.headers.get("content-length"),T=parseInt(w);T>0&&v.setData("http.response_content_length",T)}else e.error&&v.setStatus("internal_error");v.finish(),delete r[_]}return}let s=se(),i=s.getScope(),c=s.getClient(),l=i.getSpan(),{method:d,url:f}=e.fetchData,p=a&&l?l.startChild({data:{url:f,type:"fetch","http.method":d},description:`${d} ${f}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(p&&(e.fetchData.__span=p.spanId,r[p.spanId]=p),n(e.fetchData.url)&&c){let _=e.args[0];e.args[1]=e.args[1]||{};let v=e.args[1];v.headers=U1(_,c,i,v,p)}return p}function U1(e,t,n,r,a){let s=a||n.getSpan(),i=s&&s.transaction,{traceId:c,sampled:l,dsc:d}=n.getPropagationContext(),f=s?s.toTraceparent():Va(c,void 0,l),p=i?i.getDynamicSamplingContext():d||_r(c,t,n),_=va(p),v=typeof Request<"u"&&He(e,Request)?e.headers:r.headers;if(v)if(typeof Headers<"u"&&He(v,Headers)){let w=new Headers(v);return w.append("sentry-trace",f),_&&w.append(ga,_),w}else if(Array.isArray(v)){let w=[...v,["sentry-trace",f]];return _&&w.push([ga,_]),w}else{let w="baggage"in v?v.baggage:void 0,T=[];return Array.isArray(w)?T.push(...w):w&&T.push(w),_&&T.push(_),G(A({},v),{"sentry-trace":f,baggage:T.length>0?T.join(","):void 0})}else return{"sentry-trace":f,baggage:_}}function $1(e,t,n,r){let a=e.xhr,s=a&&a[Rt];if(!za()||a&&a.__sentry_own_request__||!a||!s)return;let i=t(s.url);if(e.endTimestamp&&i){let p=a.__sentry_xhr_span_id__;if(!p)return;let _=r[p];_&&(_.setHttpStatus(s.status_code),_.finish(),delete r[p]);return}let c=se(),l=c.getScope(),d=l.getSpan(),f=i&&d?d.startChild({data:G(A({},s.data),{type:"xhr","http.method":s.method,url:s.url}),description:`${s.method} ${s.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(f&&(a.__sentry_xhr_span_id__=f.spanId,r[a.__sentry_xhr_span_id__]=f),a.setRequestHeader&&n(s.url))if(f){let p=f&&f.transaction,_=p&&p.getDynamicSamplingContext(),v=va(_);hi(a,f.toTraceparent(),v)}else{let p=c.getClient(),{traceId:_,sampled:v,dsc:w}=l.getPropagationContext(),T=Va(_,void 0,v),x=w||(p?_r(_,p,l):void 0),I=va(x);hi(a,T,I)}return f}function hi(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(ga,n)}catch{}}function B1(e,t=!0,n=!0){if(!W||!W.location){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn("Could not initialize routing instrumentation due to invalid location");return}let r=W.location.href,a;t&&(a=e({name:W.location.pathname,startTimestamp:je?je/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&ye("history",({to:s,from:i})=>{if(i===void 0&&r&&r.indexOf(s)!==-1){r=void 0;return}i!==s&&(r=void 0,a&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`[Tracing] Finishing current transaction with op: ${a.op}`),a.finish()),a=e({name:W.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}var F1="BrowserTracing",V1=A(G(A({},er),{markBackgroundTransactions:!0,routingInstrumentation:B1,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{}}),Sa),Y1=class{constructor(e){this.name=F1,this._hasSetTracePropagationTargets=!1,Pp(),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options=A(A({},V1),e),this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=b1(),this.options.enableLongTask&&E1(),this.options._experiments.enableInteractions&&x1()}setupOnce(e,t){this._getCurrentHub=t;let n=t().getClient(),r=n&&n.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:s,startTransactionOnPageLoad:i,markBackgroundTransactions:c,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:p,_experiments:_}=this.options,v=r&&r.tracePropagationTargets,w=v||this.options.tracePropagationTargets;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&v&&P.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),a(T=>{let x=this._createRouteTransaction(T);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(x,T,t),x},i,s),c&&f1(),_.enableInteractions&&this._registerInteractionListener(),P1({traceFetch:l,traceXHR:d,tracePropagationTargets:w,shouldCreateSpanForRequest:f,enableHTTPTimings:p})}_createRouteTransaction(e){if(!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`);return}let t=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:r,finalTimeout:a,heartbeatInterval:s}=this.options,i=e.op==="pageload",c=i?pi("sentry-trace"):"",l=i?pi("baggage"):"",{traceparentData:d,dynamicSamplingContext:f,propagationContext:p}=sp(c,l),_=G(A(A({},e),d),{metadata:G(A({},e.metadata),{dynamicSamplingContext:d&&!f?{}:f}),trimEnd:!0}),v=typeof n=="function"?n(_):_,w=v===void 0?G(A({},_),{sampled:!1}):v;w.metadata=w.name!==_.name?G(A({},w.metadata),{source:"custom"}):w.metadata,this._latestRouteName=w.name,this._latestRouteSource=w.metadata&&w.metadata.source,w.sampled===!1&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`[Tracing] Will not send ${w.op} transaction because of beforeNavigate.`),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.log(`[Tracing] Starting ${w.op} transaction on scope`);let{location:T}=W,x=ei(t,w,r,a,!0,{location:T},s),I=t.getScope();return i&&d?I.setPropagationContext(p):I.setPropagationContext({traceId:x.traceId,spanId:x.spanId,parentSpanId:x.parentSpanId,sampled:x.sampled}),x.registerBeforeFinishCallback(R=>{this._collectWebVitals(),C1(R)}),x}_registerInteractionListener(){let e,t=()=>{let{idleTimeout:n,finalTimeout:r,heartbeatInterval:a}=this.options,s="ui.action.click",i=gn();if(i&&i.op&&["navigation","pageload"].includes(i.op)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`[Tracing] Did not create ${s} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&(e.setFinishReason("interactionInterrupted"),e.finish(),e=void 0),!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`[Tracing] Did not create ${s} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&P.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`);return}let c=this._getCurrentHub(),{location:l}=W,d={name:this._latestRouteName,op:s,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};e=ei(c,d,n,r,!0,{location:l},a)};["click"].forEach(n=>{addEventListener(n,t,{once:!1,capture:!0})})}};function pi(e){let t=dh(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}var eu={};K.Sentry&&K.Sentry.Integrations&&(eu=K.Sentry.Integrations);A(A(A({},eu),Bc),Kc);var H1="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",Gn=null;function tu(e,t){if(e===!1)return Yr(e);if(Gn)return Yr(Gn,t);let n=new T0({dsn:H1,transport:window.fetch?C0:R0,stackParser:Y0,integrations:[new vr,new Vt,new yr,new Er,new br,new Y1]});return Gn=new Ga(n),Yr(Gn,t)}function Yr(e,t={key:"source",value:"@hCaptcha/loader"}){return{addBreadcrumb:n=>{e&&e.addBreadcrumb(n)},captureMessage:n=>{e&&e.withScope(function(r){r.setTag(t.key,t.value),e.captureMessage(n)})},captureException:n=>{e&&e.withScope(function(r){r.setTag(t.key,t.value),e.captureEvent({message:oa,level:"error",extra:n})})}}}function G1({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:r,apihost:a="https://js.hcaptcha.com",cleanup:s=!0,secureApi:i=!1,scriptSource:c=""}={}){let l=pc(e),d=hc(l);return new Promise((f,p)=>{let _=d.document.createElement("script");_.id=eh,c?_.src=`${c}?onload=${Jn}`:i?_.src=`${a}/1/secure-api.js?onload=${Jn}`:_.src=`${a}/1/api.js?onload=${Jn}`,_.crossOrigin=r,_.async=n;let v=(w,T)=>{try{!i&&s&&l.removeChild(_),T(w)}catch(x){p(x)}};_.onload=w=>v(w,f),_.onerror=w=>v(w,p),_.src+=t!==""?`&${t}`:"",l.appendChild(_)})}var zn=[];function z1(e={cleanup:!0},t){try{t.addBreadcrumb({category:It,message:"hCaptcha loader params",data:e});let n=pc(e.scriptLocation),r=hc(n),a=zn.find(({scope:i})=>i===r.window);if(a)return t.addBreadcrumb({category:It,message:"hCaptcha already loaded"}),a.promise;let s=new Promise((i,c)=>Ma(this,null,function*(){try{r.window[Jn]=()=>{t.addBreadcrumb({category:It,message:"hCaptcha script called onload function"}),i(r.window.hcaptcha)};let l=Qf({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl});yield G1(A({query:l},e)),t.addBreadcrumb({category:It,message:"hCaptcha loaded",data:a})}catch(l){t.addBreadcrumb({category:It,message:"hCaptcha failed to load",data:l});let d=zn.findIndex(f=>f.scope===r.window);d!==-1&&zn.splice(d,1),t.captureException(l),c(new Error(oa))}}));return zn.push({promise:s,scope:r.window}),s}catch(n){return t.captureException(n),Promise.reject(new Error(oa))}}function nu(e,t=0){return Ma(this,null,function*(){let n=t<2?"Retry loading hCaptcha Api":"Exceeded maximum retries",r=tu(e.sentry);try{return yield z1(e,r)}catch(a){return r.addBreadcrumb({SENTRY_SOURCE:It,message:n,data:{error:a}}),t>=2?(r.captureException(a),Promise.reject(a)):(t+=1,nu(e,t))}})}function W1(){return Ma(this,arguments,function*(e={}){return yield nu(e)})}function mi(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function _i(e){return e||document.head}var Ct={key:"source",value:"@hCaptcha/react"},an={mounted:"hCaptcha component mounted",expired:"hCaptcha expired",unmounted:"hCaptcha component unmounted",reset:"hCaptcha reset",removed:"hCaptcha removed"},q1=function(e){qf(t,e);function t(r){var a;return a=e.call(this,r)||this,a._hcaptcha=void 0,a.renderCaptcha=a.renderCaptcha.bind(_e(a)),a.resetCaptcha=a.resetCaptcha.bind(_e(a)),a.removeCaptcha=a.removeCaptcha.bind(_e(a)),a.isReady=a.isReady.bind(_e(a)),a._onReady=null,a.loadCaptcha=a.loadCaptcha.bind(_e(a)),a.handleOnLoad=a.handleOnLoad.bind(_e(a)),a.handleSubmit=a.handleSubmit.bind(_e(a)),a.handleExpire=a.handleExpire.bind(_e(a)),a.handleError=a.handleError.bind(_e(a)),a.handleOpen=a.handleOpen.bind(_e(a)),a.handleClose=a.handleClose.bind(_e(a)),a.handleChallengeExpired=a.handleChallengeExpired.bind(_e(a)),a.ref=u.createRef(),a.apiScriptRequested=!1,a.sentryHub=null,a.captchaId="",a.state={isApiReady:!1,isRemoved:!1,elementId:r.id},a}var n=t.prototype;return n.componentDidMount=function(){var a=this,s=_i(this.props.scriptLocation),i=mi(s);this._hcaptcha=i.window.hcaptcha||void 0;var c=typeof this._hcaptcha<"u";if(this.sentryHub=tu(this.props.sentry,Ct),this.sentryHub.addBreadcrumb({category:Ct.value,message:an.mounted}),c){this.setState({isApiReady:!0},function(){a.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var a=this._hcaptcha,s=this.captchaId;this.isReady()&&(a.reset(s),a.remove(s),this.sentryHub.addBreadcrumb({category:Ct.value,message:an.unmounted}))},n.shouldComponentUpdate=function(a,s){return!(this.state.isApiReady!==s.isApiReady||this.state.isRemoved!==s.isRemoved)},n.componentDidUpdate=function(a){var s=this,i=["sitekey","size","theme","tabindex","languageOverride","endpoint"],c=i.every(function(l){return a[l]===s.props[l]});c||this.removeCaptcha(function(){s.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var a=this.props,s=a.apihost,i=a.assethost,c=a.endpoint,l=a.host,d=a.imghost,f=a.languageOverride,p=a.reCaptchaCompat,_=a.reportapi,v=a.sentry,w=a.custom,T=a.loadAsync,x=a.scriptLocation,I=a.scriptSource,R=a.secureApi,D=a.cleanup,C=D===void 0?!0:D,j={render:"explicit",apihost:s,assethost:i,endpoint:c,hl:f,host:l,imghost:d,recaptchacompat:p===!1?"off":null,reportapi:_,sentry:v,custom:w,loadAsync:T,scriptLocation:x,scriptSource:I,secureApi:R,cleanup:C};W1(j).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(a){var s=this,i=this.props.onReady,c=this.state.isApiReady,l=this.captchaId;if(!(!c||l)){var d=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),f=this._hcaptcha,p=f.render(this.ref.current,d);this.captchaId=p,this.setState({isRemoved:!1},function(){a&&a(),i&&i(),s._onReady&&s._onReady(p)})}},n.resetCaptcha=function(){var a=this._hcaptcha,s=this.captchaId;this.isReady()&&(a.reset(s),this.sentryHub.addBreadcrumb({category:Ct.value,message:an.reset}))},n.removeCaptcha=function(a){var s=this._hcaptcha,i=this.captchaId;this.isReady()&&(this.setState({isRemoved:!0},function(){s.remove(i),a&&a()}),this.sentryHub.addBreadcrumb({category:Ct.value,message:an.removed}))},n.handleOnLoad=function(){var a=this;this.setState({isApiReady:!0},function(){try{var s=_i(a.props.scriptLocation),i=mi(s);a._hcaptcha=i.window.hcaptcha,a.renderCaptcha(function(){var c=a.props.onLoad;c&&c()})}catch(c){a.sentryHub.captureException(c)}})},n.handleSubmit=function(a){var s=this.props.onVerify,i=this.state.isRemoved,c=this._hcaptcha,l=this.captchaId;if(!(typeof c>"u"||i)){var d=c.getResponse(l),f=c.getRespKey(l);s&&s(d,f)}},n.handleExpire=function(){var a=this.props.onExpire,s=this._hcaptcha,i=this.captchaId;this.isReady()&&(s.reset(i),a&&a(),this.sentryHub.addBreadcrumb({category:Ct.value,message:an.expired}))},n.handleError=function(a){var s=this.props.onError,i=this._hcaptcha,c=this.captchaId;this.isReady()&&i.reset(c),s&&s(a)},n.isReady=function(){var a=this.state,s=a.isApiReady,i=a.isRemoved;return s&&!i},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(a){var s=this;a===void 0&&(a=null),a=typeof a=="object"?a:null;try{var i=this._hcaptcha,c=this.captchaId;if(!this.isReady()){var l,d=new Promise(function(f,p){s._onReady=function(_){try{var v=s._hcaptcha;a&&a.async?v.execute(_,a).then(f).catch(p):f(v.execute(_,a))}catch(w){p(w)}}});return(l=a)!=null&&l.async?d:null}return i.execute(c,a)}catch(f){return this.sentryHub.captureException(f),a&&a.async?Promise.reject(f):null}},n.close=function(){var a=this._hcaptcha,s=this.captchaId;if(this.isReady())return a.close(s)},n.setData=function(a){var s=this._hcaptcha,i=this.captchaId;this.isReady()&&(a&&typeof a!="object"&&(a=null),s.setData(i,a))},n.getResponse=function(){var a=this._hcaptcha;return a.getResponse(this.captchaId)},n.getRespKey=function(){var a=this._hcaptcha;return a.getRespKey(this.captchaId)},n.render=function(){var a=this.state.elementId;return u.createElement("div",{ref:this.ref,id:a})},t}(u.Component);const ct=typeof window>"u"?null:window.matchMedia("(prefers-color-scheme: dark)");function K1(){const[e,t]=u.useState(ct!=null&&ct.matches?"dark":"light");return u.useEffect(()=>{if(!ct)return;const n=()=>{t(ct.matches?"dark":"light")};return ct.addEventListener("change",n),()=>{ct.removeEventListener("change",n)}},[]),e}function X1({siteKey:e,token:t,onToken:n,prevLabel:r,onPrev:a,nextLabel:s,onNext:i,ref:c,invalid:l,children:d,...f}){const p=u.useRef(null),_=K1(),[v,w]=u.useState(t),T=u.useCallback(()=>{var R;(R=p.current)==null||R.execute()},[]),x=u.useCallback((R,D)=>{w(R),n(R,D)},[n]),I=u.useCallback(R=>{if(v)return i(R);if(p.current)p.current.execute();else throw new Error("Unable to load hCaptcha")},[v,i]);return g.jsx($t,{...f,cancelLabel:r,onCancel:a,submitLabel:s,onSubmit:I,append:d,invalid:l||!v,children:g.jsx(q1,{theme:_,sitekey:e,onLoad:T,onVerify:x,ref:nt([c,p])})})}function J1({links:e,className:t,...n}){const r=e==null?void 0:e.find(a=>a.rel==="help");return r?g.jsx("p",{...n,className:te("text-text-default rounded-md bg-slate-100 p-3 text-sm dark:bg-slate-800",t),children:g.jsx(Z,{id:"87VTIH",components:{0:g.jsx(Kr,{link:r,className:"text-primary underline"})}})}):null}function Q1({onBack:e,backLabel:t,onValidateNewHandle:n,onDone:r}){const{availableUserDomains:a=[],hcaptchaSiteKey:s=void 0,inviteCodeRequired:i=!0,links:c}=Ca(),[l,d]=u.useState(void 0),[f,p]=u.useState(void 0),[_,v]=u.useState(void 0),w=s==null?void 0:_||!1,T=u.useCallback(x=>{if(l&&f&&w!==!1)return r({...l,handle:f,hcaptchaToken:w},x)},[l,f,w,r]);return g.jsxs(Fe,{title:{id:"e+RpCP"},subtitle:g.jsx(Z,{id:"qjBGxf"}),children:[g.jsx(Hf,{doneLabel:g.jsx(Z,{id:"e+RpCP"}),onBack:e,backLabel:t,onDone:T,steps:[{invalid:!f,titleRender:()=>g.jsx(Z,{id:"khEQ02"}),contentRender:({prev:x,prevLabel:I,next:R,nextLabel:D,invalid:C})=>g.jsx(Wf,{className:"grow",invalid:C,domains:a,handle:f,onHandle:p,prevLabel:I,onPrev:x,nextLabel:D,onNext:async j=>{if(f&&await n({handle:f},j),!j.aborted)return R(j)},children:g.jsx(Lr,{links:c})})},{invalid:!l,titleRender:()=>g.jsx(Z,{id:"gdRnT7"}),contentRender:({prev:x,prevLabel:I,next:R,nextLabel:D,invalid:C})=>g.jsx(Gf,{className:"grow",invalid:C,prevLabel:I,onPrev:x,nextLabel:D,onNext:R,inviteCodeRequired:i,credentials:l,onCredentials:d,children:g.jsx(Lr,{links:c})})},s!=null&&{invalid:w===!1,titleRender:()=>g.jsx(Z,{id:"aIar4b"}),contentRender:({prev:x,prevLabel:I,next:R,nextLabel:D,invalid:C})=>g.jsx(X1,{className:"grow",invalid:C,siteKey:s,token:_,onToken:v,prevLabel:I,onPrev:x,nextLabel:D,onNext:R,children:g.jsx(Lr,{links:c})})}]}),g.jsx(J1,{className:"mt-4",links:c})]})}const rs=u.createContext(null);rs.displayName="AuthenticationContext";function xm({disableRemember:e=!1,promptMode:t,forcedIdentifier:n,onCancel:r,children:a}){const{availableUserDomains:s}=Ca(),i=!!(s!=null&&s.length),[c,l]=u.useState(void 0),{sessions:d,session:f,setSession:p,doValidateNewHandle:_,doSignUp:v,doSignIn:w,doInitiatePasswordReset:T,doConfirmResetPassword:x}=go(),[I,R,D]=u.useMemo(()=>{if(n){const $=d.filter(({account:z})=>z.sub===n||z.preferred_username===n);return[!1,$[0]??null,$]}else return[!0,f,d]},[f,d,n]),C=!i||D.length>0||!I?2:0,[j,O]=u.useState(()=>t==="create"&&i?1:C),L=()=>O(C),H=()=>O(2),q=i?()=>O(1):void 0;u.useEffect(()=>{j===4?R&&R.loginRequired?O(2):R||O(C):j===0?C!==0&&O(C):j===1?i||O(C):j===2&&R&&!R.loginRequired&&O(4)},[j,i,C,R]);const B=u.useMemo(()=>!R||R.loginRequired?null:{session:R,sessions:D,canSwitchAccounts:I},[R,D,I]);return B?g.jsx(rs,{value:B,children:a}):j===0?g.jsx(_f,{onSignIn:H,onSignUp:q,onCancel:r}):j===1?g.jsx(Q1,{onValidateNewHandle:_,onBack:L,onDone:v}):j===3?g.jsx(Nf,{emailDefault:c,onResetPasswordRequest:T,onResetPasswordConfirm:x,onBack:H}):g.jsx(Bf,{disableRemember:e,forcedIdentifier:n,sessions:D,session:R,setSession:p,onSignIn:w,onSignUp:q,onBack:C===2?r:L,backLabel:C===2?g.jsx(Z,{id:"dEgA5A"}):void 0,onForgotPassword:$=>{O(3),l($)}})}function em(){const e=u.useContext(rs);if(e)return e;throw new Error("useAuthenticationContext must be used within an AuthenticationProvider")}function Tm(){return em().session}var Te={},ut={},we={},Wn={},Hr={},gi;function Tr(){return gi||(gi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getParsedType=e.ZodParsedType=e.objectUtil=e.util=void 0;var t;(function(a){a.assertEqual=l=>l;function s(l){}a.assertIs=s;function i(l){throw new Error}a.assertNever=i,a.arrayToEnum=l=>{const d={};for(const f of l)d[f]=f;return d},a.getValidEnumValues=l=>{const d=a.objectKeys(l).filter(p=>typeof l[l[p]]!="number"),f={};for(const p of d)f[p]=l[p];return a.objectValues(f)},a.objectValues=l=>a.objectKeys(l).map(function(d){return l[d]}),a.objectKeys=typeof Object.keys=="function"?l=>Object.keys(l):l=>{const d=[];for(const f in l)Object.prototype.hasOwnProperty.call(l,f)&&d.push(f);return d},a.find=(l,d)=>{for(const f of l)if(d(f))return f},a.isInteger=typeof Number.isInteger=="function"?l=>Number.isInteger(l):l=>typeof l=="number"&&isFinite(l)&&Math.floor(l)===l;function c(l,d=" | "){return l.map(f=>typeof f=="string"?`'${f}'`:f).join(d)}a.joinValues=c,a.jsonStringifyReplacer=(l,d)=>typeof d=="bigint"?d.toString():d})(t||(e.util=t={}));var n;(function(a){a.mergeShapes=(s,i)=>({...s,...i})})(n||(e.objectUtil=n={})),e.ZodParsedType=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const r=a=>{switch(typeof a){case"undefined":return e.ZodParsedType.undefined;case"string":return e.ZodParsedType.string;case"number":return isNaN(a)?e.ZodParsedType.nan:e.ZodParsedType.number;case"boolean":return e.ZodParsedType.boolean;case"function":return e.ZodParsedType.function;case"bigint":return e.ZodParsedType.bigint;case"symbol":return e.ZodParsedType.symbol;case"object":return Array.isArray(a)?e.ZodParsedType.array:a===null?e.ZodParsedType.null:a.then&&typeof a.then=="function"&&a.catch&&typeof a.catch=="function"?e.ZodParsedType.promise:typeof Map<"u"&&a instanceof Map?e.ZodParsedType.map:typeof Set<"u"&&a instanceof Set?e.ZodParsedType.set:typeof Date<"u"&&a instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}};e.getParsedType=r}(Hr)),Hr}var Le={},vi;function as(){if(vi)return Le;vi=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.ZodError=Le.quotelessJson=Le.ZodIssueCode=void 0;const e=Tr();Le.ZodIssueCode=e.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);const t=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");Le.quotelessJson=t;let n=class ru extends Error{get errors(){return this.issues}constructor(a){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=a}format(a){const s=a||function(l){return l.message},i={_errors:[]},c=l=>{for(const d of l.issues)if(d.code==="invalid_union")d.unionErrors.map(c);else if(d.code==="invalid_return_type")c(d.returnTypeError);else if(d.code==="invalid_arguments")c(d.argumentsError);else if(d.path.length===0)i._errors.push(s(d));else{let f=i,p=0;for(;p<d.path.length;){const _=d.path[p];p===d.path.length-1?(f[_]=f[_]||{_errors:[]},f[_]._errors.push(s(d))):f[_]=f[_]||{_errors:[]},f=f[_],p++}}};return c(this),i}static assert(a){if(!(a instanceof ru))throw new Error(`Not a ZodError: ${a}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,e.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(a=s=>s.message){const s={},i=[];for(const c of this.issues)c.path.length>0?(s[c.path[0]]=s[c.path[0]]||[],s[c.path[0]].push(a(c))):i.push(a(c));return{formErrors:i,fieldErrors:s}}get formErrors(){return this.flatten()}};return Le.ZodError=n,n.create=r=>new n(r),Le}var yi;function au(){if(yi)return Wn;yi=1,Object.defineProperty(Wn,"__esModule",{value:!0});const e=Tr(),t=as(),n=(r,a)=>{let s;switch(r.code){case t.ZodIssueCode.invalid_type:r.received===e.ZodParsedType.undefined?s="Required":s=`Expected ${r.expected}, received ${r.received}`;break;case t.ZodIssueCode.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(r.expected,e.util.jsonStringifyReplacer)}`;break;case t.ZodIssueCode.unrecognized_keys:s=`Unrecognized key(s) in object: ${e.util.joinValues(r.keys,", ")}`;break;case t.ZodIssueCode.invalid_union:s="Invalid input";break;case t.ZodIssueCode.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${e.util.joinValues(r.options)}`;break;case t.ZodIssueCode.invalid_enum_value:s=`Invalid enum value. Expected ${e.util.joinValues(r.options)}, received '${r.received}'`;break;case t.ZodIssueCode.invalid_arguments:s="Invalid function arguments";break;case t.ZodIssueCode.invalid_return_type:s="Invalid function return type";break;case t.ZodIssueCode.invalid_date:s="Invalid date";break;case t.ZodIssueCode.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(s=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?s=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?s=`Invalid input: must end with "${r.validation.endsWith}"`:e.util.assertNever(r.validation):r.validation!=="regex"?s=`Invalid ${r.validation}`:s="Invalid";break;case t.ZodIssueCode.too_small:r.type==="array"?s=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?s=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?s=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?s=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:s="Invalid input";break;case t.ZodIssueCode.too_big:r.type==="array"?s=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?s=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?s=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?s=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?s=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:s="Invalid input";break;case t.ZodIssueCode.custom:s="Invalid input";break;case t.ZodIssueCode.invalid_intersection_types:s="Intersection results could not be merged";break;case t.ZodIssueCode.not_multiple_of:s=`Number must be a multiple of ${r.multipleOf}`;break;case t.ZodIssueCode.not_finite:s="Number must be finite";break;default:s=a.defaultError,e.util.assertNever(r)}return{message:s}};return Wn.default=n,Wn}var bi;function ss(){if(bi)return we;bi=1;var e=we&&we.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(we,"__esModule",{value:!0}),we.getErrorMap=we.setErrorMap=we.defaultErrorMap=void 0;const t=e(au());we.defaultErrorMap=t.default;let n=t.default;function r(s){n=s}we.setErrorMap=r;function a(){return n}return we.getErrorMap=a,we}var sn={},Ei;function su(){return Ei||(Ei=1,function(e){var t=sn&&sn.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=e.isValid=e.isDirty=e.isAborted=e.OK=e.DIRTY=e.INVALID=e.ParseStatus=e.addIssueToContext=e.EMPTY_PATH=e.makeIssue=void 0;const n=ss(),r=t(au()),a=v=>{const{data:w,path:T,errorMaps:x,issueData:I}=v,R=[...T,...I.path||[]],D={...I,path:R};if(I.message!==void 0)return{...I,path:R,message:I.message};let C="";const j=x.filter(O=>!!O).slice().reverse();for(const O of j)C=O(D,{data:w,defaultError:C}).message;return{...I,path:R,message:C}};e.makeIssue=a,e.EMPTY_PATH=[];function s(v,w){const T=(0,n.getErrorMap)(),x=(0,e.makeIssue)({issueData:w,data:v.data,path:v.path,errorMaps:[v.common.contextualErrorMap,v.schemaErrorMap,T,T===r.default?void 0:r.default].filter(I=>!!I)});v.common.issues.push(x)}e.addIssueToContext=s;class i{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(w,T){const x=[];for(const I of T){if(I.status==="aborted")return e.INVALID;I.status==="dirty"&&w.dirty(),x.push(I.value)}return{status:w.value,value:x}}static async mergeObjectAsync(w,T){const x=[];for(const I of T){const R=await I.key,D=await I.value;x.push({key:R,value:D})}return i.mergeObjectSync(w,x)}static mergeObjectSync(w,T){const x={};for(const I of T){const{key:R,value:D}=I;if(R.status==="aborted"||D.status==="aborted")return e.INVALID;R.status==="dirty"&&w.dirty(),D.status==="dirty"&&w.dirty(),R.value!=="__proto__"&&(typeof D.value<"u"||I.alwaysSet)&&(x[R.value]=D.value)}return{status:w.value,value:x}}}e.ParseStatus=i,e.INVALID=Object.freeze({status:"aborted"});const c=v=>({status:"dirty",value:v});e.DIRTY=c;const l=v=>({status:"valid",value:v});e.OK=l;const d=v=>v.status==="aborted";e.isAborted=d;const f=v=>v.status==="dirty";e.isDirty=f;const p=v=>v.status==="valid";e.isValid=p;const _=v=>typeof Promise<"u"&&v instanceof Promise;e.isAsync=_}(sn)),sn}var Gr={},xi;function tm(){return xi||(xi=1,Object.defineProperty(Gr,"__esModule",{value:!0})),Gr}var S={},on={},Ti;function nm(){if(Ti)return on;Ti=1,Object.defineProperty(on,"__esModule",{value:!0}),on.errorUtil=void 0;var e;return function(t){t.errToObj=n=>typeof n=="string"?{message:n}:n||{},t.toString=n=>typeof n=="string"?n:n==null?void 0:n.message}(e||(on.errorUtil=e={})),on}var wi;function rm(){if(wi)return S;wi=1;var e=S&&S.__classPrivateFieldGet||function(y,o,h,m){if(h==="a"&&!m)throw new TypeError("Private accessor was defined without a getter");if(typeof o=="function"?y!==o||!m:!o.has(y))throw new TypeError("Cannot read private member from an object whose class did not declare it");return h==="m"?m:h==="a"?m.call(y):m?m.value:o.get(y)},t=S&&S.__classPrivateFieldSet||function(y,o,h,m,b){if(m==="m")throw new TypeError("Private method is not writable");if(m==="a"&&!b)throw new TypeError("Private accessor was defined without a setter");if(typeof o=="function"?y!==o||!b:!o.has(y))throw new TypeError("Cannot write private member to an object whose class did not declare it");return m==="a"?b.call(y,h):b?b.value=h:o.set(y,h),h},n,r;Object.defineProperty(S,"__esModule",{value:!0}),S.boolean=S.bigint=S.array=S.any=S.coerce=S.ZodFirstPartyTypeKind=S.late=S.ZodSchema=S.Schema=S.custom=S.ZodReadonly=S.ZodPipeline=S.ZodBranded=S.BRAND=S.ZodNaN=S.ZodCatch=S.ZodDefault=S.ZodNullable=S.ZodOptional=S.ZodTransformer=S.ZodEffects=S.ZodPromise=S.ZodNativeEnum=S.ZodEnum=S.ZodLiteral=S.ZodLazy=S.ZodFunction=S.ZodSet=S.ZodMap=S.ZodRecord=S.ZodTuple=S.ZodIntersection=S.ZodDiscriminatedUnion=S.ZodUnion=S.ZodObject=S.ZodArray=S.ZodVoid=S.ZodNever=S.ZodUnknown=S.ZodAny=S.ZodNull=S.ZodUndefined=S.ZodSymbol=S.ZodDate=S.ZodBoolean=S.ZodBigInt=S.ZodNumber=S.ZodString=S.datetimeRegex=S.ZodType=void 0,S.NEVER=S.void=S.unknown=S.union=S.undefined=S.tuple=S.transformer=S.symbol=S.string=S.strictObject=S.set=S.record=S.promise=S.preprocess=S.pipeline=S.ostring=S.optional=S.onumber=S.oboolean=S.object=S.number=S.nullable=S.null=S.never=S.nativeEnum=S.nan=S.map=S.literal=S.lazy=S.intersection=S.instanceof=S.function=S.enum=S.effect=S.discriminatedUnion=S.date=void 0;const a=ss(),s=nm(),i=su(),c=Tr(),l=as();class d{constructor(o,h,m,b){this._cachedPath=[],this.parent=o,this.data=h,this._path=m,this._key=b}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const f=(y,o)=>{if((0,i.isValid)(o))return{success:!0,data:o.value};if(!y.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const h=new l.ZodError(y.common.issues);return this._error=h,this._error}}};function p(y){if(!y)return{};const{errorMap:o,invalid_type_error:h,required_error:m,description:b}=y;if(o&&(h||m))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return o?{errorMap:o,description:b}:{errorMap:(k,N)=>{var U,M;const{message:F}=y;return k.code==="invalid_enum_value"?{message:F??N.defaultError}:typeof N.data>"u"?{message:(U=F??m)!==null&&U!==void 0?U:N.defaultError}:k.code!=="invalid_type"?{message:N.defaultError}:{message:(M=F??h)!==null&&M!==void 0?M:N.defaultError}},description:b}}class _{get description(){return this._def.description}_getType(o){return(0,c.getParsedType)(o.data)}_getOrReturnCtx(o,h){return h||{common:o.parent.common,data:o.data,parsedType:(0,c.getParsedType)(o.data),schemaErrorMap:this._def.errorMap,path:o.path,parent:o.parent}}_processInputParams(o){return{status:new i.ParseStatus,ctx:{common:o.parent.common,data:o.data,parsedType:(0,c.getParsedType)(o.data),schemaErrorMap:this._def.errorMap,path:o.path,parent:o.parent}}}_parseSync(o){const h=this._parse(o);if((0,i.isAsync)(h))throw new Error("Synchronous parse encountered promise.");return h}_parseAsync(o){const h=this._parse(o);return Promise.resolve(h)}parse(o,h){const m=this.safeParse(o,h);if(m.success)return m.data;throw m.error}safeParse(o,h){var m;const b={common:{issues:[],async:(m=h==null?void 0:h.async)!==null&&m!==void 0?m:!1,contextualErrorMap:h==null?void 0:h.errorMap},path:(h==null?void 0:h.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:o,parsedType:(0,c.getParsedType)(o)},E=this._parseSync({data:o,path:b.path,parent:b});return f(b,E)}"~validate"(o){var h,m;const b={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:o,parsedType:(0,c.getParsedType)(o)};if(!this["~standard"].async)try{const E=this._parseSync({data:o,path:[],parent:b});return(0,i.isValid)(E)?{value:E.value}:{issues:b.common.issues}}catch(E){!((m=(h=E==null?void 0:E.message)===null||h===void 0?void 0:h.toLowerCase())===null||m===void 0)&&m.includes("encountered")&&(this["~standard"].async=!0),b.common={issues:[],async:!0}}return this._parseAsync({data:o,path:[],parent:b}).then(E=>(0,i.isValid)(E)?{value:E.value}:{issues:b.common.issues})}async parseAsync(o,h){const m=await this.safeParseAsync(o,h);if(m.success)return m.data;throw m.error}async safeParseAsync(o,h){const m={common:{issues:[],contextualErrorMap:h==null?void 0:h.errorMap,async:!0},path:(h==null?void 0:h.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:o,parsedType:(0,c.getParsedType)(o)},b=this._parse({data:o,path:m.path,parent:m}),E=await((0,i.isAsync)(b)?b:Promise.resolve(b));return f(m,E)}refine(o,h){const m=b=>typeof h=="string"||typeof h>"u"?{message:h}:typeof h=="function"?h(b):h;return this._refinement((b,E)=>{const k=o(b),N=()=>E.addIssue({code:l.ZodIssueCode.custom,...m(b)});return typeof Promise<"u"&&k instanceof Promise?k.then(U=>U?!0:(N(),!1)):k?!0:(N(),!1)})}refinement(o,h){return this._refinement((m,b)=>o(m)?!0:(b.addIssue(typeof h=="function"?h(m,b):h),!1))}_refinement(o){return new xe({schema:this,typeName:V.ZodEffects,effect:{type:"refinement",refinement:o}})}superRefine(o){return this._refinement(o)}constructor(o){this.spa=this.safeParseAsync,this._def=o,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:h=>this["~validate"](h)}}optional(){return De.create(this,this._def)}nullable(){return ze.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ee.create(this)}promise(){return Et.create(this,this._def)}or(o){return Wt.create([this,o],this._def)}and(o){return qt.create(this,o,this._def)}transform(o){return new xe({...p(this._def),schema:this,typeName:V.ZodEffects,effect:{type:"transform",transform:o}})}default(o){const h=typeof o=="function"?o:()=>o;return new en({...p(this._def),innerType:this,defaultValue:h,typeName:V.ZodDefault})}brand(){return new Cr({typeName:V.ZodBranded,type:this,...p(this._def)})}catch(o){const h=typeof o=="function"?o:()=>o;return new tn({...p(this._def),innerType:this,catchValue:h,typeName:V.ZodCatch})}describe(o){const h=this.constructor;return new h({...this._def,description:o})}pipe(o){return nn.create(this,o)}readonly(){return rn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}S.ZodType=_,S.Schema=_,S.ZodSchema=_;const v=/^c[^\s-]{8,}$/i,w=/^[0-9a-z]+$/,T=/^[0-9A-HJKMNP-TV-Z]{26}$/i,x=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,I=/^[a-z0-9_-]{21}$/i,R=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,D=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,C=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,j="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let O;const L=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,H=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,q=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,B=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,z=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ue="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Y=new RegExp(`^${ue}$`);function ne(y){let o="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return y.precision?o=`${o}\\.\\d{${y.precision}}`:y.precision==null&&(o=`${o}(\\.\\d+)?`),o}function X(y){return new RegExp(`^${ne(y)}$`)}function Q(y){let o=`${ue}T${ne(y)}`;const h=[];return h.push(y.local?"Z?":"Z"),y.offset&&h.push("([+-]\\d{2}:?\\d{2})"),o=`${o}(${h.join("|")})`,new RegExp(`^${o}$`)}S.datetimeRegex=Q;function rt(y,o){return!!((o==="v4"||!o)&&L.test(y)||(o==="v6"||!o)&&q.test(y))}function gt(y,o){if(!R.test(y))return!1;try{const[h]=y.split("."),m=h.replace(/-/g,"+").replace(/_/g,"/").padEnd(h.length+(4-h.length%4)%4,"="),b=JSON.parse(atob(m));return!(typeof b!="object"||b===null||!b.typ||!b.alg||o&&b.alg!==o)}catch{return!1}}function wr(y,o){return!!((o==="v4"||!o)&&H.test(y)||(o==="v6"||!o)&&B.test(y))}class fe extends _{_parse(o){if(this._def.coerce&&(o.data=String(o.data)),this._getType(o)!==c.ZodParsedType.string){const E=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(E,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.string,received:E.parsedType}),i.INVALID}const m=new i.ParseStatus;let b;for(const E of this._def.checks)if(E.kind==="min")o.data.length<E.value&&(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{code:l.ZodIssueCode.too_small,minimum:E.value,type:"string",inclusive:!0,exact:!1,message:E.message}),m.dirty());else if(E.kind==="max")o.data.length>E.value&&(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{code:l.ZodIssueCode.too_big,maximum:E.value,type:"string",inclusive:!0,exact:!1,message:E.message}),m.dirty());else if(E.kind==="length"){const k=o.data.length>E.value,N=o.data.length<E.value;(k||N)&&(b=this._getOrReturnCtx(o,b),k?(0,i.addIssueToContext)(b,{code:l.ZodIssueCode.too_big,maximum:E.value,type:"string",inclusive:!0,exact:!0,message:E.message}):N&&(0,i.addIssueToContext)(b,{code:l.ZodIssueCode.too_small,minimum:E.value,type:"string",inclusive:!0,exact:!0,message:E.message}),m.dirty())}else if(E.kind==="email")C.test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"email",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty());else if(E.kind==="emoji")O||(O=new RegExp(j,"u")),O.test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"emoji",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty());else if(E.kind==="uuid")x.test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"uuid",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty());else if(E.kind==="nanoid")I.test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"nanoid",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty());else if(E.kind==="cuid")v.test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"cuid",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty());else if(E.kind==="cuid2")w.test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"cuid2",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty());else if(E.kind==="ulid")T.test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"ulid",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty());else if(E.kind==="url")try{new URL(o.data)}catch{b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"url",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty()}else E.kind==="regex"?(E.regex.lastIndex=0,E.regex.test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"regex",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty())):E.kind==="trim"?o.data=o.data.trim():E.kind==="includes"?o.data.includes(E.value,E.position)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{code:l.ZodIssueCode.invalid_string,validation:{includes:E.value,position:E.position},message:E.message}),m.dirty()):E.kind==="toLowerCase"?o.data=o.data.toLowerCase():E.kind==="toUpperCase"?o.data=o.data.toUpperCase():E.kind==="startsWith"?o.data.startsWith(E.value)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{code:l.ZodIssueCode.invalid_string,validation:{startsWith:E.value},message:E.message}),m.dirty()):E.kind==="endsWith"?o.data.endsWith(E.value)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{code:l.ZodIssueCode.invalid_string,validation:{endsWith:E.value},message:E.message}),m.dirty()):E.kind==="datetime"?Q(E).test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{code:l.ZodIssueCode.invalid_string,validation:"datetime",message:E.message}),m.dirty()):E.kind==="date"?Y.test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{code:l.ZodIssueCode.invalid_string,validation:"date",message:E.message}),m.dirty()):E.kind==="time"?X(E).test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{code:l.ZodIssueCode.invalid_string,validation:"time",message:E.message}),m.dirty()):E.kind==="duration"?D.test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"duration",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty()):E.kind==="ip"?rt(o.data,E.version)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"ip",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty()):E.kind==="jwt"?gt(o.data,E.alg)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"jwt",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty()):E.kind==="cidr"?wr(o.data,E.version)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"cidr",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty()):E.kind==="base64"?$.test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"base64",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty()):E.kind==="base64url"?z.test(o.data)||(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{validation:"base64url",code:l.ZodIssueCode.invalid_string,message:E.message}),m.dirty()):c.util.assertNever(E);return{status:m.value,value:o.data}}_regex(o,h,m){return this.refinement(b=>o.test(b),{validation:h,code:l.ZodIssueCode.invalid_string,...s.errorUtil.errToObj(m)})}_addCheck(o){return new fe({...this._def,checks:[...this._def.checks,o]})}email(o){return this._addCheck({kind:"email",...s.errorUtil.errToObj(o)})}url(o){return this._addCheck({kind:"url",...s.errorUtil.errToObj(o)})}emoji(o){return this._addCheck({kind:"emoji",...s.errorUtil.errToObj(o)})}uuid(o){return this._addCheck({kind:"uuid",...s.errorUtil.errToObj(o)})}nanoid(o){return this._addCheck({kind:"nanoid",...s.errorUtil.errToObj(o)})}cuid(o){return this._addCheck({kind:"cuid",...s.errorUtil.errToObj(o)})}cuid2(o){return this._addCheck({kind:"cuid2",...s.errorUtil.errToObj(o)})}ulid(o){return this._addCheck({kind:"ulid",...s.errorUtil.errToObj(o)})}base64(o){return this._addCheck({kind:"base64",...s.errorUtil.errToObj(o)})}base64url(o){return this._addCheck({kind:"base64url",...s.errorUtil.errToObj(o)})}jwt(o){return this._addCheck({kind:"jwt",...s.errorUtil.errToObj(o)})}ip(o){return this._addCheck({kind:"ip",...s.errorUtil.errToObj(o)})}cidr(o){return this._addCheck({kind:"cidr",...s.errorUtil.errToObj(o)})}datetime(o){var h,m;return typeof o=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:o}):this._addCheck({kind:"datetime",precision:typeof(o==null?void 0:o.precision)>"u"?null:o==null?void 0:o.precision,offset:(h=o==null?void 0:o.offset)!==null&&h!==void 0?h:!1,local:(m=o==null?void 0:o.local)!==null&&m!==void 0?m:!1,...s.errorUtil.errToObj(o==null?void 0:o.message)})}date(o){return this._addCheck({kind:"date",message:o})}time(o){return typeof o=="string"?this._addCheck({kind:"time",precision:null,message:o}):this._addCheck({kind:"time",precision:typeof(o==null?void 0:o.precision)>"u"?null:o==null?void 0:o.precision,...s.errorUtil.errToObj(o==null?void 0:o.message)})}duration(o){return this._addCheck({kind:"duration",...s.errorUtil.errToObj(o)})}regex(o,h){return this._addCheck({kind:"regex",regex:o,...s.errorUtil.errToObj(h)})}includes(o,h){return this._addCheck({kind:"includes",value:o,position:h==null?void 0:h.position,...s.errorUtil.errToObj(h==null?void 0:h.message)})}startsWith(o,h){return this._addCheck({kind:"startsWith",value:o,...s.errorUtil.errToObj(h)})}endsWith(o,h){return this._addCheck({kind:"endsWith",value:o,...s.errorUtil.errToObj(h)})}min(o,h){return this._addCheck({kind:"min",value:o,...s.errorUtil.errToObj(h)})}max(o,h){return this._addCheck({kind:"max",value:o,...s.errorUtil.errToObj(h)})}length(o,h){return this._addCheck({kind:"length",value:o,...s.errorUtil.errToObj(h)})}nonempty(o){return this.min(1,s.errorUtil.errToObj(o))}trim(){return new fe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new fe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new fe({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(o=>o.kind==="datetime")}get isDate(){return!!this._def.checks.find(o=>o.kind==="date")}get isTime(){return!!this._def.checks.find(o=>o.kind==="time")}get isDuration(){return!!this._def.checks.find(o=>o.kind==="duration")}get isEmail(){return!!this._def.checks.find(o=>o.kind==="email")}get isURL(){return!!this._def.checks.find(o=>o.kind==="url")}get isEmoji(){return!!this._def.checks.find(o=>o.kind==="emoji")}get isUUID(){return!!this._def.checks.find(o=>o.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(o=>o.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(o=>o.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(o=>o.kind==="cuid2")}get isULID(){return!!this._def.checks.find(o=>o.kind==="ulid")}get isIP(){return!!this._def.checks.find(o=>o.kind==="ip")}get isCIDR(){return!!this._def.checks.find(o=>o.kind==="cidr")}get isBase64(){return!!this._def.checks.find(o=>o.kind==="base64")}get isBase64url(){return!!this._def.checks.find(o=>o.kind==="base64url")}get minLength(){let o=null;for(const h of this._def.checks)h.kind==="min"&&(o===null||h.value>o)&&(o=h.value);return o}get maxLength(){let o=null;for(const h of this._def.checks)h.kind==="max"&&(o===null||h.value<o)&&(o=h.value);return o}}S.ZodString=fe,fe.create=y=>{var o;return new fe({checks:[],typeName:V.ZodString,coerce:(o=y==null?void 0:y.coerce)!==null&&o!==void 0?o:!1,...p(y)})};function Yt(y,o){const h=(y.toString().split(".")[1]||"").length,m=(o.toString().split(".")[1]||"").length,b=h>m?h:m,E=parseInt(y.toFixed(b).replace(".","")),k=parseInt(o.toFixed(b).replace(".",""));return E%k/Math.pow(10,b)}class he extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(o){if(this._def.coerce&&(o.data=Number(o.data)),this._getType(o)!==c.ZodParsedType.number){const E=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(E,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.number,received:E.parsedType}),i.INVALID}let m;const b=new i.ParseStatus;for(const E of this._def.checks)E.kind==="int"?c.util.isInteger(o.data)||(m=this._getOrReturnCtx(o,m),(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:E.message}),b.dirty()):E.kind==="min"?(E.inclusive?o.data<E.value:o.data<=E.value)&&(m=this._getOrReturnCtx(o,m),(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.too_small,minimum:E.value,type:"number",inclusive:E.inclusive,exact:!1,message:E.message}),b.dirty()):E.kind==="max"?(E.inclusive?o.data>E.value:o.data>=E.value)&&(m=this._getOrReturnCtx(o,m),(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.too_big,maximum:E.value,type:"number",inclusive:E.inclusive,exact:!1,message:E.message}),b.dirty()):E.kind==="multipleOf"?Yt(o.data,E.value)!==0&&(m=this._getOrReturnCtx(o,m),(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.not_multiple_of,multipleOf:E.value,message:E.message}),b.dirty()):E.kind==="finite"?Number.isFinite(o.data)||(m=this._getOrReturnCtx(o,m),(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.not_finite,message:E.message}),b.dirty()):c.util.assertNever(E);return{status:b.value,value:o.data}}gte(o,h){return this.setLimit("min",o,!0,s.errorUtil.toString(h))}gt(o,h){return this.setLimit("min",o,!1,s.errorUtil.toString(h))}lte(o,h){return this.setLimit("max",o,!0,s.errorUtil.toString(h))}lt(o,h){return this.setLimit("max",o,!1,s.errorUtil.toString(h))}setLimit(o,h,m,b){return new he({...this._def,checks:[...this._def.checks,{kind:o,value:h,inclusive:m,message:s.errorUtil.toString(b)}]})}_addCheck(o){return new he({...this._def,checks:[...this._def.checks,o]})}int(o){return this._addCheck({kind:"int",message:s.errorUtil.toString(o)})}positive(o){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.errorUtil.toString(o)})}negative(o){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.errorUtil.toString(o)})}nonpositive(o){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.errorUtil.toString(o)})}nonnegative(o){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.errorUtil.toString(o)})}multipleOf(o,h){return this._addCheck({kind:"multipleOf",value:o,message:s.errorUtil.toString(h)})}finite(o){return this._addCheck({kind:"finite",message:s.errorUtil.toString(o)})}safe(o){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:s.errorUtil.toString(o)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:s.errorUtil.toString(o)})}get minValue(){let o=null;for(const h of this._def.checks)h.kind==="min"&&(o===null||h.value>o)&&(o=h.value);return o}get maxValue(){let o=null;for(const h of this._def.checks)h.kind==="max"&&(o===null||h.value<o)&&(o=h.value);return o}get isInt(){return!!this._def.checks.find(o=>o.kind==="int"||o.kind==="multipleOf"&&c.util.isInteger(o.value))}get isFinite(){let o=null,h=null;for(const m of this._def.checks){if(m.kind==="finite"||m.kind==="int"||m.kind==="multipleOf")return!0;m.kind==="min"?(h===null||m.value>h)&&(h=m.value):m.kind==="max"&&(o===null||m.value<o)&&(o=m.value)}return Number.isFinite(h)&&Number.isFinite(o)}}S.ZodNumber=he,he.create=y=>new he({checks:[],typeName:V.ZodNumber,coerce:(y==null?void 0:y.coerce)||!1,...p(y)});class be extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(o){if(this._def.coerce)try{o.data=BigInt(o.data)}catch{return this._getInvalidInput(o)}if(this._getType(o)!==c.ZodParsedType.bigint)return this._getInvalidInput(o);let m;const b=new i.ParseStatus;for(const E of this._def.checks)E.kind==="min"?(E.inclusive?o.data<E.value:o.data<=E.value)&&(m=this._getOrReturnCtx(o,m),(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.too_small,type:"bigint",minimum:E.value,inclusive:E.inclusive,message:E.message}),b.dirty()):E.kind==="max"?(E.inclusive?o.data>E.value:o.data>=E.value)&&(m=this._getOrReturnCtx(o,m),(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.too_big,type:"bigint",maximum:E.value,inclusive:E.inclusive,message:E.message}),b.dirty()):E.kind==="multipleOf"?o.data%E.value!==BigInt(0)&&(m=this._getOrReturnCtx(o,m),(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.not_multiple_of,multipleOf:E.value,message:E.message}),b.dirty()):c.util.assertNever(E);return{status:b.value,value:o.data}}_getInvalidInput(o){const h=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(h,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.bigint,received:h.parsedType}),i.INVALID}gte(o,h){return this.setLimit("min",o,!0,s.errorUtil.toString(h))}gt(o,h){return this.setLimit("min",o,!1,s.errorUtil.toString(h))}lte(o,h){return this.setLimit("max",o,!0,s.errorUtil.toString(h))}lt(o,h){return this.setLimit("max",o,!1,s.errorUtil.toString(h))}setLimit(o,h,m,b){return new be({...this._def,checks:[...this._def.checks,{kind:o,value:h,inclusive:m,message:s.errorUtil.toString(b)}]})}_addCheck(o){return new be({...this._def,checks:[...this._def.checks,o]})}positive(o){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:s.errorUtil.toString(o)})}negative(o){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:s.errorUtil.toString(o)})}nonpositive(o){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:s.errorUtil.toString(o)})}nonnegative(o){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:s.errorUtil.toString(o)})}multipleOf(o,h){return this._addCheck({kind:"multipleOf",value:o,message:s.errorUtil.toString(h)})}get minValue(){let o=null;for(const h of this._def.checks)h.kind==="min"&&(o===null||h.value>o)&&(o=h.value);return o}get maxValue(){let o=null;for(const h of this._def.checks)h.kind==="max"&&(o===null||h.value<o)&&(o=h.value);return o}}S.ZodBigInt=be,be.create=y=>{var o;return new be({checks:[],typeName:V.ZodBigInt,coerce:(o=y==null?void 0:y.coerce)!==null&&o!==void 0?o:!1,...p(y)})};class Ht extends _{_parse(o){if(this._def.coerce&&(o.data=!!o.data),this._getType(o)!==c.ZodParsedType.boolean){const m=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.boolean,received:m.parsedType}),i.INVALID}return(0,i.OK)(o.data)}}S.ZodBoolean=Ht,Ht.create=y=>new Ht({typeName:V.ZodBoolean,coerce:(y==null?void 0:y.coerce)||!1,...p(y)});class at extends _{_parse(o){if(this._def.coerce&&(o.data=new Date(o.data)),this._getType(o)!==c.ZodParsedType.date){const E=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(E,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.date,received:E.parsedType}),i.INVALID}if(isNaN(o.data.getTime())){const E=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(E,{code:l.ZodIssueCode.invalid_date}),i.INVALID}const m=new i.ParseStatus;let b;for(const E of this._def.checks)E.kind==="min"?o.data.getTime()<E.value&&(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{code:l.ZodIssueCode.too_small,message:E.message,inclusive:!0,exact:!1,minimum:E.value,type:"date"}),m.dirty()):E.kind==="max"?o.data.getTime()>E.value&&(b=this._getOrReturnCtx(o,b),(0,i.addIssueToContext)(b,{code:l.ZodIssueCode.too_big,message:E.message,inclusive:!0,exact:!1,maximum:E.value,type:"date"}),m.dirty()):c.util.assertNever(E);return{status:m.value,value:new Date(o.data.getTime())}}_addCheck(o){return new at({...this._def,checks:[...this._def.checks,o]})}min(o,h){return this._addCheck({kind:"min",value:o.getTime(),message:s.errorUtil.toString(h)})}max(o,h){return this._addCheck({kind:"max",value:o.getTime(),message:s.errorUtil.toString(h)})}get minDate(){let o=null;for(const h of this._def.checks)h.kind==="min"&&(o===null||h.value>o)&&(o=h.value);return o!=null?new Date(o):null}get maxDate(){let o=null;for(const h of this._def.checks)h.kind==="max"&&(o===null||h.value<o)&&(o=h.value);return o!=null?new Date(o):null}}S.ZodDate=at,at.create=y=>new at({checks:[],coerce:(y==null?void 0:y.coerce)||!1,typeName:V.ZodDate,...p(y)});class bn extends _{_parse(o){if(this._getType(o)!==c.ZodParsedType.symbol){const m=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.symbol,received:m.parsedType}),i.INVALID}return(0,i.OK)(o.data)}}S.ZodSymbol=bn,bn.create=y=>new bn({typeName:V.ZodSymbol,...p(y)});class Gt extends _{_parse(o){if(this._getType(o)!==c.ZodParsedType.undefined){const m=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.undefined,received:m.parsedType}),i.INVALID}return(0,i.OK)(o.data)}}S.ZodUndefined=Gt,Gt.create=y=>new Gt({typeName:V.ZodUndefined,...p(y)});class zt extends _{_parse(o){if(this._getType(o)!==c.ZodParsedType.null){const m=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.null,received:m.parsedType}),i.INVALID}return(0,i.OK)(o.data)}}S.ZodNull=zt,zt.create=y=>new zt({typeName:V.ZodNull,...p(y)});class vt extends _{constructor(){super(...arguments),this._any=!0}_parse(o){return(0,i.OK)(o.data)}}S.ZodAny=vt,vt.create=y=>new vt({typeName:V.ZodAny,...p(y)});class st extends _{constructor(){super(...arguments),this._unknown=!0}_parse(o){return(0,i.OK)(o.data)}}S.ZodUnknown=st,st.create=y=>new st({typeName:V.ZodUnknown,...p(y)});class Oe extends _{_parse(o){const h=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(h,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.never,received:h.parsedType}),i.INVALID}}S.ZodNever=Oe,Oe.create=y=>new Oe({typeName:V.ZodNever,...p(y)});class En extends _{_parse(o){if(this._getType(o)!==c.ZodParsedType.undefined){const m=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.void,received:m.parsedType}),i.INVALID}return(0,i.OK)(o.data)}}S.ZodVoid=En,En.create=y=>new En({typeName:V.ZodVoid,...p(y)});class Ee extends _{_parse(o){const{ctx:h,status:m}=this._processInputParams(o),b=this._def;if(h.parsedType!==c.ZodParsedType.array)return(0,i.addIssueToContext)(h,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.array,received:h.parsedType}),i.INVALID;if(b.exactLength!==null){const k=h.data.length>b.exactLength.value,N=h.data.length<b.exactLength.value;(k||N)&&((0,i.addIssueToContext)(h,{code:k?l.ZodIssueCode.too_big:l.ZodIssueCode.too_small,minimum:N?b.exactLength.value:void 0,maximum:k?b.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:b.exactLength.message}),m.dirty())}if(b.minLength!==null&&h.data.length<b.minLength.value&&((0,i.addIssueToContext)(h,{code:l.ZodIssueCode.too_small,minimum:b.minLength.value,type:"array",inclusive:!0,exact:!1,message:b.minLength.message}),m.dirty()),b.maxLength!==null&&h.data.length>b.maxLength.value&&((0,i.addIssueToContext)(h,{code:l.ZodIssueCode.too_big,maximum:b.maxLength.value,type:"array",inclusive:!0,exact:!1,message:b.maxLength.message}),m.dirty()),h.common.async)return Promise.all([...h.data].map((k,N)=>b.type._parseAsync(new d(h,k,h.path,N)))).then(k=>i.ParseStatus.mergeArray(m,k));const E=[...h.data].map((k,N)=>b.type._parseSync(new d(h,k,h.path,N)));return i.ParseStatus.mergeArray(m,E)}get element(){return this._def.type}min(o,h){return new Ee({...this._def,minLength:{value:o,message:s.errorUtil.toString(h)}})}max(o,h){return new Ee({...this._def,maxLength:{value:o,message:s.errorUtil.toString(h)}})}length(o,h){return new Ee({...this._def,exactLength:{value:o,message:s.errorUtil.toString(h)}})}nonempty(o){return this.min(1,o)}}S.ZodArray=Ee,Ee.create=(y,o)=>new Ee({type:y,minLength:null,maxLength:null,exactLength:null,typeName:V.ZodArray,...p(o)});function yt(y){if(y instanceof J){const o={};for(const h in y.shape){const m=y.shape[h];o[h]=De.create(yt(m))}return new J({...y._def,shape:()=>o})}else return y instanceof Ee?new Ee({...y._def,type:yt(y.element)}):y instanceof De?De.create(yt(y.unwrap())):y instanceof ze?ze.create(yt(y.unwrap())):y instanceof Ae?Ae.create(y.items.map(o=>yt(o))):y}class J extends _{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const o=this._def.shape(),h=c.util.objectKeys(o);return this._cached={shape:o,keys:h}}_parse(o){if(this._getType(o)!==c.ZodParsedType.object){const M=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(M,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.object,received:M.parsedType}),i.INVALID}const{status:m,ctx:b}=this._processInputParams(o),{shape:E,keys:k}=this._getCached(),N=[];if(!(this._def.catchall instanceof Oe&&this._def.unknownKeys==="strip"))for(const M in b.data)k.includes(M)||N.push(M);const U=[];for(const M of k){const F=E[M],le=b.data[M];U.push({key:{status:"valid",value:M},value:F._parse(new d(b,le,b.path,M)),alwaysSet:M in b.data})}if(this._def.catchall instanceof Oe){const M=this._def.unknownKeys;if(M==="passthrough")for(const F of N)U.push({key:{status:"valid",value:F},value:{status:"valid",value:b.data[F]}});else if(M==="strict")N.length>0&&((0,i.addIssueToContext)(b,{code:l.ZodIssueCode.unrecognized_keys,keys:N}),m.dirty());else if(M!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const M=this._def.catchall;for(const F of N){const le=b.data[F];U.push({key:{status:"valid",value:F},value:M._parse(new d(b,le,b.path,F)),alwaysSet:F in b.data})}}return b.common.async?Promise.resolve().then(async()=>{const M=[];for(const F of U){const le=await F.key,Sn=await F.value;M.push({key:le,value:Sn,alwaysSet:F.alwaysSet})}return M}).then(M=>i.ParseStatus.mergeObjectSync(m,M)):i.ParseStatus.mergeObjectSync(m,U)}get shape(){return this._def.shape()}strict(o){return s.errorUtil.errToObj,new J({...this._def,unknownKeys:"strict",...o!==void 0?{errorMap:(h,m)=>{var b,E,k,N;const U=(k=(E=(b=this._def).errorMap)===null||E===void 0?void 0:E.call(b,h,m).message)!==null&&k!==void 0?k:m.defaultError;return h.code==="unrecognized_keys"?{message:(N=s.errorUtil.errToObj(o).message)!==null&&N!==void 0?N:U}:{message:U}}}:{}})}strip(){return new J({...this._def,unknownKeys:"strip"})}passthrough(){return new J({...this._def,unknownKeys:"passthrough"})}extend(o){return new J({...this._def,shape:()=>({...this._def.shape(),...o})})}merge(o){return new J({unknownKeys:o._def.unknownKeys,catchall:o._def.catchall,shape:()=>({...this._def.shape(),...o._def.shape()}),typeName:V.ZodObject})}setKey(o,h){return this.augment({[o]:h})}catchall(o){return new J({...this._def,catchall:o})}pick(o){const h={};return c.util.objectKeys(o).forEach(m=>{o[m]&&this.shape[m]&&(h[m]=this.shape[m])}),new J({...this._def,shape:()=>h})}omit(o){const h={};return c.util.objectKeys(this.shape).forEach(m=>{o[m]||(h[m]=this.shape[m])}),new J({...this._def,shape:()=>h})}deepPartial(){return yt(this)}partial(o){const h={};return c.util.objectKeys(this.shape).forEach(m=>{const b=this.shape[m];o&&!o[m]?h[m]=b:h[m]=b.optional()}),new J({...this._def,shape:()=>h})}required(o){const h={};return c.util.objectKeys(this.shape).forEach(m=>{if(o&&!o[m])h[m]=this.shape[m];else{let E=this.shape[m];for(;E instanceof De;)E=E._def.innerType;h[m]=E}}),new J({...this._def,shape:()=>h})}keyof(){return us(c.util.objectKeys(this.shape))}}S.ZodObject=J,J.create=(y,o)=>new J({shape:()=>y,unknownKeys:"strip",catchall:Oe.create(),typeName:V.ZodObject,...p(o)}),J.strictCreate=(y,o)=>new J({shape:()=>y,unknownKeys:"strict",catchall:Oe.create(),typeName:V.ZodObject,...p(o)}),J.lazycreate=(y,o)=>new J({shape:y,unknownKeys:"strip",catchall:Oe.create(),typeName:V.ZodObject,...p(o)});class Wt extends _{_parse(o){const{ctx:h}=this._processInputParams(o),m=this._def.options;function b(E){for(const N of E)if(N.result.status==="valid")return N.result;for(const N of E)if(N.result.status==="dirty")return h.common.issues.push(...N.ctx.common.issues),N.result;const k=E.map(N=>new l.ZodError(N.ctx.common.issues));return(0,i.addIssueToContext)(h,{code:l.ZodIssueCode.invalid_union,unionErrors:k}),i.INVALID}if(h.common.async)return Promise.all(m.map(async E=>{const k={...h,common:{...h.common,issues:[]},parent:null};return{result:await E._parseAsync({data:h.data,path:h.path,parent:k}),ctx:k}})).then(b);{let E;const k=[];for(const U of m){const M={...h,common:{...h.common,issues:[]},parent:null},F=U._parseSync({data:h.data,path:h.path,parent:M});if(F.status==="valid")return F;F.status==="dirty"&&!E&&(E={result:F,ctx:M}),M.common.issues.length&&k.push(M.common.issues)}if(E)return h.common.issues.push(...E.ctx.common.issues),E.result;const N=k.map(U=>new l.ZodError(U));return(0,i.addIssueToContext)(h,{code:l.ZodIssueCode.invalid_union,unionErrors:N}),i.INVALID}}get options(){return this._def.options}}S.ZodUnion=Wt,Wt.create=(y,o)=>new Wt({options:y,typeName:V.ZodUnion,...p(o)});const Ze=y=>y instanceof Xt?Ze(y.schema):y instanceof xe?Ze(y.innerType()):y instanceof Jt?[y.value]:y instanceof Ge?y.options:y instanceof Qt?c.util.objectValues(y.enum):y instanceof en?Ze(y._def.innerType):y instanceof Gt?[void 0]:y instanceof zt?[null]:y instanceof De?[void 0,...Ze(y.unwrap())]:y instanceof ze?[null,...Ze(y.unwrap())]:y instanceof Cr||y instanceof rn?Ze(y.unwrap()):y instanceof tn?Ze(y._def.innerType):[];class xn extends _{_parse(o){const{ctx:h}=this._processInputParams(o);if(h.parsedType!==c.ZodParsedType.object)return(0,i.addIssueToContext)(h,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.object,received:h.parsedType}),i.INVALID;const m=this.discriminator,b=h.data[m],E=this.optionsMap.get(b);return E?h.common.async?E._parseAsync({data:h.data,path:h.path,parent:h}):E._parseSync({data:h.data,path:h.path,parent:h}):((0,i.addIssueToContext)(h,{code:l.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[m]}),i.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(o,h,m){const b=new Map;for(const E of h){const k=Ze(E.shape[o]);if(!k.length)throw new Error(`A discriminator value for key \`${o}\` could not be extracted from all schema options`);for(const N of k){if(b.has(N))throw new Error(`Discriminator property ${String(o)} has duplicate value ${String(N)}`);b.set(N,E)}}return new xn({typeName:V.ZodDiscriminatedUnion,discriminator:o,options:h,optionsMap:b,...p(m)})}}S.ZodDiscriminatedUnion=xn;function Sr(y,o){const h=(0,c.getParsedType)(y),m=(0,c.getParsedType)(o);if(y===o)return{valid:!0,data:y};if(h===c.ZodParsedType.object&&m===c.ZodParsedType.object){const b=c.util.objectKeys(o),E=c.util.objectKeys(y).filter(N=>b.indexOf(N)!==-1),k={...y,...o};for(const N of E){const U=Sr(y[N],o[N]);if(!U.valid)return{valid:!1};k[N]=U.data}return{valid:!0,data:k}}else if(h===c.ZodParsedType.array&&m===c.ZodParsedType.array){if(y.length!==o.length)return{valid:!1};const b=[];for(let E=0;E<y.length;E++){const k=y[E],N=o[E],U=Sr(k,N);if(!U.valid)return{valid:!1};b.push(U.data)}return{valid:!0,data:b}}else return h===c.ZodParsedType.date&&m===c.ZodParsedType.date&&+y==+o?{valid:!0,data:y}:{valid:!1}}class qt extends _{_parse(o){const{status:h,ctx:m}=this._processInputParams(o),b=(E,k)=>{if((0,i.isAborted)(E)||(0,i.isAborted)(k))return i.INVALID;const N=Sr(E.value,k.value);return N.valid?(((0,i.isDirty)(E)||(0,i.isDirty)(k))&&h.dirty(),{status:h.value,value:N.data}):((0,i.addIssueToContext)(m,{code:l.ZodIssueCode.invalid_intersection_types}),i.INVALID)};return m.common.async?Promise.all([this._def.left._parseAsync({data:m.data,path:m.path,parent:m}),this._def.right._parseAsync({data:m.data,path:m.path,parent:m})]).then(([E,k])=>b(E,k)):b(this._def.left._parseSync({data:m.data,path:m.path,parent:m}),this._def.right._parseSync({data:m.data,path:m.path,parent:m}))}}S.ZodIntersection=qt,qt.create=(y,o,h)=>new qt({left:y,right:o,typeName:V.ZodIntersection,...p(h)});class Ae extends _{_parse(o){const{status:h,ctx:m}=this._processInputParams(o);if(m.parsedType!==c.ZodParsedType.array)return(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.array,received:m.parsedType}),i.INVALID;if(m.data.length<this._def.items.length)return(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.INVALID;!this._def.rest&&m.data.length>this._def.items.length&&((0,i.addIssueToContext)(m,{code:l.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),h.dirty());const E=[...m.data].map((k,N)=>{const U=this._def.items[N]||this._def.rest;return U?U._parse(new d(m,k,m.path,N)):null}).filter(k=>!!k);return m.common.async?Promise.all(E).then(k=>i.ParseStatus.mergeArray(h,k)):i.ParseStatus.mergeArray(h,E)}get items(){return this._def.items}rest(o){return new Ae({...this._def,rest:o})}}S.ZodTuple=Ae,Ae.create=(y,o)=>{if(!Array.isArray(y))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ae({items:y,typeName:V.ZodTuple,rest:null,...p(o)})};class Kt extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(o){const{status:h,ctx:m}=this._processInputParams(o);if(m.parsedType!==c.ZodParsedType.object)return(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.object,received:m.parsedType}),i.INVALID;const b=[],E=this._def.keyType,k=this._def.valueType;for(const N in m.data)b.push({key:E._parse(new d(m,N,m.path,N)),value:k._parse(new d(m,m.data[N],m.path,N)),alwaysSet:N in m.data});return m.common.async?i.ParseStatus.mergeObjectAsync(h,b):i.ParseStatus.mergeObjectSync(h,b)}get element(){return this._def.valueType}static create(o,h,m){return h instanceof _?new Kt({keyType:o,valueType:h,typeName:V.ZodRecord,...p(m)}):new Kt({keyType:fe.create(),valueType:o,typeName:V.ZodRecord,...p(h)})}}S.ZodRecord=Kt;class Tn extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(o){const{status:h,ctx:m}=this._processInputParams(o);if(m.parsedType!==c.ZodParsedType.map)return(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.map,received:m.parsedType}),i.INVALID;const b=this._def.keyType,E=this._def.valueType,k=[...m.data.entries()].map(([N,U],M)=>({key:b._parse(new d(m,N,m.path,[M,"key"])),value:E._parse(new d(m,U,m.path,[M,"value"]))}));if(m.common.async){const N=new Map;return Promise.resolve().then(async()=>{for(const U of k){const M=await U.key,F=await U.value;if(M.status==="aborted"||F.status==="aborted")return i.INVALID;(M.status==="dirty"||F.status==="dirty")&&h.dirty(),N.set(M.value,F.value)}return{status:h.value,value:N}})}else{const N=new Map;for(const U of k){const M=U.key,F=U.value;if(M.status==="aborted"||F.status==="aborted")return i.INVALID;(M.status==="dirty"||F.status==="dirty")&&h.dirty(),N.set(M.value,F.value)}return{status:h.value,value:N}}}}S.ZodMap=Tn,Tn.create=(y,o,h)=>new Tn({valueType:o,keyType:y,typeName:V.ZodMap,...p(h)});class it extends _{_parse(o){const{status:h,ctx:m}=this._processInputParams(o);if(m.parsedType!==c.ZodParsedType.set)return(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.set,received:m.parsedType}),i.INVALID;const b=this._def;b.minSize!==null&&m.data.size<b.minSize.value&&((0,i.addIssueToContext)(m,{code:l.ZodIssueCode.too_small,minimum:b.minSize.value,type:"set",inclusive:!0,exact:!1,message:b.minSize.message}),h.dirty()),b.maxSize!==null&&m.data.size>b.maxSize.value&&((0,i.addIssueToContext)(m,{code:l.ZodIssueCode.too_big,maximum:b.maxSize.value,type:"set",inclusive:!0,exact:!1,message:b.maxSize.message}),h.dirty());const E=this._def.valueType;function k(U){const M=new Set;for(const F of U){if(F.status==="aborted")return i.INVALID;F.status==="dirty"&&h.dirty(),M.add(F.value)}return{status:h.value,value:M}}const N=[...m.data.values()].map((U,M)=>E._parse(new d(m,U,m.path,M)));return m.common.async?Promise.all(N).then(U=>k(U)):k(N)}min(o,h){return new it({...this._def,minSize:{value:o,message:s.errorUtil.toString(h)}})}max(o,h){return new it({...this._def,maxSize:{value:o,message:s.errorUtil.toString(h)}})}size(o,h){return this.min(o,h).max(o,h)}nonempty(o){return this.min(1,o)}}S.ZodSet=it,it.create=(y,o)=>new it({valueType:y,minSize:null,maxSize:null,typeName:V.ZodSet,...p(o)});class bt extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(o){const{ctx:h}=this._processInputParams(o);if(h.parsedType!==c.ZodParsedType.function)return(0,i.addIssueToContext)(h,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.function,received:h.parsedType}),i.INVALID;function m(N,U){return(0,i.makeIssue)({data:N,path:h.path,errorMaps:[h.common.contextualErrorMap,h.schemaErrorMap,(0,a.getErrorMap)(),a.defaultErrorMap].filter(M=>!!M),issueData:{code:l.ZodIssueCode.invalid_arguments,argumentsError:U}})}function b(N,U){return(0,i.makeIssue)({data:N,path:h.path,errorMaps:[h.common.contextualErrorMap,h.schemaErrorMap,(0,a.getErrorMap)(),a.defaultErrorMap].filter(M=>!!M),issueData:{code:l.ZodIssueCode.invalid_return_type,returnTypeError:U}})}const E={errorMap:h.common.contextualErrorMap},k=h.data;if(this._def.returns instanceof Et){const N=this;return(0,i.OK)(async function(...U){const M=new l.ZodError([]),F=await N._def.args.parseAsync(U,E).catch(Ir=>{throw M.addIssue(m(U,Ir)),M}),le=await Reflect.apply(k,this,F);return await N._def.returns._def.type.parseAsync(le,E).catch(Ir=>{throw M.addIssue(b(le,Ir)),M})})}else{const N=this;return(0,i.OK)(function(...U){const M=N._def.args.safeParse(U,E);if(!M.success)throw new l.ZodError([m(U,M.error)]);const F=Reflect.apply(k,this,M.data),le=N._def.returns.safeParse(F,E);if(!le.success)throw new l.ZodError([b(F,le.error)]);return le.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...o){return new bt({...this._def,args:Ae.create(o).rest(st.create())})}returns(o){return new bt({...this._def,returns:o})}implement(o){return this.parse(o)}strictImplement(o){return this.parse(o)}static create(o,h,m){return new bt({args:o||Ae.create([]).rest(st.create()),returns:h||st.create(),typeName:V.ZodFunction,...p(m)})}}S.ZodFunction=bt;class Xt extends _{get schema(){return this._def.getter()}_parse(o){const{ctx:h}=this._processInputParams(o);return this._def.getter()._parse({data:h.data,path:h.path,parent:h})}}S.ZodLazy=Xt,Xt.create=(y,o)=>new Xt({getter:y,typeName:V.ZodLazy,...p(o)});class Jt extends _{_parse(o){if(o.data!==this._def.value){const h=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(h,{received:h.data,code:l.ZodIssueCode.invalid_literal,expected:this._def.value}),i.INVALID}return{status:"valid",value:o.data}}get value(){return this._def.value}}S.ZodLiteral=Jt,Jt.create=(y,o)=>new Jt({value:y,typeName:V.ZodLiteral,...p(o)});function us(y,o){return new Ge({values:y,typeName:V.ZodEnum,...p(o)})}class Ge extends _{constructor(){super(...arguments),n.set(this,void 0)}_parse(o){if(typeof o.data!="string"){const h=this._getOrReturnCtx(o),m=this._def.values;return(0,i.addIssueToContext)(h,{expected:c.util.joinValues(m),received:h.parsedType,code:l.ZodIssueCode.invalid_type}),i.INVALID}if(e(this,n,"f")||t(this,n,new Set(this._def.values),"f"),!e(this,n,"f").has(o.data)){const h=this._getOrReturnCtx(o),m=this._def.values;return(0,i.addIssueToContext)(h,{received:h.data,code:l.ZodIssueCode.invalid_enum_value,options:m}),i.INVALID}return(0,i.OK)(o.data)}get options(){return this._def.values}get enum(){const o={};for(const h of this._def.values)o[h]=h;return o}get Values(){const o={};for(const h of this._def.values)o[h]=h;return o}get Enum(){const o={};for(const h of this._def.values)o[h]=h;return o}extract(o,h=this._def){return Ge.create(o,{...this._def,...h})}exclude(o,h=this._def){return Ge.create(this.options.filter(m=>!o.includes(m)),{...this._def,...h})}}S.ZodEnum=Ge,n=new WeakMap,Ge.create=us;class Qt extends _{constructor(){super(...arguments),r.set(this,void 0)}_parse(o){const h=c.util.getValidEnumValues(this._def.values),m=this._getOrReturnCtx(o);if(m.parsedType!==c.ZodParsedType.string&&m.parsedType!==c.ZodParsedType.number){const b=c.util.objectValues(h);return(0,i.addIssueToContext)(m,{expected:c.util.joinValues(b),received:m.parsedType,code:l.ZodIssueCode.invalid_type}),i.INVALID}if(e(this,r,"f")||t(this,r,new Set(c.util.getValidEnumValues(this._def.values)),"f"),!e(this,r,"f").has(o.data)){const b=c.util.objectValues(h);return(0,i.addIssueToContext)(m,{received:m.data,code:l.ZodIssueCode.invalid_enum_value,options:b}),i.INVALID}return(0,i.OK)(o.data)}get enum(){return this._def.values}}S.ZodNativeEnum=Qt,r=new WeakMap,Qt.create=(y,o)=>new Qt({values:y,typeName:V.ZodNativeEnum,...p(o)});class Et extends _{unwrap(){return this._def.type}_parse(o){const{ctx:h}=this._processInputParams(o);if(h.parsedType!==c.ZodParsedType.promise&&h.common.async===!1)return(0,i.addIssueToContext)(h,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.promise,received:h.parsedType}),i.INVALID;const m=h.parsedType===c.ZodParsedType.promise?h.data:Promise.resolve(h.data);return(0,i.OK)(m.then(b=>this._def.type.parseAsync(b,{path:h.path,errorMap:h.common.contextualErrorMap})))}}S.ZodPromise=Et,Et.create=(y,o)=>new Et({type:y,typeName:V.ZodPromise,...p(o)});class xe extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===V.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(o){const{status:h,ctx:m}=this._processInputParams(o),b=this._def.effect||null,E={addIssue:k=>{(0,i.addIssueToContext)(m,k),k.fatal?h.abort():h.dirty()},get path(){return m.path}};if(E.addIssue=E.addIssue.bind(E),b.type==="preprocess"){const k=b.transform(m.data,E);if(m.common.async)return Promise.resolve(k).then(async N=>{if(h.value==="aborted")return i.INVALID;const U=await this._def.schema._parseAsync({data:N,path:m.path,parent:m});return U.status==="aborted"?i.INVALID:U.status==="dirty"||h.value==="dirty"?(0,i.DIRTY)(U.value):U});{if(h.value==="aborted")return i.INVALID;const N=this._def.schema._parseSync({data:k,path:m.path,parent:m});return N.status==="aborted"?i.INVALID:N.status==="dirty"||h.value==="dirty"?(0,i.DIRTY)(N.value):N}}if(b.type==="refinement"){const k=N=>{const U=b.refinement(N,E);if(m.common.async)return Promise.resolve(U);if(U instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return N};if(m.common.async===!1){const N=this._def.schema._parseSync({data:m.data,path:m.path,parent:m});return N.status==="aborted"?i.INVALID:(N.status==="dirty"&&h.dirty(),k(N.value),{status:h.value,value:N.value})}else return this._def.schema._parseAsync({data:m.data,path:m.path,parent:m}).then(N=>N.status==="aborted"?i.INVALID:(N.status==="dirty"&&h.dirty(),k(N.value).then(()=>({status:h.value,value:N.value}))))}if(b.type==="transform")if(m.common.async===!1){const k=this._def.schema._parseSync({data:m.data,path:m.path,parent:m});if(!(0,i.isValid)(k))return k;const N=b.transform(k.value,E);if(N instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:h.value,value:N}}else return this._def.schema._parseAsync({data:m.data,path:m.path,parent:m}).then(k=>(0,i.isValid)(k)?Promise.resolve(b.transform(k.value,E)).then(N=>({status:h.value,value:N})):k);c.util.assertNever(b)}}S.ZodEffects=xe,S.ZodTransformer=xe,xe.create=(y,o,h)=>new xe({schema:y,typeName:V.ZodEffects,effect:o,...p(h)}),xe.createWithPreprocess=(y,o,h)=>new xe({schema:o,effect:{type:"preprocess",transform:y},typeName:V.ZodEffects,...p(h)});class De extends _{_parse(o){return this._getType(o)===c.ZodParsedType.undefined?(0,i.OK)(void 0):this._def.innerType._parse(o)}unwrap(){return this._def.innerType}}S.ZodOptional=De,De.create=(y,o)=>new De({innerType:y,typeName:V.ZodOptional,...p(o)});class ze extends _{_parse(o){return this._getType(o)===c.ZodParsedType.null?(0,i.OK)(null):this._def.innerType._parse(o)}unwrap(){return this._def.innerType}}S.ZodNullable=ze,ze.create=(y,o)=>new ze({innerType:y,typeName:V.ZodNullable,...p(o)});class en extends _{_parse(o){const{ctx:h}=this._processInputParams(o);let m=h.data;return h.parsedType===c.ZodParsedType.undefined&&(m=this._def.defaultValue()),this._def.innerType._parse({data:m,path:h.path,parent:h})}removeDefault(){return this._def.innerType}}S.ZodDefault=en,en.create=(y,o)=>new en({innerType:y,typeName:V.ZodDefault,defaultValue:typeof o.default=="function"?o.default:()=>o.default,...p(o)});class tn extends _{_parse(o){const{ctx:h}=this._processInputParams(o),m={...h,common:{...h.common,issues:[]}},b=this._def.innerType._parse({data:m.data,path:m.path,parent:{...m}});return(0,i.isAsync)(b)?b.then(E=>({status:"valid",value:E.status==="valid"?E.value:this._def.catchValue({get error(){return new l.ZodError(m.common.issues)},input:m.data})})):{status:"valid",value:b.status==="valid"?b.value:this._def.catchValue({get error(){return new l.ZodError(m.common.issues)},input:m.data})}}removeCatch(){return this._def.innerType}}S.ZodCatch=tn,tn.create=(y,o)=>new tn({innerType:y,typeName:V.ZodCatch,catchValue:typeof o.catch=="function"?o.catch:()=>o.catch,...p(o)});class wn extends _{_parse(o){if(this._getType(o)!==c.ZodParsedType.nan){const m=this._getOrReturnCtx(o);return(0,i.addIssueToContext)(m,{code:l.ZodIssueCode.invalid_type,expected:c.ZodParsedType.nan,received:m.parsedType}),i.INVALID}return{status:"valid",value:o.data}}}S.ZodNaN=wn,wn.create=y=>new wn({typeName:V.ZodNaN,...p(y)}),S.BRAND=Symbol("zod_brand");class Cr extends _{_parse(o){const{ctx:h}=this._processInputParams(o),m=h.data;return this._def.type._parse({data:m,path:h.path,parent:h})}unwrap(){return this._def.type}}S.ZodBranded=Cr;class nn extends _{_parse(o){const{status:h,ctx:m}=this._processInputParams(o);if(m.common.async)return(async()=>{const E=await this._def.in._parseAsync({data:m.data,path:m.path,parent:m});return E.status==="aborted"?i.INVALID:E.status==="dirty"?(h.dirty(),(0,i.DIRTY)(E.value)):this._def.out._parseAsync({data:E.value,path:m.path,parent:m})})();{const b=this._def.in._parseSync({data:m.data,path:m.path,parent:m});return b.status==="aborted"?i.INVALID:b.status==="dirty"?(h.dirty(),{status:"dirty",value:b.value}):this._def.out._parseSync({data:b.value,path:m.path,parent:m})}}static create(o,h){return new nn({in:o,out:h,typeName:V.ZodPipeline})}}S.ZodPipeline=nn;class rn extends _{_parse(o){const h=this._def.innerType._parse(o),m=b=>((0,i.isValid)(b)&&(b.value=Object.freeze(b.value)),b);return(0,i.isAsync)(h)?h.then(b=>m(b)):m(h)}unwrap(){return this._def.innerType}}S.ZodReadonly=rn,rn.create=(y,o)=>new rn({innerType:y,typeName:V.ZodReadonly,...p(o)});function ls(y,o){const h=typeof y=="function"?y(o):typeof y=="string"?{message:y}:y;return typeof h=="string"?{message:h}:h}function ds(y,o={},h){return y?vt.create().superRefine((m,b)=>{var E,k;const N=y(m);if(N instanceof Promise)return N.then(U=>{var M,F;if(!U){const le=ls(o,m),Sn=(F=(M=le.fatal)!==null&&M!==void 0?M:h)!==null&&F!==void 0?F:!0;b.addIssue({code:"custom",...le,fatal:Sn})}});if(!N){const U=ls(o,m),M=(k=(E=U.fatal)!==null&&E!==void 0?E:h)!==null&&k!==void 0?k:!0;b.addIssue({code:"custom",...U,fatal:M})}}):vt.create()}S.custom=ds,S.late={object:J.lazycreate};var V;(function(y){y.ZodString="ZodString",y.ZodNumber="ZodNumber",y.ZodNaN="ZodNaN",y.ZodBigInt="ZodBigInt",y.ZodBoolean="ZodBoolean",y.ZodDate="ZodDate",y.ZodSymbol="ZodSymbol",y.ZodUndefined="ZodUndefined",y.ZodNull="ZodNull",y.ZodAny="ZodAny",y.ZodUnknown="ZodUnknown",y.ZodNever="ZodNever",y.ZodVoid="ZodVoid",y.ZodArray="ZodArray",y.ZodObject="ZodObject",y.ZodUnion="ZodUnion",y.ZodDiscriminatedUnion="ZodDiscriminatedUnion",y.ZodIntersection="ZodIntersection",y.ZodTuple="ZodTuple",y.ZodRecord="ZodRecord",y.ZodMap="ZodMap",y.ZodSet="ZodSet",y.ZodFunction="ZodFunction",y.ZodLazy="ZodLazy",y.ZodLiteral="ZodLiteral",y.ZodEnum="ZodEnum",y.ZodEffects="ZodEffects",y.ZodNativeEnum="ZodNativeEnum",y.ZodOptional="ZodOptional",y.ZodNullable="ZodNullable",y.ZodDefault="ZodDefault",y.ZodCatch="ZodCatch",y.ZodPromise="ZodPromise",y.ZodBranded="ZodBranded",y.ZodPipeline="ZodPipeline",y.ZodReadonly="ZodReadonly"})(V||(S.ZodFirstPartyTypeKind=V={}));const cu=(y,o={message:`Input not instance of ${y.name}`})=>ds(h=>h instanceof y,o);S.instanceof=cu;const fs=fe.create;S.string=fs;const hs=he.create;S.number=hs;const uu=wn.create;S.nan=uu;const lu=be.create;S.bigint=lu;const ps=Ht.create;S.boolean=ps;const du=at.create;S.date=du;const fu=bn.create;S.symbol=fu;const hu=Gt.create;S.undefined=hu;const pu=zt.create;S.null=pu;const mu=vt.create;S.any=mu;const _u=st.create;S.unknown=_u;const gu=Oe.create;S.never=gu;const vu=En.create;S.void=vu;const yu=Ee.create;S.array=yu;const bu=J.create;S.object=bu;const Eu=J.strictCreate;S.strictObject=Eu;const xu=Wt.create;S.union=xu;const Tu=xn.create;S.discriminatedUnion=Tu;const wu=qt.create;S.intersection=wu;const Su=Ae.create;S.tuple=Su;const Cu=Kt.create;S.record=Cu;const Iu=Tn.create;S.map=Iu;const Ru=it.create;S.set=Ru;const Au=bt.create;S.function=Au;const Du=Xt.create;S.lazy=Du;const Nu=Jt.create;S.literal=Nu;const ku=Ge.create;S.enum=ku;const Pu=Qt.create;S.nativeEnum=Pu;const ju=Et.create;S.promise=ju;const ms=xe.create;S.effect=ms,S.transformer=ms;const Ou=De.create;S.optional=Ou;const Zu=ze.create;S.nullable=Zu;const Mu=xe.createWithPreprocess;S.preprocess=Mu;const Lu=nn.create;S.pipeline=Lu;const Uu=()=>fs().optional();S.ostring=Uu;const $u=()=>hs().optional();S.onumber=$u;const Bu=()=>ps().optional();return S.oboolean=Bu,S.coerce={string:y=>fe.create({...y,coerce:!0}),number:y=>he.create({...y,coerce:!0}),boolean:y=>Ht.create({...y,coerce:!0}),bigint:y=>be.create({...y,coerce:!0}),date:y=>at.create({...y,coerce:!0})},S.NEVER=i.INVALID,S}var Si;function Ci(){return Si||(Si=1,function(e){var t=ut&&ut.__createBinding||(Object.create?function(r,a,s,i){i===void 0&&(i=s);var c=Object.getOwnPropertyDescriptor(a,s);(!c||("get"in c?!a.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(r,i,c)}:function(r,a,s,i){i===void 0&&(i=s),r[i]=a[s]}),n=ut&&ut.__exportStar||function(r,a){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(ss(),e),n(su(),e),n(tm(),e),n(Tr(),e),n(rm(),e),n(as(),e)}(ut)),ut}var Ii;function is(){return Ii||(Ii=1,function(e){var t=Te&&Te.__createBinding||(Object.create?function(i,c,l,d){d===void 0&&(d=l);var f=Object.getOwnPropertyDescriptor(c,l);(!f||("get"in f?!c.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return c[l]}}),Object.defineProperty(i,d,f)}:function(i,c,l,d){d===void 0&&(d=l),i[d]=c[l]}),n=Te&&Te.__setModuleDefault||(Object.create?function(i,c){Object.defineProperty(i,"default",{enumerable:!0,value:c})}:function(i,c){i.default=c}),r=Te&&Te.__importStar||function(i){if(i&&i.__esModule)return i;var c={};if(i!=null)for(var l in i)l!=="default"&&Object.prototype.hasOwnProperty.call(i,l)&&t(c,i,l);return n(c,i),c},a=Te&&Te.__exportStar||function(i,c){for(var l in i)l!=="default"&&!Object.prototype.hasOwnProperty.call(c,l)&&t(c,i,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.z=void 0;const s=r(Ci());e.z=s,a(Ci(),e),e.default=s}(Te)),Te}var lt={},zr={},dt={},Ri;function yn(){if(Ri)return dt;Ri=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.InvalidDidError=dt.DidError=void 0;class e extends Error{constructor(r,a,s,i=400,c){super(a,{cause:c}),Object.defineProperty(this,"did",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:i})}get statusCode(){return this.status}toString(){return`${this.constructor.name} ${this.code} (${this.did}): ${this.message}`}static from(r,a){if(r instanceof e)return r;const s=r instanceof Error?r.message:typeof r=="string"?r:"An unknown error occurred",i=(typeof(r==null?void 0:r.statusCode)=="number"?r.statusCode:void 0)??(typeof(r==null?void 0:r.status)=="number"?r.status:void 0);return new e(a,s,"did-unknown-error",i,r)}}dt.DidError=e;class t extends e{constructor(r,a,s){super(r,a,"did-invalid",400,s)}}return dt.InvalidDidError=t,dt}var ft={},Ai;function os(){var n;if(Ai)return ft;Ai=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.canParse=void 0,ft.isFragment=e,ft.isHexDigit=t;function e(r,a=0,s=r.length){let i;for(let c=a;c<s;c++)if(i=r.charCodeAt(c),!(i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===45||i===46||i===95||i===126)){if(!(i===33||i===36||i===38||i===39||i===40||i===41||i===42||i===43||i===44||i===59||i===61)){if(!(i===58||i===64)){if(!(i===47||i===63))if(i===37){if(c+2>=s||!t(r.charCodeAt(c+1))||!t(r.charCodeAt(c+2)))return!1;c+=2}else return!1}}}return!0}function t(r){return r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102}return ft.canParse=((n=URL.canParse)==null?void 0:n.bind(URL))??((r,a)=>{try{return new URL(r,a),!0}catch{return!1}}),ft}var ht={},We={},Di;function am(){if(Di)return We;Di=1,Object.defineProperty(We,"__esModule",{value:!0}),We.DID_PLC_PREFIX=void 0,We.isDidPlc=a,We.asDidPlc=s,We.assertDidPlc=i;const e=yn(),t="did:plc:";We.DID_PLC_PREFIX=t;const n=t.length,r=32;function a(l){if(typeof l!="string"||l.length!==r||!l.startsWith(t))return!1;for(let d=n;d<r;d++)if(!c(l.charCodeAt(d)))return!1;return!0}function s(l){return i(l),l}function i(l){if(typeof l!="string")throw new e.InvalidDidError(typeof l,"DID must be a string");if(!l.startsWith(t))throw new e.InvalidDidError(l,"Invalid did:plc prefix");if(l.length!==r)throw new e.InvalidDidError(l,`did:plc must be ${r} characters long`);for(let d=n;d<r;d++)if(!c(l.charCodeAt(d)))throw new e.InvalidDidError(l,`Invalid character at position ${d}`)}const c=l=>l>=97&&l<=122||l>=50&&l<=55;return We}var Wr={},pe={},Ni;function cs(){if(Ni)return pe;Ni=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.didSchema=pe.DID_PREFIX=void 0,pe.assertDidMethod=a,pe.extractDidMethod=s,pe.assertDidMsid=i,pe.assertDid=c,pe.isDid=l,pe.asDid=d;const e=is(),t=yn(),n="did:";pe.DID_PREFIX=n;const r=n.length;function a(f,p=0,_=f.length){if(!Number.isFinite(_)||!Number.isFinite(p)||_<p||_>f.length)throw new TypeError("Invalid start or end position");if(_===p)throw new t.InvalidDidError(f,"Empty method name");let v;for(let w=p;w<_;w++)if(v=f.charCodeAt(w),(v<97||v>122)&&(v<48||v>57))throw new t.InvalidDidError(f,`Invalid character at position ${w} in DID method name`)}function s(f){const p=f.indexOf(":",r);return f.slice(r,p)}function i(f,p=0,_=f.length){if(!Number.isFinite(_)||!Number.isFinite(p)||_<p||_>f.length)throw new TypeError("Invalid start or end position");if(_===p)throw new t.InvalidDidError(f,"DID method-specific id must not be empty");let v;for(let w=p;w<_;w++)if(v=f.charCodeAt(w),(v<97||v>122)&&(v<65||v>90)&&(v<48||v>57)&&v!==46&&v!==45&&v!==95){if(v===58){if(w===_-1)throw new t.InvalidDidError(f,'DID cannot end with ":"');continue}if(v===37){if(v=f.charCodeAt(++w),(v<48||v>57)&&(v<65||v>70))throw new t.InvalidDidError(f,`Invalid pct-encoded character at position ${w}`);if(v=f.charCodeAt(++w),(v<48||v>57)&&(v<65||v>70))throw new t.InvalidDidError(f,`Invalid pct-encoded character at position ${w}`);if(w>=_)throw new t.InvalidDidError(f,`Incomplete pct-encoded character at position ${w-2}`);continue}throw new t.InvalidDidError(f,`Disallowed character in DID at position ${w}`)}}function c(f){if(typeof f!="string")throw new t.InvalidDidError(typeof f,"DID must be a string");const{length:p}=f;if(p>2048)throw new t.InvalidDidError(f,"DID is too long (2048 chars max)");if(!f.startsWith(n))throw new t.InvalidDidError(f,`DID requires "${n}" prefix`);const _=f.indexOf(":",r);if(_===-1)throw new t.InvalidDidError(f,"Missing colon after method name");a(f,r,_),i(f,_+1,p)}function l(f){try{return c(f),!0}catch(p){if(p instanceof t.DidError)return!1;throw p}}function d(f){return c(f),f}return pe.didSchema=e.z.string().superRefine((f,p)=>{try{return c(f),!0}catch(_){return p.addIssue({code:e.z.ZodIssueCode.custom,message:_ instanceof Error?_.message:"Unexpected error"}),!1}}),pe}var ki;function sm(){return ki||(ki=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DID_WEB_PREFIX=void 0,e.isDidWeb=a,e.asDidWeb=s,e.assertDidWeb=i,e.didWebToUrl=c,e.urlToDidWeb=l,e.buildDidWebUrl=d;const t=yn(),n=cs(),r=os();e.DID_WEB_PREFIX="did:web:";function a(f){if(typeof f!="string"||!f.startsWith(e.DID_WEB_PREFIX)||f.charAt(e.DID_WEB_PREFIX.length)===":")return!1;try{(0,n.assertDidMsid)(f,e.DID_WEB_PREFIX.length)}catch{return!1}return(0,r.canParse)(d(f))}function s(f){return i(f),f}function i(f){if(typeof f!="string")throw new t.InvalidDidError(typeof f,"DID must be a string");if(!f.startsWith(e.DID_WEB_PREFIX))throw new t.InvalidDidError(f,"Invalid did:web prefix");if(f.charAt(e.DID_WEB_PREFIX.length)===":")throw new t.InvalidDidError(f,"did:web MSID must not start with a colon");if((0,n.assertDidMsid)(f,e.DID_WEB_PREFIX.length),!(0,r.canParse)(d(f)))throw new t.InvalidDidError(f,"Invalid Web DID")}function c(f){try{return new URL(d(f))}catch(p){throw new t.InvalidDidError(f,"Invalid Web DID",p)}}function l(f){const p=f.port?`%3A${f.port}`:"",_=f.pathname==="/"?"":f.pathname.replaceAll("/",":");return`did:web:${f.hostname}${p}${_}`}function d(f){const p=e.DID_WEB_PREFIX.length,_=f.indexOf(":",p),w=(_===-1?f.slice(p):f.slice(p,_)).replaceAll("%3A",":"),T=_===-1?"":f.slice(_).replaceAll(":","/");return`${w.startsWith("localhost")&&(w.length===9||w.charCodeAt(9)===58)?"http":"https"}://${w}${T}`}}(Wr)),Wr}var Pi;function iu(){return Pi||(Pi=1,function(e){var t=ht&&ht.__createBinding||(Object.create?function(r,a,s,i){i===void 0&&(i=s);var c=Object.getOwnPropertyDescriptor(a,s);(!c||("get"in c?!a.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(r,i,c)}:function(r,a,s,i){i===void 0&&(i=s),r[i]=a[s]}),n=ht&&ht.__exportStar||function(r,a){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(am(),e),n(sm(),e)}(ht)),ht}var qn={},ji;function ou(){if(ji)return qn;ji=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.matchesIdentifier=e;function e(t,n,r){return r.charCodeAt(0)===35?r.length===n.length+1&&r.endsWith(n):r.length===n.length+1+t.length&&r.charCodeAt(t.length)===35&&r.startsWith(t)&&r.endsWith(n)}return qn}var Oi;function im(){return Oi||(Oi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ATPROTO_VERIFICATION_METHOD_TYPES=e.isAtprotoAudience=e.atprotoDidSchema=void 0,e.isAtprotoDid=i,e.asAtprotoDid=c,e.assertAtprotoDid=l,e.assertAtprotoDidWeb=d,e.isAtprotoDidWeb=f,e.extractAtprotoData=T,e.extractPdsUrl=x,e.isAtprotoAka=I,e.isAtprotoPersonalDataServerService=R,e.isAtprotoVerificationMethod=D;const t=is(),n=yn(),r=os(),a=iu(),s=ou();e.atprotoDidSchema=t.z.string().refine(i,'Atproto only allows "plc" and "web" DID methods');function i(C){return(0,a.isDidPlc)(C)||f(C)}function c(C){return l(C),C}function l(C){if(typeof C!="string")throw new n.InvalidDidError(typeof C,"DID must be a string");if(C.startsWith(a.DID_PLC_PREFIX))(0,a.assertDidPlc)(C);else if(C.startsWith(a.DID_WEB_PREFIX))d(C);else throw new n.InvalidDidError(C,'Atproto only allows "plc" and "web" DID methods')}function d(C){if((0,a.assertDidWeb)(C),p(C))throw new n.InvalidDidError(C,"Atproto does not allow path components in Web DIDs");if(v(C))throw new n.InvalidDidError(C,"Atproto does not allow port numbers in Web DIDs, except for localhost")}function f(C){return!(!(0,a.isDidWeb)(C)||p(C)||v(C))}function p(C){return C.includes(":",a.DID_WEB_PREFIX.length)}function _(C){return C==="did:web:localhost"||C.startsWith("did:web:localhost:")||C.startsWith("did:web:localhost%3A")}function v(C){if(_(C))return!1;const j=C.indexOf(":",a.DID_WEB_PREFIX.length);return j===-1?C.includes("%3A",a.DID_WEB_PREFIX.length):C.lastIndexOf("%3A",j)!==-1}const w=C=>{if(typeof C!="string")return!1;const j=C.indexOf("#");return j===-1||C.indexOf("#",j+1)!==-1?!1:(0,r.isFragment)(C,j+1)&&i(C.slice(0,j))};e.isAtprotoAudience=w;function T(C){var j,O,L,H;return{did:C.id,aka:(O=(j=C.alsoKnownAs)==null?void 0:j.find(I))==null?void 0:O.slice(5),key:(L=C.verificationMethod)==null?void 0:L.find(D,C),pds:(H=C.service)==null?void 0:H.find(R,C)}}function x(C){var O;const j=(O=C.service)==null?void 0:O.find(R,C);if(!j)throw new n.DidError(C.id,`Document ${C.id} does not contain a (valid) #atproto_pds service URL`,"did-service-not-found");return new URL(j.serviceEndpoint)}function I(C){return C.startsWith("at://")}function R(C){return(C==null?void 0:C.type)==="AtprotoPersonalDataServer"&&typeof C.serviceEndpoint=="string"&&(0,r.canParse)(C.serviceEndpoint)&&(0,s.matchesIdentifier)(this.id,"atproto_pds",C.id)}e.ATPROTO_VERIFICATION_METHOD_TYPES=Object.freeze(["EcdsaSecp256r1VerificationKey2019","EcdsaSecp256k1VerificationKey2019","Multikey"]);function D(C){return typeof C=="object"&&typeof(C==null?void 0:C.publicKeyMultibase)=="string"&&e.ATPROTO_VERIFICATION_METHOD_TYPES.includes(C.type)&&(0,s.matchesIdentifier)(this.id,"atproto",C.id)}}(zr)),zr}var qr={},Zi;function om(){return Zi||(Zi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.didDocumentValidator=e.didDocumentSchema=void 0;const t=is(),n=cs(),r=os(),a=t.z.string().url("RFC3968 compliant URI"),s=t.z.union([n.didSchema,t.z.array(n.didSchema)]),i=t.z.union([a.refine(v=>{const w=v.indexOf("#");return w===-1?!1:(0,r.isFragment)(v,w+1)},{message:"Missing or invalid fragment in RFC3968 URI"}),t.z.string().refine(v=>v.charCodeAt(0)===35,{message:"Fragment must start with #"}).refine(v=>(0,r.isFragment)(v,1),{message:"Invalid char in URI fragment"})]),c=t.z.object({id:i,type:t.z.string().min(1),controller:s,publicKeyJwk:t.z.record(t.z.string(),t.z.unknown()).optional(),publicKeyMultibase:t.z.string().optional()}),l=i,d=t.z.union([t.z.string(),t.z.array(t.z.string())]),f=t.z.union([a,t.z.record(t.z.string(),a),t.z.array(t.z.union([a,t.z.record(t.z.string(),a)])).nonempty()]),p=t.z.object({id:l,type:d,serviceEndpoint:f}),_=t.z.union([i,c]);e.didDocumentSchema=t.z.object({"@context":t.z.union([t.z.literal("https://www.w3.org/ns/did/v1"),t.z.array(t.z.string().url()).nonempty().refine(v=>v[0]==="https://www.w3.org/ns/did/v1",{message:"First @context must be https://www.w3.org/ns/did/v1"})]).optional(),id:n.didSchema,controller:s.optional(),alsoKnownAs:t.z.array(a).optional(),service:t.z.array(p).optional(),authentication:t.z.array(_).optional(),verificationMethod:t.z.array(c).optional()}),e.didDocumentValidator=e.didDocumentSchema.superRefine(({id:v,service:w},T)=>{if(w){const x=new Set;for(let I=0;I<w.length;I++){const R=w[I],D=R.id.startsWith("#")?`${v}${R.id}`:R.id;x.has(D)?T.addIssue({code:t.z.ZodIssueCode.custom,message:`Duplicate service id (${R.id}) found in the document`,path:["service",I,"id"]}):x.add(D)}}})}(qr)),qr}var Mi;function wm(){return Mi||(Mi=1,function(e){var t=lt&<.__createBinding||(Object.create?function(r,a,s,i){i===void 0&&(i=s);var c=Object.getOwnPropertyDescriptor(a,s);(!c||("get"in c?!a.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(r,i,c)}:function(r,a,s,i){i===void 0&&(i=s),r[i]=a[s]}),n=lt&<.__exportStar||function(r,a){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(im(),e),n(om(),e),n(yn(),e),n(cs(),e),n(iu(),e),n(ou(),e)}(lt)),lt}export{Of as A,xm as B,Nf as C,Qi as D,dm as E,vd as F,Em as G,fm as H,mm as I,ac as J,Wi as K,Fi as L,Fe as M,pm as N,Re as P,mf as R,_m as S,Qe as a,Ye as b,Ki as c,Ll as d,ym as e,me as f,ro as g,no as h,bm as i,Jr as j,vm as k,Lf as l,jf as m,em as n,go as o,Ra as p,Tm as q,Ia as r,gm as s,is as t,kt as u,wm as v,md as w,Af as x,ml as y,Hi as z};
|
|
60
|
-
//# sourceMappingURL=index-BtIdBUOA.js.map
|